-
Notifications
You must be signed in to change notification settings - Fork 51
Home
AndreyNikiforov edited this page Sep 21, 2010
·
5 revisions
vault2git
Convert history from Vault repo into Git repo
- Download Vault Client API for your version of Vault (you have to use version matching your Vault server); other option is to copy *.dll from Vault client installation
- Replace Vault2GitLib/libs/*.dll with your files
- Recompile
- Install Git (msysgit is the easiest way); Configure it (email, name etc)
- Create empty folder and init Git repo in it. This is your Git repo and Vault working folder.
- Place .gitignore into your working folder. The one from vault2git may be a good starting point.
- Create initial commit, e.g. git commit —allow-empty —message=“inital commit”
- Create branches from initial commit, e.g. git branch br1
- Change .config file to match your setup (vault login account, branch mappings etc). Note: Git branches specified in mappings should already exist (vault2git does not create branches itself) — see prev step
- run vault2git.exe.
Run vault2git —help for additional command line parameters
- vault2git gets changesets from Vault into working folder one by one and commits each into Git. Vault bindings are stripped from *.sln, *.csproj, *.vdproj files.
- Commit message is taken from Vault. Info about Vault revision and paths are appended to the commit message:
[git-vault-id] VaultRepo$/VaultPath@VaultRevision/VaultTrxNumber - Dates of the files are not preserved.
- Commit dates are preserved
- Author names are preserved and company domain (from .config) is appended.
- Empty commits are converted too
When ran again, vault2git first checks for [git-vault-id] tag in latest git commit, parses revision number (after @)
and pulls Vault data above found number only.
- Every 200 git commits, Git garbage collection is executed.
- After processing is complete, finalization executes git update-server-info, which updates data in Git repo for dumb server (e.g. read-only http sharing with iis)
Last Updated: 2010-09-21
Author: Andrey Nikiforov
Location: github.com/AndreyNikiforov/vault2git