可以将 CVS 分支视为一篇手册的某个版本,或是一个文件的不同版本。
要检出模块的分支,运行下面的命令:
$ cvs co -d <directory> -r <branchname> <module-name>
将创建名为 <directory> 的目录, 模块 <module-name> 的 <branchname> 分支的文件将被复制到这个目录中。
例如,要检出 mymodule 模块的 BRANCH-VERSION-1.2 分支,运行命令:
$ cvs co -d mymodule-1.2 -r BRANCH-VERSION-1.2 mymodule
模块的 BRANCH-VERSION-1.2 分支将被检出到 mymodule-1.2 目录中。
要查看文件有哪些分支和标记,运行命令:
$ cvs status -v <filename>
例如,文件 foo.sgml 的状态如下:
===================================================================
File: foo.sgml Status: Up-to-date
Working revision: 1.47
Repository revision: 1.47 /cvs/docs/custom-guide/rhl-cg-en.sgml,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
Existing Tags:
BRANCH-VERSION-1.2 (branch: 1.25.2)
只有在 Existing Tags(现有标记)中显示为"分支"的标记才可以作为分支检出。