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

你离开我真会死。 提交于 2019-12-06 19:04:31

问题


I have a project with with the following structure

^/project/trunk
^/project/branches/mybranch

where current HEAD is revision 1048. The branch was copied from trunk in r523. trunk has been merged to mybranch with the result being r1048. The mergeinfo on ^/project/branches/mybranch gives

/project/trunk:523-1047

and the mergeinfo of trunk has no record mentioning anything from ^/project/branches/mybranch. Actually in reality both trunk and branches also hold mergeinfos from branches parallel to mybranch but those mergeinfos appear as absolutely identical in both outputs.

Now I go into my working copy of trunk and try to issue

svn merge --reintegrate ^/project/branches/myproject

I get an error message that says:

svn: Reintegrate can only be used if revisions 523 through 1048 were previously merged from file:///home/svn/project/trunk to the reintegrate source, but this is not the case:
  project/branches/mybranch/src
    Missing ranges: /project/trunk/src:523-1047

That is weird because the mergeinfo on my branch folder tells me that 523-1047 have been correctly merged from trunk to branch. What is the deal with that subfolder? src is a directory that obviously exists in both trunk and branch.

I think that is where something is fishy. If I look into the mergeinfo of mybranch/src via svn pg svn:mergeinfo ^/project/branches/mybranch/src@HEAD I get nothing at all. If I look at the trunk/src however (svn pg svn:mergeinfo ^/project/trunk/src@HEAD) I get

/project/branches/mybranch/src:784

So it seems as though someone did a cherry-pick from branch to trunk there. However this does not appear in the trunk folder itself.

Is that where the trouble lies? And most importantly: how can I cure it??


回答1:


Is that where the trouble lies?

Yes, exactly - merge subtree later always confuse reintegration

And most importantly: how can I cure it??

Remove mergeinfo from /project/trunk/src




回答2:


Here is a very similar topic you might want to have a look at:

Reintegrate can only be used if revisions were previously merged URL to reintegrate the source

Especially this answer from Paul Whipp has helped me a lot when I encountered the same problem and didn't want to delete the mergeinfo, because this somehow sounded like a workaround and not a "real" fix.

In short: Try to merge the missing information manually for that specific file/ folder (just as svn suggests). Worked like a charm for me.

See Pauls answer for the corresponding code excamples, etc.



来源:https://stackoverflow.com/questions/14986553/svn-merge-with-reintegrate-complains-about-missing-ranges-but-mergeinfo-seems

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