I want to convert a CVS project to Subversion, using cvs2svn. It has a main trunk (HEAD), with several temporary development branches created from the trunk.
Before we convert it, we'll merge the latest changes from the trunk into all of the dev branches. But they will also have changes that haven't been merged back into the trunk yet.
When I convert the project to SVN, it won't have any of the merge-history properties. So how can I initialize those properties, so I can subsequently merge to and from the branches?
In other words, after the conversion, there will be a number of differences between the trunk and any given branch. The next time I merge from the trunk into the branch, I don't want to see those differences as changes that need to be merged. But when I merge from the branch into the trunk, I do. Is this possible?
UPDATE: I took mhagger's suggestion, and told SVN that the branches had all changes already merged in from the trunk:
svn co [branch URL] .
svn merge --record-only [trunk URL]
svn commit -m ''
This works, so the next time I try to merge from the trunk into a branch, it shows no new changes.
But I still have a problem with --reintegrate merges, from the branch back to the trunk. It ends up showing a lot of "R"eplaced files, meaning that the trunk has a file X, and the branch has a file X, but they're not considered the same file. This makes the merge kind of messy, although it seems to end up with the right results.
I think this happens because of the following sequence of events:
- Branch was created (in CVS)
- A file X was added to the trunk (in CVS)
- X was merged into the branch (also in CVS)
- Project was converted to Subversion
- Subversion didn't know that branch/X was copied from trunk/X. So it thinks it's a replacement.
The SVN history looks something like this:
r100: create branch (copied from trunk)
r200: add trunk/X
r300: add branch/X (because of a CVS merge, but it's not a SVN copy)
So, is there a way for me to tell Subversion to ignore the files' ancestry when doing a --reintegrate merge? Or a better way to convert these files?