This is an improved version of the Perl migration script (migrate.pl) found at "Visual SourceSafe to Subversion Migration" by Brett Wooldridge.
I have added the following features:
- Group VSS file check-ins by user, time and comment into atomic commits into Subversion. It is reasonable that all files checked in by the same user, at the same time, and with the same comment, are part of the same fix and should be checked in at the same time in the Subversion repository.
- Handle directory names and file names that contain spaces.
- Handle line breaks and special characters in comments.
- Allow running the script multiple times to migrate check-ins done after the previous migration.
- Note that I have changed the command line arguments a little, and changed the meaning of some of them slightly. In particular, --repos is the URL of an existing directory in the Subversion repository into which the contents of the VSS project (project argument) should be migrated. --restart has been renamed --resume, and I have added --migrate-latest.
- Also note that because I live in Sweden, I use a locale that displays dates as "2006-12-22" and times as "15:29:48". I have therefore modified the script to parse this date and time format from the VSS file histories. (See line 437 in the script.)
- The commit time for each commit is set to the original VSS check-in time. For this to work you must create the pre-revprop-change hook in the SVN repository and in it allow setting the svn:date revision property.
Here is the runtime help:
C:\temp\new-migrate>perl migrate.pl --help Usage: migrate [options] project Migrate a Visual SourceSafe project to Subversion. --resume resume the migration from last checkpoint --migrate-latest refresh history and atoms, and resume after last checkpoint --ssrepo=<dir> repository path, e.g. \\share\vss --sshome=<dir> VSS installation directory --repos=<url> URL for the Subversion repository --force-user=<user> force the files to be checked into Subversion as as user <user> --dumpusers after pre-processing the VSS repository, create a users.txt file which can be used to create comparable accounts in Subversion. The migration can be resumed without penalty by using the --resume option
I run migrate.pl from a Command Prompt using ActiveState's perl.
Bug fixes
Problem with $*
Further development