Skip to content

SourceGear Vault project to Git repository converter.

License

Notifications You must be signed in to change notification settings

EngJay/vault2git

 
 

Repository files navigation

vault2git


Project license

Pull Requests welcome made with love by EngJay

codecov

Table of Contents

About

The vault2git gem provides a simple command line tool for migrating a SourceGear Vault project to a Git repository.

This fork of the original Ruby script by @slamotte updates the dependencies to current, adds quality control, converts the script to a gem available from the RubyGems repostiory, and will add a few additional features in subsequent releases.

Ultimately, the aim is to provide a simple to use, high-quality command line tool for migrating a project from SourceGear Vault to Git in high-scrutiny contexts. The key new feature planned is automatic validation of a migration by generating and comparing hashes of each Vault check-in against the correpsonding Git commit.

Process

Given a Vault project path, vault2git creates a new Git repository, fetches the list of Vault check-ins, then iterates through each of the check-ins performing the following steps:

  • clear out the Git repository folder (except .git* files)
  • fetch the current check-in's files from Vault
  • add and commit the files to Git, including a commit message that is either the message associated with the Vault check-in or its metadata.

The comments written to Git include the original Vault comments (if any) plus a one-liner containing the original Vault version number, check-in time, etc. The original Vault check-in time is used as the commit's time.

Built With

  • Ruby
  • log4r
  • nokogiri

External Dependencies

  • Git
  • SourceGear Vault client

Getting Started

Prerequisites

  • Have Git installed.
  • Have a SourceGear Vault client installed.
  • Have the current stable version of Ruby (3.1.2).

Installation

To install vault2git, install the gem at the user level using bundler. This will install it to a hidden directory in the root of the user account which might need to be added to the path.

$ bundle install --user-install vault2git

Usage

Usage: vault2git [options] $/source/folder dest/folder

Specific options:
    -s, --host host                  The repository hostname/ip address
    -r, --repo name                  The repository name
    -u, --username [username]        The repository user
    -p, --password [password]        The repository user's password
        --vault-client-path path-to-vault.exe
                                     Path to vault.exe, defaults to C:\Program Files\SourceGear\Vault Client\vault.exe
        --git-path path-to-git.exe   Path to git.exe, defaults to git
        --logfile filename           File to log to (defaults to vault2git.log)
    -h, --help                       Display this help screen

Wrap parameter values in double-quotes as required. IMPORTANT: the paths MUST use forward slashes to delimit folders even in Windows.

Support

Reach out to the maintainers by opening an issue.

Project Assistance

If you want to say thank you or/and support active development of vault2git:

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

To contribute to vault2git, open an issue or a pull request with your proposal and the maintainers will respond. Please note we have a code of conduct; please follow it in all your interactions with the project, and thank you for being involved!

Security

This project follows good practices of security, but 100% security cannot be assured. The vault2git RubyGem is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the MIT license.

See LICENSE for more information.

Acknowledgements

This appears to be the original C# project: vault2git by Andrey Nikiforov (@AndreyNikiforov) and Jevgeni Zelenkov (@jayzelenkov).

Contribution of the original Ruby port from which this project is forked: Steve Lamotte (@slamotte)

About

SourceGear Vault project to Git repository converter.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 96.7%
  • Gherkin 2.6%
  • Shell 0.7%