简体   繁体   English

svn与--reintegrate合并抱怨缺少范围,但mergeinfo似乎是正确的

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

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. 当前HEAD是修订版1048.分支是从r523中的trunk复制的。 trunk has been merged to mybranch with the result being r1048. trunk已合并到mybranch,结果为r1048。 The mergeinfo on ^/project/branches/mybranch gives ^/project/branches/mybranch给出

/project/trunk:523-1047

and the mergeinfo of trunk has no record mentioning anything from ^/project/branches/mybranch . 并且trunk的mergeinfo没有提及^/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. 实际上实际上,主干和分支也从与mybranch平行的分支中保持mergeinfos,但是这两个mergeinfos在两个输出中看起来完全相同。

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. 这很奇怪,因为我的分支文件夹上的mergeinfo告诉我523-1047已经从主干到分支正确合并。 What is the deal with that subfolder? 这个子文件夹的处理是什么? src is a directory that obviously exists in both trunk and branch. src是一个显然存在于trunk和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. 如果我通过svn pg svn:mergeinfo ^/project/branches/mybranch/src@HEAD查看mybranch / src的mergeinfo svn pg svn:mergeinfo ^/project/branches/mybranch/src@HEAD我什么都没得到。 If I look at the trunk/src however ( svn pg svn:mergeinfo ^/project/trunk/src@HEAD ) I get 如果我看一下trunk / src( svn pg svn:mergeinfo ^/project/trunk/src@HEAD )我得到了

/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. 但是,这不会出现在trunk文件夹中。

Is that where the trouble lies? 那是麻烦所在吗? And most importantly: how can I cure it?? 最重要的是:我该怎样治愈它?

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 从/ project / trunk / src中删除mergeinfo

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 只有在以前合并修订URL以重新集成源时,才能使用重新集成

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. 特别是Paul Whipp的 回答在我遇到同样的问题并且不想删除mergeinfo时给了我很多帮助,因为这听起来像是一种解决方法而不是“真正的”修复。

In short: Try to merge the missing information manually for that specific file/ folder (just as svn suggests). 简而言之:尝试手动合并特定文件/文件夹的缺失信息(正如svn建议的那样)。 Worked like a charm for me. 对我来说就像一个魅力。

See Pauls answer for the corresponding code excamples, etc. 请参阅Pauls答案以获取相应的代码示例等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM