xref: /openbsd-src/gnu/usr.bin/cvs/doc/cvs.info-4 (revision 55b57aafc73e4f3206a9e6baa59e87c4bf850b0d)
143c1707eStholoThis is cvs.info, produced by makeinfo version 4.0 from cvs.texinfo.
21e72d8d2Sderaadt
36407bc5bStholoSTART-INFO-DIR-ENTRY
46407bc5bStholo* CVS: (cvs).          Concurrent Versions System
56407bc5bStholoEND-INFO-DIR-ENTRY
66407bc5bStholo
71e72d8d2Sderaadt   Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994
81e72d8d2SderaadtFree Software Foundation, Inc.
91e72d8d2Sderaadt
101e72d8d2Sderaadt   Permission is granted to make and distribute verbatim copies of this
111e72d8d2Sderaadtmanual provided the copyright notice and this permission notice are
121e72d8d2Sderaadtpreserved on all copies.
131e72d8d2Sderaadt
141e72d8d2Sderaadt   Permission is granted to copy and distribute modified versions of
151e72d8d2Sderaadtthis manual under the conditions for verbatim copying, provided also
166407bc5bStholothat the entire resulting derived work is distributed under the terms
176407bc5bStholoof a permission notice identical to this one.
181e72d8d2Sderaadt
191e72d8d2Sderaadt   Permission is granted to copy and distribute translations of this
201e72d8d2Sderaadtmanual into another language, under the above conditions for modified
216407bc5bStholoversions, except that this permission notice may be stated in a
226407bc5bStholotranslation approved by the Free Software Foundation.
231e72d8d2Sderaadt
241e72d8d2Sderaadt
252f9d2fd9StholoFile: cvs.info,  Node: Moving directories,  Prev: Moving files,  Up: Adding and removing
262f9d2fd9Stholo
272f9d2fd9StholoMoving and renaming directories
282f9d2fd9Stholo===============================
292f9d2fd9Stholo
302f9d2fd9Stholo   The normal way to rename or move a directory is to rename or move
312f9d2fd9Stholoeach file within it as described in *Note Outside::.  Then check out
322f9d2fd9Stholowith the `-P' option, as described in *Note Removing directories::.
332f9d2fd9Stholo
342f9d2fd9Stholo   If you really want to hack the repository to rename or delete a
352f9d2fd9Stholodirectory in the repository, you can do it like this:
362f9d2fd9Stholo
372f9d2fd9Stholo  1. Inform everyone who has a checked out copy of the directory that
382f9d2fd9Stholo     the directory will be renamed.  They should commit all their
392f9d2fd9Stholo     changes, and remove their working copies, before you take the
402f9d2fd9Stholo     steps below.
412f9d2fd9Stholo
422f9d2fd9Stholo  2. Rename the directory inside the repository.
432f9d2fd9Stholo
442f9d2fd9Stholo          $ cd $CVSROOT/PARENT-DIR
452f9d2fd9Stholo          $ mv OLD-DIR NEW-DIR
462f9d2fd9Stholo
472f9d2fd9Stholo  3. Fix the CVS administrative files, if necessary (for instance if
482f9d2fd9Stholo     you renamed an entire module).
492f9d2fd9Stholo
502f9d2fd9Stholo  4. Tell everyone that they can check out again and continue working.
512f9d2fd9Stholo
522f9d2fd9Stholo
532f9d2fd9Stholo   If someone had a working copy the CVS commands will cease to work
542f9d2fd9Stholofor him, until he removes the directory that disappeared inside the
552f9d2fd9Stholorepository.
562f9d2fd9Stholo
572f9d2fd9Stholo   It is almost always better to move the files in the directory
582f9d2fd9Stholoinstead of moving the directory.  If you move the directory you are
592f9d2fd9Stholounlikely to be able to retrieve old releases correctly, since they
602f9d2fd9Stholoprobably depend on the name of the directories.
612f9d2fd9Stholo
622f9d2fd9Stholo
632f9d2fd9StholoFile: cvs.info,  Node: History browsing,  Next: Binary files,  Prev: Adding and removing,  Up: Top
642f9d2fd9Stholo
652f9d2fd9StholoHistory browsing
662f9d2fd9Stholo****************
672f9d2fd9Stholo
682f9d2fd9Stholo   Once you have used CVS to store a version control history--what
692f9d2fd9Stholofiles have changed when, how, and by whom, there are a variety of
702f9d2fd9Stholomechanisms for looking through the history.
712f9d2fd9Stholo
722f9d2fd9Stholo* Menu:
732f9d2fd9Stholo
742f9d2fd9Stholo* log messages::                Log messages
752f9d2fd9Stholo* history database::            The history database
762f9d2fd9Stholo* user-defined logging::        User-defined logging
772f9d2fd9Stholo* annotate::                    What revision modified each line of a file?
782f9d2fd9Stholo
792f9d2fd9Stholo
802f9d2fd9StholoFile: cvs.info,  Node: log messages,  Next: history database,  Up: History browsing
812f9d2fd9Stholo
822f9d2fd9StholoLog messages
832f9d2fd9Stholo============
842f9d2fd9Stholo
852f9d2fd9Stholo   Whenever you commit a file you specify a log message.
862f9d2fd9Stholo
872f9d2fd9Stholo   To look through the log messages which have been specified for every
882f9d2fd9Stholorevision which has been committed, use the `cvs log' command (*note
89e77048c1Sthololog::).
902f9d2fd9Stholo
912f9d2fd9Stholo
922f9d2fd9StholoFile: cvs.info,  Node: history database,  Next: user-defined logging,  Prev: log messages,  Up: History browsing
932f9d2fd9Stholo
942f9d2fd9StholoThe history database
952f9d2fd9Stholo====================
962f9d2fd9Stholo
97e77048c1Stholo   You can use the history file (*note history file::) to log various
982f9d2fd9StholoCVS actions.  To retrieve the information from the history file, use
99e77048c1Stholothe `cvs history' command (*note history::).
100e77048c1Stholo
101e77048c1Stholo   Note: you can control what is logged to this file by using the
102e77048c1Stholo`LogHistory' keyword in the `CVSROOT/config' file (*note config::).
1032f9d2fd9Stholo
1042f9d2fd9Stholo
1052f9d2fd9StholoFile: cvs.info,  Node: user-defined logging,  Next: annotate,  Prev: history database,  Up: History browsing
1062f9d2fd9Stholo
1072f9d2fd9StholoUser-defined logging
1082f9d2fd9Stholo====================
1092f9d2fd9Stholo
1102f9d2fd9Stholo   You can customize CVS to log various kinds of actions, in whatever
1112f9d2fd9Stholomanner you choose.  These mechanisms operate by executing a script at
1122f9d2fd9Stholovarious times.  The script might append a message to a file listing the
1132f9d2fd9Stholoinformation and the programmer who created it, or send mail to a group
1142f9d2fd9Stholoof developers, or, perhaps, post a message to a particular newsgroup.
115e77048c1StholoTo log commits, use the `loginfo' file (*note loginfo::).  To log
1162f9d2fd9Stholocommits, checkouts, exports, and tags, respectively, you can also use
1172f9d2fd9Stholothe `-i', `-o', `-e', and `-t' options in the modules file.  For a more
1182f9d2fd9Stholoflexible way of giving notifications to various users, which requires
1192f9d2fd9Sthololess in the way of keeping centralized scripts up to date, use the `cvs
120e77048c1Stholowatch add' command (*note Getting Notified::); this command is useful
1212f9d2fd9Stholoeven if you are not using `cvs watch on'.
1222f9d2fd9Stholo
1232f9d2fd9Stholo   The `taginfo' file defines programs to execute when someone executes
1242f9d2fd9Stholoa `tag' or `rtag' command.  The `taginfo' file has the standard form
125e77048c1Stholofor administrative files (*note Administrative files::), where each
1262f9d2fd9Sthololine is a regular expression followed by a command to execute.  The
1272f9d2fd9Stholoarguments passed to the command are, in order, the TAGNAME, OPERATION
1282f9d2fd9Stholo(`add' for `tag', `mov' for `tag -F', and `del' for `tag -d'),
1292f9d2fd9StholoREPOSITORY, and any remaining are pairs of FILENAME REVISION.  A
1302f9d2fd9Stholonon-zero exit of the filter program will cause the tag to be aborted.
1312f9d2fd9Stholo
1322f9d2fd9Stholo   Here is an example of using taginfo to log tag and rtag commands.
1332f9d2fd9StholoIn the taginfo file put:
1342f9d2fd9Stholo
1352f9d2fd9Stholo     ALL /usr/local/cvsroot/CVSROOT/loggit
1362f9d2fd9Stholo
1372f9d2fd9Stholo   Where `/usr/local/cvsroot/CVSROOT/loggit' contains the following
1382f9d2fd9Stholoscript:
1392f9d2fd9Stholo
1402f9d2fd9Stholo     #!/bin/sh
1412f9d2fd9Stholo     echo "$@" >>/home/kingdon/cvsroot/CVSROOT/taglog
1422f9d2fd9Stholo
1432f9d2fd9Stholo
1442f9d2fd9StholoFile: cvs.info,  Node: annotate,  Prev: user-defined logging,  Up: History browsing
1452f9d2fd9Stholo
1462f9d2fd9StholoAnnotate command
1472f9d2fd9Stholo================
1482f9d2fd9Stholo
1492f9d2fd9Stholo - Command: cvs annotate [`-flR'] [`-r rev'|`-D date'] files ...
1502f9d2fd9Stholo     For each file in FILES, print the head revision of the trunk,
1512f9d2fd9Stholo     together with information on the last modification for each line.
1522f9d2fd9Stholo     For example:
1532f9d2fd9Stholo
1542f9d2fd9Stholo          $ cvs annotate ssfile
1552f9d2fd9Stholo          Annotations for ssfile
1562f9d2fd9Stholo          ***************
1572f9d2fd9Stholo          1.1          (mary     27-Mar-96): ssfile line 1
1582f9d2fd9Stholo          1.2          (joe      28-Mar-96): ssfile line 2
1592f9d2fd9Stholo
1602f9d2fd9Stholo     The file `ssfile' currently contains two lines.  The `ssfile line
1612f9d2fd9Stholo     1' line was checked in by `mary' on March 27.  Then, on March 28,
1622f9d2fd9Stholo     `joe' added a line `ssfile line 2', without modifying the `ssfile
1632f9d2fd9Stholo     line 1' line.  This report doesn't tell you anything about lines
1642f9d2fd9Stholo     which have been deleted or replaced; you need to use `cvs diff'
165e77048c1Stholo     for that (*note diff::).
1662f9d2fd9Stholo
1672f9d2fd9Stholo
1682f9d2fd9Stholo   The options to `cvs annotate' are listed in *Note Invoking CVS::,
1692f9d2fd9Stholoand can be used to select the files and revisions to annotate.  The
1702f9d2fd9Stholooptions are described in more detail in *Note Common options::.
1712f9d2fd9Stholo
1722f9d2fd9Stholo
1732f9d2fd9StholoFile: cvs.info,  Node: Binary files,  Next: Multiple developers,  Prev: History browsing,  Up: Top
1742f9d2fd9Stholo
1752f9d2fd9StholoHandling binary files
1762f9d2fd9Stholo*********************
1772f9d2fd9Stholo
1782f9d2fd9Stholo   The most common use for CVS is to store text files.  With text
1792f9d2fd9Stholofiles, CVS can merge revisions, display the differences between
1802f9d2fd9Stholorevisions in a human-visible fashion, and other such operations.
1812f9d2fd9StholoHowever, if you are willing to give up a few of these abilities, CVS
1822f9d2fd9Stholocan store binary files.  For example, one might store a web site in CVS
1832f9d2fd9Stholoincluding both text files and binary images.
1842f9d2fd9Stholo
1852f9d2fd9Stholo* Menu:
1862f9d2fd9Stholo
1872f9d2fd9Stholo* Binary why::     More details on issues with binary files
1882f9d2fd9Stholo* Binary howto::   How to store them
1892f9d2fd9Stholo
1902f9d2fd9Stholo
1912f9d2fd9StholoFile: cvs.info,  Node: Binary why,  Next: Binary howto,  Up: Binary files
1922f9d2fd9Stholo
1932f9d2fd9StholoThe issues with binary files
1942f9d2fd9Stholo============================
1952f9d2fd9Stholo
1962f9d2fd9Stholo   While the need to manage binary files may seem obvious if the files
1972f9d2fd9Stholothat you customarily work with are binary, putting them into version
1982f9d2fd9Stholocontrol does present some additional issues.
1992f9d2fd9Stholo
2002f9d2fd9Stholo   One basic function of version control is to show the differences
2012f9d2fd9Stholobetween two revisions.  For example, if someone else checked in a new
2022f9d2fd9Stholoversion of a file, you may wish to look at what they changed and
2032f9d2fd9Stholodetermine whether their changes are good.  For text files, CVS provides
2042f9d2fd9Stholothis functionality via the `cvs diff' command.  For binary files, it
2052f9d2fd9Stholomay be possible to extract the two revisions and then compare them with
2062f9d2fd9Stholoa tool external to CVS (for example, word processing software often has
2072f9d2fd9Stholosuch a feature).  If there is no such tool, one must track changes via
2082f9d2fd9Stholoother mechanisms, such as urging people to write good log messages, and
2092f9d2fd9Stholohoping that the changes they actually made were the changes that they
2102f9d2fd9Stholointended to make.
2112f9d2fd9Stholo
2122f9d2fd9Stholo   Another ability of a version control system is the ability to merge
2132f9d2fd9Stholotwo revisions.  For CVS this happens in two contexts.  The first is
2142f9d2fd9Stholowhen users make changes in separate working directories (*note Multiple
215e77048c1Stholodevelopers::).  The second is when one merges explicitly with the
216e77048c1Stholo`update -j' command (*note Branching and merging::).
2172f9d2fd9Stholo
2182f9d2fd9Stholo   In the case of text files, CVS can merge changes made independently,
2192f9d2fd9Stholoand signal a conflict if the changes conflict.  With binary files, the
2202f9d2fd9Stholobest that CVS can do is present the two different copies of the file,
2212f9d2fd9Stholoand leave it to the user to resolve the conflict.  The user may choose
2222f9d2fd9Stholoone copy or the other, or may run an external merge tool which knows
2232f9d2fd9Stholoabout that particular file format, if one exists.  Note that having the
2242f9d2fd9Stholouser merge relies primarily on the user to not accidentally omit some
2252f9d2fd9Stholochanges, and thus is potentially error prone.
2262f9d2fd9Stholo
2272f9d2fd9Stholo   If this process is thought to be undesirable, the best choice may be
2282f9d2fd9Stholoto avoid merging.  To avoid the merges that result from separate
2292f9d2fd9Stholoworking directories, see the discussion of reserved checkouts (file
2302f9d2fd9Sthololocking) in *Note Multiple developers::.  To avoid the merges resulting
2312f9d2fd9Stholofrom branches, restrict use of branches.
2322f9d2fd9Stholo
2332f9d2fd9Stholo
2348506102dStholoFile: cvs.info,  Node: Binary howto,  Prev: Binary why,  Up: Binary files
2358506102dStholo
2368506102dStholoHow to store binary files
2378506102dStholo=========================
2388506102dStholo
2398506102dStholo   There are two issues with using CVS to store binary files.  The
2408506102dStholofirst is that CVS by default converts line endings between the
2418506102dStholocanonical form in which they are stored in the repository (linefeed
2428506102dStholoonly), and the form appropriate to the operating system in use on the
2438506102dStholoclient (for example, carriage return followed by line feed for Windows
2448506102dStholoNT).
2458506102dStholo
2468506102dStholo   The second is that a binary file might happen to contain data which
247e77048c1Sthololooks like a keyword (*note Keyword substitution::), so keyword
2488506102dStholoexpansion must be turned off.
2498506102dStholo
2508506102dStholo   The `-kb' option available with some CVS commands insures that
2518506102dStholoneither line ending conversion nor keyword expansion will be done.
2528506102dStholo
2538506102dStholo   Here is an example of how you can create a new file using the `-kb'
2548506102dStholoflag:
2558506102dStholo
256*55b57aafStholo     $ echo '$Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $' > kotest
2578506102dStholo     $ cvs add -kb -m"A test file" kotest
2588506102dStholo     $ cvs ci -m"First checkin; contains a keyword" kotest
2598506102dStholo
2608506102dStholo   If a file accidentally gets added without `-kb', one can use the
2618506102dStholo`cvs admin' command to recover.  For example:
2628506102dStholo
263*55b57aafStholo     $ echo '$Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $' > kotest
2648506102dStholo     $ cvs add -m"A test file" kotest
2658506102dStholo     $ cvs ci -m"First checkin; contains a keyword" kotest
2668506102dStholo     $ cvs admin -kb kotest
2678506102dStholo     $ cvs update -A kotest
2688506102dStholo     # For non-unix systems:
2698506102dStholo     # Copy in a good copy of the file from outside CVS
2708506102dStholo     $ cvs commit -m "make it binary" kotest
2718506102dStholo
2728506102dStholo   When you check in the file `kotest' the file is not preserved as a
2738506102dStholobinary file, because you did not check it in as a binary file.  The `cvs
2748506102dStholoadmin -kb' command sets the default keyword substitution method for
2758506102dStholothis file, but it does not alter the working copy of the file that you
2768506102dStholohave.  If you need to cope with line endings (that is, you are using
2778506102dStholoCVS on a non-unix system), then you need to check in a new copy of the
2788506102dStholofile, as shown by the `cvs commit' command above.  On unix, the `cvs
2798506102dStholoupdate -A' command suffices.
2808506102dStholo
2818506102dStholo   However, in using `cvs admin -k' to change the keyword expansion, be
2828506102dStholoaware that the keyword expansion mode is not version controlled.  This
2838506102dStholomeans that, for example, that if you have a text file in old releases,
2848506102dStholoand a binary file with the same name in new releases, CVS provides no
2858506102dStholoway to check out the file in text or binary mode depending on what
2868506102dStholoversion you are checking out.  There is no good workaround for this
2878506102dStholoproblem.
2888506102dStholo
2898506102dStholo   You can also set a default for whether `cvs add' and `cvs import'
2908506102dStholotreat a file as binary based on its name; for example you could say
2918506102dStholothat files who names end in `.exe' are binary.  *Note Wrappers::.
2928506102dStholoThere is currently no way to have CVS detect whether a file is binary
2938506102dStholobased on its contents.  The main difficulty with designing such a
2948506102dStholofeature is that it is not clear how to distinguish between binary and
2958506102dStholonon-binary files, and the rules to apply would vary considerably with
2968506102dStholothe operating system.
2978506102dStholo
2988506102dStholo
2998506102dStholoFile: cvs.info,  Node: Multiple developers,  Next: Revision management,  Prev: Binary files,  Up: Top
3008506102dStholo
3018506102dStholoMultiple developers
3028506102dStholo*******************
3038506102dStholo
3048506102dStholo   When more than one person works on a software project things often
3058506102dSthologet complicated.  Often, two people try to edit the same file
3068506102dStholosimultaneously.  One solution, known as "file locking" or "reserved
3078506102dStholocheckouts", is to allow only one person to edit each file at a time.
3088506102dStholoThis is the only solution with some version control systems, including
3098506102dStholoRCS and SCCS.  Currently the usual way to get reserved checkouts with
310e77048c1StholoCVS is the `cvs admin -l' command (*note admin options::).  This is not
311e77048c1Stholoas nicely integrated into CVS as the watch features, described below,
312e77048c1Stholobut it seems that most people with a need for reserved checkouts find
313e77048c1Stholoit adequate.  It also may be possible to use the watches features
3148506102dStholodescribed below, together with suitable procedures (not enforced by
3158506102dStholosoftware), to avoid having two people edit at the same time.
3168506102dStholo
3178506102dStholo   The default model with CVS is known as "unreserved checkouts".  In
3188506102dStholothis model, developers can edit their own "working copy" of a file
3198506102dStholosimultaneously.  The first person that commits his changes has no
3208506102dStholoautomatic way of knowing that another has started to edit it.  Others
3218506102dStholowill get an error message when they try to commit the file.  They must
3228506102dStholothen use CVS commands to bring their working copy up to date with the
3238506102dStholorepository revision.  This process is almost automatic.
3248506102dStholo
3258506102dStholo   CVS also supports mechanisms which facilitate various kinds of
3268506102dStholocommunication, without actually enforcing rules like reserved checkouts
3278506102dStholodo.
3288506102dStholo
3298506102dStholo   The rest of this chapter describes how these various models work,
3308506102dStholoand some of the issues involved in choosing between them.
3318506102dStholo
3328506102dStholo* Menu:
3338506102dStholo
3348506102dStholo* File status::                 A file can be in several states
3358506102dStholo* Updating a file::             Bringing a file up-to-date
3368506102dStholo* Conflicts example::           An informative example
3378506102dStholo* Informing others::            To cooperate you must inform
3388506102dStholo* Concurrency::                 Simultaneous repository access
3398506102dStholo* Watches::                     Mechanisms to track who is editing files
3408506102dStholo* Choosing a model::            Reserved or unreserved checkouts?
3418506102dStholo
3428506102dStholo
3438506102dStholoFile: cvs.info,  Node: File status,  Next: Updating a file,  Up: Multiple developers
3448506102dStholo
3458506102dStholoFile status
3468506102dStholo===========
3478506102dStholo
3488506102dStholo   Based on what operations you have performed on a checked out file,
3498506102dStholoand what operations others have performed to that file in the
3508506102dStholorepository, one can classify a file in a number of states.  The states,
3518506102dStholoas reported by the `status' command, are:
3528506102dStholo
3538506102dStholoUp-to-date
3548506102dStholo     The file is identical with the latest revision in the repository
3558506102dStholo     for the branch in use.
3568506102dStholo
3578506102dStholoLocally Modified
3588506102dStholo     You have edited the file, and not yet committed your changes.
3598506102dStholo
3608506102dStholoLocally Added
3618506102dStholo     You have added the file with `add', and not yet committed your
3628506102dStholo     changes.
3638506102dStholo
3648506102dStholoLocally Removed
3658506102dStholo     You have removed the file with `remove', and not yet committed
3668506102dStholo     your changes.
3678506102dStholo
3688506102dStholoNeeds Checkout
3698506102dStholo     Someone else has committed a newer revision to the repository.
3708506102dStholo     The name is slightly misleading; you will ordinarily use `update'
3718506102dStholo     rather than `checkout' to get that newer revision.
3728506102dStholo
3738506102dStholoNeeds Patch
3748506102dStholo     Like Needs Checkout, but the CVS server will send a patch rather
3758506102dStholo     than the entire file.  Sending a patch or sending an entire file
3768506102dStholo     accomplishes the same thing.
3778506102dStholo
3788506102dStholoNeeds Merge
3798506102dStholo     Someone else has committed a newer revision to the repository, and
3808506102dStholo     you have also made modifications to the file.
3818506102dStholo
3828506102dStholoFile had conflicts on merge
3838506102dStholo     This is like Locally Modified, except that a previous `update'
3848506102dStholo     command gave a conflict.  If you have not already done so, you
3858506102dStholo     need to resolve the conflict as described in *Note Conflicts
3868506102dStholo     example::.
3878506102dStholo
3888506102dStholoUnknown
3898506102dStholo     CVS doesn't know anything about this file.  For example, you have
3908506102dStholo     created a new file and have not run `add'.
3918506102dStholo
3928506102dStholo   To help clarify the file status, `status' also reports the `Working
3938506102dStholorevision' which is the revision that the file in the working directory
3948506102dStholoderives from, and the `Repository revision' which is the latest
3958506102dStholorevision in the repository for the branch in use.
3968506102dStholo
3978506102dStholo   The options to `status' are listed in *Note Invoking CVS::.  For
3988506102dStholoinformation on its `Sticky tag' and `Sticky date' output, see *Note
3998506102dStholoSticky tags::.  For information on its `Sticky options' output, see the
4008506102dStholo`-k' option in *Note update options::.
4018506102dStholo
4028506102dStholo   You can think of the `status' and `update' commands as somewhat
4038506102dStholocomplementary.  You use `update' to bring your files up to date, and you
4048506102dStholocan use `status' to give you some idea of what an `update' would do (of
4058506102dStholocourse, the state of the repository might change before you actually run
4068506102dStholo`update').  In fact, if you want a command to display file status in a
4078506102dStholomore brief format than is displayed by the `status' command, you can
4088506102dStholoinvoke
4098506102dStholo
4108506102dStholo     $ cvs -n -q update
4118506102dStholo
4128506102dStholo   The `-n' option means to not actually do the update, but merely to
4138506102dStholodisplay statuses; the `-q' option avoids printing the name of each
4148506102dStholodirectory.  For more information on the `update' command, and these
4158506102dStholooptions, see *Note Invoking CVS::.
4168506102dStholo
4178506102dStholo
4188506102dStholoFile: cvs.info,  Node: Updating a file,  Next: Conflicts example,  Prev: File status,  Up: Multiple developers
4198506102dStholo
4208506102dStholoBringing a file up to date
4218506102dStholo==========================
4228506102dStholo
4238506102dStholo   When you want to update or merge a file, use the `update' command.
4248506102dStholoFor files that are not up to date this is roughly equivalent to a
4258506102dStholo`checkout' command: the newest revision of the file is extracted from
4268506102dStholothe repository and put in your working directory.
4278506102dStholo
4288506102dStholo   Your modifications to a file are never lost when you use `update'.
4298506102dStholoIf no newer revision exists, running `update' has no effect.  If you
4308506102dStholohave edited the file, and a newer revision is available, CVS will merge
4318506102dStholoall changes into your working copy.
4328506102dStholo
4338506102dStholo   For instance, imagine that you checked out revision 1.4 and started
4348506102dStholoediting it.  In the meantime someone else committed revision 1.5, and
4358506102dStholoshortly after that revision 1.6.  If you run `update' on the file now,
4368506102dStholoCVS will incorporate all changes between revision 1.4 and 1.6 into your
4378506102dStholofile.
4388506102dStholo
4398506102dStholo   If any of the changes between 1.4 and 1.6 were made too close to any
4408506102dStholoof the changes you have made, an "overlap" occurs.  In such cases a
4418506102dStholowarning is printed, and the resulting file includes both versions of
4428506102dStholothe lines that overlap, delimited by special markers.  *Note update::,
4438506102dStholofor a complete description of the `update' command.
4448506102dStholo
4458506102dStholo
4468506102dStholoFile: cvs.info,  Node: Conflicts example,  Next: Informing others,  Prev: Updating a file,  Up: Multiple developers
4478506102dStholo
4488506102dStholoConflicts example
4498506102dStholo=================
4508506102dStholo
4518506102dStholo   Suppose revision 1.4 of `driver.c' contains this:
4528506102dStholo
4538506102dStholo     #include <stdio.h>
4548506102dStholo
4558506102dStholo     void main()
4568506102dStholo     {
4578506102dStholo         parse();
4588506102dStholo         if (nerr == 0)
4598506102dStholo             gencode();
4608506102dStholo         else
4618506102dStholo             fprintf(stderr, "No code generated.\n");
4628506102dStholo         exit(nerr == 0 ? 0 : 1);
4638506102dStholo     }
4648506102dStholo
4658506102dStholoRevision 1.6 of `driver.c' contains this:
4668506102dStholo
4678506102dStholo     #include <stdio.h>
4688506102dStholo
4698506102dStholo     int main(int argc,
4708506102dStholo              char **argv)
4718506102dStholo     {
4728506102dStholo         parse();
4738506102dStholo         if (argc != 1)
4748506102dStholo         {
4758506102dStholo             fprintf(stderr, "tc: No args expected.\n");
4768506102dStholo             exit(1);
4778506102dStholo         }
4788506102dStholo         if (nerr == 0)
4798506102dStholo             gencode();
4808506102dStholo         else
4818506102dStholo             fprintf(stderr, "No code generated.\n");
4828506102dStholo         exit(!!nerr);
4838506102dStholo     }
4848506102dStholo
4858506102dStholoYour working copy of `driver.c', based on revision 1.4, contains this
4868506102dStholobefore you run `cvs update':
4878506102dStholo
4888506102dStholo     #include <stdlib.h>
4898506102dStholo     #include <stdio.h>
4908506102dStholo
4918506102dStholo     void main()
4928506102dStholo     {
4938506102dStholo         init_scanner();
4948506102dStholo         parse();
4958506102dStholo         if (nerr == 0)
4968506102dStholo             gencode();
4978506102dStholo         else
4988506102dStholo             fprintf(stderr, "No code generated.\n");
4998506102dStholo         exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
5008506102dStholo     }
5018506102dStholo
5028506102dStholoYou run `cvs update':
5038506102dStholo
5048506102dStholo     $ cvs update driver.c
5058506102dStholo     RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
5068506102dStholo     retrieving revision 1.4
5078506102dStholo     retrieving revision 1.6
5088506102dStholo     Merging differences between 1.4 and 1.6 into driver.c
5098506102dStholo     rcsmerge warning: overlaps during merge
5108506102dStholo     cvs update: conflicts found in driver.c
5118506102dStholo     C driver.c
5128506102dStholo
5138506102dStholoCVS tells you that there were some conflicts.  Your original working
5148506102dStholofile is saved unmodified in `.#driver.c.1.4'.  The new version of
5158506102dStholo`driver.c' contains this:
5168506102dStholo
5178506102dStholo     #include <stdlib.h>
5188506102dStholo     #include <stdio.h>
5198506102dStholo
5208506102dStholo     int main(int argc,
5218506102dStholo              char **argv)
5228506102dStholo     {
5238506102dStholo         init_scanner();
5248506102dStholo         parse();
5258506102dStholo         if (argc != 1)
5268506102dStholo         {
5278506102dStholo             fprintf(stderr, "tc: No args expected.\n");
5288506102dStholo             exit(1);
5298506102dStholo         }
5308506102dStholo         if (nerr == 0)
5318506102dStholo             gencode();
5328506102dStholo         else
5338506102dStholo             fprintf(stderr, "No code generated.\n");
5348506102dStholo     <<<<<<< driver.c
5358506102dStholo         exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
5368506102dStholo     =======
5378506102dStholo         exit(!!nerr);
5388506102dStholo     >>>>>>> 1.6
5398506102dStholo     }
5408506102dStholo
5418506102dStholoNote how all non-overlapping modifications are incorporated in your
5428506102dStholoworking copy, and that the overlapping section is clearly marked with
5438506102dStholo`<<<<<<<', `=======' and `>>>>>>>'.
5448506102dStholo
5458506102dStholo   You resolve the conflict by editing the file, removing the markers
5468506102dStholoand the erroneous line.  Suppose you end up with this file:
5478506102dStholo     #include <stdlib.h>
5488506102dStholo     #include <stdio.h>
5498506102dStholo
5508506102dStholo     int main(int argc,
5518506102dStholo              char **argv)
5528506102dStholo     {
5538506102dStholo         init_scanner();
5548506102dStholo         parse();
5558506102dStholo         if (argc != 1)
5568506102dStholo         {
5578506102dStholo             fprintf(stderr, "tc: No args expected.\n");
5588506102dStholo             exit(1);
5598506102dStholo         }
5608506102dStholo         if (nerr == 0)
5618506102dStholo             gencode();
5628506102dStholo         else
5638506102dStholo             fprintf(stderr, "No code generated.\n");
5648506102dStholo         exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
5658506102dStholo     }
5668506102dStholo
5678506102dStholoYou can now go ahead and commit this as revision 1.7.
5688506102dStholo
5698506102dStholo     $ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c
5708506102dStholo     Checking in driver.c;
5718506102dStholo     /usr/local/cvsroot/yoyodyne/tc/driver.c,v  <--  driver.c
5728506102dStholo     new revision: 1.7; previous revision: 1.6
5738506102dStholo     done
5748506102dStholo
5758506102dStholo   For your protection, CVS will refuse to check in a file if a
5768506102dStholoconflict occurred and you have not resolved the conflict.  Currently to
5778506102dStholoresolve a conflict, you must change the timestamp on the file.  In
5788506102dStholoprevious versions of CVS, you also needed to insure that the file
5798506102dStholocontains no conflict markers.  Because your file may legitimately
5808506102dStholocontain conflict markers (that is, occurrences of `>>>>>>> ' at the
5818506102dStholostart of a line that don't mark a conflict), the current version of CVS
5828506102dStholowill print a warning and proceed to check in the file.
5838506102dStholo
5848506102dStholo   If you use release 1.04 or later of pcl-cvs (a GNU Emacs front-end
5858506102dStholofor CVS) you can use an Emacs package called emerge to help you resolve
5868506102dStholoconflicts.  See the documentation for pcl-cvs.
5878506102dStholo
5888506102dStholo
589f79d7d1bStholoFile: cvs.info,  Node: Informing others,  Next: Concurrency,  Prev: Conflicts example,  Up: Multiple developers
590565bb110Stholo
591f79d7d1bStholoInforming others about commits
592f79d7d1bStholo==============================
593565bb110Stholo
594f79d7d1bStholo   It is often useful to inform others when you commit a new revision
595f79d7d1bStholoof a file.  The `-i' option of the `modules' file, or the `loginfo'
596f79d7d1bStholofile, can be used to automate this process.  *Note modules::.  *Note
597f79d7d1bStholologinfo::.  You can use these features of CVS to, for instance,
598f79d7d1bStholoinstruct CVS to mail a message to all developers, or post a message to
599f79d7d1bStholoa local newsgroup.
600565bb110Stholo
601565bb110Stholo
602f79d7d1bStholoFile: cvs.info,  Node: Concurrency,  Next: Watches,  Prev: Informing others,  Up: Multiple developers
603565bb110Stholo
604f79d7d1bStholoSeveral developers simultaneously attempting to run CVS
605f79d7d1bStholo=======================================================
606565bb110Stholo
607f79d7d1bStholo   If several developers try to run CVS at the same time, one may get
608f79d7d1bStholothe following message:
609565bb110Stholo
610f79d7d1bStholo     [11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo
611565bb110Stholo
612f79d7d1bStholo   CVS will try again every 30 seconds, and either continue with the
613f79d7d1bStholooperation or print the message again, if it still needs to wait.  If a
614f79d7d1bSthololock seems to stick around for an undue amount of time, find the person
615f79d7d1bStholoholding the lock and ask them about the cvs command they are running.
616f79d7d1bStholoIf they aren't running a cvs command, look in the repository directory
617f79d7d1bStholomentioned in the message and remove files which they own whose names
618d794bb93Stholostart with `#cvs.rfl', `#cvs.wfl', or `#cvs.lock'.
619565bb110Stholo
620f79d7d1bStholo   Note that these locks are to protect CVS's internal data structures
621f79d7d1bStholoand have no relationship to the word "lock" in the sense used by
622e77048c1StholoRCS--which refers to reserved checkouts (*note Multiple developers::).
623565bb110Stholo
624f79d7d1bStholo   Any number of people can be reading from a given repository at a
625f79d7d1bStholotime; only when someone is writing do the locks prevent other people
626f79d7d1bStholofrom reading or writing.
627565bb110Stholo
628f79d7d1bStholo   One might hope for the following property
629565bb110Stholo
630f79d7d1bStholo     If someone commits some changes in one cvs command,
631f79d7d1bStholo     then an update by someone else will either get all the
632f79d7d1bStholo     changes, or none of them.
633565bb110Stholo
6342f9d2fd9Stholo   but CVS does _not_ have this property.  For example, given the files
635565bb110Stholo
636f79d7d1bStholo     a/one.c
637f79d7d1bStholo     a/two.c
638f79d7d1bStholo     b/three.c
639f79d7d1bStholo     b/four.c
640565bb110Stholo
641f79d7d1bStholo   if someone runs
642f79d7d1bStholo
643f79d7d1bStholo     cvs ci a/two.c b/three.c
644f79d7d1bStholo
645f79d7d1bStholo   and someone else runs `cvs update' at the same time, the person
646f79d7d1bStholorunning `update' might get only the change to `b/three.c' and not the
647f79d7d1bStholochange to `a/two.c'.
648565bb110Stholo
649565bb110Stholo
650f79d7d1bStholoFile: cvs.info,  Node: Watches,  Next: Choosing a model,  Prev: Concurrency,  Up: Multiple developers
651565bb110Stholo
652f79d7d1bStholoMechanisms to track who is editing files
653f79d7d1bStholo========================================
654565bb110Stholo
655f79d7d1bStholo   For many groups, use of CVS in its default mode is perfectly
656f79d7d1bStholosatisfactory.  Users may sometimes go to check in a modification only
657f79d7d1bStholoto find that another modification has intervened, but they deal with it
658f79d7d1bStholoand proceed with their check in.  Other groups prefer to be able to
659f79d7d1bStholoknow who is editing what files, so that if two people try to edit the
660f79d7d1bStholosame file they can choose to talk about who is doing what when rather
661f79d7d1bStholothan be surprised at check in time.  The features in this section allow
662f79d7d1bStholosuch coordination, while retaining the ability of two developers to
663f79d7d1bStholoedit the same file at the same time.
664f79d7d1bStholo
665f79d7d1bStholo   For maximum benefit developers should use `cvs edit' (not `chmod')
666f79d7d1bStholoto make files read-write to edit them, and `cvs release' (not `rm') to
667f79d7d1bStholodiscard a working directory which is no longer in use, but CVS is not
668f79d7d1bStholoable to enforce this behavior.
669565bb110Stholo
670565bb110Stholo* Menu:
671565bb110Stholo
672f79d7d1bStholo* Setting a watch::             Telling CVS to watch certain files
673f79d7d1bStholo* Getting Notified::            Telling CVS to notify you
674f79d7d1bStholo* Editing files::               How to edit a file which is being watched
675f79d7d1bStholo* Watch information::           Information about who is watching and editing
676f79d7d1bStholo* Watches Compatibility::       Watches interact poorly with CVS 1.6 or earlier
677565bb110Stholo
678565bb110Stholo
679f79d7d1bStholoFile: cvs.info,  Node: Setting a watch,  Next: Getting Notified,  Up: Watches
680565bb110Stholo
681f79d7d1bStholoTelling CVS to watch certain files
682f79d7d1bStholo----------------------------------
683565bb110Stholo
684f79d7d1bStholo   To enable the watch features, you first specify that certain files
685f79d7d1bStholoare to be watched.
686565bb110Stholo
6872f9d2fd9Stholo - Command: cvs watch on [`-lR'] files ...
688f79d7d1bStholo     Specify that developers should run `cvs edit' before editing
689f79d7d1bStholo     FILES.  CVS will create working copies of FILES read-only, to
690f79d7d1bStholo     remind developers to run the `cvs edit' command before working on
691f79d7d1bStholo     them.
692f79d7d1bStholo
693f79d7d1bStholo     If FILES includes the name of a directory, CVS arranges to watch
694f79d7d1bStholo     all files added to the corresponding repository directory, and
695f79d7d1bStholo     sets a default for files added in the future; this allows the user
696f79d7d1bStholo     to set notification policies on a per-directory basis.  The
697f79d7d1bStholo     contents of the directory are processed recursively, unless the
698f79d7d1bStholo     `-l' option is given.  The `-R' option can be used to force
699f79d7d1bStholo     recursion if the `-l' option is set in `~/.cvsrc' (*note
700e77048c1Stholo     ~/.cvsrc::).
701f79d7d1bStholo
702f79d7d1bStholo     If FILES is omitted, it defaults to the current directory.
703f79d7d1bStholo
704f79d7d1bStholo
7052f9d2fd9Stholo - Command: cvs watch off [`-lR'] files ...
706e77048c1Stholo     Do not create FILES read-only on checkout; thus, developers will
707e77048c1Stholo     not be reminded to use `cvs edit' and `cvs unedit'.
708f79d7d1bStholo
709f79d7d1bStholo     The FILES and options are processed as for `cvs watch on'.
710f79d7d1bStholo
711565bb110Stholo
712565bb110Stholo
713f79d7d1bStholoFile: cvs.info,  Node: Getting Notified,  Next: Editing files,  Prev: Setting a watch,  Up: Watches
714565bb110Stholo
715f79d7d1bStholoTelling CVS to notify you
716f79d7d1bStholo-------------------------
717565bb110Stholo
718f79d7d1bStholo   You can tell CVS that you want to receive notifications about
719f79d7d1bStholovarious actions taken on a file.  You can do this without using `cvs
720f79d7d1bStholowatch on' for the file, but generally you will want to use `cvs watch
721f79d7d1bStholoon', so that developers use the `cvs edit' command.
722f79d7d1bStholo
7232f9d2fd9Stholo - Command: cvs watch add [`-a' action] [`-lR'] files ...
724f79d7d1bStholo     Add the current user to the list of people to receive notification
725f79d7d1bStholo     of work done on FILES.
726f79d7d1bStholo
727f79d7d1bStholo     The `-a' option specifies what kinds of events CVS should notify
728f79d7d1bStholo     the user about.  ACTION is one of the following:
729f79d7d1bStholo
730f79d7d1bStholo    `edit'
731f79d7d1bStholo          Another user has applied the `cvs edit' command (described
732f79d7d1bStholo          below) to a file.
733f79d7d1bStholo
734f79d7d1bStholo    `unedit'
735f79d7d1bStholo          Another user has applied the `cvs unedit' command (described
736f79d7d1bStholo          below) or the `cvs release' command to a file, or has deleted
737f79d7d1bStholo          the file and allowed `cvs update' to recreate it.
738f79d7d1bStholo
739f79d7d1bStholo    `commit'
740f79d7d1bStholo          Another user has committed changes to a file.
741f79d7d1bStholo
742f79d7d1bStholo    `all'
743f79d7d1bStholo          All of the above.
744f79d7d1bStholo
745f79d7d1bStholo    `none'
746f79d7d1bStholo          None of the above.  (This is useful with `cvs edit',
747f79d7d1bStholo          described below.)
748f79d7d1bStholo
749f79d7d1bStholo     The `-a' option may appear more than once, or not at all.  If
750f79d7d1bStholo     omitted, the action defaults to `all'.
751f79d7d1bStholo
752f79d7d1bStholo     The FILES and options are processed as for the `cvs watch'
753f79d7d1bStholo     commands.
754f79d7d1bStholo
755f79d7d1bStholo
7562f9d2fd9Stholo - Command: cvs watch remove [`-a' action] [`-lR'] files ...
757f79d7d1bStholo     Remove a notification request established using `cvs watch add';
758f79d7d1bStholo     the arguments are the same.  If the `-a' option is present, only
759f79d7d1bStholo     watches for the specified actions are removed.
760f79d7d1bStholo
761f79d7d1bStholo
762f79d7d1bStholo   When the conditions exist for notification, CVS calls the `notify'
763f79d7d1bStholoadministrative file.  Edit `notify' as one edits the other
764e77048c1Stholoadministrative files (*note Intro administrative files::).  This file
765f79d7d1bStholofollows the usual conventions for administrative files (*note
766e77048c1Stholosyntax::), where each line is a regular expression followed by a
7678506102dStholocommand to execute.  The command should contain a single occurrence of
768f79d7d1bStholo`%s' which will be replaced by the user to notify; the rest of the
769f79d7d1bStholoinformation regarding the notification will be supplied to the command
770f79d7d1bStholoon standard input.  The standard thing to put in the `notify' file is
771f79d7d1bStholothe single line:
772f79d7d1bStholo
773e77048c1Stholo     ALL mail %s -s "CVS notification"
774f79d7d1bStholo
775f79d7d1bStholo   This causes users to be notified by electronic mail.
776f79d7d1bStholo
777f79d7d1bStholo   Note that if you set this up in the straightforward way, users
778f79d7d1bStholoreceive notifications on the server machine.  One could of course write
779f79d7d1bStholoa `notify' script which directed notifications elsewhere, but to make
780f79d7d1bStholothis easy, CVS allows you to associate a notification address for each
781f79d7d1bStholouser.  To do so create a file `users' in `CVSROOT' with a line for each
782f79d7d1bStholouser in the format USER:VALUE.  Then instead of passing the name of the
783f79d7d1bStholouser to be notified to `notify', CVS will pass the VALUE (normally an
784f79d7d1bStholoemail address on some other machine).
785f79d7d1bStholo
786f79d7d1bStholo   CVS does not notify you for your own changes.  Currently this check
787f79d7d1bStholois done based on whether the user name of the person taking the action
788f79d7d1bStholowhich triggers notification matches the user name of the person getting
789f79d7d1bStholonotification.  In fact, in general, the watches features only track one
790f79d7d1bStholoedit by each user.  It probably would be more useful if watches tracked
791f79d7d1bStholoeach working directory separately, so this behavior might be worth
792f79d7d1bStholochanging.
793565bb110Stholo
794565bb110Stholo
795f79d7d1bStholoFile: cvs.info,  Node: Editing files,  Next: Watch information,  Prev: Getting Notified,  Up: Watches
796565bb110Stholo
797f79d7d1bStholoHow to edit a file which is being watched
798f79d7d1bStholo-----------------------------------------
799565bb110Stholo
800f79d7d1bStholo   Since a file which is being watched is checked out read-only, you
801f79d7d1bStholocannot simply edit it.  To make it read-write, and inform others that
802f79d7d1bStholoyou are planning to edit it, use the `cvs edit' command.  Some systems
803f79d7d1bStholocall this a "checkout", but CVS uses that term for obtaining a copy of
804e77048c1Stholothe sources (*note Getting the source::), an operation which those
805f79d7d1bStholosystems call a "get" or a "fetch".
806565bb110Stholo
8072f9d2fd9Stholo - Command: cvs edit [options] files ...
808f79d7d1bStholo     Prepare to edit the working files FILES.  CVS makes the FILES
809f79d7d1bStholo     read-write, and notifies users who have requested `edit'
810f79d7d1bStholo     notification for any of FILES.
811f79d7d1bStholo
812f79d7d1bStholo     The `cvs edit' command accepts the same OPTIONS as the `cvs watch
813f79d7d1bStholo     add' command, and establishes a temporary watch for the user on
814f79d7d1bStholo     FILES; CVS will remove the watch when FILES are `unedit'ed or
815f79d7d1bStholo     `commit'ted.  If the user does not wish to receive notifications,
816f79d7d1bStholo     she should specify `-a none'.
817f79d7d1bStholo
818f79d7d1bStholo     The FILES and options are processed as for the `cvs watch'
819f79d7d1bStholo     commands.
820f79d7d1bStholo
821f79d7d1bStholo
822f79d7d1bStholo   Normally when you are done with a set of changes, you use the `cvs
823f79d7d1bStholocommit' command, which checks in your changes and returns the watched
824f79d7d1bStholofiles to their usual read-only state.  But if you instead decide to
825f79d7d1bStholoabandon your changes, or not to make any changes, you can use the `cvs
826f79d7d1bStholounedit' command.
827f79d7d1bStholo
8282f9d2fd9Stholo - Command: cvs unedit [`-lR'] files ...
829f79d7d1bStholo     Abandon work on the working files FILES, and revert them to the
830f79d7d1bStholo     repository versions on which they are based.  CVS makes those
831f79d7d1bStholo     FILES read-only for which users have requested notification using
832f79d7d1bStholo     `cvs watch on'.  CVS notifies users who have requested `unedit'
833f79d7d1bStholo     notification for any of FILES.
834f79d7d1bStholo
835f79d7d1bStholo     The FILES and options are processed as for the `cvs watch'
836f79d7d1bStholo     commands.
837f79d7d1bStholo
838f79d7d1bStholo     If watches are not in use, the `unedit' command probably does not
839f79d7d1bStholo     work, and the way to revert to the repository version is to remove
840f79d7d1bStholo     the file and then use `cvs update' to get a new copy.  The meaning
841f79d7d1bStholo     is not precisely the same; removing and updating may also bring in
842f79d7d1bStholo     some changes which have been made in the repository since the last
843f79d7d1bStholo     time you updated.
844f79d7d1bStholo
845f79d7d1bStholo   When using client/server CVS, you can use the `cvs edit' and `cvs
8468506102dStholounedit' commands even if CVS is unable to successfully communicate with
847f79d7d1bStholothe server; the notifications will be sent upon the next successful CVS
848f79d7d1bStholocommand.
849565bb110Stholo
850565bb110Stholo
851f79d7d1bStholoFile: cvs.info,  Node: Watch information,  Next: Watches Compatibility,  Prev: Editing files,  Up: Watches
852565bb110Stholo
853f79d7d1bStholoInformation about who is watching and editing
854f79d7d1bStholo---------------------------------------------
855565bb110Stholo
8562f9d2fd9Stholo - Command: cvs watchers [`-lR'] files ...
857f79d7d1bStholo     List the users currently watching changes to FILES.  The report
858f79d7d1bStholo     includes the files being watched, and the mail address of each
859f79d7d1bStholo     watcher.
860565bb110Stholo
861f79d7d1bStholo     The FILES and options are processed as for the `cvs watch'
862f79d7d1bStholo     commands.
863565bb110Stholo
864565bb110Stholo
8652f9d2fd9Stholo - Command: cvs editors [`-lR'] files ...
866f79d7d1bStholo     List the users currently working on FILES.  The report includes
867f79d7d1bStholo     the mail address of each user, the time when the user began
868f79d7d1bStholo     working with the file, and the host and path of the working
869f79d7d1bStholo     directory containing the file.
870f79d7d1bStholo
871f79d7d1bStholo     The FILES and options are processed as for the `cvs watch'
872f79d7d1bStholo     commands.
873f79d7d1bStholo
874565bb110Stholo
875565bb110Stholo
876f79d7d1bStholoFile: cvs.info,  Node: Watches Compatibility,  Prev: Watch information,  Up: Watches
877f79d7d1bStholo
878f79d7d1bStholoUsing watches with old versions of CVS
879f79d7d1bStholo--------------------------------------
880f79d7d1bStholo
881f79d7d1bStholo   If you use the watch features on a repository, it creates `CVS'
882f79d7d1bStholodirectories in the repository and stores the information about watches
883f79d7d1bStholoin that directory.  If you attempt to use CVS 1.6 or earlier with the
884f79d7d1bStholorepository, you get an error message such as the following (all on one
885f79d7d1bSthololine):
886f79d7d1bStholo
887f79d7d1bStholo     cvs update: cannot open CVS/Entries for reading:
888f79d7d1bStholo     No such file or directory
889f79d7d1bStholo
890f79d7d1bStholo   and your operation will likely be aborted.  To use the watch
891f79d7d1bStholofeatures, you must upgrade all copies of CVS which use that repository
892f79d7d1bStholoin local or server mode.  If you cannot upgrade, use the `watch off' and
893f79d7d1bStholo`watch remove' commands to remove all watches, and that will restore
894f79d7d1bStholothe repository to a state which CVS 1.6 can cope with.
895f79d7d1bStholo
896f79d7d1bStholo
897f79d7d1bStholoFile: cvs.info,  Node: Choosing a model,  Prev: Watches,  Up: Multiple developers
898f79d7d1bStholo
899f79d7d1bStholoChoosing between reserved or unreserved checkouts
900f79d7d1bStholo=================================================
901f79d7d1bStholo
902f79d7d1bStholo   Reserved and unreserved checkouts each have pros and cons.  Let it
903f79d7d1bStholobe said that a lot of this is a matter of opinion or what works given
904f79d7d1bStholodifferent groups' working styles, but here is a brief description of
905f79d7d1bStholosome of the issues.  There are many ways to organize a team of
906f79d7d1bStholodevelopers.  CVS does not try to enforce a certain organization.  It is
907f79d7d1bStholoa tool that can be used in several ways.
908f79d7d1bStholo
909f79d7d1bStholo   Reserved checkouts can be very counter-productive.  If two persons
910f79d7d1bStholowant to edit different parts of a file, there may be no reason to
911f79d7d1bStholoprevent either of them from doing so.  Also, it is common for someone
912f79d7d1bStholoto take out a lock on a file, because they are planning to edit it, but
913f79d7d1bStholothen forget to release the lock.
914f79d7d1bStholo
915f79d7d1bStholo   People, especially people who are familiar with reserved checkouts,
916f79d7d1bStholooften wonder how often conflicts occur if unreserved checkouts are
917f79d7d1bStholoused, and how difficult they are to resolve.  The experience with many
918f79d7d1bSthologroups is that they occur rarely and usually are relatively
919f79d7d1bStholostraightforward to resolve.
920f79d7d1bStholo
921f79d7d1bStholo   The rarity of serious conflicts may be surprising, until one realizes
922f79d7d1bStholothat they occur only when two developers disagree on the proper design
923f79d7d1bStholofor a given section of code; such a disagreement suggests that the team
924f79d7d1bStholohas not been communicating properly in the first place.  In order to
9252f9d2fd9Stholocollaborate under _any_ source management regimen, developers must
926f79d7d1bStholoagree on the general design of the system; given this agreement,
927f79d7d1bStholooverlapping changes are usually straightforward to merge.
928f79d7d1bStholo
929f79d7d1bStholo   In some cases unreserved checkouts are clearly inappropriate.  If no
930f79d7d1bStholomerge tool exists for the kind of file you are managing (for example
931f79d7d1bStholoword processor files or files edited by Computer Aided Design
932f79d7d1bStholoprograms), and it is not desirable to change to a program which uses a
933f79d7d1bStholomergeable data format, then resolving conflicts is going to be
934f79d7d1bStholounpleasant enough that you generally will be better off to simply avoid
935f79d7d1bStholothe conflicts instead, by using reserved checkouts.
936f79d7d1bStholo
937f79d7d1bStholo   The watches features described above in *Note Watches:: can be
938f79d7d1bStholoconsidered to be an intermediate model between reserved checkouts and
939f79d7d1bStholounreserved checkouts.  When you go to edit a file, it is possible to
940f79d7d1bStholofind out who else is editing it.  And rather than having the system
941f79d7d1bStholosimply forbid both people editing the file, it can tell you what the
942f79d7d1bStholosituation is and let you figure out whether it is a problem in that
943f79d7d1bStholoparticular case or not.  Therefore, for some groups it can be
944f79d7d1bStholoconsidered the best of both the reserved checkout and unreserved
945f79d7d1bStholocheckout worlds.
946f79d7d1bStholo
947f79d7d1bStholo
948f79d7d1bStholoFile: cvs.info,  Node: Revision management,  Next: Keyword substitution,  Prev: Multiple developers,  Up: Top
949f79d7d1bStholo
950f79d7d1bStholoRevision management
951f79d7d1bStholo*******************
952f79d7d1bStholo
953f79d7d1bStholo   If you have read this far, you probably have a pretty good grasp on
954f79d7d1bStholowhat CVS can do for you.  This chapter talks a little about things that
955f79d7d1bStholoyou still have to decide.
956f79d7d1bStholo
957f79d7d1bStholo   If you are doing development on your own using CVS you could
958f79d7d1bStholoprobably skip this chapter.  The questions this chapter takes up become
959f79d7d1bStholomore important when more than one person is working in a repository.
960f79d7d1bStholo
961f79d7d1bStholo* Menu:
962f79d7d1bStholo
963f79d7d1bStholo* When to commit::              Some discussion on the subject
964f79d7d1bStholo
965f79d7d1bStholo
966f79d7d1bStholoFile: cvs.info,  Node: When to commit,  Up: Revision management
967f79d7d1bStholo
968f79d7d1bStholoWhen to commit?
969f79d7d1bStholo===============
970f79d7d1bStholo
971f79d7d1bStholo   Your group should decide which policy to use regarding commits.
972f79d7d1bStholoSeveral policies are possible, and as your experience with CVS grows
973f79d7d1bStholoyou will probably find out what works for you.
974f79d7d1bStholo
975f79d7d1bStholo   If you commit files too quickly you might commit files that do not
976f79d7d1bStholoeven compile.  If your partner updates his working sources to include
977f79d7d1bStholoyour buggy file, he will be unable to compile the code.  On the other
978f79d7d1bStholohand, other persons will not be able to benefit from the improvements
979f79d7d1bStholoyou make to the code if you commit very seldom, and conflicts will
980f79d7d1bStholoprobably be more common.
981f79d7d1bStholo
982f79d7d1bStholo   It is common to only commit files after making sure that they can be
983f79d7d1bStholocompiled.  Some sites require that the files pass a test suite.
984f79d7d1bStholoPolicies like this can be enforced using the commitinfo file (*note
985e77048c1Stholocommitinfo::), but you should think twice before you enforce such a
986f79d7d1bStholoconvention.  By making the development environment too controlled it
987f79d7d1bStholomight become too regimented and thus counter-productive to the real
988f79d7d1bSthologoal, which is to get software written.
989f79d7d1bStholo
990f79d7d1bStholo
991f79d7d1bStholoFile: cvs.info,  Node: Keyword substitution,  Next: Tracking sources,  Prev: Revision management,  Up: Top
992565bb110Stholo
993565bb110StholoKeyword substitution
994565bb110Stholo********************
995565bb110Stholo
9968506102dStholo   As long as you edit source files inside a working directory you can
9978506102dStholoalways find out the state of your files via `cvs status' and `cvs log'.
9988506102dStholoBut as soon as you export the files from your development environment
9998506102dStholoit becomes harder to identify which revisions they are.
1000565bb110Stholo
1001565bb110Stholo   CVS can use a mechanism known as "keyword substitution" (or "keyword
1002565bb110Stholoexpansion") to help identifying the files.  Embedded strings of the form
1003565bb110Stholo`$KEYWORD$' and `$KEYWORD:...$' in a file are replaced with strings of
1004565bb110Stholothe form `$KEYWORD:VALUE$' whenever you obtain a new revision of the
1005565bb110Stholofile.
1006565bb110Stholo
1007565bb110Stholo* Menu:
1008565bb110Stholo
1009565bb110Stholo* Keyword list::                Keywords
1010565bb110Stholo* Using keywords::              Using keywords
1011565bb110Stholo* Avoiding substitution::       Avoiding substitution
1012565bb110Stholo* Substitution modes::          Substitution modes
1013565bb110Stholo* Log keyword::                 Problems with the $Log: cvs.info-4,v $
1014*55b57aafStholo* Log keyword::                 Problems with the Revision 1.3  2001/09/30 19:44:54  tholo
1015*55b57aafStholo* Log keyword::                 Problems with the Revert to distributed version
1016*55b57aafStholo* Log keyword::                 Problems with the
1017*55b57aafStholo* Log keyword::                 Problems with the Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1018*55b57aafStholo* Log keyword::                 Problems with the Latest from Cyclic Software
1019565bb110Stholo* Log keyword::                 Problems with the keyword.
1020565bb110Stholo
1021565bb110Stholo
1022565bb110StholoFile: cvs.info,  Node: Keyword list,  Next: Using keywords,  Up: Keyword substitution
1023565bb110Stholo
1024f79d7d1bStholoKeyword List
1025565bb110Stholo============
1026565bb110Stholo
1027565bb110Stholo   This is a list of the keywords:
1028565bb110Stholo
1029565bb110Stholo`$Author: tholo $'
1030565bb110Stholo     The login name of the user who checked in the revision.
1031565bb110Stholo
1032*55b57aafStholo`$Date: 2001/09/30 19:44:54 $'
1033565bb110Stholo     The date and time (UTC) the revision was checked in.
1034565bb110Stholo
1035*55b57aafStholo`$Header: /home/cvs/src/gnu/usr.bin/cvs/doc/cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $'
1036565bb110Stholo     A standard header containing the full pathname of the RCS file,
1037565bb110Stholo     the revision number, the date (UTC), the author, the state, and
1038565bb110Stholo     the locker (if locked).  Files will normally never be locked when
1039565bb110Stholo     you use CVS.
1040565bb110Stholo
1041*55b57aafStholo`$Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $'
1042*55b57aafStholo     Same as `$Header: /home/cvs/src/gnu/usr.bin/cvs/doc/cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $', except that the RCS filename is without a path.
1043565bb110Stholo
1044565bb110Stholo`$Name:  $'
10458506102dStholo     Tag name used to check out this file.  The keyword is expanded
10468506102dStholo     only if one checks out with an explicit tag name.  For example,
10478506102dStholo     when running the command `cvs co -r first', the keyword expands to
10488506102dStholo     `Name: first'.
1049565bb110Stholo
1050565bb110Stholo`$Locker:  $'
1051565bb110Stholo     The login name of the user who locked the revision (empty if not
10528506102dStholo     locked, which is the normal case unless `cvs admin -l' is in use).
1053565bb110Stholo
1054565bb110Stholo`$Log: cvs.info-4,v $
1055*55b57aafStholo`Revision 1.3  2001/09/30 19:44:54  tholo
1056*55b57aafStholo`Revert to distributed version
1057*55b57aafStholo`
1058*55b57aafStholo`Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1059*55b57aafStholo`Latest from Cyclic Software
1060565bb110Stholo`'
1061565bb110Stholo     The log message supplied during commit, preceded by a header
1062565bb110Stholo     containing the RCS filename, the revision number, the author, and
10632f9d2fd9Stholo     the date (UTC).  Existing log messages are _not_ replaced.
1064565bb110Stholo     Instead, the new log message is inserted after `$Log: cvs.info-4,v $
1065*55b57aafStholo     Instead, the new log message is inserted after `Revision 1.3  2001/09/30 19:44:54  tholo
1066*55b57aafStholo     Instead, the new log message is inserted after `Revert to distributed version
1067*55b57aafStholo     Instead, the new log message is inserted after `
1068*55b57aafStholo     Instead, the new log message is inserted after `Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1069*55b57aafStholo     Instead, the new log message is inserted after `Latest from Cyclic Software
1070565bb110Stholo     Instead, the new log message is inserted after `'.  Each
1071f79d7d1bStholo     new line is prefixed with the same string which precedes the
1072f79d7d1bStholo     `$Log' keyword.  For example, if the file contains
1073f79d7d1bStholo
1074f79d7d1bStholo            /* Here is what people have been up to:
1075f79d7d1bStholo             *
1076f79d7d1bStholo             * $Log: cvs.info-4,v $
1077*55b57aafStholo             * Revision 1.3  2001/09/30 19:44:54  tholo
1078*55b57aafStholo             * Revert to distributed version
1079*55b57aafStholo             *
1080*55b57aafStholo             * Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1081*55b57aafStholo             * Latest from Cyclic Software
1082f79d7d1bStholo             *
1083f79d7d1bStholo             * Revision 1.1  1997/01/03 14:23:51  joe
1084f79d7d1bStholo             * Add the superfrobnicate option
1085f79d7d1bStholo             *
1086f79d7d1bStholo             */
1087f79d7d1bStholo
1088f79d7d1bStholo     then additional lines which are added when expanding the `$Log'
1089f79d7d1bStholo     keyword will be preceded by `   * '.  Unlike previous versions of
1090f79d7d1bStholo     CVS and RCS, the "comment leader" from the RCS file is not used.
1091f79d7d1bStholo     The `$Log' keyword is useful for accumulating a complete change
1092f79d7d1bStholo     log in a source file, but for several reasons it can be
1093f79d7d1bStholo     problematic.  *Note Log keyword::.
1094565bb110Stholo
1095565bb110Stholo`$RCSfile: cvs.info-4,v $'
1096565bb110Stholo     The name of the RCS file without a path.
1097565bb110Stholo
1098*55b57aafStholo`$Revision: 1.3 $'
1099565bb110Stholo     The revision number assigned to the revision.
1100565bb110Stholo
1101565bb110Stholo`$Source: /home/cvs/src/gnu/usr.bin/cvs/doc/cvs.info-4,v $'
1102565bb110Stholo     The full pathname of the RCS file.
1103565bb110Stholo
1104565bb110Stholo`$State: Exp $'
1105565bb110Stholo     The state assigned to the revision.  States can be assigned with
1106f79d7d1bStholo     `cvs admin -s'--see *Note admin options::.
1107565bb110Stholo
1108565bb110Stholo
1109565bb110StholoFile: cvs.info,  Node: Using keywords,  Next: Avoiding substitution,  Prev: Keyword list,  Up: Keyword substitution
1110565bb110Stholo
1111565bb110StholoUsing keywords
1112565bb110Stholo==============
1113565bb110Stholo
1114565bb110Stholo   To include a keyword string you simply include the relevant text
1115*55b57aafStholostring, such as `$Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $', inside the file, and commit the file.  CVS will
1116565bb110Stholoautomatically expand the string as part of the commit operation.
1117565bb110Stholo
1118*55b57aafStholo   It is common to embed the `$Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $' string in the source files so that
1119d794bb93Stholoit gets passed through to generated files.  For example, if you are
1120d794bb93Stholomanaging computer program source code, you might include a variable
1121d794bb93Stholowhich is initialized to contain that string.  Or some C compilers may
1122d794bb93Stholoprovide a `#pragma ident' directive.  Or a document management system
1123d794bb93Stholomight provide a way to pass a string through to generated files.
1124565bb110Stholo
1125565bb110Stholo   The `ident' command (which is part of the RCS package) can be used
1126565bb110Stholoto extract keywords and their values from a file.  This can be handy
1127565bb110Stholofor text files, but it is even more useful for extracting keywords from
1128565bb110Stholobinary files.
1129565bb110Stholo
1130565bb110Stholo     $ ident samp.c
1131565bb110Stholo     samp.c:
1132*55b57aafStholo          $Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $
1133565bb110Stholo     $ gcc samp.c
1134565bb110Stholo     $ ident a.out
1135565bb110Stholo     a.out:
1136*55b57aafStholo          $Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $
1137565bb110Stholo
1138565bb110Stholo   SCCS is another popular revision control system.  It has a command,
1139565bb110Stholo`what', which is very similar to `ident' and used for the same purpose.
1140565bb110StholoMany sites without RCS have SCCS.  Since `what' looks for the
1141565bb110Stholocharacter sequence `@(#)' it is easy to include keywords that are
11422f9d2fd9Stholodetected by either command.  Simply prefix the keyword with the magic
11432f9d2fd9StholoSCCS phrase, like this:
1144565bb110Stholo
1145*55b57aafStholo     static char *id="@(#) $Id: cvs.info-4,v 1.3 2001/09/30 19:44:54 tholo Exp $";
1146565bb110Stholo
1147565bb110Stholo
1148565bb110StholoFile: cvs.info,  Node: Avoiding substitution,  Next: Substitution modes,  Prev: Using keywords,  Up: Keyword substitution
1149565bb110Stholo
1150565bb110StholoAvoiding substitution
1151565bb110Stholo=====================
1152565bb110Stholo
1153565bb110Stholo   Keyword substitution has its disadvantages.  Sometimes you might
1154565bb110Stholowant the literal text string `$Author: tholo $' to appear inside a file without
1155f79d7d1bStholoCVS interpreting it as a keyword and expanding it into something like
1156565bb110Stholo`$Author: tholo $'.
1157565bb110Stholo
1158565bb110Stholo   There is unfortunately no way to selectively turn off keyword
1159e77048c1Stholosubstitution.  You can use `-ko' (*note Substitution modes::) to turn
1160565bb110Stholooff keyword substitution entirely.
1161565bb110Stholo
1162565bb110Stholo   In many cases you can avoid using keywords in the source, even
1163565bb110Stholothough they appear in the final product.  For example, the source for
1164565bb110Stholothis manual contains `$@asis{}Author$' whenever the text `$Author: tholo $'
1165565bb110Stholoshould appear.  In `nroff' and `troff' you can embed the null-character
1166565bb110Stholo`\&' inside the keyword for a similar effect.
1167565bb110Stholo
1168565bb110Stholo
11692e7fa898StholoFile: cvs.info,  Node: Substitution modes,  Next: Log keyword,  Prev: Avoiding substitution,  Up: Keyword substitution
11702e7fa898Stholo
11712e7fa898StholoSubstitution modes
11722e7fa898Stholo==================
11732e7fa898Stholo
11742e7fa898Stholo   Each file has a stored default substitution mode, and each working
11752e7fa898Stholodirectory copy of a file also has a substitution mode.  The former is
11762e7fa898Stholoset by the `-k' option to `cvs add' and `cvs admin'; the latter is set
1177f79d7d1bStholoby the `-k' or `-A' options to `cvs checkout' or `cvs update'.  `cvs
1178f79d7d1bStholodiff' also has a `-k' option.  For some examples, see *Note Binary
11792f9d2fd9Stholofiles::, and *Note Merging and keywords::.
11802e7fa898Stholo
11812e7fa898Stholo   The modes available are:
11822e7fa898Stholo
11832e7fa898Stholo`-kkv'
11842e7fa898Stholo     Generate keyword strings using the default form, e.g.  `$Revision:
11852e7fa898Stholo     5.7 $' for the `Revision' keyword.
11862e7fa898Stholo
11872e7fa898Stholo`-kkvl'
11882e7fa898Stholo     Like `-kkv', except that a locker's name is always inserted if the
11898506102dStholo     given revision is currently locked.  The locker's name is only
11908506102dStholo     relevant if `cvs admin -l' is in use.
11912e7fa898Stholo
11922e7fa898Stholo`-kk'
11932e7fa898Stholo     Generate only keyword names in keyword strings; omit their values.
11942e7fa898Stholo     For example, for the `Revision' keyword, generate the string
1195*55b57aafStholo     `$Revision: 1.3 $' instead of `$Revision: 1.3 $'.  This option is useful
11962e7fa898Stholo     to ignore differences due to keyword substitution when comparing
1197e77048c1Stholo     different revisions of a file (*note Merging and keywords::).
11982e7fa898Stholo
11992e7fa898Stholo`-ko'
12002e7fa898Stholo     Generate the old keyword string, present in the working file just
12012e7fa898Stholo     before it was checked in.  For example, for the `Revision'
1202*55b57aafStholo     keyword, generate the string `$Revision: 1.3 $' instead of
1203*55b57aafStholo     `$Revision: 1.3 $' if that is how the string appeared when the
12042e7fa898Stholo     file was checked in.
12052e7fa898Stholo
12062e7fa898Stholo`-kb'
12072e7fa898Stholo     Like `-ko', but also inhibit conversion of line endings between
12082e7fa898Stholo     the canonical form in which they are stored in the repository
12092e7fa898Stholo     (linefeed only), and the form appropriate to the operating system
12102e7fa898Stholo     in use on the client.  For systems, like unix, which use linefeed
12112e7fa898Stholo     only to terminate lines, this is the same as `-ko'.  For more
12122e7fa898Stholo     information on binary files, see *Note Binary files::.
12132e7fa898Stholo
12142e7fa898Stholo`-kv'
12152e7fa898Stholo     Generate only keyword values for keyword strings.  For example,
12162e7fa898Stholo     for the `Revision' keyword, generate the string `5.7' instead of
1217*55b57aafStholo     `$Revision: 1.3 $'.  This can help generate files in programming
12182e7fa898Stholo     languages where it is hard to strip keyword delimiters like
1219*55b57aafStholo     `$Revision: 1.3 $' from a string.  However, further keyword
12202e7fa898Stholo     substitution cannot be performed once the keyword names are
12212e7fa898Stholo     removed, so this option should be used with care.
12222e7fa898Stholo
12232e7fa898Stholo     One often would like to use `-kv' with `cvs export'--*note
1224e77048c1Stholo     export::.  But be aware that doesn't handle an export containing
12252e7fa898Stholo     binary files correctly.
12262e7fa898Stholo
12272e7fa898Stholo
12282e7fa898StholoFile: cvs.info,  Node: Log keyword,  Prev: Substitution modes,  Up: Keyword substitution
12292e7fa898Stholo
12302e7fa898StholoProblems with the $Log: cvs.info-4,v $
1231*55b57aafStholoProblems with the Revision 1.3  2001/09/30 19:44:54  tholo
1232*55b57aafStholoProblems with the Revert to distributed version
1233*55b57aafStholoProblems with the
1234*55b57aafStholoProblems with the Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1235*55b57aafStholoProblems with the Latest from Cyclic Software
12362e7fa898StholoProblems with the keyword.
12372e7fa898Stholo================================
12382e7fa898Stholo
12392e7fa898Stholo   The `$Log: cvs.info-4,v $
1240*55b57aafStholo   The `Revision 1.3  2001/09/30 19:44:54  tholo
1241*55b57aafStholo   The `Revert to distributed version
1242*55b57aafStholo   The `
1243*55b57aafStholo   The `Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1244*55b57aafStholo   The `Latest from Cyclic Software
12452e7fa898Stholo   The `' keyword is somewhat controversial.  As long as you are
12462e7fa898Stholoworking on your development system the information is easily accessible
12472e7fa898Stholoeven if you do not use the `$Log: cvs.info-4,v $
1248*55b57aafStholoeven if you do not use the `Revision 1.3  2001/09/30 19:44:54  tholo
1249*55b57aafStholoeven if you do not use the `Revert to distributed version
1250*55b57aafStholoeven if you do not use the `
1251*55b57aafStholoeven if you do not use the `Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1252*55b57aafStholoeven if you do not use the `Latest from Cyclic Software
12532e7fa898Stholoeven if you do not use the `' keyword--just do a `cvs log'.  Once
12542e7fa898Stholoyou export the file the history information might be useless anyhow.
12552e7fa898Stholo
1256565bb110Stholo   A more serious concern is that CVS is not good at handling `$Log: cvs.info-4,v $
1257*55b57aafStholo   A more serious concern is that CVS is not good at handling `Revision 1.3  2001/09/30 19:44:54  tholo
1258*55b57aafStholo   A more serious concern is that CVS is not good at handling `Revert to distributed version
1259*55b57aafStholo   A more serious concern is that CVS is not good at handling `
1260*55b57aafStholo   A more serious concern is that CVS is not good at handling `Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1261*55b57aafStholo   A more serious concern is that CVS is not good at handling `Latest from Cyclic Software
1262565bb110Stholo   A more serious concern is that CVS is not good at handling `'
12632e7fa898Stholoentries when a branch is merged onto the main trunk.  Conflicts often
12642e7fa898Stholoresult from the merging operation.
12652e7fa898Stholo
12662e7fa898Stholo   People also tend to "fix" the log entries in the file (correcting
12672e7fa898Stholospelling mistakes and maybe even factual errors).  If that is done the
12682e7fa898Stholoinformation from `cvs log' will not be consistent with the information
12692e7fa898Stholoinside the file.  This may or may not be a problem in real life.
12702e7fa898Stholo
12712e7fa898Stholo   It has been suggested that the `$Log: cvs.info-4,v $
1272*55b57aafStholo   It has been suggested that the `Revision 1.3  2001/09/30 19:44:54  tholo
1273*55b57aafStholo   It has been suggested that the `Revert to distributed version
1274*55b57aafStholo   It has been suggested that the `
1275*55b57aafStholo   It has been suggested that the `Revision 1.1.1.18  2001/09/28 22:48:51  tholo
1276*55b57aafStholo   It has been suggested that the `Latest from Cyclic Software
12772e7fa898Stholo   It has been suggested that the `' keyword should be inserted
12782f9d2fd9Stholo_last_ in the file, and not in the files header, if it is to be used at
12792e7fa898Stholoall.  That way the long list of change messages will not interfere with
12802e7fa898Stholoeveryday source file browsing.
12812e7fa898Stholo
1282e77048c1Stholo
1283e77048c1StholoFile: cvs.info,  Node: Tracking sources,  Next: Builds,  Prev: Keyword substitution,  Up: Top
1284e77048c1Stholo
1285e77048c1StholoTracking third-party sources
1286e77048c1Stholo****************************
1287e77048c1Stholo
1288e77048c1Stholo   If you modify a program to better fit your site, you probably want
1289e77048c1Stholoto include your modifications when the next release of the program
1290e77048c1Stholoarrives.  CVS can help you with this task.
1291e77048c1Stholo
1292e77048c1Stholo   In the terminology used in CVS, the supplier of the program is
1293e77048c1Stholocalled a "vendor".  The unmodified distribution from the vendor is
1294e77048c1Stholochecked in on its own branch, the "vendor branch".  CVS reserves branch
1295e77048c1Stholo1.1.1 for this use.
1296e77048c1Stholo
1297e77048c1Stholo   When you modify the source and commit it, your revision will end up
1298e77048c1Stholoon the main trunk.  When a new release is made by the vendor, you
1299e77048c1Stholocommit it on the vendor branch and copy the modifications onto the main
1300e77048c1Stholotrunk.
1301e77048c1Stholo
1302e77048c1Stholo   Use the `import' command to create and update the vendor branch.
1303e77048c1StholoWhen you import a new file, the vendor branch is made the `head'
1304e77048c1Stholorevision, so anyone that checks out a copy of the file gets that
1305e77048c1Stholorevision.  When a local modification is committed it is placed on the
1306e77048c1Stholomain trunk, and made the `head' revision.
1307e77048c1Stholo
1308e77048c1Stholo* Menu:
1309e77048c1Stholo
1310e77048c1Stholo* First import::                Importing for the first time
1311e77048c1Stholo* Update imports::              Updating with the import command
1312e77048c1Stholo* Reverting local changes::     Reverting to the latest vendor release
1313e77048c1Stholo* Binary files in imports::     Binary files require special handling
1314e77048c1Stholo* Keywords in imports::         Keyword substitution might be undesirable
1315e77048c1Stholo* Multiple vendor branches::    What if you get sources from several places?
1316e77048c1Stholo
1317