views:

1017

answers:

3

I am forced to use VSS at work, but use SVN for a personal repository. What is the best way to sync between VSS and sync?

A: 

What I have done in the past is as follows:

  1. Make sure all my changes are committed to svn://trunk
  2. Do a get latest from VSS into my working copy.
  3. Manually merge the changes in my working copy.
  4. Commit the merged code into the svn://trunk
  5. Do a VSS diff and checkout any files with differences (without overwriting files)
  6. Check in those files.
Adam Tegen
+3  A: 

To get rid of the manual merge step, I could use a separate svn branch (svn://branches/VSS) as follows:

  1. Create a working copy of svn://branches/VSS
  2. Do a VSS Get Latest on this working copy
  3. svn commit
  4. svn merge from svn://trunk
  5. svn commit
  6. Do a VSS diff and checkout all files (without overwriting) with differences
  7. Check in those files
  8. reintegrate svn://branches/VSS into svn://trunk
Adam Tegen
+1  A: 

You could also treat this as a vendor supplied branch as defined in the redbean book: Vendor Branches

With this, the basic flow would be:

  1. Have a vendor branch "branches/VSS/current" containing the latest code from VSS
  2. Tag the current version as "branches/VSS/2008-09-15"
  3. Next day, get the new files into "current"
  4. Tag again into "branches/VSS/2008-09-16"
  5. Merge differences between the two tags into trunk, resolving conflicts
  6. Delete old tags as required

This is actually the technique we used when migrating from VSS to SVN. If you care about the return trip from SVN->VSS, you'll just have to diff between trunk and branches/VSS/current and apply the diffs to VSS.

Jim T