Go to the previous, next section.
First, an example of how not to use the
admin
command. It is included to stress the
fact that this command can be quite dangerous unless
you know exactly what you are doing.
The `-o' option can be used to outdate old revisions from the history file. If you are short on disc this option might help you. But think twice before using it--there is no way short of restoring the latest backup to undo this command!
The next line is an example of a command that you would not like to execute.
$ cvs admin -o:R_1_02 .
The above command will delete all revisions up to, and including, the revision that corresponds to the tag R_1_02. But beware! If there are files that have not changed between R_1_02 and R_1_03 the file will have the same numerical revision number assigned to the tags R_1_02 and R_1_03. So not only will it be impossible to retrieve R_1_02; R_1_03 will also have to be restored from the tapes!
If you use CVS to store binary files, where
keyword strings (see section Keyword substitution) might
accidentally appear inside the file, you should use
cvs admin -ko
to make sure that they are not
modified automatically. Here is an example of how you
can create a new file using the `-ko' flag:
$ echo '$Id$' > kotest $ cvs add -m"A test file" kotest $ cvs ci -m"First checkin; contains a keyword" kotest $ cvs admin -ko kotest $ rm kotest $ cvs update kotest
When you check in the file `kotest' the keywords
are expanded. (Try the above example, and do a
cat kotest
after every command!) The cvs
admin -ko
command sets the default keyword
substitution method for this file, but it does not
alter the working copy of the file that you have. The
easiest way to get the unexpanded version of
`kotest' is to remove it and check it out again.
If you use the $
Log$ keyword and you do
not agree with the guess for comment leader that
CVS has done, you can enforce your will with
cvs admin -c
. This might be suitable for
nroff
source:
$ cvs admin -c'.\" ' *.man $ rm *.man $ cvs update
The two last steps are to make sure that you get the versions with correct comment leaders in your working files.
Go to the previous, next section.