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

5

32

I'm trying to reintegrate a development branch into the trunk in my Subversion 1.5 repository. I merged all the changes from the trunk to the development branch prior to this operation. Now when I try to reintegrate the changes from the branch I get the following error message:

Command: Reintegrate merge https://dev/svn/branches/devel into C:\trunk  
Error: Reintegrate can only be used if revisions 280 through 325 were previously   
Error: merged from https://dev/svn/trunk to the reintegrate   
Error: source, but this is not the case:  
Error:   branches/devel/images/test  
Error:     Missing ranges: /trunk/images/test:280-324  
...

The message then goes on complaining about some folders in my project. But when I try to merge the changes from the trunk to the development branch again, TortoiseSVN tells me that there's nothing to merge (as I already merged all the changes before):

Command: Merging revisions 1-HEAD of https://dev/svn/trunk into C:\devel, respecting ancestry  
Completed: C:\devel  

I'm trying to follow the instructions from here: http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html, but there's nothing about solving such a problem.

Any ideas? Perhaps I should just delete the trunk and then make a copy of my branch? But I'm not really sure if it's safe.

See also

svn merge with --reintegrate complains about missing ranges but mergeinfo seems correct

Grayback answered 18/3, 2010 at 18:2 Comment(1)
I had a similar problem where SVN thought I was missing a merge, but then when I tried to merge, there was nothing to merge. See #13056557Sidelong
S
29

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

Salsala answered 19/3, 2010 at 2:22 Comment(6)
Unfortunately, this is not the case. When I try to merge the specific range of revisions (280 through 325) from the trunk do the devel branch, TortoiseSVN says that there's nothing to merge (I merged these changes before and of course commited the merge). But when I try to reintegrate, I get the error message.Grayback
@Grayback why did you accept the answer if it's not the case? Either remove your comment or don't accept the answer... In this case the answer is correct, but your comment is confusingSeptillion
@Grayback does conflict himself with the above comment and also accepting the answer, but I can say that I also have experienced the same problem. Merged all revisions up to my branch and when I attempt to reintegrate I get the "Missing ranges" message. svn, version 1.6.2 (r37639) and tortoise 1.6.5 (I believe).Ricks
I've had the same problem. I managed to fix it today by deleting all the mergeinfo properties on the branch other than the one on the root folder of the branch. If you only ever merge at the root level of each branch, then those properties shouldn't really be there near as I can tell.Leatherworker
I resolved this by merging from trunk to branch and clicking "all revisions" - then I did the "all revisions" again from branch to trunk. Merge to trunk was then successful.Atonsah
This works for me, but the range in question is 280:324, not 280:325.Ability
M
33

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

Mascara answered 24/8, 2014 at 11:3 Comment(2)
Sooo ugly... but so efficient to work around this broken behaviour. Indeed, sometimes the only solution.Hygrometer
Editing the svn:mergeinfo property can be done using svn propedit svn:mergeinfo path/to/file/or/folderIntervene
S
29

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

Salsala answered 19/3, 2010 at 2:22 Comment(6)
Unfortunately, this is not the case. When I try to merge the specific range of revisions (280 through 325) from the trunk do the devel branch, TortoiseSVN says that there's nothing to merge (I merged these changes before and of course commited the merge). But when I try to reintegrate, I get the error message.Grayback
@Grayback why did you accept the answer if it's not the case? Either remove your comment or don't accept the answer... In this case the answer is correct, but your comment is confusingSeptillion
@Grayback does conflict himself with the above comment and also accepting the answer, but I can say that I also have experienced the same problem. Merged all revisions up to my branch and when I attempt to reintegrate I get the "Missing ranges" message. svn, version 1.6.2 (r37639) and tortoise 1.6.5 (I believe).Ricks
I've had the same problem. I managed to fix it today by deleting all the mergeinfo properties on the branch other than the one on the root folder of the branch. If you only ever merge at the root level of each branch, then those properties shouldn't really be there near as I can tell.Leatherworker
I resolved this by merging from trunk to branch and clicking "all revisions" - then I did the "all revisions" again from branch to trunk. Merge to trunk was then successful.Atonsah
This works for me, but the range in question is 280:324, not 280:325.Ability
C
18

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.

enter image description here

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

enter image description here

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.

Catechetical answered 20/12, 2016 at 9:24 Comment(1)
In my opinion this is the correct answer assuming you tried to merge the specific revision and it reported there was nothing to do. Thanks!Diamond
K
5

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

Kaki answered 28/9, 2010 at 13:40 Comment(0)
S
-1

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.

Sheba answered 16/4, 2013 at 14:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.