HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man5/!!!intro.5
________________________________________________________________
___ ___
r
rcsintro(5) rcsintro(5)
rcs -l f.c
This command will lock the latest revision for you, unless somebody else has already locked it. In that
case, you will have to negotiate with that person.
Locking assures that you, and only you, can check in the next update, and avoids nasty problems if several
people work on the same file. Even if a revision is locked, it can still be checked out for reading, compiling,
etc. All that locking prevents is a check in by anybody but the locker.
If your RCS file is private, i.e., if you are the only person who is going to deposit revisions into it, strict lock-
ing is not needed and you can turn it off. If strict locking is turned off, the owner of the RCS file need not
have a lock for check in; all others still do. Turning strict locking off and on is done with the commands:
rcs -U f.c
and
rcs -L f.c
If you do not want to clutter your working directory with RCS files, create a subdirectory called RCS in your
working directory, and move all your RCS files there. RCS commands will search that directory to find
needed files. All the commands discussed above will still work without any modification.
To avoid the deletion of the working file during check in (in case you want to continue editing), invoke:
ci -l f.c
or
ci -u f.c
These commands check in f.c as usual, but perform an implicit check out. The first form also locks the
checked in revision, the second one does not. Thus, these options save you one check out operation. The
first form is useful if locking is strict; the second one if not strict. Both update the identification markers in
your working file (see below).
You can give ci the number you want assigned to a checked in revision. Assume all your revisions were
numbered 1.1, 1.2, 1.3, etc., and you would like to start release 2. The command:
ci -r2 f.c
or
ci -r2.1 f.c
assigns the number 2.1 to the new revision. From then on, ci will number the subsequent revisions with
2.2, 2.3, etc. The corresponding co commands:
co -r2 f.c
and
co -r2.1 f.c
retrieve the latest revision numbered 2.x and the revision 2.1, respectively. co without a revision number
selects the latest revision on the "trunk"; i.e., the highest revision with a number consisting of 2 fields.
Numbers with more than 2 fields are needed for branches. For example, to start a branch at revision 1.3,
invoke:
ci -r1.3.1 f.c
This command starts a branch numbered 1 at revision 1.3, and assigns the number 1.3.1.1 to the new revi-
sion. For more information about branches, see rcsfile(4).
RCS File Naming and Location
RCS recognizes two kinds of files: RCS files (revision archives), and working files. Working filenames are
defined by the RCS user, RCS file names are generated by RCS by appending ",v" to the working file name.
Pairs of RCS files and working files can be specified in 3 ways:
• Both the RCS file and the working file are given. The RCS filename is of the form
path1/workfile,v and the working filename is of the form path2/workfile, where path1 and
path2 are (possibly different or empty) paths and workfile is a filename.
• Only the RCS file is given. Then the working file is assumed to be in the current directory and its
name is derived from the name of the RCS file by removing path1/ and the suffix ",v".
HP-UX Release 11i: December 2000 − 2 − Section 5−−287
___
___