Missing ranges error message when reintegrating a branch into trunk in Subversion 1.5

风格不统一 提交于 2019-11-30 06:27:45

You have to merge the revisions r280 to r324 from trunk into your branch first.

It seems you already merged r325 into your branch, however --reintegrate needs to get all revisions up to your latest revision merged. There must be no gap. So here a little Diag:

           +----------------------> /branches/devel
          /                    /   \<--merge not working!
 --------/-------+--+---+-----+---------> trunk
         |       \  |  /      |
        280       \ V /      325
                    V
                  missing sync merges from trunk to branch

I think this is your branch structure, so you need to sync all changes from trunk to your branch. You only merged r325, so just merge r280-r324 and after doing this you should be fine to use --reintegrate

We struggled with this issue for few weeks and we finally got it solved.

In our case, we worked on a branch that was merged with all trunk revisions on a daily basis. When we tried to reintegrate it (merge back to trunk) we got this error. When we tried to merge the missing ranges to our branch we got message that there is nothing to merge. It happened in several unrelated branches and with different files and folders.

The solution was to add the missing ranges to the svn:mergeinfo property of the file or folder in our branch.

For each "Missing ranges: path:revision_range" line in the message you got:

  • Edit the svn:mergeinfo property in file/folder mentioned in in the merged branch
  • Append the following : string at the end of the property value (e.g. /trunk/images/test:280-324)
  • Save the SVN property

Commit all changes and reintegrate again

I had this issue, and it was ultimately caused by the erroneous SVN properties against a folder in my branch.

The solution was easy - I merged from trunk to my branch using the specific revision number that had been reported as missing e.g.

And then specifying to only record the merge e.g.

This action correctly brought my branch into line with trunk, and my subsequent branch reintegration into trunk worked successfully, without the missing ranges error message.

This technique avoided any manual editing of any svn:mergeinfo properties against any files/folders.

I stopped getting these problems when I started using the -r option to svn merge command and did not attempt to do the --reintegrate until after I had merged without it. I'm using svn 1.6.1.

Here's what I do:
1. when merging from branch to trunk or trunk to branch, I use the -r option like this:

 cd branchWorkArea/topDir
 svn merge -r<branchPoint>:HEAD [otheroptions] svn://svn/project/trunk/topDir
  1. when I have resolved any conflicts and test my code, I commit the merge to the branch and then merge the branch to the trunk using the same basic options (especially -rBranchPoint:HEAD)

  2. when the trunk has been tested and committed, then I use the --reintegrate option to the close off the branch. Make sure you use the -rbranchPoint:HEAD option on it too.

For other options, I always use

--depth infinity (defaults to infinity in 1.6.2 but not before)
-x -b -x -w --ignore-eol-style

Maybe, I've just been lucky but things sure seem to work better.

To find the branch point for a branch, you do a svn log --stop-on-copy then look at the to very last revsion -- it will be the svn copy that created the branch.

To do this on linux, I do something like this:

svn log --stop-on-copy svn://svn/project/trunk/topDir |
grep '^r' | tail -1 | sed -e 's/^r//1'-e 's/ .*//g'

this should print the revision number of the branch point.

Good luck

This not an answer but a clarifying question.

My error message is:

Reintegrate can only be used if revisions 2669 through 3403 were previously merged from
https://../schemas
to the integrate source, but this is not the case:
trunk/schemas:
Missing ranges:
../schemas:2673,2682,2720,2736,2878,2960,3003,3057

I merged the revisions using the solution provided by @Greg Trevellick, still getting the error message.

When I open the svn:mergeinfo property following the answer by @pako on the schemas folder, the content looks like

/branches/repos_develop_os/trunk_branch-os/schemas:3329
/trunk/schemas:2669-2673,2682,2720,2736,2878,2960,3003,3057

I'm not sure how should I modify this content. It looks like the missing ranges are all there.

I just had this problem and what worked for me was to first of all, Synchronize the Branch with the Trunk, so that the Branch can have the latest updates from the trunk. After this, I tried Reintegrating the Branch to the Trunk and worked fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!