Reverting to an Older Version of a File 恢复一个文件的旧版本 Right-click on the file and select CVS → History to bring up the History Dialog. 右键,选择文件,选择 CVS-历史,弹出历史对话框www.shengfang.org Right-click on the revision you need and choose the "Save this revision as..." option. 选择你需要的版本右键,选择 保存该版本为 选项www.shengfang.org When the Save As dialog appears, do not click the "Save" button; instead, double-click on the file's name in the directory listing. 当另存为对话框弹出,不要选择保存按钮,双击目录列表下的同名文件。 Answer "Yes" when TortoiseCVS prompts you to overwrite the file. TCVS将询问是否覆盖时选择确定。www.shengfang.org Branching And Merging 分支和合并 Branching is useful to control changes during the lifecycle of a software project. For example, suppose you have made the first release of your software project version 1.0. You now begin adding new features in preparation for your next major release 2.0. Between your initial release and the new version it is discovered that there are bugs in the software. The current revision of the sources code is in a state of flux and are not expected to be stable for at least another month and therefore there is no way to make a bugfix release based on the newest sources. 在一个软件项目周期中,分支是一个很有用的修改控制。例如,如果你已经推出了你的软件的第一个版本1.0,现在你已经在下一个版本2.0增加新功能。此时你的第一个版本发现了BUG,你的新版本的源代码正在开发阶段,推出稳定版本至少需要一个月的时间,www.shengfang.org因此无法基于最新版本推出一个修正原有BUG的版本。 Instead of attempting to make the fix to the current version, or the HEAD branch, you would create a branch on the revision trees for all the files that made up release 1.0. You can then make modifications to the branch without disturbing the head branch. When the modifications are finished you can either incorporate them on the head branch or leave them on the release 1.0 branch. 你不要试图在当前版本或者主分支中作这种BUG修改,你应该在版本树中创建一个分支,所有文件都是基于释放 版本1.0的,于是你就可以在这个分支上修改而不会干扰主分支了。当修改完成后,你可以把它们合并到主分支或者把它们保留在1.O分支上。www.shengfang.org Creating a Branch 创建分支 Selecting a Branch to Work On选择工作分支www.shengfang.org To move your local copy to another 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 → Update Special.... 修改你的本地拷贝到另外一个分支,选择最顶层工作目录,你也可以选择特定的文件或者目录(你知道这些信息并确认希望得到这些文件的分支)右键 选择CVS-www.shengfang.org更新到指定版本 Figure 3.5. Update Special Dialog 更新到指定版本对话框 TortoiseCVS puts what is known as sticky tags on the files that are affected by the branch. To remove the sticky tags you must go back to the head branch. TCVS将在这些分支文件上设置粘性标志,移除这些粘性标志,你必须返回到主分支中。www.shengfang.org 字体:大 中 小 |
![]() | 永久地址 http://www.shengfang.org/blog/p/tcvsverold.php |
![]() | 引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1120741610 |
2005年7月7日21:06星期四 [English]






