David Coufal
David Coufal

Reputation: 6371

Moving from Visual Sourcesafe to Mercurial

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

Upvotes: 19

Views: 5168

Answers (6)

trojanfoe
trojanfoe

Reputation: 122401

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.

A version of the script is available here.

Upvotes: 13

Martin Geisler
Martin Geisler

Reputation: 73788

The Mercurial wiki has this page, which might be of interest: https://www.mercurial-scm.org/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.

Upvotes: 5

Petter Wigle
Petter Wigle

Reputation: 862

I have done a conversion from SourceSafe to Mercurial for a client. I first converted the SourceSafe database to a Subversion repository and then from Subversion to Mercurial using the hg convert extension. See my blog post for details.

Upvotes: 3

Matt B
Matt B

Reputation: 761

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?

Upvotes: 0

Edmund
Edmund

Reputation: 131

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.

Upvotes: 6

retracile
retracile

Reputation: 12339

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.

Upvotes: 14

Related Questions