views:

1206

answers:

6

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.

A: 

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
+5  A: 

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.

http://www.selenic.com/mercurial/wiki/index.cgi/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
Joshua
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
Any tips on how to implement the Vault side of that?
Michael Haren
I dont have vault so I cant give you the exact commands, but GETVERSION and HISTORY are commands that should be researched.
Joshua
This is the best help so far but it's really not what I was hoping for.
Michael Haren
I can recommend http://sharpsvn.net/ for the Subversion side.. But I don't have any experience on the vault side.
Bert Huijben
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
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
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
A: 

OT: I'm curious as to why you are abandoning Vault

Rik Garner
This belongs in a comment, it is not an answer.
bdukes
+1  A: 

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

A: 

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

pogaz
+1  A: 

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.

Andrey Nikiforov
Here is the URL to git2svn:http://github.com/AndreyNikiforov/vault2gitI am not sure it is any good, but was bothering me that no link was included.
Tod1d