到底如何进行 Subversion 1.5 之前的样式合并?
我现在必须处理 Subversion 1.4 合并,并发现了这个 问题的答案,它准确地描述了我的问题。实际问题涉及 git 风格的 rebase 和合并问题,这些问题会产生树冲突。其中包括以下建议:
[...] 您不想将分支范围合并到指向主干的工作副本,而是希望将“FROM trunk@HEAD TO Branch@HEAD”与指向主干的工作副本合并。本质上:
“给我所有需要的更改,使主干与分支相同”。
现在我想知道如何实际与 SVN 进行合并,因为 svn merge 只合并到工作目录。原来的答案有错字还是我遗漏了什么?
I have to deal with Subversion 1.4 merges at the moment and have found this answer to a question, which exactly describes my problem. The actual question deals with git
-style rebase and merge problems with SVN which produce tree conflicts. It includes the following recommendation:
[...] instead of range-merging the branch to a working copy that points to the trunk, you want to merge "FROM trunk@HEAD TO branch@HEAD" with the working copy pointing to trunk. In essence:
"Give me all the changes I'd need to make trunk identical to branch".
Now I wonder how to actually do that merge with SVN, since svn merge
only merges to the working directory. Is there a typo in the original answer or am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
svn merge
之后,您需要svn ci
,并将合并提交到分支svn merge
you need tosvn ci
, and the merge is committed to the branch我不确定,但在我看来,您需要将分支头和主干头之间的差异合并到主干中,这样就可以是“从分支@HEAD到主干@HEAD”,而不是相反。
有一种合并语法,您可以将两个标签之间的差异合并到工作副本中。这就是要使用的。 (抱歉说得这么含糊,但我在 1.5 之前并没有做过太多 SVN 工作。)
I'm not sure, but it seems to me you would need to merge the difference between branch head and trunk head into trunk, so that would be "FROM branch@HEAD TO trunk@HEAD", not the other way around.
There is a merge syntax where you merge the difference between two tags into your working copy. This would be the one to use. (Sorry for being so vague, but I had't done much SVN before 1.5.)