Merging from a Branch合并分支www.shengfang.org To merge from a branch, move your local copy to the branch you want to merge the changes into. See Selecting a Branch to Work On or Going Back to the Head Branch. Select the top level folder of the project. You can also select the exact folders and files that are part of the desired branch if you know this information. Right-click the on the selection, and choose CVS → Merge.... 从一个分支合并,移动你的本地拷贝到你想最终合并的分支上去,参考 选择一个工作分支或者回到主分支。选择项目的的顶层目录,如果你能够确认得话,你也可以选择准确的文件和目录,分支的一部分而不是全部。右键 点击,选择 CVS-合并 Figure 3.6. Merge Dialog 合并对话框www.shengfang.org The merge given above will try to merge changes from the start of the branch. If you do the operation a second time (to merge changes done to the branch after the last merge), merging from the start of the branch is not what you want, and it will most likely get you into trouble. To get around this problem, you should give the branch a new tag after every merge, and use the new tag when naming the branch for subsequent merges. 上述合并将从最开始的分支开始合并,如果你第二次进行合并(从最后合并后的分支再合并修改),你不希望从开始分支开始合并,这将带给你麻烦。处理这个问题,你应该在每次合并后给分支打上一个标签,使用新的标签命名后来修改的分支。www.shengfang.org Note: The above paragraph only applies for standard Unix CVS (aka cvshome.org CVS). If your server runs CVSNT, you can take advantage of a special feature known as merge points. This means that CVS keeps track of your last merge, so that you can effortlessly merge from the same branch repeatedly. For more information on this feature, see the CVSNT Wiki page (note that the CVSNT Manual is not yet up to date on this point). 注意:以上段落仅仅应用于UNIX CVS(CVSHOME.ORG cvs),如果你的服务器端运行CVSNT,你可以利用它的特点作为合并点。这意味着CVS保留你最后一次合并的踪迹,因此你可以从同一个分支进行多次合并。获得更多信息:参考CVSNT的WIKI页面。注意最近的CVSNT手册还没有注明这点。www.shengfang.org Going Back to the Head Branch回到主分支 To remove the sticky tags, and thus update your local copy to the main development line, select the top level folder of the project. You can also select the exact folders and files that are part of the desired branch if you know this information. Right-click the on the selection, and choose CVS → Update Special.... 移除附着标签,www.shengfang.org从而让你的本地拷贝回到主开发线。选择顶层目录或者需要的文件,右键,CVS-更新到指定版本。 You will then be presented with the Update Special Dialog. Select the Return to main (HEAD) branch checkbox and click the OK button. TortoiseCVS will now do the necessary updates to move your working copy back to the head branch.www.shengfang.org 对话框弹出,选择 回到主分支 选择框,点击OK,TCVS将进行必要的更新让你的工作回到主分支 字体:大 中 小 |
![]() | 永久地址 http://www.shengfang.org/blog/p/tcvshlpmergbranch.php |
![]() | 引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1120828134 |
2005年7月8日21:08星期五 [English]





