Any tool to migrate repo from Vault to Subversion?
Asked Answered
R

5

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.

Rainwater answered 11/9, 2008 at 20:27 Comment(4)
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.Rainwater
Hmm. I wonder if Eric Sink reads Stackoverflow and if he wants to make some quick rep by implementing this feature in Vault.Incorporated
I doubt this is something he'd be happy to have.Rainwater
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. joelonsoftware.com/articles/fog0000000052.htmlIncorporated
G
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.

Giddy answered 11/9, 2008 at 20:27 Comment(5)
Here is the URL to git2svn: github.com/AndreyNikiforov/vault2git I am not sure it is any good, but was bothering me that no link was included.Marmoset
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. github.com/jocull/vault2git - There should be a branch called vault_api_3.1.9Caseate
@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 )Phosphorism
@Caseate et al., here's another Vault2Git fork, to support v3.1.9 : bitbucket.org/bbuchanan/vault2gitPhosphorism
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: roelvanlisdonk.nl/?p=4709Phosphorism
F
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
Finnish answered 11/9, 2008 at 23:43 Comment(8)
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!Rainwater
Any tips on how to implement the Vault side of that?Rainwater
I dont have vault so I cant give you the exact commands, but GETVERSION and HISTORY are commands that should be researched.Finnish
This is the best help so far but it's really not what I was hoping for.Rainwater
I can recommend sharpsvn.net for the Subversion side.. But I don't have any experience on the vault side.Artillery
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 determineRainwater
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.Finnish
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.Rainwater
E
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

Eager answered 11/9, 2008 at 21:0 Comment(0)
N
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

Nonsmoker answered 11/9, 2008 at 20:27 Comment(0)
S
0

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

Student answered 11/9, 2008 at 20:27 Comment(1)
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)Overflight

© 2022 - 2024 — McMap. All rights reserved.