Bite my bytes

What I learn by day I blog at night - A blog from Microsoft Consultant working from Ljubljana, Slovenia

  Home :: Contact :: Syndication  
  999 Posts :: 7691 Comments :: 235 Trackbacks


Most popular posts
in last 360 days


My Projects



Copyright © by David Vidmar
Contact me!
LinkedIn Profile

Lately I was very successful at evangelizing Subversion at turning people away from SourceSafe. Before you can turn developers away from anything, solid migration strategy is needed so here is how I do it...

Step 0: Setup Subversion

You need to set up Subversion, create at least one repository and create logins. This is quite simple if you follow instructions.

If you don't need to expose Subversion to the world, you really don't have to bother with Apache. Just set up svnserve to run as a window service and of you go. If you run Linux, you probably already have Apache up and running so you can use that.

My tip: I usually ad extra repository for developers to play with, store their own projects and so on. Tell developers, that they can store SQL files, configurations files, documents and much more on Subversion. It's not just for code! One day you'll be thankful they did. I also use this repository for test migrations.

When your Subversion server is up and running you can do migration.

Step 1 (optional): Check in everything

It's a good idea to tell everyone to check in the changes they have made and stop changing the code. Since this is not always possible you can skip this step and do little wrapping up at the end.

Step 2-A: If you just want to move source code and you don't care about source code history

This is a simple and fast way to migrate. You will not loose your history it will just become split. Before migration you will have to look it up in SourceSafe and from migration on it lives in Subversion. For small projects and teams this just might be good enough. But if you have a large team or want to completely get rid of SourceSafe skip to next chapter and migrate your history too!

Get latest version of your source code from SourceSafe.

Open the solution/project or whatever your current IDE calls the main wrapper around your code and unbind and disconnect from SourceSafe. Only Deleting .vsscc, .vssscc files will not help. At least not in .NET. .NET project files (*.csproj, *.vbproj) also have information about source control server so it's easiest to do it from Development Environment.

Create a new folder on Subversion server and do an initial commit of all your files.

Step 2-B: If you would like to carry source code history to new Subversion server

I use a utility VSSMigrate to do migrations when I need to preserve history. Since source code is available I did some minor adjustments to the code, especially handling special characters in comments and file names.

I usually prepare a migration folder like this:

  • /win32 - I put a copy of SourceSafe 6.0d in here. Utility will run ss.exe heavily and 6.0d is a recommended version. If you only have 6.0 be sure to install Visual Studio 6 service pack 6.
  • /work - temporary folder VSSMigrate utility will use.
  • /VSSMigrate - copy of VSSMigrate executables in there.

VSSMigrate is little tricky. You should always run it from it's own directory so I create run.bat file and call that. You should provide a .ini file with settings as the only parameter.

I put VSSMigrate .ini in root of my migration folder for easy access. If you run VSSMigrate and it says it didn't find ss.exe it's usually because you didn't run it from it's folder. I got burned by this several times.

Another problem you might encounter is missing SSDIR environment variable. Best way to solve this is to put something like

set ssdir=\\<vssserver>\<vssfolder>\

in run.bat which I mentioned before.

Do a test migration first. Setup you VSSMigrate.ini so that it will do a migration in completely separate repository so you don't mess up with your production repo until you are ready. If you encounter an error during migration you can usually see what has gone wrong from the error message and text files in your working folder. If your migration fails you should open Repository Browser, delete migrated files, get rid of a problem and start again.

If you have problems with special characters in filenames you can rename them on SourceSafe before migrating.

I also had trouble with Unicode comments that were copy/pasted from email and I had to dig into C++ code of VSSMigrate and filter them. So you'll want to get VSSMigrate code, import it into your own Subversion source control and recompile. You'll need VS 2003 or VS 2005 with Visual C++ install in order to compile it.

I also changed original project so that MFC library is statically linked if you'll run this on a server without libraries installed.

Step 3: Cleanup

Now it's good time to get rid of all the files that don't belong to source control. Since you are protected by Subversion you can afford to make mistakes. In VS 2005 you can click on "Clean Solution" if you right click on Solution in Solution Explorer. For VS 2003 your best bet is Cleanup Sources Plus. You can also use Cleanup for VS.NET 2003 Solutions tool which does a good job of cleaning up. Don't forget to commit your changes.

My tip: rename your projects folder on SourceSafe. This way if anyone by accident still uses old source code they will get an error that the project doesn't exists. But the code is not lost. It's just under renamed directory. I usually use name = "_MOVED_TO_SVN_" + old_name.

What you really want to do after migration is to compare latest code from SourceSafe and latest from Subversion and compare them. I exclusively use WinMerge for code comparison but you might prefer another tool. 

At this time you'll also want to tell developers that didn't check in files before you started migration to simply copy changed files over those that are under Subversion source control and check for changes.

Step 4: It's a wrap

That's is. You developers should now install TortoiseSVN, VisualSVN and any other Subversion client and under an hour you can teach them how to live peaceful life where code is safe.


If you need help with your migration, drop me a line using my contact form or comments and we will work something out!

Browse related articles on this site!

Posted on Saturday, October 27, 2007 7:49 PM | Filed under: Developement |


# re: Migrating from SourceSafe to Subversion 10/29/2007 4:24 PM Dan
I didn't know about Clean Source until now so thanks for that. If you wnat ot double-check that it has expunged the VSS stuff from your files, have a look at where I put some steps down to do it maually.


# re: Migrating from SourceSafe to Subversion 10/29/2007 4:52 PM David
Dan, thanx for the tip!
I occasionally do manualk remove in notepad, but I find opening a solution, disconnecting a simpler way, especially for a tutorial like this.

# Subversion integration into Visual Studio 10/29/2007 10:35 PM Bite my bytes
Subversion integration into Visual Studio

# Subversion and TortoiseSVN tips and tricks 12/11/2007 10:33 PM Bite my bytes
Subversion and TortoiseSVN tips and tricks

# re: Migrating from SourceSafe to Subversion 3/12/2008 6:52 PM Phil
Having problems with VSSmigrate.exe. Does not recognize the user or password and I get the following errors: in FileList.txt:::

cat FileList.txt
T:\vsscopy\BillingAutomation_copy\$/ComPlusBuild is not valid SourceSafe syntax


$/ComPlusBuild is not an existing filename or project

seems vss2svn was much faster and easier to setup I was able to do a successful convert the first time. But I want to just have the latest version with history converted not the whole VSS repository.

any step by step help would be nice ;-)


# re: Migrating from SourceSafe to Subversion 3/27/2008 5:14 PM Arno

Thanks for your tutorial...

I've got everything working well, except when I have spaces in the directory name.

If I want to migrate the following VSS folder $/01 - Development, VSSMigrate is saying there is no existing project named $/01 and no existing project named Development.
I tried using quotes or double quotes, but it's not working.

In my config.ini file: VSSPROJ=$/01 - Development

Any ideas of what I can do to migrate this project (without having to rename it in VSS)?


Best regards


# re: Migrating from SourceSafe to Subversion 4/29/2008 5:11 PM Mark Stenzler
Is it planned that the next version of VSSMigrate will include the transfer of the VSS labels?

This is very important to us.



# re: Migrating from SourceSafe to Subversion 5/9/2008 8:51 AM Claus
We have troubles with the german "Umlaute" (ä,ü,ö, ...) in filename. Because VSSMigrate can't convert these characters tu UTF-8.
A stupid workaround is, to rename alle files in VSS before starting migration, but i can't check and rename tousend of files (excel-, word-, ppt-files, ... no sources!)

Have anybody an idea to solve this problem?

Thank you!


# re: Migrating from SourceSafe to Subversion 5/9/2008 7:55 PM David
@Claus: I had the same problem with Slovenian characters (š, č, ž). I have modified the code a bit to solve it. If you can't figure it out, I can send you my modified code as a start.

# re: Migrating from SourceSafe to Subversion 5/21/2008 12:59 PM Johnson

Thanks for the information. This worked fine, except for a few minor issues:

- The date/time of all the revisions are displaying the migrated date/time.
- It shows the author of the revision as 'Admin', the SVN user which was specified in the VSSMigrate.ini file.

How do we rectify these issues? Kindly help.


# re: Migrating from SourceSafe to Subversion 6/5/2008 1:22 PM David
Those are both solvable with a little bit of C++ coding, but I didn't go that far.


# re: Migrating from SourceSafe to Subversion 10/10/2008 2:57 AM RS

Thanks for the instructions. I'm having an issue though. The directory structure is migrated fine, but the program keeps giving me the following prompt on every revision of every file:

The system cannot accept the date entered.
Enter the new date: (mm-dd-yy)

Any ideas?

Thanks again.

# re: Migrating from SourceSafe to Subversion 4/21/2009 4:13 PM Yash Shah
I always get the same error below no matter what parameters I enter in config.ini.

Please help me as I need this solution working as soon as possible...


Usage: VSSMigrate <full path to config.ini>

The configuration INI file should contain:
VSSWIN32=<dir> # VSS\Win32 directory which contains ss.exe
VSSDIR=<dir> #VSS repository directory (contains srcsafe.ini)
VSSPROJ=<proj> #VSS project to start at (ie $/Product)
VSSUSER=<user> #User to use for VSS commands, use blank for none
VSSPASSWORD=<password> #password to use for VSS commands, blank is OK

SVNWIN32=<dir> # VSS\Win32 directory which contains ss.exe
SVNUSER=<user> #User to use for SVN commands, use blank for none
SVNPASSWORD=<password> #password to use for SVN commands, blank is OK
SVNURL=<dir> #URL to use for the root of the check in

SVNPROJ=<proj> #SVN project to start at (ie $/Product)
WORKDIR=<dir> #Directory under which files and directories will be created as wo
rk progresses
DEBUG=1 #turn on debug output, blank is OK
AUTORETRY=1 #if a command fails to run, it will be run automatically 1 time befo
re failing

Press any key


# re: Migrating from SourceSafe to Subversion 4/21/2009 4:28 PM David
Try putting config.ini in same folder as .exe.

# re: Migrating from SourceSafe to Subversion 6/23/2009 6:39 AM Tyris
Looks like a few people would really like label support... so I wrote a patch adding label support to VSSMigrate.
Patch can be dl'd here:
Apply to r22000 from the svn.
Hope its not too late ;)

# re: Migrating from SourceSafe to Subversion 6/24/2009 3:20 PM Hartmut Schroeder
unter Cygwin (Linux) gibt es Tool namens 'yes', welches staendig einen String ausgibt (zB ''), den kann man nach vssmigrate pipen:

yes '' | VSSMigrate.exe D:\work\config.ini

Damit hat die Migration geklappt.


# re: Migrating from SourceSafe to Subversion 7/1/2009 10:09 AM Nils A
Thanks for the info, but as I read this I'd like to just mention that there are some updates to the VSSMigrate-code. The page that you link to ( lists several (4) updates to the original VSSMigrate-code, the latest one from November 11 2008.
Also, VSSMigrate has also been uploaded and modified at, and seems to live on there.

# re: Migrating from SourceSafe to Subversion 7/8/2009 1:31 PM sam
i get a names .dat error while migrating....any idea how to fix it?is there a update available on this issue?

# re: Migrating from SourceSafe to Subversion 9/23/2009 11:09 AM Lee Englestone
Can you confirm that the VSSMigrate tool can handle VSS 6.0d and not only VSS 2005?


-- Lee

# re: Migrating from SourceSafe to Subversion 9/23/2009 12:43 PM David
Yes, I migrated from v6.

# re: Migrating from SourceSafe to Subversion 12/2/2009 7:43 AM Biju Joseph
I could migrate a VSS database to SVN using VSSmigrate.EXE. But can I check whether a migrated file in SVN repository was a linked file in VSS. Please help.

# re: Migrating from SourceSafe to Subversion 9/16/2010 3:45 PM chenille bedspreads
Thanks for sharing and keep up the good work..

# re: Migrating from SourceSafe to Subversion 11/3/2011 8:12 PM Moses
Wondering on how long it took to complete the migration? Please include or estimate the research, collecting tools, etc.

Comments have been closed on this topic.