Yet Another Vss2Svn Import Tool

March 28, 2012. Posted by Eugene Ivakhiv

The year is 2012 but still there is some source code left in old SourceSafe repositories which needs to be imported into new-generation source control systems like Subversion.

There are numerous tools doing the same thing each having its pros and cons, limitations and issues.

Closest to our needs was the following tool: http://vss2svn.codeplex.com/

However the way it was importing sources was not "good" in terms of atomic commits of Subversion. Each file was committed separately creating own commit which cluttered SVN and you could not easily trace related files from the same logical revision. I know that there are some patches to the tool packing revisions to atomic SVN commits however there was still need to make some operation similar to labeling.

So, long story short, we've decided to make own version meeting our requirements and sufficient to our specific needs.

Feature highlights:

  • Analyzes revision tree prior to commit and packs revisions into one atomic revision.
  • Tool has UI allowing you to review analyzed VSS project tree before any commits.
  • Works with both VSS versions: VSS 6d and VSS 2005.
  • Updates commit metadata with original author, date-time and comment.
  • Creates formatted tags for labels. Label name is put into commit comment. Unlike Label, tag is created for whole trunk not only for original labeled files subset.
  • Files with last version only (VSS flag "Store latest version only" is set) are treated as one-revision files with creation date of last change. For example file with two revisions of March 20 and March 25 will be added to SVN and committed only once with its last change date March 25.

 

Limitations:

  • Deleted files are not supported.
  • Files with their location changed not supported.
  • Branching not supported. At least yet.

 

Known issues:

  • VSS6 automation in its original version has had some serious bugs causing "Version not found" errors. So, basically you could not obtain full revision tree programmatically. This is fixed in VSS hotfix 822845 which should be applied before running import, however there is no direct download link to this fix available on Microsoft site so you can grab it from here: vss6d.hotfix.822845.zip (3.94 mb)
  • To update metadata it is necessary to add SVN PreRevPropChange hook. The one I am using is included into download package. Not setting this hook will give you SVN exception during commit if you'll select "Update author, date, log" option.

 

Download: ArtfulBitsCZ.Vss2Svn.120420-001.7z (2.02 mb)

Installation: unpack and run on machine where VSS is installed. Tool uses SharpSvn library which latest version 1.7 is included.

It is highly recommended to make import to test repository before importing project to your main one. If you are using TortoiseSVN it has nice feature of local repository which you can create in a matter of seconds and check whether import will succeed.

Development , , , ,