PREV, BASE, or COMMITTED revision keywords are invalid for URL while reintegrating a branch

Viewed 2661

I have branched my trunk (at a previous revision) and implemented/commited a new feature and implemented part of another feature locally to the branch. I now need to reintegrate the finished feature to the trunk.

I svn cp branches/completedfeature branches/uncompletedfeature to get the partially completed feature in its own branch. I then svn revert -R . everything in the first branch so it is up to date.

Now when I svn merge --reintegrate ../../branches/completedfeature from the trunk, I get this cryptic (to me) error:

PREV, BASE, or COMMITTED revision keywords are invalid for URL while reintegrating a branch

Both the trunk and the completed feature branch are up to date with no local changes. What is going on?

3 Answers

In general there is no need to use patch-files here - any "-c x" or "-r x:y" range is actually a changeset, i.e. a kind of patch that may be applied. Let's make a complete example, so initially

svn copy trunk/path/file branch/path/file

and after that one can work on trunk. Now you need to know the revision-range to apply the changes to the target - since the revision number is global, you can ask both files, for example

svn info trunk/path/file 
# 35

svn info branch/path/file
# 27

This is the range to use, now you can say

svn merge -r 27:35 trunk/path/file branch/path/file

You may think of it as if it is creating a patch file internally for the range 27:35 being applied to the target. As long as this is only file-to-file you can not even get a tree-conflict (think of renamed files in a directory merge).

Related