在 Subversion 1.5 中将分支重新集成到主干时出现缺少范围错误消息

发布于 2024-08-25 21:12:10 字数 1211 浏览 10 评论 0原文

我正在尝试将开发分支重新集成到我的 Subversion 1.5 存储库中的主干中。在此操作之前,我将所有更改从主干合并到开发分支。现在,当我尝试重新集成分支中的更改时,我收到以下错误消息:

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  
...

该消息然后继续抱怨我的项目中的某些文件夹。但是,当我尝试再次将主干的更改合并到开发分支时,TortoiseSVN 告诉我没有什么可以合并(因为我之前已经合并了所有更改):

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

我正在尝试按照此处的说明进行操作:http://svnbook.red-bean.com/en/1.5/svn。 branchmerge.basicmerging.html,但是没有解决这样的问题。

有什么想法吗?也许我应该删除主干,然后复制我的分支?但我不太确定它是否安全。

参见

svn merge with --reintegrate 抱怨关于缺少范围,但合并信息似乎是正确的

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

只有影子陪我不离不弃 2024-09-01 21:12:10

我们为这个问题苦苦挣扎了几个星期,终于解决了。

在我们的例子中,我们工作的分支每天都会与所有主干修订合并。当我们尝试重新集成它(合并回主干)时,我们收到了此错误。
当我们尝试将缺失的范围合并到我们的分支时,我们收到消息说没有任何内容可以合并。它发生在几个不相关的分支以及不同的文件和文件夹中。

解决方案是将缺少的范围添加到我们分支中的文件或文件夹的 svn:mergeinfo 属性中。

对于您收到的消息中的每个“Missing range: path:revision_range”行:

  • 编辑 svn :mergeinfo 属性中提到的文件/文件夹
    合并的分支
  • 在属性值末尾附加以下内容:字符串(例如 /trunk/images/test:280-324)
  • 保存 SVN 属性

提交所有更改并再次重新集成

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

偏爱你一生 2024-09-01 21:12:10

您必须首先将修订版 r280 到 r324 从主干合并到您的分支中。

看来您已经将 r325 合并到您的分支中,但是 --reintegrate 需要将所有修订版合并到最新的修订版中。一定不能有间隙。
所以这里有一点诊断:

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

我认为这是你的分支结构,所以你需要将所有更改从主干同步到你的分支。您只合并了 r325,所以只需合并 r280-r324 ,完成此操作后您应该可以使用 --reintegrate

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

楠木可依 2024-09-01 21:12:10

我遇到了这个问题,它最终是由我分支中的文件夹的 SVN 属性错误引起的。

解决方案很简单 - 我使用报告为缺失的特定修订号从主干合并到我的分支,例如

< img src="https://i.sstatic.net/gEDo6.png" alt="在此处输入图像描述">

然后指定仅记录合并,例如

在此处输入图像描述

此操作正确使我的分支与主干一致,并且我随后的分支重新集成到主干中工作成功,没有丢失范围错误消息。

此技术避免了对任何文件/文件夹的任何 svn:mergeinfo 属性的任何手动编辑。

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.

不再见 2024-09-01 21:12:10

当我开始使用 svn merge 命令的 -r 选项时,我不再遇到这些问题,并且直到我在没有它的情况下合并之后才尝试执行 --reintegrate 。我使用的是 svn 1.6.1。

这就是我所做的:
1. 当从分支合并到主干或从主干合并到分支时,我使用 -r 选项,如下所示:

 cd branchWorkArea/topDir
 svn merge -r<branchPoint>:HEAD [otheroptions] svn://svn/project/trunk/topDir
  1. 当我解决了任何冲突并测试我的代码时,我将合并提交到分支,然后将分支合并到trunk 使用相同的基本选项(尤其是 -rBranchPoint:HEAD)

  2. 当主干经过测试并提交后,我使用 --reintegrate 选项来关闭分支。确保您也使用 -rbranchPoint:HEAD 选项。

对于其他选项,我总是使用

--深度无穷大(默认
在 1.6.2 中为无穷大,但之前不是)
-x -b -x -w --ignore-eol-style

也许,我只是很幸运,但事情似乎确实效果更好。

要找到分支的分支点,您可以执行 svn log --stop-on-copy 然后查看最后的修订版 - 它将是创建分支的 svn 副本。

要在 Linux 上执行此操作,我会执行以下操作:

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

这应该打印分支点的修订号。

祝你好运

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

无声静候 2024-09-01 21:12:10

我刚刚遇到这个问题,对我有用的是首先将分支与主干同步,以便分支可以从主干获取最新更新。之后,我尝试将分支重新集成到主干并且工作得很好。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文