These are my notes for using the VSS2SVN tool to migrate a project from Visual Source Safe to Subversion. These notes were tested using Windows 7 32bit edition.
- Download and install VisualSVN Server version 1.6. It’s very important to install version 1.6 for the purposes of the migration. This version is very old but is required for the VSS2SVN application. VisualSVN luckily make all previous versions available so this is very handy.
- Download and install VSS2SVN.
- Make a copy of your SourceSafe database. This is the directory where VSS has been storing all your revision data. In this directory will be a file called “srcsafe.ini”. Don’t work with the original unless you like taking risks.
- Open the VisualSVN Server interface.
- Select “Create new user”
- Create a user account for yourself
- Right click on “Repositories” and chose “Create New Repository…”
- Enter a name corresponding to the name of the project you are migrating. Select “Create default structure”.
- I don’t get it and I don’t know why, but you must set a pre-revision property change hook. Right click your repo and choose “Properties”. Go to the “Hooks” tab, click “Pre-revision property change hook” and click “Edit”. In the textbox enter:
exit /b 0 - Now we need to analyse your VSS repo becuase most of the time there are corruptions and VSS2SVN wont work if thats the case. From the command line enter:
"C:\Program Files\Microsoft Visual SourceSafe\analyze.exe" -F -V3 -D "c:\path\to\your\copy\of\the\sourcesafe\database\'data'\directory"
- If that step fails, your VSS database might be too corrupt to migrate (or even use)
- Check out a working copy of the Subversion repository you just created. From the command line enter:
"C:\Program Files\VisualSVN Server\bin\svn" co http://<HOSTNAME>/svn/<REPO NAME>/trunk/ c:\path\to\working\copy
- Now open VSS2SVN. Enter the following settings:
- Path to Scrsafe.ini: Enter the path to srcsafe.ini in your copy of the VSS database you made
- Username: The username you created in VisualSVN
- Password: The password you chose when creating the user in VisualSVN
- VSS project to use: Enter a dollar symbol ($) followed by a backslash (\) followed by the name of your VSS project as can be found using the Visual SourceSafe Explorer that comes with VSS. Eg:
$\MyProject
- Click “Find files in source safe”. If you get an error saying a weird file like nbaaaaaa.b was not found, your VSS repo is probably corrupt and you need to run the analyse tool as mentioned above.
- For “Working Directory” enter the path to your Subversion working directory you created when checking out above.
- For “SVN path to use” enter URL of the trunk of your Subversion repositiory you created. Eg:
http://<HOST NAME>/svn/repos/<REPO NAME>/trunk/ - Click “Migrate to subversion”
- Sit back; it might take a while
After you’ve migrated all your projects, it would advisable to upgrade your VisualSVN and Subversion.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.