Reintegrate can only be used if revisions X through Y were previously merged from to reintegrate the source, but this is not the case


Been using SVN branches with Tortoise 1.6. I've been periodically merging the trunk into the branch to keep it up to date.

Today, I thought I'd reintegrate the branch. I chose "Reintegrate a branch" from Tortoise and received the following error message:

Reintegrate can only be used if revisions 4709 through 5019 were previously merged from http://subversion/svn/saxdev/trunk to the reintegrate source, but this is not the case

It then listed around 50 files with descriptions such as this:

Error: branches/qst/kobalt/sax/businessobjects/util/

Error: Missing ranges: /trunk/kobalt/sax/businessobjects/util/

Revision 5019 is the head revision.
Revision 4737 was the revision when I created a branch.

I have this from the log for revision 4737

Action: Added Path: /branches/qst Copy from path: /trunk

To me, that error message says that the branch was not originally from trunk, which isn't true.

Any ideas?

Best Solution

If you are working on a branch and have been keeping it up to date with others work you might be bemused when you create a working copy of the trunk and attempt to reintegrate your branch if you get a message something like this:

$ svn merge --reintegrate https://server.blah/source/orb/branches/bronze_services
svn: Reintegrate can only be used if revisions 650 through 694 were previously merged from
     https://server.blah/source/orb/trunk to the reintegrate source, but this is not the
    Missing ranges: /trunk/occl:650-693

I've seen a number of workarounds on Google but they made me nervous as 'hacks'. To address it I decided to do just what subversion is hinting at in the message. I went back to my branch and explicitly merged the specified revisions:

$ svn merge -r 650:693 https://server.blah/source/orb/trunk
$ svn commit -m 'merged revisions 650:693 from trunk'
    Sending        occl
Committed revision 695.

Once I did this, I was able to return to the working copy of trunk and reintegrate the branch without any problems.

I hope this helps