16

Are there any tools to facilitate a migration from Sourcegear's Vault to Subversion?

I'd really prefer an existing tool or project (I'll buy!).

Requirements:

  1. One-time migration only
  2. Full history with comments

Optional:

  1. Some support for labels/branches/tags
  2. Relatively speedy. It can take hours but not days.
  3. Cost if available

Bonus points if you can share personal experience related to this process.


One of the reasons I'd like to do this is because we have lots of projects spread between Vault and Subversion (we're finally away from sourcesafe). It'd be helpful in some situations to be able to consolidate a particular customer's repos to SVN.

Additionally, SVN is better supported among third party tools. For example, Hudson and Redmine.

Again, though: we're not abandoning vault altogether.

Jon Seigel
  • 11,819
  • 8
  • 53
  • 90
Michael Haren
  • 97,268
  • 39
  • 159
  • 200
  • A few have asked why I am leaving Vault. It's not about abandoning vault or favoring SVN--my company uses both. It'd just be helpful in some situations to be able to move from one to the other. – Michael Haren Oct 08 '08 at 18:06
  • Hmm. I wonder if Eric Sink reads Stackoverflow and if he wants to make some quick rep by implementing this feature in Vault. – Chris Upchurch Feb 03 '09 at 00:24
  • I doubt this is something he'd be happy to have. – Michael Haren Feb 03 '09 at 13:25
  • 2
    I don't know about that. A great way to entice people to try your product is to make it easy to switch back if they don't like it. http://www.joelonsoftware.com/articles/fog0000000052.html – Chris Upchurch Feb 07 '09 at 15:16

5 Answers5

19

We are thinking about migrating from vault to git. I wrote vault2git converter that takes care of history and removes vault bindings from *.sln, *.csproj files.

Once you have git repo, there is git2svn.

I know it sounds like going rounds, but it might be faster than writing vault2svn from scratch.

  • 3
    Here is the URL to git2svn: http://github.com/AndreyNikiforov/vault2git I am not sure it is any good, but was bothering me that no link was included. – Tod Birdsall Aug 30 '10 at 20:03
  • 2
    I was also having this problem, but we are on an older version of Vault (3.1.9). I forked Andrey's repo and altered it to work with our version of Vault. https://github.com/jocull/vault2git - There should be a branch called vault_api_3.1.9 – jocull May 01 '11 at 16:34
  • @Andrey I want to buy you a drink to say thanks, but can't find your contact info. Vault2Git represents such a contribution; thank you! : o ) – iokevins May 12 '16 at 03:03
  • 1
    @jocull et al., here's another Vault2Git fork, to support v3.1.9 : https://bitbucket.org/bbuchanan/vault2git – iokevins May 12 '16 at 03:06
  • It should be said that Vault2Git ships with DLLs for 4.0.6, but it seems you can go all the way to current versions: Roel van Lisdonk documented upgrading his Vault Server, from v3.1.9, to v9.x, then used Vault2Git, with the 9.x client API DLLs, to export the data: https://www.roelvanlisdonk.nl/?p=4709 – iokevins May 12 '16 at 03:12
8

If you want full version history, you may want to just write a script that checks out each version from vault and checks it in with the comments to Subversion.

https://www.mercurial-scm.org/wiki/GenericConversion is a good example

Based on the documentation that I saw on the Vault website, look into the command line GETVERSION.

Use your favorite scripting language... Implement the following process:

  1. Check out a version from vault.
  2. Get the commit comments for the changeset.
  3. Add/remove the files to the SVN repo
  4. Commit files using the commit comments
  5. Go back to step one with the next version
Vadim Kotov
  • 7,103
  • 8
  • 44
  • 57
Joshua
  • 24,418
  • 22
  • 74
  • 106
  • This is what we had started to do but I thought I might as well ask SO to see if something exists already. Thanks for the link, though! – Michael Haren Sep 11 '08 at 23:47
  • Any tips on how to implement the Vault side of that? – Michael Haren Jan 29 '09 at 14:42
  • I dont have vault so I cant give you the exact commands, but GETVERSION and HISTORY are commands that should be researched. – Joshua Jan 30 '09 at 03:41
  • This is the best help so far but it's really not what I was hoping for. – Michael Haren Jan 30 '09 at 15:28
  • I can recommend http://sharpsvn.net/ for the Subversion side.. But I don't have any experience on the vault side. – Bert Huijben Jan 31 '09 at 01:30
  • One of the issues is that while Svn has a repo-wide version number, that changes on each commit, vault doesn't. Each folder/file is versioned individually, making the concept of a changeset a little harder to determine – Michael Haren Feb 02 '09 at 15:33
  • Can you get the full comment history and the files associated with each comment? You could group the files that way. Another possibility is to use the labels to group the changes. – Joshua Feb 03 '09 at 00:25
  • Joshua, I appreciate your help here. Your suggestions are good, but they don't really answer my question. What I've done is what @Brettski suggested--I'm going to have to go with him. – Michael Haren Feb 03 '09 at 19:04
2

I never found an easy way to convert from Vault to svn. Basically we took our latest branches and trunk and started new in svn. Honestly I went two or three labels back, just because. I kept the vault db around for six months and we never needed to go back to it for data. So I assume you want to carry forward your history for a bug tracker tie-in; at this same time we transferred our outstanding bug list to a new tracker, so that definitely made things more convenient. If we where staying with the same bug tracker, I would think we would of started a new instance of it for the new repo. Good Luck!

Brett

Brettski
  • 17,234
  • 13
  • 67
  • 85
0

Free. The vault user license costs have tripled since we went to it.

  • I dont know how your answer is relevant, but its true. This is one of the main reasons im moving to SVN (in addition to mac client availability) – schmoopy Jul 25 '11 at 22:27
0

We are considering migration as well. One reason is cost, but another reason is that Vault does not use valid xml (or any) for its commit comments so special characters fail our automated CCNet build system (e.g. a bullet character is one of them, and specifically causes us a problem). A way around this has been to A) ask our developers to not use these special, "invalid" characters (characters outside the range of ASCII 32 - 126) and B) to manually go in and re-commit code with a "valid" comment. This may not seem like a big deal, but not allowing these characters prevents easy copy/paste of bug and other comments into the commit comment. This slows people down and anything that hinders flow and productivity and creates frustration needs to be reduced or removed.

From my research, it seems that there is no way to directly migrate from Vault to SVN. Perhaps it is possible to use another version control system as a migration middle step: Vault --> OtherSourceControlProduct --> SVN

...but I think that we would either script the commits (as Joshua suggested at the beginning of this thread) or - which more likely - just commit the last few revisions and leave the Vault repos around a while for history, etc. This actually gives us a a good opportunity to clean out and refactor our current code and hierarchy.

Paul