views:

1470

answers:

5

What's the best way to move a Visual Sourcesafe repository to Mercurial (I'm interested in retaining all history)?

+6  A: 

While I haven't made that particular conversion, I have gone from VSS to SVN using (IIRC) this script. You'll probably want to look into tailor and do a search for vss2hg. Also keep in mind that it may make sense to go through an intermediate step like vss2svn + svn2hg or similar.

The primary bit of advice I'd give though is: script the conversion so you can re-run it easily. That will let you run nightly conversions from VSS to Hg and make sure that everything is converting correctly before you pull the trigger on it.

retracile
+5  A: 

The Mercurial wiki has this page, which might be of interest: http://www.selenic.com/mercurial/wiki/SourceSafeConversion. I've never used Visual source safe, so I don't have any personal experience with it.

I also found a mail from Patrick Mézard about the subject, but unfortunately he writes that a VSS converter will be difficult. He also talks about converting to Subversion first, and then from Subversion to Mercurial. I guess that means that there are VSS -> SVN converts out there. You can probably google that yourself.

Martin Geisler
+3  A: 

I used the vss2hg.pl script from here. It is a Perl script, so you need to install ActivePerl first.

It worked great, but I ran into a problem with the dates. It turns out that the script supports three kinds of date formats. By default it is set to the UK date format (in line 547). The other two date formats are commented out in the code. After enabling the US date format, the script converted my SourceSafe database without a problem.

Edmund
+3  A: 

I am the author of the vss2hg.pl script and have used it to move many projects from VSS to Mercurial. It has one or two minor bugs where some comments are not completely converted but I haven't seen any other issues. It converts complete history and works-around a problem with VSS where a user's PC clock can affect the order in which changes appear to be made.

It has recently moved to a new website: http://trojanfoe.org.uk/vss2hg

trojanfoe
A: 

I just tried using vss2hg and ran into a problem that it only pickup up and converted 1 user. This means all my changesets etc will not be accurate as I won't be able to see who did them. Is this because I've not pre-setup all the required users in hg?

Matt B
You might have better luck asking this as its own question.
David Coufal