cvs2svn迁移后svn合并问题
我们的团队有一个 cvs 存储库,我们通过 cvs2svn 将其转换为 svn。我们的存储库有一个主分支(让我们调用 main
),它实际上充当主干(即使它在技术上很久以前就从主干分支出来)。
在 cvs2svn 转换之后,我将 main
分支到 branch
。
我在 branch
中做了一个小更改,然后尝试将 branch
合并回 main
:
[~/main] svn merge https:.../branch
这应该计算与 branch< 的差异/code> 由于分割发生,并将该 diff 应用于
main
。然而,这件事可以追溯到几年前,导致了无数的冲突。
关于如何解决这个问题有什么想法吗?我已经搜索过谷歌但找不到任何东西。
我知道我可以调用 svn merge 并传入确切的修订号。我正在寻找更好的替代方案。
Our team had a cvs repository, which we converted to svn via cvs2svn. Our repository has a main branch (let's call in main
), that effectively serves as trunk (even though it was technically branched off from trunk far in the past).
After the cvs2svn conversion, I branched off main
to branch
.
I made a small change in branch
, and then attempted to merge branch
back into main
:
[~/main] svn merge https:.../branch
This should compute the diff to branch
since the split happened, and apply that diff to main
. It goes back a couple years too far back, however, leading to a zillion conflicts.
Any ideas on how to fix this? I've scoured Google but can't find anything.
I know that I can call svn merge and pass in the exact revision numbers. I'm looking for a better alternative.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要告诉 svn merge 您的合并点是什么,以便它知道要同步到 main 的提交范围。由于您没有指定范围,因此它默认为通过 HEAD 修订版的提交范围。这会导致太多的修改。
这将获取您将从中同步的上一个提交修订版:
基本上,这将获取分支上的第一个副本修订版(我将其称为“REV”)。然后,您将其合并到“主”副本的 HEAD 修订版(在主目录中):
这应该将“分支”副本上从 REV 到 HEAD 的所有更改应用到“主”副本。即使对于从分支到主的重复合并,这也应该可以正常工作。
干杯!
You need to tell svn merge what your merge point is so it knows what range of commits to sync to main. Since you didn't specify a range, it defaults to the range of commits through the HEAD revision. This causes too many revisions.
This will get the previous commit revision that you will be syncing from:
Basically, that gets the first copy revision on the branch (which I'll call "REV"). You'll then merge that to your 'main' copy's HEAD revision (in the main dir):
That should apply all changes from REV through HEAD on the 'branch' copy to the 'main' copy. This should work fine even for repeat merges from branch to main.
Cheers!