CVS Repository?
 –> checkout(co)
 –> commit(ci)
 –> update(up)

Repository vs Modules?
   –Repository is the modules’s container
   –Module is often a project

Repository has four main parts :
   –main trunk(called "head" in Eclipse)

CVS Version?
a) Version vs Revision?
The internal revision number(修订号) that CVS keeps for each file is unrelated to the version number of the software product of which the files are part.

The CVS revision numbers are invisible to your customers (unless you give them repository access); the only publicly visible number is the "3" in Version 3.

b) Where do versions come in?
Behind the scenes, a version control system's repository is a fairly clever beast. It doesn't just store the current copy of  each of the file in its care. Instead it stores every version that has ever been checked in. If you check out a file, edit it, version then check it back in, the repository will hold both the original version and the version that contains your changes.this system of storing revisions is remarkably powerful. Using it, the version control system can do things such as:

– retrieve a special revision of a file.
– check out all of the source code of a system as it appeared two months ago.
– tell you what changed in a particular file between versions 1.3 and 1.5.
– you can't use the individual file version numbers to keep track of things such as project releases

repeat: The individual revision numbers that CVS assigns to files should not be used as external version numbers. Instead, version control systems provide you with tags (or their equivalent).

CVS tag?
Tags to the rescue. Version control systems let you assign names to a group of files (or modules, or an entire project) at a particular point in time. If you assigned the tag .Pre-Release2. to this group of three files, you could subsequently check them out using that same tag. You'd get revision 1.11 of, 1.7 of, and 1.10 of

    cvs tag release_1_0
    cvs update –r release_1_0  //get the project which version is release_1_0

注意:Tag 的使用并不局限于产品版本号,也不局限于整个模块,你可以随意的给任何一个文件加Tag,不过滥用Tag 就会使Tag 失去它应有的作用。

CVS Branch?

– Main trunk(主线,Eclipse称为Head)
– Branch(分支)

                        main trunk
                         tagged                          tagged                   tagged
————-〉release_1_0 ———–>release_2_0———–>release_3_0
                                      |  branch(使用分支)

主线与分支相对应,在一个模块的初始是没有分支的,而在以后的开发过程中可以从主线上引出分支,上面图中分支ln_release_1_0就是基于主线的tag release_1_0的。在主线上引出一个分支来专门对付变更后的需求,而主线则保持原来的开发进程。

© 2004, bigwhite. 版权所有.

Related posts:

  1. 本不是第一篇的第一篇
  2. C++ Advanced Training(二)