Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

svn - Reintegrate can only be used if revisions X through Y were previously merged from <URL> 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/HistoryParent.java

Error: Missing ranges: /trunk/kobalt/sax/businessobjects/util/HistoryParent.java:4709-5018

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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
     case:
  branches/bronze_services/occl
    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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...