views:

55

answers:

1

I am trying to migrate to svn from a not-so-famous version control system (lets call it nsfvc). svn trunk was created some time ago from nsfvc's trunk. There is an active branch in nsfvc that I have to import to svn branch. The diff between nsfvc's trunk and branch is huge (updates, renames, additions, deletions, moves).

How do I go about doing this? I am guessing it is not as simple as...

svn co http://mysvn/repo/branches/branch c:\workspace
# replace files in c:\workspace
svn add
svn ci
+1  A: 

I hope I'm not misunderstanding, but my advice is:

  • create the svn branch from the nsfvc branch the same way you created the svn trunk from the nsfvc trunk. (I assume svn import?)

  • at this point you should have mirrored the state of the nsfvc repository in the svn repository

  • you should now be free to svn merge between the svn trunk and svn branch. svn merge is simply the process of applying diffs. You needn't setup some special connection between the trunk and the branch.

  • assuming you are running svn 1.5.x or 1.6.x, you can use svn mergeinfo to track subsequent merges between the trunk and branch

William Leara
Question: When a branch is created by running svn copy, svn does not duplicate all the files. It does a "soft copy." If I resort to importing into the branch, this will not happen. I am still leaning towards my plan (in my question). What do you think?
publicRavi
You are correct. ("cheap copy" is SVN's term) If you import into the branch, it will occupy as much hard drive space as the initial import into trunk. Of course any subsequent actions would be cheap copies. Is that really an issue? I don't see that you're really losing anything since this is a one-time only thing you're doing (i.e. setting up the branch) and hard drive space isn't so scarce these days...
William Leara
You're gonna hate me for this :) I followed my plan, and everything looks good. Accepted for diligence.
publicRavi
If your plan worked I am happy for you. Glad I could help.
William Leara