views:

250

answers:

2

If I'm using svnmerge to track changes for a branch and I want to rename the branch (by doing an svn mv), will this cause any problems with the way the changes are tracked? Is this a safe thing to do?

+1  A: 

Sydius. Yes this will cause problems with the way changes are tracked. However it is a safe thing to do, as long as you update any branches tracking the branch you moved.

This is as simple as the following:

cd /path/to/tracking/branch
svn pe svnmerge-integrated .

You will see a line (or lines if you are tracking multiple) similar to the following:

/trunk:1-8334,8336-8440,8444-8450,8452-8458,8460-8469,8471-8476,8480,8486

This designates that this branch of mine is tracking the /trunk of my repository, and the list of revisions that have been merged into it. You can simply change /trunk to be /mynewbranch and save the file.

You will also need to do the same for the svnmerge-blocked property, as such:

svn pe svnmerge-blocked .

If this file is empty, then just ignore it.

hobodave
Seemed to work until it came time to merge the branch back into the trunk. It failed when it was unable to find the previous branch name that it was moved from.
Sydius
Please update your answer with the exact steps you took.
hobodave
+1  A: 

Comments seem to be closed, but there's a problem with the answer. If you wait to run svnmerge.py init until after moving the branch, the 'init' refuses to run at all, since it somehow pulls the old path out and tries to use it, unsuccessfully.

bmargulies