合并多个分支和主干中的特定更改的最佳方法是什么?
我使用SVN/CVS很长一段时间只是作为我的代码存储的地方。但现在我到了一个地步,我需要一个“最好的方法”。
我们有多家分行。
例如:
Release1
(已发布)、Release2
(未完成,包含新功能)、Fix1
(包含Release1< 的错误修复) /code> 并将在客户测试后发货),
Fix2/trunk
(trunk
是我们当前与Fix2
的开发状态)。
现在我们来谈谈我的问题。
我无法确定 Release 2
是否在 Fix1
或 Fix2
之前发布,并且我现在有一个针对 的
。虽然只有几个文件,但很紧急。Hotfix
发布1
现在在所有分支中进行更改的最佳方法是什么?
自动合并还将合并特定于分支的差异。手动合并的最佳方法是吗?
必须有这样的方法:我用 ID“abc
”标记我的更改,并说仅合并所有分支中 abc
的更改。
顺便提一句。我正在将 Eclipse 与 Subversive 一起使用。也许eclipse之外的工具会更好!?
I used SVN/CVS for a long time just as a place where my code stored is. But now I came to a point where I need a "best way to do".
We have several branches.
For Example:
Release1
(shipped),Release2
(not finished, contains new features),Fix1
(contains bug fixes forRelease1
and will be shipped after customer tests),Fix2/trunk
(Thetrunk
is our current development state withFix2
).
And now we come to my problem.
I cannot say if Release 2
is shipped before Fix1
or Fix2
and I have now a Hotfix
for Release1
. Just a few files, but it was urgent.
What is now the best way to get the changes in all branches?
Auto merge will also merge differences that are branch specific. Is the best way to merge it by hand?
There has to be a way like: I mark my change with ID "abc
" and say merge only changes of abc
in all branches.
Btw. I am using Eclipse with Subversive. Maybe a tool outside eclipse will be better!?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Eclipse 中使用 Subclipse 插件。您也可以使用 svn 命令行来执行此操作。如果您的修复被隔离到单个修订版号,那么您可以将该修订版合并到主干(或任何其他分支)。
使用 Subclipse,您可以右键单击该文件,然后选择“团队”->“合并”。选择“合并一系列修订版”或“合并两个不同的树”选项,然后提供源 URL 和修订版以合并到目标树。
从命令行...考虑到您当前的工作目录是主干:
您可能无法合并到多个分支,这可能更好,因为您要小心合并过程。
I use Subclipse plugin for Eclipse. You can probably do this with svn command line also. If your fix is isolated to a single revision number then you can merge just that revision to the trunk(or any other branch).
Using Subclipse, you can right click the file then choose "Team"->"Merge." Select either "Merge a range of revision" or "Merge two different trees" option then provide the source url and revision to merge to the target tree.
From command line... given that your current working directory is the trunk:
You probably can't merge to multiple branches and that's probably better because you want to be careful with the merge process.