"Concurrent Versions System" (CVS) is a version-control system that helps programmers and authors keep histories of their files.
[@more@]"Concurrent Versions System" (CVS) is a version-control system that helps programmers and authors keep histories of their files.
passwd file
Here is an example passwd file with five entries:
anonymous:bach:ULtgRLXo7NRxsspwang:1sOp854gDF3DYmelissa:tGX1fS8sun6rY:pubcvsqproj:XR4EZcEs0szik:pubcvs(The passwords are encrypted according to the standard Unix crypt() function, so it is possible to paste in passwords directly from regular Unix /etc/passwd files.)
The first line in the example will grant access to any cvsnt client attempting to authenticate as user anonymous, no matter what password they use, including an empty password. (This is typical for sites granting anonymous read-only access; for information on how to do the "read-only" part, see the section called “Read-only repository access ”.)
CVS权限:
c - create - create and delete files and directoriesr - read - retrieve file and look at informationw - write - modify files and change informationn - none - no access allowedcvs chacl theuser:rw dir1 dir2 dir3
创建group file:
group1: user1 user2 user3
group2: me you dognamedblue
group3: peter paul mary
注意:Repository administrators are automatically made a member of the group 'admin'. Don't list this group in the group file.
If SystemAuth = No only the CVSROOT/admin file is checked.
创建readers and writers 文件:
$CVSROOT/CVSROOT/readers file or $CVSROOT/CVSROOT/writers .Here is a sample readers file:
melissasplotnikjrandom(Don't forget the newline after the last user.)
If readers exists, and this user is listed in it, then she gets read-only access. Or if writers exists, and this user is NOT listed in it, then she also gets read-only access (this is true even if readers exists but she is not listed there). Otherwise, she gets full read-write access.
You can create a branch with tag -b; for example, assuming you're in a working copy:
$ cvs tag -b rel-1-0-patchesYou can also create a branch without reference to any working copy, by using rtag:
$ cvs rtag -b -r rel-1-0 rel-1-0-patches tcTo check out a branch from the repository, invoke checkout with the -r flag, followed by the tag name of the branch (the section called “Creating a branch ”):
$ cvs checkout -r rel-1-0-patches tcOr, if you already have a working copy, you can switch it to a given branch with update -r:
$ cvs update -r rel-1-0-patches tcor equivalently:
$ cd tc$ cvs update -r rel-1-0-patches+-----+ +-----+ +-----+ +-----+ +-----+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk+-----+ +-----+ +-----+ +-----+ +-----+ ! * ! * ! +---------+ +---------+ +---------+Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! +---------+ +---------+ +---------+So instead you need to specify that you only want to merge the changes on the branch which have not yet been merged into the trunk. To do that you specify two -j options, and cvsnt merges the changes from the first revision to the second revision. For example, in this case the simplest way would be
cvs update -j 1.2.2.2 -j R1fix m.c # Merge changes from 1.2.2.2 to the # head of the R1fix branchWith two -j revision flags, the update (and checkout) command can merge the differences between any two revisions into your working file.
$ cvs update -j 1.5 -j 1.3 backend.cThe normal way to move a file is to copy old to new, and then issue the normal cvsnt commands to remove old from the repository, and add new to it.
$ mv old new$ cvs remove old$ cvs add new$ cvs commit -m "Renamed old to new" old newThis is the simplest way to move a file, it is not error-prone, and it preserves the history of what was done. Note that to access the history of the file you must specify the old or the new name, depending on what portion of the history you are accessing. For example, cvs log old will give the log up until the time of the rename.
When new is committed its revision numbers will start again, usually at 1.1, so if that bothers you, use the -r rev option to commit. For more information see the section called “Assigning revisions ”.
This method is more dangerous, since it involves moving files inside the repository. Read this entire section before trying it out!
$ cd $CVSROOT/dir$ mv old,v new,v来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7200963/viewspace-903640/ ,如需转载,请注明出处,否则将追究法律责任。