summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/doc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/doc')
-rw-r--r--contrib/cvs/doc/ChangeLog699
-rw-r--r--contrib/cvs/doc/RCSFILES14
-rw-r--r--contrib/cvs/doc/cvs.texinfo6063
-rw-r--r--contrib/cvs/doc/cvsclient.texi644
4 files changed, 4819 insertions, 2601 deletions
diff --git a/contrib/cvs/doc/ChangeLog b/contrib/cvs/doc/ChangeLog
index c56c253..0571444 100644
--- a/contrib/cvs/doc/ChangeLog
+++ b/contrib/cvs/doc/ChangeLog
@@ -1,5 +1,704 @@
+Sun Jan 18 18:23:02 1998 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Requests): Add Kopt request.
+
+Thu Jan 1 17:36:42 1998 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (BUGS, Credits): Change @unnumbered to @appendix now
+ that these are moved from the start to the end.
+
+Sat Dec 27 10:06:56 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add "Too many arguments!".
+
+Fri Dec 26 18:30:26 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (What is CVS?): Just point to the two canonical web
+ sites (Pascal Molli and Cyclic) concerning CVS downloads. The GNU
+ URL was out of date and GNU only has source distributions anyway.
+
+ * cvs.texinfo: Change bug-cvs address to gnu.org per email from
+ Martin Hamilton.
+
+Tue Dec 23 18:04:09 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Sticky tags): Further cleanups. Fix thinko
+ (s/subsequent cvs update/& commands/). Remove "vi driver.c" and
+ commit from example (totally vestigial). Reword start of
+ paragraph on non-branch sticky tags, so that it better alludes
+ to branch sticky tags. When introducing sticky tags, make it
+ clear that even people who aren't trying to use sticky tags
+ may need to know how to avoid them. Restore comment about
+ CVS/Tag files.
+ (Accessing branches): Don't xref to merging here; that is a much
+ more advanced topic and the "but see" wording didn't tell us what
+ to see the xref about.
+
+Tue Dec 23 14:39:08 1997 Karl Fogel <kfogel@floss.red-bean.com>
+ and Jim Kingdon
+
+ * cvs.texinfo (Creating a branch): Rewritten. Introduce with
+ `tag', then discuss `rtag' and `-r'.
+
+Tue Dec 23 10:03:37 1997 Karl Fogel <kfogel@floss.red-bean.com>
+ and Jim Kingdon
+
+ * cvs.texinfo: Changes to dehairify the "Sticky tags" situation:
+ (Revisions): "Sticky tags" moved here, description in menu changed
+ to be a little more informative.
+ (Sticky tags): Moved from "Branching and merging" to "Revisions".
+ (Accessing branches): New node in "Branching and merging",
+ explains how to use checkout vs update to retrieve a branch.
+ Text and example inherited from "Sticky tags", but text mostly
+ rewritten.
+ (Sticky tags): Moved under "Revisions", rewritten somewhat (more
+ rewrites to follow).
+ Don't use "-v" in "cvs status" example.
+
+Mon Dec 22 11:46:05 1997 Karl Fogel <kfogel@floss.red-bean.com>
+ and Jim Kingdon
+
+ Cleanups related to recent separation of revisions from
+ branching/merging:
+ * cvs.texinfo (Revisions): Take paragraph introducing branches,
+ rewrite it and move it to "Branching and merging".
+ (Branching and merging): Also rewrite merging intro.
+ (Revision numbers): Don't go into detail about branch revision
+ numbers here, just mention that they happen and refer to new
+ node "Branches and revisions".
+ (Branches and revisions): New node under "Branching and merging",
+ inherits text from "Revision numbers".
+ (Creating a branch): Refer to "Branches and revisions" now, not
+ "Revision numbers".
+ (Binary why): Rewrite sentence which refers to merging, so that
+ it isn't specific to branch merging.
+ (Branches motivation): Fix typo (select -> elect). Add comment
+ about what this node is accomplishing, in general.
+
+Sun Dec 21 20:57:24 1997 Karl Fogel <kfogel@floss.red-bean.com>
+ and Jim Kingdon
+
+ This is just moving text; related cleanups to follow.
+ * cvs.texinfo: Changes to put branching and merging together, and
+ keep it all separate from revisions:
+ (Revisions): Renamed from "Revisions and branches".
+ (Branching and merging): Renamed from "Merging".
+ (Branches motivation, Creating a branch, Sticky tags, Magic branch
+ numbers): these subnodes moved to "Branching and merging" from
+ "Revisions".
+ everywhere: Adjusted cross-references to cope with above.
+
+Sun Dec 21 20:36:39 1997 Karl Fogel <kfogel@floss.red-bean.com>
+ and Jim Kingdon
+
+ Note that this is just moving text, not changing it:
+ * cvs.texinfo: divide top-level menu into sections.
+ (Multiple developers, Builds, Tracking sources, Keyword
+ substitution): moved to be in "CVS and the Real World" section.
+ (Compatibility): moved to be in "References" section.
+
+Mon Dec 22 08:54:31 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Example): In comment, in citing the BNF style
+ used in many RFCs, cite RFC2234 not RFC822 (now that the former is
+ out).
+
+Sun Dec 21 17:42:22 1997 Karl Fogel <kfogel@floss.red-bean.com>
+
+ * cvs.texinfo (Overview): New node.
+ (What is CVS?, A sample session): Put under Overview.
+ (What is CVS not?): New node under Overview.
+ [text previously was part of "What is CVS?" -kingdon]
+ (Preface): Removed this node and its contents.
+ (Checklist): Removed this node and its contents.
+ (Credits): Now toward end of top-level menu (was under Preface).
+ (BUGS): Now toward end of top-level menu (was under Preface).
+
+Sun Dec 14 10:14:25 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Responses): Add MT response.
+ (Text tags): New node.
+
+ * cvs.texinfo (loginfo): Add comment about which commands run
+ loginfo.
+
+Sat Dec 13 08:41:13 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Connection and Authentication): State that
+ GSSAPI is preferred to kserver. Try to be clearer about what
+ the term "pserver" means. Introduce GSSAPI and cite the relevant
+ RFCs. Discuss the limitations of the existing features in
+ preventing hijacking.
+
+ * cvs.texinfo (GSSAPI authenticated, Kerberos authenticated):
+ Briefly introduce what GSSAPI and Kerberos are. Be slightly more
+ emphatic about protecting against downgrade attacks.
+
+Fri Dec 12 17:36:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cvs.texinfo (GSSAPI authenticated): New node.
+ (Global options): Document -a. Mention GSSAPI in -x
+ documentation.
+ * cvsclient.texi (Connection and Authentication): Document GSSAPI
+ authentication.
+ (Requests): Add Gssapi-encrypt and Gssapi-authenticate.
+
+Fri Dec 12 09:27:38 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (cvsignore): Add note about comments and the
+ space-separated nature of the syntax.
+
+Sun Dec 7 09:33:11 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (checkout): Clarify issues regarding updating
+ existing working directories.
+
+Sun Nov 30 20:38:17 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Wrappers): Add comment: we don't document %s.
+
+Mon Nov 24 23:00:09 1997 Karl Fogel <kfogel@floss.red-bean.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi: Move Protocol Notes node to the end.
+
+ * cvsclient.texi (Request intro): new node/section.
+ (Protocol): added some introductory material.
+ Rearranged menu into General Conventions, Protocol specification,
+ and Example etc sections.
+ (File Modes): replaces Modes, for consistency.
+
+Sat Nov 22 12:29:58 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Entries Lines): Clarify options in entries line.
+
+Tue Nov 18 09:23:15 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Requests): Be more explicit about "export" and
+ entries lines.
+
+ * Makefile.in (DISTFILES): Remove DIFFUTILS-2.7-BUG.
+
+Mon Nov 17 18:20:47 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (tag options): Expand comment with reference to FAQ.
+
+Fri Nov 14 11:02:37 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Update discussion of "dying gasps".
+
+ * cvs.texinfo (tag options): Add FIXME comment about renaming tags.
+
+Thu Nov 13 10:20:39 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Common options): Remove also has a -f option with a
+ different meaning than most.
+
+Wed Nov 12 21:57:40 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (File permissions, Connecting via rsh, Environment
+ variables): When putting an environment variable in the index, say
+ it is an environment variable. Don't index the same name twice.
+
+ * cvs.texinfo: Many edits to reflect the fact that CVS no longer
+ invokes external RCS programs.
+
+Tue Nov 11 15:15:49 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Locks, CVS in repository): New nodes, document the
+ locking scheme and briefly outline CVS and CVS/fileattr.
+
+Sun Nov 9 17:39:41 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * DIFFUTILS-2.7-BUG: Removed; the bug is fixed and the testcases
+ are incorporated into sanity.sh.
+
+Sat Nov 8 09:49:38 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Binary why): Try to be a little clearer about how
+ merges fit into CVS. Say it may be error prone to have developers
+ doing merges manually.
+
+Tue Nov 4 13:02:22 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (admin options): Add discussion of what happens if
+ there are tags.
+
+Fri Oct 31 00:04:09 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (admin options): Rewrite discussion of -o to
+ hopefully be clearer and to also document the new :: syntax.
+ (admin examples): Removed; incorporated into admin options.
+ (Invoking CVS): Wording fix for admin -o.
+
+ * cvs.texinfo (Binary why): New node, talks about diff and merge.
+ (Binary howto): Renamed from Binary files.
+ (Binary files): Now just contains an introduction.
+
+ * cvs.texinfo (Error messages): Add "could not merge" message. In
+ discussion of "Binary files . . . differ" message, mention that
+ this is only an issue with old verisons of CVS.
+
+Thu Oct 30 15:55:21 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add "authorization failed" message.
+
+Wed Oct 29 11:52:05 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo: Remove fake RCSid; we decided to remove rcsid's a
+ while ago. Cleanups suggested by Stephen Gildea (CVSROOT/passwd
+ has 2 or 3 fields; /user -> /usr; noone -> no one; in used -> in
+ use). Add comment about making compilers happy about rcsids.
+
+Sat Oct 25 00:58:24 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * RCSFILES: rcsfile.5 is correct about {num} after next being
+ optional.
+
+Wed Oct 22 10:08:27 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add message about unrecognized
+ response from cvs server.
+
+1997-10-11 Noel Cragg <noel@swish.red-bean.com>
+
+ * cvs.texinfo (checkout options): describe how the `-d' and `-N'
+ flags really work. Give examples.
+ (export options): refer the reader to the descriptions for `-d'
+ and `-N' in checkout options, since the behavior is the same.
+
+Thu Oct 9 12:01:35 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (log options): Add comment about "cvs log -r".
+
+Wed Oct 8 10:24:19 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (rtag options): Add comment about how this is
+ confusing.
+
+Tue Sep 30 12:31:25 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Working directory storage): Add comment about
+ Entries.Static.
+
+Thu Sep 25 23:52:57 1997 Noel Cragg <noel@swish.red-bean.com>
+
+ * cvsclient.texi (Responses): description of Module-expansion was
+ missing a carriage return after the @item clause.
+
+Wed Sep 24 12:04:42 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Remote repositories): Add comment about pserver
+ vs. having users create their own repositories.
+
+Sat Sep 20 00:59:53 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Keyword list): Change title from "RCS Keywords" to
+ "Keyword list" as it is CVS that expands them.
+ (Avoiding substitution): Change "rcs" to "cvs", in the context of
+ the program which expands keywords.
+
+Fri Sep 19 22:57:24 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * RCSFILES: Grammar fix in first paragraph. Re-word section on
+ dead newphrase. Add item about what it means if "expand" is omitted.
+
+ * cvs.texinfo (Magic branch numbers): Change example branch number
+ from 1.2.3 to 1.2.4; CVS assigns even branch numbers and I don't
+ think vendor branches are very relevant to this example.
+
+Wed Sep 17 17:21:33 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (admin options): Add comment about "cvs admin -b"
+ (with no argument to the -b).
+
+ * RCSFILES: "next" is optional, not required.
+
+Tue Sep 16 15:13:22 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Binary files): Add comment about another possible
+ way to auto-detect binary files.
+
+Sun Sep 14 12:38:56 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Conflicts example): Adjust text and comments
+ regarding conflict markers to reflect change in CVS.
+
+Wed Sep 10 12:44:04 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Server requirements): Add comment about server
+ disk usage in /tmp.
+
+ * cvs.texinfo (Common options): More comments about date formats:
+ "now", "yesterday", and the "3 weeks ago" family.
+
+Tue Sep 9 13:09:58 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * DIFFUTILS-2.7-BUG: Eggert patch is preferred to Rittle one.
+
+Sun Sep 7 18:38:23 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (history options): Revise -e to say that it includes
+ future record types (and remove out of date list of what record
+ types it implies).
+
+ * cvs.texinfo (Environment variables): Expand/correct discussion
+ of HOME, HOMEDRIVE, and HOMEPATH.
+ (Error messages): Add "could not find out home directory".
+
+ * cvs.texinfo (update options): Reword -r doc to hopefully be
+ clearer that it takes either numeric or symbolic revision.
+
+ * cvs.texinfo (syntax): Add comment about how regexp syntax may
+ be, er, creatively altered, by configure.in.
+
+Sat Sep 6 11:29:15 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Working directory storage): Document Baserev and
+ Baserev.tmp.
+ (Working directory storage): Adjust comment regarding CVS/* being
+ text files.
+
+Fri Sep 5 14:42:39 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (BUGS): Remove mention of unsupported resources page
+ on http://www.cyclic.com, as it might go away in a future
+ reorganization.
+
+ * DIFFUTILS-2.7-BUG: Further info from Eggert.
+
+1997-09-05 Paul Eggert <eggert@twinsun.com>
+
+ * DIFFUTILS-2.7-BUG: Explain how this bug will probably be
+ fixed in the next diffutils release.
+
+Thu Sep 4 17:09:57 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Binary files): Reword the section on what you need
+ to do with cvs admin -kb to hopefully be a bit clearer. Still not
+ ideal (see comment).
+
+ * cvs.texinfo (modules): Break node into separate nodes for alias
+ modules, regular modules, ampersand modules, and options. Expand
+ text with more examples and explanations. Add index entries.
+
+Wed Sep 3 14:49:43 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Multiple developers): Add idea about cvs editors
+ and reserved checkouts.
+
+Sun Aug 31 19:36:21 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Requests): Rewrite paragraph on cvs add on a
+ filename containing '/'.
+
+Thu Aug 28 14:13:50 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (diff options): Add comment about "cvs diff"
+ vs. "cvs diff -r HEAD".
+
+ * cvs.texinfo (Global options): Add comment about -w not
+ overriding cvs watch on.
+
+Wed Aug 27 08:09:31 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Password authentication server): Grammar fix ("under
+ as the username" -> "as the username").
+
+ * cvs.texinfo: Fix doubled 'the the' typos. Reported by
+ karlb@atg.com.
+
+Tue Aug 26 12:25:42 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Checklist): Reword xref to point to Binary files
+ rather than Keyword expansion. Credit goes to jeff@alum.mit.edu
+ (Jeff Breidenbach) for reporting the problem.
+
+Mon Aug 18 17:23:18 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (modules): Suggest taginfo instead of -t. Add
+ comment with some of the reasons. Add comment about -u and -i
+ problems.
+
+Sat Aug 16 10:19:06 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add note about how "could not
+ check out foo.c" seems to also have been observed on Irix.
+
+Fri Aug 15 17:28:01 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add "could not check out foo.c".
+
+Thu Aug 14 23:57:53 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Wrappers): Document new -m 'COPY' behavior.
+
+Tue Aug 12 20:56:40 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Sticky tags): Add comment about how we should be
+ documenting sticky tags.
+
+Fri Aug 8 10:01:03 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (File status): Add comment about "working revision"
+ in cvs status for a locally removed file.
+
+Thu Aug 7 22:53:45 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (From other version control systems): Mention
+ pvcs_to_rcs alongside sccs2rcs.
+
+Tue Aug 5 17:22:50 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Compatibility): Add comment about how CVS probably
+ could be detecting the case of dead files killed by CVS 1.3.
+
+ * cvs.texinfo (From other version control systems): Add paragraph
+ about converting from systems which don't export RCS files.
+
+Sun Aug 3 21:03:14 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Responses): Cite RFC1321 for MD5.
+
+ * cvs.texinfo (A sample session): Nuke index entry for "A sample
+ session". The fact that this isn't "sample session" is totally
+ bogus, but in general the table of contents is probably better for
+ this entry.
+
+ * cvs.texinfo (Error messages): Add comment about wording of error
+ concerning unknown -x option.
+
+ * cvs.texinfo (Wrappers): Add comment about absolute filter pathname.
+
+Thu Jul 31 14:40:15 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo: Use @ref not @xref when reference is not at the
+ start of a sentence. Avoids capitalizing "See" when we shouldn't.
+ Fixes to other similar xref problems.
+
+Wed Jul 30 19:30:31 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Connection and Authentication): Don't use @samp
+ on BEGIN AUTH REQUEST and friends. Avoids overfull hbox.
+
+Fri Jul 25 10:40:22 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Requests): Remove obsolete sentence regarding
+ using Directory instead of Repository enabling alternate response
+ syntax.
+
+ * cvsclient.texi (Response intro): Add discussing of file updating
+ responses and file update modifying responses.
+ (Responses): Refer to this description rather than trying to
+ describe it in each place. The descriptions in each place were
+ somewhat incomplete and didn't get updated when new file updating
+ responses were added.
+
+ * cvsclient.texi: Split node Responses into Response intro,
+ Response pathnames, and Responses.
+
+Thu Jul 24 23:13:24 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (config): Document SystemAuth.
+ (Password authentication server): Mention SystemAuth.
+
+Mon Jul 21 08:57:04 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * Makefile.in (DISTFILES): Add DIFFUTILS-2.7-BUG.
+
+Sun Jul 20 17:55:52 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (admin options): For options with optional
+ arguments, specify that there can be no space between the option
+ and its argument. For -N, add xref to Magic branch numbers. For
+ -t, talk about reading from stdin. Comment changes.
+
+Sat Jul 19 22:28:47 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Preface): Make section titles more verbose.
+ Likewise for the menu.
+
+Fri Jul 18 08:41:11 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): No need for an external patch if
+ server and client are current. Add comment with more thoughts
+ about messages specific to old versions of CVS.
+
+ * cvs.texinfo (Error messages): Add "cannot start server via rcmd".
+
+ * cvs.texinfo (Error messages): Add "cannot open CVS/Root" for cvs
+ init.
+
+ * cvs.texinfo (Error messages): Add "missing author".
+
+Tue Jul 15 16:47:08 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Keyword list): Fix documentation of $Log to reflect
+ the fact that we no longer use the comment leader.
+ (admin options): Fix documentation of $Log.
+ (admin examples): Remove example concerning comment leader, since
+ the example no longer does what it claims to.
+ (admin, admin options): Fix various parts of the documentation to
+ not refer to this being implemented via RCS. Say nastier things
+ about -I and -x. Add comments about options to "rcs" which we
+ don't document.
+
+Mon Jul 14 00:04:32 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): The "cannot change permissions on
+ temporary directory" error has been happening in various test cases.
+
+Sat Jul 12 11:12:18 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Repository files): Further comments about leading
+ "-" in filenames.
+
+Fri Jul 11 21:30:11 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Repository files): Add comment about legal
+ filenames.
+
+Wed Jul 9 18:05:26 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Responses): Add Mbinary response.
+
+Mon Jul 7 12:04:01 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Goals): Add previously unwritten goal about only
+ one way to do each operation.
+
+ * cvs.texinfo (File permissions): Rewrite paragraph on setuid to
+ be more verbose and less unix-specific.
+
+Sat Jul 5 03:16:38 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Connection and Authentication): When we said to
+ "ignore" an unrecogized code we mean to treat it as nonspecific,
+ not to ignore the response.
+
+ * cvsclient.texi (Example): Refer to RFC2119 when referring to
+ terminology of MUST, SHALL, &c.
+
+ * cvs.texinfo (Windows permissions): New node.
+
+Fri Jul 4 15:27:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cvs.texinfo (Common options): Fix typo (avaliable for
+ available).
+
+Tue Jul 1 09:19:02 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Server requirements): Discuss memory used by diff.
+
+ * cvs.texinfo (Substitution modes): Add comment about -A resetting
+ both sticky tags/dates and sticky options.
+
+ * cvs.texinfo (File permissions): Add paragraph concerning
+ ownership of the RCS files.
+
+ * cvs.texinfo (Working directory storage): Relative repositories
+ in CVS/Repository are legal.
+
+Mon Jun 30 10:48:21 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Top): Add menu item for Password scrambling.
+
+ * cvs.texinfo (Committing your changes): Add comment concerning
+ documentation of message prompting.
+
+Fri Jun 27 11:20:34 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Password scrambling): New node.
+ (Connection and Authentication): Adjust accordingly.
+ (Protocol Notes): Add long discussion of character sets and
+ password scrambling.
+
+ * cvs.texinfo (Repository files): Also mention doc/RCSFILES in
+ documenting RCS file format.
+ (CVSROOT, storage of files): New node.
+
+Thu Jun 26 09:18:15 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (File permissions): xref to the pserver thing about
+ permissions in CVSROOT.
+ (Kerberos authenticated): Explicitly mention kerberos rsh.
+ Add various index entries for "security, <foo>".
+
+Wed Jun 25 13:39:16 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Common options): Rewrite comments concerning HEAD
+ and testcases and solution. Changing HEAD might be too big a
+ change; might be better to phase it out.
+ (Common options, Tags): Add index entries for HEAD and BASE.
+
+Tue Jun 24 09:37:26 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add assertion failed.
+
+ * cvsclient.texi (Connection and Authentication): Add "E" and
+ "error" as responses in authentication protocol. The server
+ already was in the (formerly bad) habit of sending them, and we
+ might as well implement this in the client and document it.
+
+ * cvs.texinfo (Password authentication security): Note about
+ permissions on $CVSROOT also applies to its parent and so on up to
+ /.
+
+Mon Jun 23 18:28:18 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Creating a repository): xref to Server requirements
+ for more details on memory, CPU.
+ (Server requirements): Add xref to Creating a repository regarding
+ disk space.
+
+ * cvs.texinfo (Read-only access, Password authentication
+ security): The known holes which let a read-only user execute
+ arbitrary programs on the server are gone.
+
+ * cvsclient.texi (Protocol Notes): Remove multisite item; it is
+ replaced by item 186 in TODO. Add a general reference to TODO.
+ Rewrite accordingly the sentence about multisite in the item
+ concerning sending modified files in "cvs update".
+
+Fri Jun 20 17:00:20 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Error messages): Add "binary files differ" when
+ trying to check in a binary file.
+
+Fri Jun 20 14:01:23 1997 David J MacKenzie <djm@va.pubnix.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo: Fix various formatting, spelling, stylistic, and
+ factual errors.
+
+Thu Jun 19 07:11:33 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (config): New node.
+ (Password authentication server): Talk about RCSBIN in config as
+ an alternative to -b global option.
+ * cvsclient.texi (Requests): Specify when Root can/must be used.
+
+ * cvs.texinfo (Error messages): Add
+ "*PANIC* administration files missing".
+
+ * cvs.texinfo (Password authentication server): Mention
+ permissions on $CVSROOT and $CVSROOT/CVSROOT as part of the
+ installation process.
+ (Password authentication security): Clarify that permissions issue
+ applies to $CVSROOT as well as $CVSROOT/CVSROOT.
+
Wed Jun 18 00:03:25 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
+ * cvs.texinfo (Password authentication security): Add paragraph
+ on write permissions of $CVSROOT/CVSROOT.
+
+ * cvs.texinfo (Adding and removing): New node. Move Adding files,
+ Removing files, Removing directories, Moving files, and Moving
+ directories under it.
+
+ * cvs.texinfo (Removing directories): Add sentence about how
+ one doesn't remove the directory itself.
+
* cvs.texinfo (Password authentication server): Document
--allow-root.
diff --git a/contrib/cvs/doc/RCSFILES b/contrib/cvs/doc/RCSFILES
index 5d9c7f7..6d600b8 100644
--- a/contrib/cvs/doc/RCSFILES
+++ b/contrib/cvs/doc/RCSFILES
@@ -1,4 +1,4 @@
-It would be nice for the RCS file format (which is implemented by a
+It would be nice if the RCS file format (which is implemented by a
great many tools, both free and non-free, both by calling GNU RCS and
by reimplementing access to RCS files) were documented in some
standard separate from any one tool. But as far as I know no such
@@ -31,6 +31,10 @@ rcsfile.5 also showed the order of the revisions (and the "next" and
"branch" fields and anything else where it would be useful to have an
example of how a revision tree is represented in an RCS file).
+The rcsfile.5 grammar shows the {num} after "next" as optional; if it
+is omitted then there is no next delta node (for example 1.1 or the
+head of a branch will typically have no next).
+
There is one case where CVS uses CVS-specific, non-compatible changes
to the RCS file format, and this is magic branches. See cvs.texinfo
for more information on them. CVS also sets the RCS state to "dead"
@@ -54,8 +58,9 @@ rules.
namespace RCS library done at Silicon Graphics Inc. (SGI) in 1996
(a modified RCS 5.7--not sure it has any other name).
dead A set of RCS patches developed by Rich Pixley at
- Cygnus. These were for CVS, and predated the current
- CVS death support, which does not require RCS changes.
+ Cygnus about 1992. These were for CVS, and predated
+ the current CVS death support, which uses a state "dead"
+ rather than a "dead" newphrase.
The rules regarding keyword expansion are not documented along with
the rest of the RCS file format; they are documented in the co(1)
@@ -66,6 +71,9 @@ RCS 5.7 produces a warning whenever it behaves that way, and current
versions of CVS do not handle this case in a special way (CVS 1.9 and
earlier invoke RCS to perform keyword expansion).
+Note that if the "expand" keyword is omitted from the RCS file, the
+default is "kv".
+
Note that the "comment {string};" syntax from rcsfile.5 specifies a
comment leader, which affects expansion of the $Log keyword for old
versions of RCS. The comment leader is not used by RCS 5.7 or current
diff --git a/contrib/cvs/doc/cvs.texinfo b/contrib/cvs/doc/cvs.texinfo
index b087f3f..7c2a750 100644
--- a/contrib/cvs/doc/cvs.texinfo
+++ b/contrib/cvs/doc/cvs.texinfo
@@ -1,5 +1,4 @@
\input texinfo @c -*-texinfo-*-
-@comment cvs.texinfo,v 1.6 1995/10/12 23:39:26 kfogel Exp
@comment Documentation for CVS.
@comment Copyright (C) 1992, 1993 Signum Support AB
@comment Copyright (C) 1993 Free Software Foundation, Inc.
@@ -46,13 +45,8 @@
@c -- TODO list:
@c -- Fix all lines that match "^@c -- "
-@c -- Document how CVS finds the binaries it executes.
-@c Things to include in the index:
-@c Finding RCS binaries
-@c Path to RCS binaries
-@c RCS, how CVS finds them
-@c s/RCS/diff/
-@c -- More on binary files
+@c -- Also places marked with FIXME should be manual
+@c problems (as opposed to FIXCVS for CVS problems).
@ifinfo
Copyright @copyright{} 1992, 1993 Signum Support AB
@@ -139,277 +133,62 @@ This info manual describes how to use and administer
@end ifinfo
@c This menu is pretty long. Not sure how easily that
-@c can be fixed; seems like "Adding files", "Removing
-@c files", "Removing directories", "Moving files",
-@c and "Moving directories" all go together (into
-@c "Adding, removing, and renaming"?). Other than that
-@c no brilliant ideas for a fix...
+@c can be fixed (no brilliant ideas right away)...
@menu
-* Preface:: About this manual
-* What is CVS?:: What is CVS?
-* A sample session:: A tour of basic CVS usage
+* Overview:: An introduction to CVS
* Repository:: Where all your sources are stored
* Starting a new project:: Starting a project with CVS
-* Multiple developers:: How CVS helps a group of developers
-* Revisions and branches:: Numeric, symbolic, and branch revisions
-* Merging:: How to move changes between branches
+* Revisions:: Numeric and symbolic names for revisions
+* Branching and merging:: Diverging/rejoining branches of development
* Recursive behavior:: CVS descends directories
-* Adding files:: Adding files
-* Removing files:: Removing files
-* Removing directories:: Removing directories
-* Tracking sources:: Tracking third-party sources
-* Moving files:: Moving and renaming files
-* Moving directories:: Moving and renaming directories
+* Adding and removing:: Adding/removing/renaming files/directories
* History browsing:: Viewing the history of files in various ways
-* Keyword substitution:: CVS can include the revision inside the file
+
+CVS and the Real World.
+-----------------------
* Binary files:: CVS can handle binary files
-* Builds:: Issues related to CVS and builds
-* Compatibility:: Upgrading CVS versions
+* Multiple developers:: How CVS helps a group of developers
* Revision management:: Policy questions for revision management
+* Keyword substitution:: CVS can include the revision inside the file
+* Tracking sources:: Tracking third-party sources
+* Builds:: Issues related to CVS and builds
+
+References.
+-----------
* CVS commands:: CVS commands share some things
* Invoking CVS:: Quick reference to CVS commands
* Administrative files:: Reference manual for the Administrative files
* Environment variables:: All environment variables which affect CVS
+* Compatibility:: Upgrading CVS versions
* Troubleshooting:: Some tips when nothing works
+* Credits:: Some of the contributors to this manual
+* BUGS:: Dealing with bugs in CVS or this manual
* Copying:: GNU GENERAL PUBLIC LICENSE
* Index:: Index
@end menu
@c ---------------------------------------------------------------------
-@node Preface
-@unnumbered About this manual
-@cindex Preface
-@cindex About this manual
-
-Up to this point, one of the weakest parts of @sc{cvs}
-has been the documentation. @sc{cvs} is a complex
-program. Previous versions of the manual were written
-in the manual page format, which is not really well
-suited for such a complex program.
-
-When writing this manual, I had several goals in mind:
+@node Overview
+@chapter Overview
+@cindex Overview
-@itemize @bullet
-@item
-No knowledge of @sc{rcs} should be necessary.
+This chapter is for people who have never used
+@sc{cvs}, and perhaps have never used version control
+software before.
-@item
-No previous knowledge of revision control software
-should be necessary. All terms, such as @dfn{revision
-numbers}, @dfn{revision trees} and @dfn{merging} are
-explained as they are introduced.
+If you are already familiar with @sc{cvs} and are just
+trying to learn a particular feature or remember a
+certain command, you can probably skip everything here.
-@item
-The manual should concentrate on the things @sc{cvs} users
-want to do, instead of what the @sc{cvs} commands can do.
-The first part of this manual leads you through things
-you might want to do while doing development, and
-introduces the relevant @sc{cvs} commands as they are
-needed.
-
-@item
-Information should be easy to find. In the reference
-manual in the appendices almost all information about
-every @sc{cvs} command is gathered together. There is also
-an extensive index, and a lot of cross references.
-@end itemize
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@menu
-* Checklist::
-* Credits::
-* BUGS::
+* What is CVS?:: What you can do with @sc{cvs}
+* What is CVS not?:: Problems @sc{cvs} doesn't try to solve
+* A sample session:: A tour of basic @sc{cvs} usage
@end menu
-@node Checklist
-@unnumberedsec Checklist for the impatient reader
-
-@sc{cvs} is a complex system. You will need to read
-the manual to be able to use all of its capabilities.
-There are dangers that can easily be avoided if you
-know about them, and this manual tries to warn you
-about them. This checklist is intended to help you
-avoid the dangers without reading the entire manual.
-If you intend to read the entire manual you can skip
-this table.
-
-@table @asis
-@item Binary files
-@sc{cvs} can handle binary files, but
-you must have @sc{rcs} release 5.5 or later and
-a release of @sc{gnu} diff that supports the @samp{-a}
-flag (release 1.15 and later are OK). You must also
-configure both @sc{rcs} and @sc{cvs} to handle binary
-files when you install them.
-
-Keyword substitution can be a source of trouble with
-binary files. @xref{Keyword substitution}, for
-solutions.
-
-@item The @code{admin} command
-Careless use of the @code{admin} command can cause
-@sc{cvs} to cease working. @xref{admin}, before trying
-to use it.
-@end table
-
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node Credits
-@unnumberedsec Credits
-
-@cindex Contributors (manual)
-@cindex Credits (manual)
-Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}>
-wrote the manual pages which were distributed with
-@sc{cvs} 1.3. Much of their text was copied into this
-manual. He also read an early draft
-of this manual and contributed many ideas and
-corrections.
-
-The mailing-list @code{info-cvs} is sometimes
-informative. I have included information from postings
-made by the following persons:
-David G. Grubbs <@t{dgg@@think.com}>.
-
-Some text has been extracted from the man pages for
-@sc{rcs}.
-
-The @sc{cvs} @sc{faq} by David G. Grubbs has provided
-useful material. The @sc{faq} is no longer maintained,
-however, and this manual is about the closest thing there
-is to a successor (with respect to documenting how to
-use @sc{cvs}, at least).
-
-In addition, the following persons have helped by
-telling me about mistakes I've made:
-
-@display
-Roxanne Brunskill <@t{rbrunski@@datap.ca}>,
-Kathy Dyer <@t{dyer@@phoenix.ocf.llnl.gov}>,
-Karl Pingle <@t{pingle@@acuson.com}>,
-Thomas A Peterson <@t{tap@@src.honeywell.com}>,
-Inge Wallin <@t{ingwa@@signum.se}>,
-Dirk Koschuetzki <@t{koschuet@@fmi.uni-passau.de}>
-and Michael Brown <@t{brown@@wi.extrel.com}>.
-@end display
-
-The list of contributors here is not comprehensive; for a more
-complete list of who has contributed to this manual see
-the file @file{doc/ChangeLog} in the @sc{cvs} source
-distribution.
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node BUGS
-@unnumberedsec BUGS
-
-@cindex Bugs in this manual or CVS
-Neither @sc{cvs} nor this manual is perfect, and they
-probably never will be. If you are having trouble
-using @sc{cvs}, or think you have found a bug, there
-are a number of things you can do about it. Note that
-if the manual is unclear, that can be considered a bug
-in the manual, so these problems are often worth doing
-something about as well as problems with @sc{cvs} itself.
-
-@cindex Reporting bugs
-@cindex Bugs, reporting
-@cindex Errors, reporting
-@itemize @bullet
-@item
-If you want someone to help you and fix bugs that you
-report, there are companies which will do that for a
-fee. Two such companies are:
-
-@cindex Signum Support
-@cindex Cyclic Software
-@cindex Support, getting CVS support
-@example
-Signum Support AB
-Box 2044
-S-580 02 Linkoping
-Sweden
-Email: info@@signum.se
-Phone: +46 (0)13 - 21 46 00
-Fax: +46 (0)13 - 21 47 00
-http://www.signum.se/
-
-Cyclic Software
-United States of America
-http://www.cyclic.com/
-info@@cyclic.com
-@end example
-
-@item
-If you got @sc{cvs} through a distributor, such as an
-operating system vendor or a vendor of freeware
-@sc{cd-rom}s, you may wish to see whether the
-distributor provides support. Often, they will provide
-no support or minimal support, but this may vary from
-distributor to distributor.
-
-@item
-If you have the skills and time to do so, you may wish
-to fix the bug yourself. If you wish to submit your
-fix for inclusion in future releases of @sc{cvs}, see
-the file @sc{hacking} in the @sc{cvs} source
-distribution. It contains much more information on the
-process of submitting fixes.
-
-@item
-There may be resources on the net which can help. Two
-good places to start are:
-
-@example
-http://www.cyclic.com
- @r{particularly the Unsupported Resources page}
-http://www.loria.fr/~molli/cvs-index.html
-@end example
-
-If you are so inspired, increasing the information
-available on the net is likely to be appreciated. For
-example, before the standard @sc{cvs} distribution
-worked on Windows 95, there was a web page with some
-explanation and patches for running @sc{cvs} on Windows
-95, and various people helped out by mentioning this
-page on mailing lists or newsgroups when the subject
-came up.
-
-@item
-It is also possible to report bugs to @code{bug-cvs}.
-Note that someone may or may not want to do anything
-with your bug report---if you need a solution consider
-one of the options mentioned above. People probably do
-want to hear about bugs which are particularly severe
-in consequences and/or easy to fix, however. You can
-also increase your odds by being as clear as possible
-about the exact nature of the bug and any other
-relevant information. The way to report bugs is to
-send email to @code{bug-cvs@@prep.ai.mit.edu}. Note
-that submissions to @code{bug-cvs} may be distributed
-under the terms of the @sc{gnu} Public License, so if
-you don't like this, don't submit them. There is
-usually no justification for sending mail directly to
-one of the @sc{cvs} maintainers rather than to
-@code{bug-cvs}; those maintainers who want to hear
-about such bug reports read @code{bug-cvs}. Also note
-that sending a bug report to other mailing lists or
-newsgroups is @emph{not} a substitute for sending it to
-@code{bug-cvs}. It is fine to discuss @sc{cvs} bugs on
-whatever forum you prefer, but there are not
-necessarily any maintainers reading bug reports sent
-anywhere except @code{bug-cvs}.
-@end itemize
-
-@cindex Known bugs in this manual or CVS
-People often ask if there is a list of known bugs or
-whether a particular bug is a known one. The file
-@sc{bugs} in the @sc{cvs} source distribution is one
-list of known bugs, but it doesn't necessarily try to
-be comprehensive. Perhaps there will never be a
-comprehensive, detailed list of known bugs.
-
-@c ---------------------------------------------------------------------
@node What is CVS?
-@chapter What is CVS?
+@section What is CVS?
@cindex What is CVS?
@cindex Introduction to CVS
@cindex CVS, introduction to
@@ -465,19 +244,14 @@ Jeff Polk later helped Brian with the design of the @sc{cvs}
module and vendor branch support.
@cindex Source, getting CVS source
-You can get @sc{cvs} via anonymous @sc{ftp} from a
-number of sites; for example see
+You can get @sc{cvs} in a variety of ways, including
+free download from the internet. For more information
+on downloading @sc{cvs} and other @sc{cvs} topics, see:
+
@example
-http://www.gnu.ai.mit.edu/order/ftp.html
+http://www.cyclic.com/
+http://www.loria.fr/~molli/cvs-index.html
@end example
-for a list of the @sc{gnu} @sc{ftp} sites.
-@c We could also be pointing to other resources like
-@c the cyclic getting.html, Pascal Molli's page, etc.,
-@c and probably should, when someone gets around to
-@c figuring out which pages are stable enough that we
-@c should cite them, which ones are best to point
-@c people to (supported? binary? source? zero-cost?
-@c buying CD-ROMs? etc.), etc.
@cindex Mailing list
@cindex List, mailing list
@@ -514,10 +288,12 @@ if there is sufficient @sc{cvs} traffic on
You can also subscribe to the bug-cvs mailing list,
described in more detail in @ref{BUGS}. To subscribe
-send mail to bug-cvs-request@@prep.ai.mit.edu.
+send mail to bug-cvs-request@@gnu.org.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@unnumberedsec CVS is not@dots{}
+@node What is CVS not?
+@section What is CVS not?
+@cindex What is CVS not?
@sc{cvs} can do a lot of things for you, but it does
not try to be everything for everyone.
@@ -663,8 +439,7 @@ only once they have been proven.
@c ---------------------------------------------------------------------
@node A sample session
-@chapter A sample session
-@cindex A sample session
+@section A sample session
@cindex Example of a work-session
@cindex Getting started
@cindex Work-session, example of
@@ -720,7 +495,7 @@ called @samp{tc}.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Getting the source
-@section Getting the source
+@subsection Getting the source
@cindex Getting the source
@cindex Checking out source
@cindex Fetching source
@@ -755,7 +530,7 @@ you want to edit. @xref{Multiple developers}, for an explanation.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Committing your changes
-@section Committing your changes
+@subsection Committing your changes
@cindex Committing changes
@cindex Log message entry
@cindex CVSEDITOR, environment variable
@@ -806,6 +581,18 @@ will not show up in future editor sessions.
@c FIXCVS: Might be nice if "commit" and other commands
@c would reset that timestamp too, but currently commit
@c doesn't.
+@c FIXME: Need to talk more about the process of
+@c prompting for the log message. Like show an example
+@c of what it pops up in the editor, for example. Also
+@c a discussion of how to get the "a)bort, c)ontinue,
+@c e)dit" prompt and what to do with it. Might also
+@c work in the suggestion that if you want a diff, you
+@c should make it before running commit (someone
+@c suggested that the diff pop up in the editor. I'm
+@c not sure that is better than telling people to run
+@c "cvs diff" first if that is what they want, but if
+@c we want to tell people that, the manual possibly
+@c should say it).
If you want to avoid
starting an editor you can specify the log message on
@@ -818,7 +605,7 @@ $ cvs commit -m "Added an optimization pass" backend.c
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Cleaning up
-@section Cleaning up
+@subsection Cleaning up
@cindex Cleaning up
@cindex Working copy, removing
@cindex Removing your working copy
@@ -875,7 +662,7 @@ when @code{release} asks for confirmation.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Viewing differences
-@section Viewing differences
+@subsection Viewing differences
@cindex Viewing differences
@cindex Diff
@@ -954,7 +741,7 @@ access methods, see @ref{Remote repositories}.
@c more of the buck to the Remote repositories node?
If the access method is omitted, then if the repository
does not contain @samp{:}, then @code{:local:} is
-assumed. If it does contain @samp{:} than either
+assumed. If it does contain @samp{:} then either
@code{:ext:} or @code{:server:} is assumed. For
example, if you have a local repository in
@file{/usr/local/cvsroot}, you can use
@@ -989,7 +776,7 @@ user-defined modules.
@node Specifying a repository
@section Telling CVS where your repository is
-There are a couple of different ways to tell @sc{cvs}
+There are several ways to tell @sc{cvs}
where to find the repository. You can name the
repository on the command line explicitly, with the
@code{-d} (for "directory") option:
@@ -1006,7 +793,7 @@ cvs -d /usr/local/cvsroot checkout yoyodyne/tc
Or you can set the @code{$CVSROOT} environment
variable to an absolute path to the root of the
repository, @file{/usr/local/cvsroot} in this example.
-To set @code{$CVSROOT}, all @code{csh} and @code{tcsh}
+To set @code{$CVSROOT}, @code{csh} and @code{tcsh}
users should have this line in their @file{.cshrc} or
@file{.tcshrc} files:
@@ -1049,7 +836,7 @@ For most purposes it isn't important @emph{how}
@sc{cvs} stores information in the repository. In
fact, the format has changed in the past, and is likely
to change in the future. Since in almost all cases one
-accesses the repository via @sc{cvs} commands; such
+accesses the repository via @sc{cvs} commands, such
changes need not be disruptive.
However, in some cases it may be necessary to
@@ -1061,12 +848,33 @@ the file permissions appropriate for the repository.
@menu
* Repository files:: What files are stored in the repository
* File permissions:: File permissions
+* Windows permissions:: Issues specific to Windows
* Attic:: Some files are stored in the Attic
+* CVS in repository:: Additional information in CVS directory
+* Locks:: CVS locks control concurrent accesses
+* CVSROOT storage:: A few things about CVSROOT are different
@end menu
@node Repository files
@subsection Where files are stored within the repository
+@c @cindex filenames, legal
+@c @cindex legal filenames
+@c Somewhere we need to say something about legitimate
+@c characters in filenames in working directory and
+@c repository. Not "/" (not even on non-unix). And
+@c here is a specific set of issues:
+@c Files starting with a - are handled inconsistently. They can not
+@c be added to a repository with an add command, because it they are
+@c interpreted as a switch. They can appear in a repository if they are
+@c part of a tree that is imported. They can not be removed from the tree
+@c once they are there.
+@c Note that "--" *is* supported (as a
+@c consequence of using GNU getopt). Should document
+@c this somewhere ("Common options"?). The other usual technique,
+@c "./-foo", isn't as effective, at least for "cvs add"
+@c which doesn't support pathnames containing "/".
+
The overall structure of the repository is a directory
tree corresponding to the directories in the working
directory. For example, supposing the repository is in
@@ -1154,7 +962,9 @@ known as @dfn{RCS files}, because the first program to
store files in that format was a version control system
known as @sc{rcs}. For a full
description of the file format, see the @code{man} page
-@cite{rcsfile(5)}, distributed with @sc{rcs}. This
+@cite{rcsfile(5)}, distributed with @sc{rcs}, or the
+file @file{doc/RCSFILES} in the @sc{cvs} source
+distribution. This
file format has become very common---many systems other
than @sc{cvs} or @sc{rcs} can at least import history
files in this format.
@@ -1176,8 +986,12 @@ rules see @ref{Tags}.
@node File permissions
@subsection File permissions
@c -- Move this to @node Creating a repository or similar
-@cindex Security
-@cindex File permissions
+@cindex Security, file permissions in repository
+@cindex File permissions, general
+@cindex permissions, general
+@c FIXME: we need to somehow reflect "permissions in
+@c repository" versus "permissions in working
+@c directory" in the index entries.
@cindex Group
@cindex read-only files, in repository
All @samp{,v} files are created read-only, and you
@@ -1207,9 +1021,13 @@ Also note that users must have write access to the
@file{CVSROOT/val-tags} file. @sc{Cvs} uses it to keep
track of what tags are valid tag names (it is sometimes
updated when tags are used, as well as when they are
-created, though).
+created).
-@cindex CVSUMASK
+Each @sc{rcs} file will be owned by the user who last
+checked it in. This has little significance; what
+really matters is who owns the directories.
+
+@cindex CVSUMASK, environment variable
@cindex umask, for repository files
@sc{cvs} tries to set up reasonable file permissions
for new directories that are added inside the tree, but
@@ -1225,8 +1043,8 @@ typical for newly created files, except that sometimes
@sc{cvs} creates them read-only (see the sections on
watches, @ref{Setting a watch}; -r, @ref{Global
options}; or CVSREAD, @ref{Environment variables}).
-@c FIXME: Need more discussion of which users and
-@c groups should own the file in the repository.
+@c FIXME: Need more discussion of which
+@c group should own the file in the repository.
@c Include a somewhat detailed example of the usual
@c case where CVSUMASK is 007, the developers are all
@c in a group, and that group owns stuff in the
@@ -1249,20 +1067,75 @@ of @sc{cvs}; do not rely on the setting of
@code{CVSUMASK} on the client having no effect.
@c FIXME: need to explain what a umask is or cite
@c someplace which does.
+@c
+@c There is also a larger (largely separate) issue
+@c about the meaning of CVSUMASK in a non-unix context.
+@c For example, whether there is
+@c an equivalent which fits better into other
+@c protection schemes like POSIX.6, VMS, &c.
+@c
@c FIXME: Need one place which discusses this
@c read-only files thing. Why would one use -r or
-@c CVSREAD? Why would one use watches? How do they interact?
+@c CVSREAD? Why would one use watches? How do they
+@c interact?
+@c
@c FIXME: We need to state
@c whether using CVSUMASK removes the need for manually
@c fixing permissions (in fact, if we are going to mention
@c manually fixing permission, we better document a lot
@c better just what we mean by "fix").
+Using pserver, you will generally need stricter
+permissions on the @sc{cvsroot} directory and
+directories above it in the tree; see @ref{Password
+authentication security}.
+
@cindex setuid
@cindex setgid
-Since @sc{cvs} was not written to be run setuid, it is
-unsafe to try to run it setuid. You cannot use the
-setuid features of @sc{rcs} together with @sc{cvs}.
+@cindex security, setuid
+@cindex installed images (VMS)
+Some operating systems have features which allow a
+particular program to run with the ability to perform
+operations which the caller of the program could not.
+For example, the set user ID (setuid) or set group ID
+(setgid) features of unix or the installed image
+feature of VMS. CVS was not written to use such
+features and therefore attempting to install CVS in
+this fashion will provide protection against only
+accidental lapses; anyone who is trying to circumvent
+the measure will be able to do so, and depending on how
+you have set it up may gain access to more than just
+CVS. You may wish to instead consider pserver. It
+shares some of the same attributes, in terms of
+possibly providing a false sense of security or opening
+security holes wider than the ones you are trying to
+fix, so read the documentation on pserver security
+carefully if you are considering this option
+(@ref{Password authentication security}).
+
+@node Windows permissions
+@subsection File Permission issues specific to Windows
+@cindex Windows, and permissions
+@cindex File permissions, Windows-specific
+@cindex permissions, Windows-specific
+
+Some file permission issues are specific to Windows
+operating systems (Windows 95, Windows NT, and
+presumably future operating systems in this family.
+Some of the following might apply to OS/2 but I'm not
+sure).
+
+If you are using local CVS and the repository is on a
+networked file system which is served by the Samba SMB
+server, some people have reported problems with
+permissions. Enabling WRITE=YES in the samba
+configuration is said to fix/workaround it.
+Disclaimer: I haven't investigated enough to know the
+implications of enabling that option, nor do I know
+whether there is something which CVS could be doing
+differently in order to avoid the problem. If you find
+something out, please let us know as described in
+@ref{BUGS}.
@node Attic
@subsection The attic
@@ -1302,6 +1175,147 @@ non-@code{dead} state.
@c arrange the discussion of the dead state, versus
@c discussion of the attic).
+@node CVS in repository
+@subsection The CVS directory in the repository
+@cindex CVS directory, in repository
+
+The @file{CVS} directory in each repository directory
+contains information such as file attributes (in a file
+called @file{CVS/fileattr}; see fileattr.h in the CVS
+source distribution for more documentation). In the
+future additional files may be added to this directory,
+so implementations should silently ignore additional
+files.
+
+This behavior is implemented only by @sc{cvs} 1.7 and
+later; for details see @ref{Watches Compatibility}.
+
+@node Locks
+@subsection CVS locks in the repository
+
+For an introduction to CVS locks focusing on
+user-visible behavior, see @ref{Concurrency}. The
+following section is aimed at people who are writing
+tools which want to access a CVS repository without
+interfering with other tools acessing the same
+repository. If you find yourself confused by concepts
+described here, like @dfn{read lock}, @dfn{write lock},
+and @dfn{deadlock}, you might consult the literature on
+operating systems or databases.
+
+Any file in the repository with a name starting
+with @file{#cvs.rfl} is a read lock. Any file in
+the repository with a name starting with
+@file{#cvs.wfl} is a write lock. Old versions of CVS
+(before CVS 1.5) also created files with names starting
+with @file{#cvs.tfl}, but they are not discussed here.
+The directory @file{#cvs.lock} serves as a master
+lock. That is, one must obtain this lock first before
+creating any of the other locks.
+
+To obtain a readlock, first create the @file{#cvs.lock}
+directory. This operation must be atomic (which should
+be true for creating a directory under most operating
+systems). If it fails because the directory already
+existed, wait for a while and try again. After
+obtaining the @file{#cvs.lock} lock, create a file
+whose name is @file{#cvs.rfl} followed by information
+of your choice (for example, hostname and process
+identification number). Then remove the
+@file{#cvs.lock} directory to release the master lock.
+Then proceed with reading the repository. When you are
+done, remove the @file{#cvs.rfl} file to release the
+read lock.
+
+To obtain a writelock, first create the
+@file{#cvs.lock} directory, as with a readlock. Then
+check that there are no files whose names start with
+@file{#cvs.rfl}. If there are, remove
+@file{#cvs.lock}, wait for a while, and try again. If
+there are no readers, then create a file whose name is
+@file{#cvs.wfl} followed by information of your choice
+(for example, hostname and process identification
+number). Hang on to the @file{#cvs.lock} lock. Proceed
+with writing the repository. When you are done, first
+remove the @file{#cvs.wfl} file and then the
+@file{#cvs.lock} directory. Note that unlike the
+@file{#cvs.rfl} file, the @file{#cvs.wfl} file is just
+informational; it has no effect on the locking operation
+beyond what is provided by holding on to the
+@file{#cvs.lock} lock itself.
+
+Note that each lock (writelock or readlock) only locks
+a single directory in the repository, including
+@file{Attic} and @file{CVS} but not including
+subdirectories which represent other directories under
+version control. To lock an entire tree, you need to
+lock each directory (note that if you fail to obtain
+any lock you need, you must release the whole tree
+before waiting and trying again, to avoid deadlocks).
+
+Note also that @sc{cvs} expects writelocks to control
+access to individual @file{foo,v} files. @sc{rcs} has
+a scheme where the @file{,foo,} file serves as a lock,
+but @sc{cvs} does not implement it and so taking out a
+@sc{cvs} writelock is recommended. See the comments at
+rcs_internal_lockfile in the @sc{cvs} source code for
+further discussion/rationale.
+
+@node CVSROOT storage
+@subsection How files are stored in the CVSROOT directory
+@cindex CVSROOT, storage of files
+
+The @file{$CVSROOT/CVSROOT} directory contains the
+various administrative files. In some ways this
+directory is just like any other directory in the
+repository; it contains @sc{rcs} files whose names end
+in @samp{,v}, and many of the @sc{cvs} commands operate
+on it the same way. However, there are a few
+differences.
+
+For each administrative file, in addition to the
+@sc{rcs} file, there is also a checked out copy of the
+file. For example, there is an @sc{rcs} file
+@file{loginfo,v} and a file @file{loginfo} which
+contains the latest revision contained in
+@file{loginfo,v}. When you check in an administrative
+file, @sc{cvs} should print
+
+@example
+cvs commit: Rebuilding administrative file database
+@end example
+
+@noindent
+@cindex checkoutlist
+and update the checked out copy in
+@file{$CVSROOT/CVSROOT}. If it does not, there is
+something wrong (@pxref{BUGS}). To add your own files
+to the files to be updated in this fashion, you can add
+them to the @file{checkoutlist} administrative file.
+@c FIXME: checkoutlist probably should be documented
+@c somewhat more completely.
+
+@cindex modules.db
+@cindex modules.pag
+@cindex modules.dir
+By default, the @file{modules} file behaves as
+described above. If the modules file is very large,
+storing it as a flat text file may make looking up
+modules slow (I'm not sure whether this is as much of a
+concern now as when @sc{cvs} first evolved this
+feature; I haven't seen benchmarks). Therefore, by
+making appropriate edits to the @sc{cvs} source code
+one can store the modules file in a database which
+implements the @code{ndbm} interface, such as Berkeley
+db or GDBM. If this option is in use, then the modules
+database will be stored in the files @file{modules.db},
+@file{modules.pag}, and/or @file{modules.dir}.
+@c I think fileattr also will use the database stuff.
+@c Anything else?
+
+For information on the meaning of the various
+administrative files, see @ref{Administrative files}.
+
@node Working directory storage
@section How data is stored in the working directory
@@ -1312,6 +1326,7 @@ non-@code{dead} state.
@c whether that is a good organization (is it based on
@c what the user wants to do?).
+@cindex CVS directory, in working directory
While we are discussing @sc{cvs} internals which may
become visible from time to time, we might as well talk
about what @sc{cvs} puts in the @file{CVS} directories
@@ -1342,10 +1357,14 @@ described in @ref{Specifying a repository}.
@cindex CVS/Repository file
@item Repository
This file contains the directory within the repository
-which the current directory corresponds with. For
-historical reasons it is an absolute pathname, although
-it would make more sense for it to be relative to the
-root. For example, after the command
+which the current directory corresponds with. It can
+be either an absolute pathname or a relative pathname;
+@sc{cvs} has had the ability to read either format
+since at least version 1.3 or so. The relative
+pathname is relative to the root, and is the more
+sensible approach, but the absolute pathname is quite
+common and implementations should accept either. For
+example, after the command
@example
cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc
@@ -1357,10 +1376,17 @@ cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc
:local:/usr/local/cvsroot
@end example
-and @file{Repository} will contain
+and @file{Repository} will contain either
@example
-/usr/local/cvsroot/yoydyne/tc
+/usr/local/cvsroot/yoyodyne/tc
+@end example
+
+@noindent
+or
+
+@example
+yoyodyne/tc
@end example
@cindex Entries file, in CVS directory
@@ -1370,11 +1396,12 @@ This file lists the files and directories in the
working directory. It is a text file according to the
conventions appropriate for the operating system in
question.
-@c That seems like a lose, it makes it impossible (it
+@c Using OS text file conventions makes it impossible (it
@c would seem) to share a working directory via a
@c networked file system between systems with diverse
-@c text file conventions. But it seems to be how CVS
-@c currently works.
+@c text file conventions. But that might be correct,
+@c because the text files under CVS control are subject
+@c to the same problem. It is also the status quo.
The first character of each line indicates what sort of
line it is. If the character is unrecognized, programs
reading the file should silently skip that line, to
@@ -1481,6 +1508,18 @@ not create additional files in that directory. To
clear it, use the @code{update} command with the
@samp{-d} option, which will get the additional files
and remove @file{Entries.Static}.
+@c FIXME: This needs to be better documented, in places
+@c other than Working Directory Storage.
+@c FIXCVS: The fact that this setting exists needs to
+@c be more visible to the user. For example "cvs
+@c status foo", in the case where the file would be
+@c gotten except for Entries.Static, might say
+@c something to distinguish this from other cases.
+@c One thing that periodically gets suggested is to
+@c have "cvs update" print something when it skips
+@c files due to Entries.Static, but IMHO that kind of
+@c noise pretty much makes the Entries.Static feature
+@c useless.
@cindex Tag file, in CVS directory
@cindex CVS/Tag file
@@ -1541,6 +1580,28 @@ directory. This allows the @code{unedit} command to
operate even if it is unable to communicate with the
server.
+@cindex Baserev file, in CVS directory
+@cindex CVS/Baserev file
+@item Baserev
+The file lists the revision for each of the files in
+the @file{Base} directory. The format is:
+
+@example
+B@var{name}/@var{rev}/@var{expansion}
+@end example
+
+where @var{expansion} should be ignored, to allow for
+future expansion.
+
+@cindex Baserev.tmp file, in CVS directory
+@cindex CVS/Baserev.tmp file
+@item Baserev.tmp
+This file is to @file{Baserev} as @file{Entries.Backup}
+is to @file{Entries}. That is, to write @file{Baserev},
+first write the new contents to @file{Baserev.tmp} and
+then (atomically where possible), rename it to
+@file{Baserev}.
+
@cindex Template file, in CVS directory
@cindex CVS/Template file
@item Template
@@ -1672,9 +1733,14 @@ repositories.
To set up a @sc{cvs} repository, first choose the
machine and disk on which you want to store the
revision history of the source files. CPU and memory
-requirements are modest---a server with 32M of memory
-or even less can handle a fairly large source tree with
-a fair amount of activity. To estimate disk space
+requirements are modest, so most machines should be
+adequate. For details see @ref{Server requirements}.
+@c Possible that we should be providing a quick rule of
+@c thumb, like the 32M memory for the server. That
+@c might increase the number of people who are happy
+@c with the answer, without following the xref.
+
+To estimate disk space
requirements, if you are importing RCS files from
another system, the size of those files is the
approximate initial size of your repository, or if you
@@ -1686,15 +1752,7 @@ for a while). On the machines on which the developers
will be working, you'll want disk space for
approximately one working directory for each developer
(either the entire tree or a portion of it, depending
-on what each developer uses). Don't worry about CPU
-and memory requirements for the clients---any machine
-with enough capacity to run the operating system in
-question should have little trouble.
-@c Stuff about memory duplicates Server requirements
-@c to some extent. I'm not sure this is a bad thing,
-@c though (one is aimed at people who are looking into
-@c this carefully, the other is aimed at people who
-@c want a rule of thumb).
+on what each developer uses).
The repository should be accessable
(directly or via a networked file system) from all
@@ -1856,10 +1914,14 @@ described in @ref{Connecting via rsh}.
@c use SSH, for example. Plus it incorrectly implies
@c that you need an @code{rsh} binary on the client to use
@c :server:.
+@c Also note that rsh not pserver is the right choice if you want
+@c users to be able to create their own repositories
+@c (because of the --allow-root related issues).
@menu
* Server requirements:: Memory and other resources for servers
* Connecting via rsh:: Using the @code{rsh} program to connect
* Password authenticated:: Direct connections using passwords
+* GSSAPI authenticated:: Direct connections using GSSAPI
* Kerberos authenticated:: Direct connections with kerberos
@end menu
@@ -1873,15 +1935,23 @@ large source tree with a fair amount of activity.
@c Say something about CPU speed too? I'm even less sure
@c what to say on that subject...
-The real answer, of course, is more complicated. The
-@sc{cvs} server consists of two processes for each
-client that it is serving. Memory consumption on the
-child process should remain fairly small. Memory
-consumption on the parent process, particularly if the
-network connection to the client is slow, can be
-expected to grow to slightly more than the size of the
-sources in a single directory, or two megabytes,
-whichever is larger.
+The real answer, of course, is more complicated.
+Estimating the known areas of large memory consumption
+should be sufficient to estimate memory requirements.
+There are two such areas documented here; other memory
+consumption should be small by comparison (if you find
+that is not the case, let us know, as described in
+@ref{BUGS}, so we can update this documentation).
+
+The first area of big memory consumption is large
+checkouts, when using the @sc{cvs} server. The server
+consists of two processes for each client that it is
+serving. Memory consumption on the child process
+should remain fairly small. Memory consumption on the
+parent process, particularly if the network connection
+to the client is slow, can be expected to grow to
+slightly more than the size of the sources in a single
+directory, or two megabytes, whichever is larger.
@c "two megabytes" of course is SERVER_HI_WATER. But
@c we don't mention that here because we are
@c documenting the default configuration of CVS. If it
@@ -1905,15 +1975,45 @@ than physical memory.
@c in a first in, first out fashion, but I haven't
@c looked very closely.
-Resource consumption for the client or the
-non-client/server @sc{cvs} is even more modest---any
-machine with enough capacity to run the operating system
-in question should have little trouble.
-@c Probably we could be saying more about this.
+@c What about disk usage in /tmp on the server? I think that
+@c it can be substantial, but I haven't looked at this
+@c again and tried to figure it out ("cvs import" is
+@c probably the worst case...).
+
+The second area of large memory consumption is
+@code{diff}, when checking in large files. This is
+required even for binary files. The rule of thumb is
+to allow about ten times the size of the largest file
+you will want to check in, although five times may be
+adequate. For example, if you want to check in a file
+which is 10 megabytes, you should have 100 megabytes of
+memory on the machine doing the checkin (the server
+machine for client/server, or the machine running
+@sc{cvs} for non-client/server). This can be swap
+space rather than physical memory. Because the memory
+is only required briefly, there is no particular need
+to allow memory for more than one such checkin at a
+time.
+@c The 5-10 times rule of thumb is from Paul Eggert for
+@c GNU diff. I don't think it is in the GNU diff
+@c manual or anyplace like that.
+@c
+@c Probably we could be saying more about
+@c non-client/server CVS.
@c I would guess for non-client/server CVS in an NFS
-@c environment the biggest issues is the network and
+@c environment the biggest issues are the network and
@c the NFS server.
+Resource consumption for the client is even more
+modest---any machine with enough capacity to run the
+operating system in question should have little
+trouble.
+@c Is that true? I think the client still wants to
+@c (bogusly) store entire files in memory at times.
+
+For information on disk space requirements, see
+@ref{Creating a repository}.
+
@node Connecting via rsh
@subsection Connecting with rsh
@@ -1939,7 +2039,7 @@ Then test that @code{rsh} is working with
rsh -l bach chainsaw.yard.com 'echo $PATH'
@end example
-@cindex CVS_SERVER
+@cindex CVS_SERVER, environment variable
Next you have to make sure that @code{rsh} will be able
to find the server. Make sure that the path which
@code{rsh} printed in the above example includes the
@@ -2028,6 +2128,11 @@ some adjustments on both the server and client sides.
@node Password authentication server
@subsubsection Setting up the server for password authentication
+First of all, you probably want to tighten the
+permissions on the @file{$CVSROOT} and
+@file{$CVSROOT/CVSROOT} directories. See @ref{Password
+authentication security}, for more details.
+
@cindex Pserver (subcommand)
@cindex password server, setting up
@cindex authenticating server, setting up
@@ -2048,11 +2153,10 @@ single line in @file{inetd.conf}) should be sufficient:
@example
2401 stream tcp nowait root /usr/local/bin/cvs
-cvs -b /usr/local/bin --allow-root=/usr/cvsroot pserver
+cvs --allow-root=/usr/cvsroot pserver
@end example
-The @samp{-b} option specifies the directory which contains
-the @sc{rcs} binaries on the server. You could also use the
+You could also use the
@samp{-T} option to specify a temporary directory.
The @samp{--allow-root} option specifies the allowable
@@ -2095,7 +2199,8 @@ regular passwords when they access the repository.
This file is @file{$CVSROOT/CVSROOT/passwd}
(@pxref{Intro administrative files}). Its format is
similar to @file{/etc/passwd}, except that it only has
-two fields, username and password. For example:
+two or three fields, username, password, and optional
+username for the server to use. For example:
@example
bach:ULtgRLXo7NRxs
@@ -2113,9 +2218,11 @@ finds the user, it compares against that password. If
it does not find the user, or if the @sc{cvs}
@file{passwd} file does not exist, then the server
tries to match the password using the system's
-user-lookup routine. When using the @sc{cvs}
-@file{passwd} file, the server runs under as the
-username specified in the the third argument in the
+user-lookup routine (using the system's user-lookup
+routine can be disabled by setting @code{SystemAuth=no}
+in the config file, @pxref{config}). When using the @sc{cvs}
+@file{passwd} file, the server runs as the
+username specified in the third argument in the
entry, or as the first argument if there is no third
argument (in this way @sc{cvs} allows imaginary
usernames provided the @sc{cvs} @file{passwd} file
@@ -2155,8 +2262,8 @@ multiple cvs usernames onto a single system username.
This feature is designed to allow people
repository access without full system access (in
-particular, see @xref{Read-only access}); however, also
-@xref{Password authentication security}. Any sort of
+particular, see @ref{Read-only access}); however, also
+see @ref{Password authentication security}. Any sort of
repository access very likely implies a degree of
general system access as well.
@@ -2242,6 +2349,7 @@ password for transmission to the server.
@node Password authentication security
@subsubsection Security considerations with password authentication
+@cindex security, of pserver
The passwords are stored on the client side in a
trivial encoding of the cleartext, and transmitted in
the same encoding. The encoding is done only to
@@ -2259,6 +2367,7 @@ The separate @sc{cvs} password file (@pxref{Password
authentication server}) allows people
to use a different password for repository access than
for login access. On the other hand, once a user has
+non-read-only
access to the repository, she can execute programs on
the server system through a variety of means. Thus, repository
access implies fairly broad system access as well. It
@@ -2273,7 +2382,28 @@ but no one has done so as of this writing.
@c type).
Furthermore, there may be other ways in which having
access to @sc{cvs} allows people to gain more general
-access to the system; noone has done a careful audit.
+access to the system; no one has done a careful audit.
+
+Note that because the @file{$CVSROOT/CVSROOT} directory
+contains @file{passwd} and other files which are used
+to check security, you must control the permissions on
+this directory as tightly as the permissions on
+@file{/etc}. The same applies to the @file{$CVSROOT}
+directory itself and any directory
+above it in the tree. Anyone who has write access to
+such a directory will have the ability to become any
+user on the system. Note that these permissions are
+typically tighter than you would use if you are not
+using pserver.
+@c TODO: Would be really nice to document/implement a
+@c scheme where the CVS server can run as some non-root
+@c user, e.g. "cvs". CVSROOT/passwd would contain a
+@c bunch of entries of the form foo:xxx:cvs (or the "cvs"
+@c would be implicit). This would greatly reduce
+@c security risks such as those hinted at in the
+@c previous paragraph. I think minor changes to CVS
+@c might be required but mostly this would just need
+@c someone who wants to play with it, document it, &c.
In summary, anyone who gets the password gets
repository access, and some measure of general system
@@ -2282,17 +2412,78 @@ who can sniff network packets or read a protected
(i.e., user read-only) file. If you want real
security, get Kerberos.
+@node GSSAPI authenticated
+@subsection Direct connection with GSSAPI
+
+@cindex GSSAPI
+@cindex security, GSSAPI
+@cindex :gserver:
+GSSAPI is a generic interface to network security
+systems such as Kerberos 5.
+If you have a working GSSAPI library, you can have
+@sc{cvs} connect via a direct @sc{tcp} connection,
+authenticating with GSSAPI.
+
+To do this, @sc{cvs} needs to be compiled with GSSAPI
+support; when configuring @sc{cvs} it tries to detect
+whether GSSAPI libraries using kerberos version 5 are
+present. You can also use the @file{--with-gssapi}
+flag to configure.
+
+The connection is authenticated using GSSAPI, but the
+message stream is @emph{not} authenticated by default.
+You must use the @code{-a} global option to request
+stream authentication.
+
+The data transmitted is @emph{not} encrypted by
+default. Encryption support must be compiled into both
+the client and the server; use the
+@file{--enable-encrypt} configure option to turn it on.
+You must then use the @code{-x} global option to
+request encryption.
+
+GSSAPI connections are handled on the server side by
+the same server which handles the password
+authentication server; see @ref{Password authentication
+server}. If you are using a GSSAPI mechanism such as
+Kerberos which provides for strong authentication, you
+will probably want to disable the ability to
+authenticate via cleartext passwords. To do so, create
+an empty @file{CVSROOT/passwd} password file, and set
+@code{SystemAuth=no} in the config file
+(@pxref{config}).
+
+The GSSAPI server uses a principal name of
+cvs/@var{hostname}, where @var{hostname} is the
+canonical name of the server host. You will have to
+set this up as required by your GSSAPI mechanism.
+
+To connect using GSSAPI, use @samp{:gserver:}. For
+example,
+
+@example
+cvs -d :gserver:chainsaw.yard.com:/usr/local/cvsroot checkout foo
+@end example
+
@node Kerberos authenticated
@subsection Direct connection with kerberos
@cindex kerberos
+@cindex security, kerberos
@cindex :kserver:
+The easiest way to use kerberos is to use the kerberos
+@code{rsh}, as described in @ref{Connecting via rsh}.
The main disadvantage of using rsh is that all the data
needs to pass through additional programs, so it may be
slower. So if you have kerberos installed you can
connect via a direct @sc{tcp} connection,
authenticating with kerberos.
+This section concerns the kerberos network security
+system, version 4. Kerberos version 5 is supported via
+the GSSAPI generic network security interface, as
+described in the previous section.
+
To do this, @sc{cvs} needs to be compiled with kerberos
support; when configuring @sc{cvs} it tries to detect
whether kerberos is present or you can use the
@@ -2319,7 +2510,7 @@ which allows you to log into the server machine. Then
you are ready to go:
@example
-cvs -d :kserver:chainsaw.yard.com:/user/local/cvsroot checkout foo
+cvs -d :kserver:chainsaw.yard.com:/usr/local/cvsroot checkout foo
@end example
Previous versions of @sc{cvs} would fall back to a
@@ -2347,9 +2538,16 @@ repository, except for certain ``administrative'' files
(such as lock files and the history file). It may be
desirable to use this feature in conjunction with
user-aliasing (@pxref{Password authentication server}).
-However, note that read-only access does not repeal the
-existing security considerations in @xref{Password
-authentication security}.
+
+Unlike with previous versions of @sc{cvs}, read-only
+users should be able merely to read the repository, and
+not to execute programs on the server or otherwise gain
+unexpected levels of access. Or to be more accurate,
+the @emph{known} holes have been plugged. Because this
+feature is new and has not received a comprehensive
+security audit, you should use whatever level of
+caution seems warranted given your attitude concerning
+security.
There are two ways to specify read-only access
for a user: by inclusion, and by exclusion.
@@ -2605,6 +2803,13 @@ Many version control systems have the ability to export
export the @sc{rcs} files and then follow the above
instructions.
+Failing that, probably your best bet is to write a
+script that will check out the files one revision at a
+time using the command line interface to the other
+system, and then check the revisions into @sc{cvs}.
+The @file{sccs2rcs} script mentioned below may be a
+useful example to follow.
+
@cindex SCCS, importing files from
@item From SCCS
There is a script in the @file{contrib} directory of
@@ -2614,6 +2819,16 @@ Note: you must run it on a machine which has both
@sc{sccs} and @sc{rcs} installed, and like everything
else in contrib it is unsupported (your mileage may
vary).
+
+@cindex PVCS, importing files from
+@item From PVCS
+There is a script in the @file{contrib} directory of
+the @sc{cvs} source distribution called @file{pvcs_to_rcs}
+which converts @sc{pvcs} archives to @sc{rcs} files.
+You must run it on a machine which has both
+@sc{pvcs} and @sc{rcs} installed, and like everything
+else in contrib it is unsupported (your mileage may
+vary). See the comments in the script for details.
@end table
@c CMZ and/or PATCHY were systems that were used in the
@c high energy physics community (especially for
@@ -2717,1025 +2932,8 @@ $ cvs release -d CVSROOT
@end enumerate
@c ---------------------------------------------------------------------
-@node Multiple developers
-@chapter Multiple developers
-@cindex Multiple developers
-@cindex Team of developers
-@cindex File locking
-@cindex Locking files
-@cindex Working copy
-@cindex reserved checkouts
-@cindex unreserved checkouts
-@cindex RCS-style locking
-
-When more than one person works on a software project
-things often get complicated. Often, two people try to
-edit the same file simultaneously. One solution, known
-as @dfn{file locking} or @dfn{reserved checkouts}, is
-to allow only one person to edit each file at a time.
-This is the only solution with some version control
-systems, including @sc{rcs} and @sc{sccs}. Currently
-the usual way to get reserved checkouts with @sc{cvs}
-is the @code{cvs admin -l} command (@pxref{admin
-options}). This is not as nicely integrated into
-@sc{cvs} as the watch features, described below, but it
-seems that most people with a need for reserved
-checkouts find it adequate.
-@c Or "find it better than worrying about implementing
-@c nicely integrated reserved checkouts" or ...?
-It also may be possible to use the watches
-features described below, together with suitable
-procedures (not enforced by software), to avoid having
-two people edit at the same time.
-
-@c Our unreserved checkout model might not
-@c be quite the same as others. For example, I
-@c think that some systems will tend to create a branch
-@c in the case where CVS prints "up-to-date check failed".
-@c It isn't clear to me whether we should try to
-@c explore these subtleties; it could easily just
-@c confuse people.
-The default model with @sc{cvs} is known as
-@dfn{unreserved checkouts}. In this model, developers
-can edit their own @dfn{working copy} of a file
-simultaneously. The first person that commits his
-changes has no automatic way of knowing that another
-has started to edit it. Others will get an error
-message when they try to commit the file. They must
-then use @sc{cvs} commands to bring their working copy
-up to date with the repository revision. This process
-is almost automatic.
-
-@c FIXME? should probably use the word "watch" here, to
-@c tie this into the text below and above.
-@sc{Cvs} also supports mechanisms which facilitate
-various kinds of communcation, without actually
-enforcing rules like reserved checkouts do.
-
-The rest of this chapter describes how these various
-models work, and some of the issues involved in
-choosing between them.
-
-@ignore
-Here is a draft reserved checkout design or discussion
-of the issues. This seems like as good a place as any
-for this.
-
-Might want a cvs lock/cvs unlock--in which the names
-differ from edit/unedit because the network must be up
-for these to work. unedit gives an error if there is a
-reserved checkout in place (so that people don't
-accidentally leave locks around); unlock gives an error
-if one is not in place (this is more arguable; perhaps
-it should act like unedit in that case).
-
-On the other hand, might want it so that emacs,
-scripts, etc., can get ready to edit a file without
-having to know which model is in use. In that case we
-would have a "cvs watch lock" (or .cvsrc?) (that is,
-three settings, "on", "off", and "lock"). Having cvs
-watch lock set would cause a get to record in the CVS
-directory which model is in use, and cause "cvs edit"
-to change behaviors. We'd want a way to query which
-setting is in effect (this would be handy even if it is
-only "on" or "off" as presently). If lock is in
-effect, then commit would require a lock before
-allowing a checkin; chmod wouldn't suffice (might be
-debatable--see chmod comment below, in watches--but it
-is the way people expect RCS to work and I can't think
-of any significant downside. On the other hand, maybe
-it isn't worth bothering, because people who are used
-to RCS wouldn't think to use chmod anyway).
-
-Implementation: use file attributes or use RCS
-locking. The former avoids more dependence on RCS
-behaviors we will need to reimplement as we librarify
-RCS, and makes it easier to import/export RCS files (in
-that context, want to ignore the locker field). But
-note that RCS locks are per-branch, which is the
-correct behavior (this is also an issue for the "watch
-on" features; they should be per-branch too).
-
-Here are a few more random notes about implementation
-details, assuming "cvs watch lock" and
-
-CVS/Watched file? Or try to fit this into CVS/Entries somehow?
-Cases: (1) file is checked out (unreserved or with watch on) by old
-version of CVS, now we do something with new one, (2) file is checked
-out by new version, now we do something with old one.
-
-Remote protocol would have a "Watched" analogous to "Mode". Of course
-it would apply to all Updated-like requests. How do we keep this
-setting up to date? I guess that there wants to be a Watched request,
-and the server would send a new one if it isn't up to date? (Ugh--hard
-to implement and slows down "cvs -q update"--is there an easier way?)
-
-"cvs edit"--checks CVS/Watched, and if watch lock, then sends
-"edit-lock" request. Which comes back with a Checked-in with
-appropriate Watched (off, on, lock, locked, or some such?), or error
-message if already locked.
-
-"cvs commit"--only will commit if off/on/locked. lock is not OK.
-
-Doc:
-note that "cvs edit" must be connected to network if watch lock is in
-effect.
-
-Talk about what to do if someone has locked a file and you want to
-edit that file. (breaking locks, or lack thereof).
-
-
-@end ignore
-
-@menu
-* File status:: A file can be in several states
-* Updating a file:: Bringing a file up-to-date
-* Conflicts example:: An informative example
-* Informing others:: To cooperate you must inform
-* Concurrency:: Simultaneous repository access
-* Watches:: Mechanisms to track who is editing files
-* Choosing a model:: Reserved or unreserved checkouts?
-@end menu
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node File status
-@section File status
-@cindex File status
-@cindex Status of a file
-
-@c Shouldn't this start with an example or something,
-@c introducing the unreserved checkout model? Before we
-@c dive into listing states?
-Based on what operations you have performed on a
-checked out file, and what operations others have
-performed to that file in the repository, one can
-classify a file in a number of states. The states, as
-reported by the @code{status} command, are:
-
-@c The order of items is chosen to group logically
-@c similar outputs together.
-@c People who want alphabetical can use the index...
-@table @asis
-@cindex Up-to-date
-@item Up-to-date
-The file is identical with the latest revision in the
-repository for the branch in use.
-@c FIXME: should we clarify "in use"? The answer is
-@c sticky tags, and trying to distinguish branch sticky
-@c tags from non-branch sticky tags seems rather awkward
-@c here.
-@c FIXME: What happens with non-branch sticky tags? Is
-@c a stuck file "Up-to-date" or "Needs checkout" or what?
-
-@item Locally Modified
-@cindex Locally Modified
-You have edited the file, and not yet committed your changes.
-
-@item Locally Added
-@cindex Locally Added
-You have added the file with @code{add}, and not yet
-committed your changes.
-@c There are many cases involving the file being
-@c added/removed/modified in the working directory, and
-@c added/removed/modified in the repository, which we
-@c don't try to describe here. I'm not sure that "cvs
-@c status" produces a non-confusing output in most of
-@c those cases.
-
-@item Locally Removed
-@cindex Locally Removed
-You have removed the file with @code{remove}, and not yet
-committed your changes.
-
-@item Needs Checkout
-@cindex Needs Checkout
-Someone else has committed a newer revision to the
-repository. The name is slightly misleading; you will
-ordinarily use @code{update} rather than
-@code{checkout} to get that newer revision.
-
-@item Needs Patch
-@cindex Needs Patch
-@c See also newb-123j0 in sanity.sh (although that case
-@c should probably be changed rather than documented).
-Like Needs Checkout, but the @sc{cvs} server will send
-a patch rather than the entire file. Sending a patch or
-sending an entire file accomplishes the same thing.
-
-@item Needs Merge
-@cindex Needs Merge
-Someone else has committed a newer revision to the repository, and you
-have also made modifications to the file.
-
-@item File had conflicts on merge
-@cindex File had conflicts on merge
-@c is it worth saying that this message was "Unresolved
-@c Conflict" in CVS 1.9 and earlier? I'm inclined to
-@c think that is unnecessarily confusing to new users.
-This is like Locally Modified, except that a previous
-@code{update} command gave a conflict. If you have not
-already done so, you need to
-resolve the conflict as described in @ref{Conflicts example}.
-
-@item Unknown
-@cindex Unknown
-@sc{Cvs} doesn't know anything about this file. For
-example, you have created a new file and have not run
-@code{add}.
-@c
-@c "Entry Invalid" and "Classify Error" are also in the
-@c status.c. The latter definitely indicates a CVS bug
-@c (should it be worded more like "internal error" so
-@c people submit bug reports if they see it?). The former
-@c I'm not as sure; I haven't tracked down whether/when it
-@c appears in "cvs status" output.
-
-@end table
-
-To help clarify the file status, @code{status} also
-reports the @code{Working revision} which is the
-revision that the file in the working directory derives
-from, and the @code{Repository revision} which is the
-latest revision in the repository for the branch in
-use.
-@c FIXME: should we clarify "in use"? The answer is
-@c sticky tags, and trying to distinguish branch sticky
-@c tags from non-branch sticky tags seems rather awkward
-@c here.
-@c FIXME: What happens with non-branch sticky tags?
-@c What is the Repository Revision there? See the
-@c comment at vn_rcs in cvs.h, which is kind of
-@c confused--we really need to document better what this
-@c field contains.
-@c Q: Should we document "New file!" and other such
-@c outputs or are they self-explanatory?
-@c FIXME: what about the date to the right of "Working
-@c revision"? It doesn't appear with client/server and
-@c seems unnecessary (redundant with "ls -l") so
-@c perhaps it should be removed for non-client/server too?
-@c FIXME: Need some examples.
-
-@c Would be nice to have an @example showing output
-@c from cvs status, with comments showing the xref
-@c where each part of the output is described. This
-@c might fit in nicely if it is desirable to split this
-@c node in two; one to introduce "cvs status" and one
-@c to list each of the states.
-The options to @code{status} are listed in
-@ref{Invoking CVS}. For information on its @code{Sticky tag}
-and @code{Sticky date} output, see @ref{Sticky tags}.
-For information on its @code{Sticky options} output,
-see the @samp{-k} option in @ref{update options}.
-
-You can think of the @code{status} and @code{update}
-commands as somewhat complementary. You use
-@code{update} to bring your files up to date, and you
-can use @code{status} to give you some idea of what an
-@code{update} would do (of course, the state of the
-repository might change before you actually run
-@code{update}). In fact, if you want a command to
-display file status in a more brief format than is
-displayed by the @code{status} command, you can invoke
-
-@cindex update, to display file status
-@example
-$ cvs -n -q update
-@end example
-
-The @samp{-n} option means to not actually do the
-update, but merely to display statuses; the @samp{-q}
-option avoids printing the name of each directory. For
-more information on the @code{update} command, and
-these options, see @ref{Invoking CVS}.
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node Updating a file
-@section Bringing a file up to date
-@cindex Bringing a file up to date
-@cindex Updating a file
-@cindex Merging a file
-@cindex update, introduction
-
-When you want to update or merge a file, use the @code{update}
-command. For files that are not up to date this is roughly equivalent
-to a @code{checkout} command: the newest revision of the file is
-extracted from the repository and put in your working copy of the
-module.
-
-Your modifications to a file are never lost when you
-use @code{update}. If no newer revision exists,
-running @code{update} has no effect. If you have
-edited the file, and a newer revision is available,
-@sc{cvs} will merge all changes into your working copy.
-
-For instance, imagine that you checked out revision 1.4 and started
-editing it. In the meantime someone else committed revision 1.5, and
-shortly after that revision 1.6. If you run @code{update} on the file
-now, @sc{cvs} will incorporate all changes between revision 1.4 and 1.6 into
-your file.
-
-@cindex Overlap
-If any of the changes between 1.4 and 1.6 were made too
-close to any of the changes you have made, an
-@dfn{overlap} occurs. In such cases a warning is
-printed, and the resulting file includes both
-versions of the lines that overlap, delimited by
-special markers.
-@xref{update}, for a complete description of the
-@code{update} command.
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node Conflicts example
-@section Conflicts example
-@cindex Merge, an example
-@cindex Example of merge
-@cindex driver.c (merge example)
-
-Suppose revision 1.4 of @file{driver.c} contains this:
-
-@example
-#include <stdio.h>
-
-void main()
-@{
- parse();
- if (nerr == 0)
- gencode();
- else
- fprintf(stderr, "No code generated.\n");
- exit(nerr == 0 ? 0 : 1);
-@}
-@end example
-
-@noindent
-Revision 1.6 of @file{driver.c} contains this:
-
-@example
-#include <stdio.h>
-
-int main(int argc,
- char **argv)
-@{
- parse();
- if (argc != 1)
- @{
- fprintf(stderr, "tc: No args expected.\n");
- exit(1);
- @}
- if (nerr == 0)
- gencode();
- else
- fprintf(stderr, "No code generated.\n");
- exit(!!nerr);
-@}
-@end example
-
-@noindent
-Your working copy of @file{driver.c}, based on revision
-1.4, contains this before you run @samp{cvs update}:
-@c -- Really include "cvs"?
-
-@example
-#include <stdlib.h>
-#include <stdio.h>
-
-void main()
-@{
- init_scanner();
- parse();
- if (nerr == 0)
- gencode();
- else
- fprintf(stderr, "No code generated.\n");
- exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
-@}
-@end example
-
-@noindent
-You run @samp{cvs update}:
-@c -- Really include "cvs"?
-
-@example
-$ cvs update driver.c
-RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
-retrieving revision 1.4
-retrieving revision 1.6
-Merging differences between 1.4 and 1.6 into driver.c
-rcsmerge warning: overlaps during merge
-cvs update: conflicts found in driver.c
-C driver.c
-@end example
-
-@noindent
-@cindex Conflicts (merge example)
-@sc{cvs} tells you that there were some conflicts.
-Your original working file is saved unmodified in
-@file{.#driver.c.1.4}. The new version of
-@file{driver.c} contains this:
-
-@example
-#include <stdlib.h>
-#include <stdio.h>
-
-int main(int argc,
- char **argv)
-@{
- init_scanner();
- parse();
- if (argc != 1)
- @{
- fprintf(stderr, "tc: No args expected.\n");
- exit(1);
- @}
- if (nerr == 0)
- gencode();
- else
- fprintf(stderr, "No code generated.\n");
-@asis{}<<<<<<< driver.c
- exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
-@asis{}=======
- exit(!!nerr);
-@asis{}>>>>>>> 1.6
-@}
-@end example
-
-@noindent
-@cindex Markers, conflict
-@cindex Conflict markers
-@cindex <<<<<<<
-@cindex >>>>>>>
-@cindex =======
-
-Note how all non-overlapping modifications are incorporated in your working
-copy, and that the overlapping section is clearly marked with
-@samp{<<<<<<<}, @samp{=======} and @samp{>>>>>>>}.
-
-@cindex Resolving a conflict
-@cindex Conflict resolution
-You resolve the conflict by editing the file, removing the markers and
-the erroneous line. Suppose you end up with this file:
-@c -- Add xref to the pcl-cvs manual when it talks
-@c -- about this.
-@example
-#include <stdlib.h>
-#include <stdio.h>
-
-int main(int argc,
- char **argv)
-@{
- init_scanner();
- parse();
- if (argc != 1)
- @{
- fprintf(stderr, "tc: No args expected.\n");
- exit(1);
- @}
- if (nerr == 0)
- gencode();
- else
- fprintf(stderr, "No code generated.\n");
- exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
-@}
-@end example
-
-@noindent
-You can now go ahead and commit this as revision 1.7.
-
-@example
-$ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c
-Checking in driver.c;
-/usr/local/cvsroot/yoyodyne/tc/driver.c,v <-- driver.c
-new revision: 1.7; previous revision: 1.6
-done
-@end example
-
-For your protection, @sc{cvs} will refuse to check in a
-file if a conflict occurred and you have not resolved
-the conflict. Currently to resolve a conflict, you
-must change the timestamp on the file, and must also
-insure that the file contains no conflict markers. If
-your file legitimately contains conflict markers (that
-is, occurrences of @samp{>>>>>>> } at the start of a
-line that don't mark a conflict), then @sc{cvs} has
-trouble handling this and you need to start hacking on
-the @code{CVS/Entries} file or other such workarounds.
-@c FIXME: There should be a "cvs resolved" command
-@c which clears the conflict indication. For a nice user
-@c interface, this should be invoked by an interactive
-@c merge tool like emerge rather than by the user
-@c directly--such a tool can verify that the user has
-@c really dealt with each conflict.
-
-@cindex emerge
-If you use release 1.04 or later of pcl-cvs (a @sc{gnu}
-Emacs front-end for @sc{cvs}) you can use an Emacs
-package called emerge to help you resolve conflicts.
-See the documentation for pcl-cvs.
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node Informing others
-@section Informing others about commits
-@cindex Informing others
-@cindex Spreading information
-@cindex Mail, automatic mail on commit
-
-It is often useful to inform others when you commit a
-new revision of a file. The @samp{-i} option of the
-@file{modules} file, or the @file{loginfo} file, can be
-used to automate this process. @xref{modules}.
-@xref{loginfo}. You can use these features of @sc{cvs}
-to, for instance, instruct @sc{cvs} to mail a
-message to all developers, or post a message to a local
-newsgroup.
-@c -- More text would be nice here.
-
-@node Concurrency
-@section Several developers simultaneously attempting to run CVS
-
-@cindex locks, cvs
-@c For a discussion of *why* CVS creates locks, see
-@c the comment at the start of src/lock.c
-If several developers try to run @sc{cvs} at the same
-time, one may get the following message:
-
-@example
-[11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo
-@end example
-
-@sc{cvs} will try again every 30 seconds, and either
-continue with the operation or print the message again,
-if it still needs to wait. If a lock seems to stick
-around for an undue amount of time, find the person
-holding the lock and ask them about the cvs command
-they are running. If they aren't running a cvs
-command, look in the repository directory mentioned in
-the message and remove files which they own whose names
-start with @file{#cvs.tfl}, @file{#cvs.rfl}, or
-@file{#cvs.wfl}.
-
-Note that these locks are to protect @sc{cvs}'s
-internal data structures and have no relationship to
-the word @dfn{lock} in the sense used by
-@sc{rcs}---which refers to reserved checkouts
-(@pxref{Multiple developers}).
-
-Any number of people can be reading from a given
-repository at a time; only when someone is writing do
-the locks prevent other people from reading or writing.
-
-@cindex Atomic transactions, lack of
-@cindex Transactions, atomic, lack of
-@c the following talks about what one might call commit/update
-@c atomicity.
-@c Probably also should say something about
-@c commit/commit atomicity, that is, "An update will
-@c not get partial versions of more than one commit".
-@c CVS currently has this property and I guess we can
-@c make it a documented feature.
-@c For example one person commits
-@c a/one.c and b/four.c and another commits a/two.c and
-@c b/three.c. Then an update cannot get the new a/one.c
-@c and a/two.c and the old b/four.c and b/three.c.
-One might hope for the following property
-
-@example
-If someone commits some changes in one cvs command,
-then an update by someone else will either get all the
-changes, or none of them.
-@end example
-
-but @sc{cvs} does @emph{not} have this property. For
-example, given the files
-
-@example
-a/one.c
-a/two.c
-b/three.c
-b/four.c
-@end example
-
-if someone runs
-
-@example
-cvs ci a/two.c b/three.c
-@end example
-
-and someone else runs @code{cvs update} at the same
-time, the person running @code{update} might get only
-the change to @file{b/three.c} and not the change to
-@file{a/two.c}.
-
-@node Watches
-@section Mechanisms to track who is editing files
-@cindex Watches
-
-For many groups, use of @sc{cvs} in its default mode is
-perfectly satisfactory. Users may sometimes go to
-check in a modification only to find that another
-modification has intervened, but they deal with it and
-proceed with their check in. Other groups prefer to be
-able to know who is editing what files, so that if two
-people try to edit the same file they can choose to
-talk about who is doing what when rather than be
-surprised at check in time. The features in this
-section allow such coordination, while retaining the
-ability of two developers to edit the same file at the
-same time.
-
-@c Some people might ask why CVS does not enforce the
-@c rule on chmod, by requiring a cvs edit before a cvs
-@c commit. The main reason is that it could always be
-@c circumvented--one could edit the file, and
-@c then when ready to check it in, do the cvs edit and put
-@c in the new contents and do the cvs commit. One
-@c implementation note: if we _do_ want to have cvs commit
-@c require a cvs edit, we should store the state on
-@c whether the cvs edit has occurred in the working
-@c directory, rather than having the server try to keep
-@c track of what working directories exist.
-@c FIXME: should the above discussion be part of the
-@c manual proper, somewhere, not just in a comment?
-For maximum benefit developers should use @code{cvs
-edit} (not @code{chmod}) to make files read-write to
-edit them, and @code{cvs release} (not @code{rm}) to
-discard a working directory which is no longer in use,
-but @sc{cvs} is not able to enforce this behavior.
-
-@c I'm a little dissatisfied with this presentation,
-@c because "watch on"/"edit"/"editors" are one set of
-@c functionality, and "watch add"/"watchers" is another
-@c which is somewhat orthogonal even though they interact in
-@c various ways. But I think it might be
-@c confusing to describe them separately (e.g. "watch
-@c add" with loginfo). I don't know.
-
-@menu
-* Setting a watch:: Telling CVS to watch certain files
-* Getting Notified:: Telling CVS to notify you
-* Editing files:: How to edit a file which is being watched
-* Watch information:: Information about who is watching and editing
-* Watches Compatibility:: Watches interact poorly with CVS 1.6 or earlier
-@end menu
-
-@node Setting a watch
-@subsection Telling CVS to watch certain files
-
-To enable the watch features, you first specify that
-certain files are to be watched.
-
-@cindex watch on (subcommand)
-@deffn Command {cvs watch on} [@code{-lR}] files @dots{}
-
-@cindex read-only files, and watches
-Specify that developers should run @code{cvs edit}
-before editing @var{files}. CVS will create working
-copies of @var{files} read-only, to remind developers
-to run the @code{cvs edit} command before working on
-them.
-
-If @var{files} includes the name of a directory, CVS
-arranges to watch all files added to the corresponding
-repository directory, and sets a default for files
-added in the future; this allows the user to set
-notification policies on a per-directory basis. The
-contents of the directory are processed recursively,
-unless the @code{-l} option is given.
-The @code{-R} option can be used to force recursion if the @code{-l}
-option is set in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
-
-If @var{files} is omitted, it defaults to the current directory.
-
-@cindex watch off (subcommand)
-@end deffn
-
-@deffn Command {cvs watch off} [@code{-lR}] files @dots{}
-
-Do not provide notification about work on @var{files}. CVS will create
-working copies of @var{files} read-write.
-
-The @var{files} and options are processed as for @code{cvs
-watch on}.
-
-@end deffn
-
-@node Getting Notified
-@subsection Telling CVS to notify you
-
-You can tell @sc{cvs} that you want to receive
-notifications about various actions taken on a file.
-You can do this without using @code{cvs watch on} for
-the file, but generally you will want to use @code{cvs
-watch on}, so that developers use the @code{cvs edit}
-command.
-
-@cindex watch add (subcommand)
-@deffn Command {cvs watch add} [@code{-a} action] [@code{-lR}] files @dots{}
-
-Add the current user to the list of people to receive notification of
-work done on @var{files}.
-
-The @code{-a} option specifies what kinds of events CVS should notify
-the user about. @var{action} is one of the following:
-
-@table @code
-
-@item edit
-Another user has applied the @code{cvs edit} command (described
-below) to a file.
-
-@item unedit
-Another user has applied the @code{cvs unedit} command (described
-below) or the @code{cvs release} command to a file, or has deleted
-the file and allowed @code{cvs update} to recreate it.
-
-@item commit
-Another user has committed changes to a file.
-
-@item all
-All of the above.
-
-@item none
-None of the above. (This is useful with @code{cvs edit},
-described below.)
-
-@end table
-
-The @code{-a} option may appear more than once, or not at all. If
-omitted, the action defaults to @code{all}.
-
-The @var{files} and options are processed as for the
-@code{cvs watch} commands.
-
-@end deffn
-
-
-@cindex watch remove (subcommand)
-@deffn Command {cvs watch remove} [@code{-a} action] [@code{-lR}] files @dots{}
-
-Remove a notification request established using @code{cvs watch add};
-the arguments are the same. If the @code{-a} option is present, only
-watches for the specified actions are removed.
-
-@end deffn
-
-@cindex notify (admin file)
-When the conditions exist for notification, @sc{cvs}
-calls the @file{notify} administrative file. Edit
-@file{notify} as one edits the other administrative
-files (@pxref{Intro administrative files}). This
-file follows the usual conventions for administrative
-files (@pxref{syntax}), where each line is a regular
-expression followed by a command to execute. The
-command should contain a single ocurrence of @samp{%s}
-which will be replaced by the user to notify; the rest
-of the information regarding the notification will be
-supplied to the command on standard input. The
-standard thing to put in the @code{notify} file is the
-single line:
-
-@example
-ALL mail %s -s \"CVS notification\"
-@end example
-
-This causes users to be notified by electronic mail.
-@c FIXME: should it be this hard to set up this
-@c behavior (and the result when one fails to do so,
-@c silent failure to notify, so non-obvious)? Should
-@c CVS give a warning if no line in notify matches (and
-@c document the use of "DEFAULT :" for the case where
-@c skipping the notification is indeed desired)?
-
-@cindex users (admin file)
-Note that if you set this up in the straightforward
-way, users receive notifications on the server machine.
-One could of course write a @file{notify} script which
-directed notifications elsewhere, but to make this
-easy, @sc{cvs} allows you to associate a notification
-address for each user. To do so create a file
-@file{users} in @file{CVSROOT} with a line for each
-user in the format @var{user}:@var{value}. Then
-instead of passing the name of the user to be notified
-to @file{notify}, @sc{cvs} will pass the @var{value}
-(normally an email address on some other machine).
-
-@sc{Cvs} does not notify you for your own changes.
-Currently this check is done based on whether the user
-name of the person taking the action which triggers
-notification matches the user name of the person
-getting notification. In fact, in general, the watches
-features only track one edit by each user. It probably
-would be more useful if watches tracked each working
-directory separately, so this behavior might be worth
-changing.
-@c "behavior might be worth changing" is an effort to
-@c point to future directions while also not promising
-@c that "they" (as in "why don't they fix CVS to....")
-@c will do this.
-@c one implementation issue is identifying whether a
-@c working directory is same or different. Comparing
-@c pathnames/hostnames is hopeless, but having the server
-@c supply a serial number which the client stores in the
-@c CVS directory as a magic cookie should work.
-
-@node Editing files
-@subsection How to edit a file which is being watched
-
-@cindex checkout, as term for getting ready to edit
-Since a file which is being watched is checked out
-read-only, you cannot simply edit it. To make it
-read-write, and inform others that you are planning to
-edit it, use the @code{cvs edit} command. Some systems
-call this a @dfn{checkout}, but @sc{cvs} uses that term
-for obtaining a copy of the sources (@pxref{Getting the
-source}), an operation which those systems call a
-@dfn{get} or a @dfn{fetch}.
-@c Issue to think about: should we transition CVS
-@c towards the "get" terminology? "cvs get" is already a
-@c synonym for "cvs checkout" and that section of the
-@c manual refers to "Getting the source". If this is
-@c done, needs to be done gingerly (for example, we should
-@c still accept "checkout" in .cvsrc files indefinitely
-@c even if the CVS's messages are changed from "cvs checkout: "
-@c to "cvs get: ").
-@c There is a concern about whether "get" is not as
-@c good for novices because it is a more general term
-@c than "checkout" (and thus arguably harder to assign
-@c a technical meaning for).
-
-@cindex edit (subcommand)
-@deffn Command {cvs edit} [options] files @dots{}
-
-Prepare to edit the working files @var{files}. CVS makes the
-@var{files} read-write, and notifies users who have requested
-@code{edit} notification for any of @var{files}.
-
-The @code{cvs edit} command accepts the same @var{options} as the
-@code{cvs watch add} command, and establishes a temporary watch for the
-user on @var{files}; CVS will remove the watch when @var{files} are
-@code{unedit}ed or @code{commit}ted. If the user does not wish to
-receive notifications, she should specify @code{-a none}.
-
-The @var{files} and options are processed as for the @code{cvs
-watch} commands.
-
-@end deffn
-
-Normally when you are done with a set of changes, you
-use the @code{cvs commit} command, which checks in your
-changes and returns the watched files to their usual
-read-only state. But if you instead decide to abandon
-your changes, or not to make any changes, you can use
-the @code{cvs unedit} command.
-
-@cindex unedit (subcommand)
-@cindex abandoning work
-@cindex reverting to repository version
-@deffn Command {cvs unedit} [@code{-lR}] files @dots{}
-
-Abandon work on the working files @var{files}, and revert them to the
-repository versions on which they are based. CVS makes those
-@var{files} read-only for which users have requested notification using
-@code{cvs watch on}. CVS notifies users who have requested @code{unedit}
-notification for any of @var{files}.
-
-The @var{files} and options are processed as for the
-@code{cvs watch} commands.
-
-If watches are not in use, the @code{unedit} command
-probably does not work, and the way to revert to the
-repository version is to remove the file and then use
-@code{cvs update} to get a new copy. The meaning is
-not precisely the same; removing and updating may also
-bring in some changes which have been made in the
-repository since the last time you updated.
-@c It would be a useful enhancement to CVS to make
-@c unedit work in the non-watch case as well.
-@end deffn
-
-When using client/server @sc{cvs}, you can use the
-@code{cvs edit} and @code{cvs unedit} commands even if
-@sc{cvs} is unable to succesfully communicate with the
-server; the notifications will be sent upon the next
-successful @sc{cvs} command.
-
-@node Watch information
-@subsection Information about who is watching and editing
-
-@cindex watchers (subcommand)
-@deffn Command {cvs watchers} [@code{-lR}] files @dots{}
-
-List the users currently watching changes to @var{files}. The report
-includes the files being watched, and the mail address of each watcher.
-
-The @var{files} and options are processed as for the
-@code{cvs watch} commands.
-
-@end deffn
-
-
-@cindex editors (subcommand)
-@deffn Command {cvs editors} [@code{-lR}] files @dots{}
-
-List the users currently working on @var{files}. The report
-includes the mail address of each user, the time when the user began
-working with the file, and the host and path of the working directory
-containing the file.
-
-The @var{files} and options are processed as for the
-@code{cvs watch} commands.
-
-@end deffn
-
-@node Watches Compatibility
-@subsection Using watches with old versions of CVS
-
-@cindex CVS 1.6, and watches
-If you use the watch features on a repository, it
-creates @file{CVS} directories in the repository and
-stores the information about watches in that directory.
-If you attempt to use @sc{cvs} 1.6 or earlier with the
-repository, you get an error message such as the
-following (all on one line):
-
-@example
-cvs update: cannot open CVS/Entries for reading:
-No such file or directory
-@end example
-
-and your operation will likely be aborted. To use the
-watch features, you must upgrade all copies of @sc{cvs}
-which use that repository in local or server mode. If
-you cannot upgrade, use the @code{watch off} and
-@code{watch remove} commands to remove all watches, and
-that will restore the repository to a state which
-@sc{cvs} 1.6 can cope with.
-
-@node Choosing a model
-@section Choosing between reserved or unreserved checkouts
-@cindex choosing, reserved or unreserved checkouts
-
-Reserved and unreserved checkouts each have pros and
-cons. Let it be said that a lot of this is a matter of
-opinion or what works given different groups' working
-styles, but here is a brief description of some of the
-issues. There are many ways to organize a team of
-developers. @sc{cvs} does not try to enforce a certain
-organization. It is a tool that can be used in several
-ways.
-
-Reserved checkouts can be very counter-productive. If
-two persons want to edit different parts of a file,
-there may be no reason to prevent either of them from
-doing so. Also, it is common for someone to take out a
-lock on a file, because they are planning to edit it,
-but then forget to release the lock.
-
-@c "many groups"? specifics? cites to papers on this?
-@c some way to weasel-word it a bit more so we don't
-@c need facts :-)?
-People, especially people who are familiar with
-reserved checkouts, often wonder how often conflicts
-occur if unreserved checkouts are used, and how
-difficult they are to resolve. The experience with
-many groups is that they occur rarely and usually are
-relatively straightforward to resolve.
-
-The rarity of serious conflicts may be surprising, until one realizes
-that they occur only when two developers disagree on the proper design
-for a given section of code; such a disagreement suggests that the
-team has not been communicating properly in the first place. In order
-to collaborate under @emph{any} source management regimen, developers
-must agree on the general design of the system; given this agreement,
-overlapping changes are usually straightforward to merge.
-
-In some cases unreserved checkouts are clearly
-inappropriate. If no merge tool exists for the kind of
-file you are managing (for example word processor files
-or files edited by Computer Aided Design programs), and
-it is not desirable to change to a program which uses a
-mergeable data format, then resolving conflicts is
-going to be unpleasant enough that you generally will
-be better off to simply avoid the conflicts instead, by
-using reserved checkouts.
-
-The watches features described above in @ref{Watches}
-can be considered to be an intermediate model between
-reserved checkouts and unreserved checkouts. When you
-go to edit a file, it is possible to find out who else
-is editing it. And rather than having the system
-simply forbid both people editing the file, it can tell
-you what the situation is and let you figure out
-whether it is a problem in that particular case or not.
-Therefore, for some groups it can be considered the
-best of both the reserved checkout and unreserved
-checkout worlds.
-
-@c ---------------------------------------------------------------------
-@node Revisions and branches
-@chapter Revisions and branches
-@cindex Branches
-@cindex Main trunk and branches
-@cindex Revision tree, making branches
+@node Revisions
+@chapter Revisions
For many uses of @sc{cvs}, one doesn't need to worry
too much about revision numbers; @sc{cvs} assigns
@@ -3750,21 +2948,12 @@ went into a particular release, one uses a @dfn{tag},
which is a symbolic revision which can be assigned to a
numeric revision in each file.
-Another useful feature, especially when maintaining
-several releases of a software product at once, is the
-ability to make branches on the revision tree.
-@c FIXME: probably want another sentence or two, very
-@c briefly motivating branches.
-
@menu
* Revision numbers:: The meaning of a revision number
* Versions revisions releases:: Terminology used in this manual
* Assigning revisions:: Assigning revisions
* Tags:: Tags--Symbolic revisions
-* Branches motivation:: What branches are good for
-* Creating a branch:: Creating a branch
-* Sticky tags:: Sticky tags
-* Magic branch numbers:: Magic branch numbers
+* Sticky tags:: Certain tags are persistent
@end menu
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -3794,71 +2983,12 @@ a few revisions, with newer revisions to the right.
+-----+ +-----+ +-----+ +-----+ +-----+
@end example
-@c Probably should move the following down a few
-@c sections, until after "branch motivation".
-@sc{cvs} is not limited to linear development. The
-@dfn{revision tree} can be split into @dfn{branches},
-where each branch is a self-maintained line of
-development. Changes made on one branch can easily be
-moved back to the main trunk.
-
-Each branch has a @dfn{branch number}, consisting of an
-odd number of period-separated decimal integers. The
-branch number is created by appending an integer to the
-revision number where the corresponding branch forked
-off. Having branch numbers allows more than one branch
-to be forked off from a certain revision.
-
-@need 3500
-All revisions on a branch have revision numbers formed
-by appending an ordinal number to the branch number.
-The following figure illustrates branching with an
-example.
-
-@example
-@group
- +-------------+
- Branch 1.2.2.3.2 -> ! 1.2.2.3.2.1 !
- / +-------------+
- /
- /
- +---------+ +---------+ +---------+
-Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
- / +---------+ +---------+ +---------+
- /
- /
-+-----+ +-----+ +-----+ +-----+ +-----+
-! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk
-+-----+ +-----+ +-----+ +-----+ +-----+
- !
- !
- ! +---------+ +---------+ +---------+
-Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
- +---------+ +---------+ +---------+
-
-@end group
-@end example
-
-@c -- However, at least for me the figure is not enough. I suggest more
-@c -- text to accompany it. "A picture is worth a thousand words", so you
-@c -- have to make sure the reader notices the couple of hundred words
-@c -- *you* had in mind more than the others!
-
-@c -- Why an even number of segments? This section implies that this is
-@c -- how the main trunk is distinguished from branch roots, but you never
-@c -- explicitly say that this is the purpose of the [by itself rather
-@c -- surprising] restriction to an even number of segments.
-
-The exact details of how the branch number is
-constructed is not something you normally need to be
-concerned about, but here is how it works: When
-@sc{cvs} creates a branch number it picks the first
-unused even integer, starting with 2. So when you want
-to create a branch from revision 6.4 it will be
-numbered 6.4.2. All branch numbers ending in a zero
-(such as 6.4.0) are used internally by @sc{cvs}
-(@pxref{Magic branch numbers}). The branch 1.1.1 has a
-special meaning. @xref{Tracking sources}.
+It is also possible to end up with numbers containing
+more than one period, for example @samp{1.3.2.2}. Such
+revisions represent revisions on branches
+(@pxref{Branching and merging}); such revision numbers
+are explained in detail in @ref{Branches and
+revisions}.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Versions revisions releases
@@ -3925,7 +3055,7 @@ Note that the number you specify with @samp{-r} must be
larger than any existing revision number. That is, if
revision 3.0 exists, you cannot @samp{cvs commit
-r 1.3}. If you want to maintain several releases in
-parallel, you need to use a branch (@pxref{Revisions and branches}).
+parallel, you need to use a branch (@pxref{Branching and merging}).
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Tags
@@ -3960,6 +3090,8 @@ rcsutil.c 5.10
@cindex Tag, symbolic name
@cindex Symbolic name (tag)
@cindex Name, symbolic (tag)
+@cindex HEAD, as reserved tag name
+@cindex BASE, as reserved tag name
You can use the @code{tag} command to give a symbolic name to a
certain revision of a file. You can use the @samp{-v} flag to the
@code{status} command to see all tags that a file has, and
@@ -4110,12 +3242,157 @@ like this:
@end example
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Sticky tags
+@section Sticky tags
+@cindex Sticky tags
+@cindex Tags, sticky
+
+@c A somewhat related issue is per-directory sticky
+@c tags (see comment at CVS/Tag in node Working
+@c directory storage); we probably want to say
+@c something like "you can set a sticky tag for only
+@c some files, but you don't want to" or some such.
+
+Sometimes a working copy's revision has extra data
+associated with it, for example it might be on a branch
+(@pxref{Branching and merging}), or restricted to
+versions prior to a certain date by @samp{checkout -D}
+or @samp{update -D}. Because this data persists --
+that is, it applies to subsequent commands in the
+working copy -- we refer to it as @dfn{sticky}.
+
+Most of the time, stickiness is an obscure aspect of
+@sc{cvs} that you don't need to think about. However,
+even if you don't want to use the feature, you may need
+to know @emph{something} about sticky tags (for
+example, how to avoid them!).
+
+You can use the @code{status} command to see if any
+sticky tags or dates are set:
+
+@example
+$ cvs status driver.c
+===================================================================
+File: driver.c Status: Up-to-date
+
+ Version: 1.7.2.1 Sat Dec 5 19:35:03 1992
+ RCS Version: 1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
+ Sticky Tag: release-1-0-patches (branch: 1.7.2)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+@end example
+
+@cindex Resetting sticky tags
+@cindex Sticky tags, resetting
+@cindex Deleting sticky tags
+The sticky tags will remain on your working files until
+you delete them with @samp{cvs update -A}. The
+@samp{-A} option retrieves the version of the file from
+the head of the trunk, and forgets any sticky tags,
+dates, or options.
+
+@cindex sticky date
+The most common use of sticky tags is to identify which
+branch one is working on, as described in
+@ref{Accessing branches}. However, non-branch
+sticky tags have uses as well. For example,
+suppose that you want to avoid updating your working
+directory, to isolate yourself from possibly
+destabilizing changes other people are making. You
+can, of course, just refrain from running @code{cvs
+update}. But if you want to avoid updating only a
+portion of a larger tree, then sticky tags can help.
+If you check out a certain revision (such as 1.4) it
+will become sticky. Subsequent @code{cvs update}
+commands will
+not retrieve the latest revision until you reset the
+tag with @code{cvs update -A}. Likewise, use of the
+@samp{-D} option to @code{update} or @code{checkout}
+sets a @dfn{sticky date}, which, similarly, causes that
+date to be used for future retrievals.
+
+@cindex Restoring old version of removed file
+@cindex Resurrecting old version of dead file
+Many times you will want to retrieve an old version of
+a file without setting a sticky tag. The way to do
+that is with the @samp{-p} option to @code{checkout} or
+@code{update}, which sends the contents of the file to
+standard output. For example, suppose you have a file
+named @file{file1} which existed as revision 1.1, and
+you then removed it (thus adding a dead revision 1.2).
+Now suppose you want to add it again, with the same
+contents it had previously. Here is how to do it:
+
+@example
+$ cvs update -p -r 1.1 file1 >file1
+===================================================================
+Checking out file1
+RCS: /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
+VERS: 1.1
+***************
+$ cvs add file1
+cvs add: re-adding file file1 (in place of dead revision 1.2)
+cvs add: use 'cvs commit' to add this file permanently
+$ cvs commit -m test
+Checking in file1;
+/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1
+new revision: 1.3; previous revision: 1.2
+done
+$
+@end example
+
+@c ---------------------------------------------------------------------
+@node Branching and merging
+@chapter Branching and merging
+@cindex Branching
+@cindex Merging
+@cindex Copying changes
+@cindex Main trunk and branches
+@cindex Revision tree, making branches
+@cindex Branches, copying changes between
+@cindex Changes, copying between branches
+@cindex Modifications, copying between branches
+
+CVS allows you to isolate changes onto a separate
+line of development, known as a @dfn{branch}. When you
+change files on a branch, those changes do not appear
+on the main trunk or other branches.
+
+Later you can move changes from one branch to another
+branch (or the main trunk) by @dfn{merging}. Merging
+involves first running @code{cvs update -j}, to merge
+the changes into the working directory.
+You can then commit that revision, and thus effectively
+copy the changes onto another branch.
+
+@menu
+* Branches motivation:: What branches are good for
+* Creating a branch:: Creating a branch
+* Accessing branches:: Checking out and updating branches
+* Branches and revisions:: Branches are reflected in revision numbers
+* Magic branch numbers:: Magic branch numbers
+* Merging a branch:: Merging an entire branch
+* Merging more than once:: Merging from a branch several times
+* Merging two revisions:: Merging differences between two revisions
+* Merging adds and removals:: What if files are added or removed?
+@end menu
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Branches motivation
@section What branches are good for
@cindex Branches motivation
@cindex What branches are good for
@cindex Motivation for branches
+@c FIXME: this node mentions one way to use branches,
+@c but it is by no means the only way. For example,
+@c the technique of committing a new feature on a branch,
+@c until it is ready for the main trunk. The whole
+@c thing is generally speaking more akin to the
+@c "Revision management" node although it isn't clear to
+@c me whether policy matters should be centralized or
+@c distributed throughout the relevant sections.
Suppose that release 1.0 of tc has been made. You are continuing to
develop tc, planning to create release 1.1 in a couple of months. After a
while your customers start to complain about a fatal bug. You check
@@ -4129,7 +3406,7 @@ The thing to do in a situation like this is to create a @dfn{branch} on
the revision trees for all the files that make up
release 1.0 of tc. You can then make
modifications to the branch without disturbing the main trunk. When the
-modifications are finished you can select to either incorporate them on
+modifications are finished you can elect to either incorporate them on
the main trunk, or leave them on the branch.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -4137,42 +3414,120 @@ the main trunk, or leave them on the branch.
@section Creating a branch
@cindex Creating a branch
@cindex Branch, creating a
+@cindex tag, creating a branch using
@cindex rtag, creating a branch using
-@c FIXME: should be more explicit about the value of
-@c having a tag on the branchpoint. Also should talk
-@c about creating a branch with tag not rtag.
-The @code{rtag} command can be used to create a branch.
-The @code{rtag} command is much like @code{tag}, but it
-does not require that you have a working copy of the
-module. @xref{rtag}. (You can also use the @code{tag}
-command; @pxref{tag}).
-
-@c Why does this example use -r? That seems like a
-@c confusing thing to do in an example where we are
-@c introducing branches. One user thought it was
-@c a mandatory part of creating a branch for example.
-@c And we are not sufficiently
-@c "step by step" in terms of explaining
-@c what argument one should give to -r.
+You can create a branch with @code{tag -b}; for
+example, assuming you're in a working copy:
+
+@example
+$ cvs tag -b release-1-0-patches
+@end example
+
+@c FIXME: we should be more explicit about the value of
+@c having a tag on the branchpoint. For example
+@c "cvs tag release-1-0-patches-branchpoint" before
+@c the "cvs tag -b". This points out that
+@c release-1-0-patches is a pretty awkward name for
+@c this example (more so than for the rtag example
+@c below).
+
+This splits off a branch based on the current revisions
+in the working copy, assigning that branch the name
+@samp{release-1-0-patches}.
+
+It is important to understand that branches get created
+in the repository, not in the working copy. Creating a
+branch based on current revisions, as the above example
+does, will @emph{not} automatically switch the working
+copy to be on the new branch. For information on how
+to do that, see @ref{Accessing branches}.
+
+You can also create a branch without reference to any
+working copy, by using @code{rtag}:
+
@example
$ cvs rtag -b -r release-1-0 release-1-0-patches tc
@end example
-The @samp{-b} flag makes @code{rtag} create a branch
-(rather than just a symbolic revision name). @samp{-r
-release-1-0} says that this branch should be rooted at the node (in
-the revision tree) that corresponds to the tag
-@samp{release-1-0}. Note that the numeric revision number that matches
-@samp{release-1-0} will probably be different from file to file. The
-name of the new branch is @samp{release-1-0-patches}, and the
-module affected is @samp{tc}.
+@samp{-r release-1-0} says that this branch should be
+rooted at the revision that
+corresponds to the tag @samp{release-1-0}. It need not
+be the most recent revision -- it's often useful to
+split a branch off an old revision (for example, when
+fixing a bug in a past release otherwise known to be
+stable).
+
+As with @samp{tag}, the @samp{-b} flag tells
+@code{rtag} to create a branch (rather than just a
+symbolic revision name). Note that the numeric
+revision number that matches @samp{release-1-0} will
+probably be different from file to file.
-To fix the problem in release 1.0, you need a working
-copy of the branch you just created.
+So, the full effect of the command is to create a new
+branch -- named @samp{release-1-0-patches} -- in module
+@samp{tc}, rooted in the revision tree at the point tagged
+by @samp{release-1-0}.
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Accessing branches
+@section Accessing branches
+@cindex Check out a branch
+@cindex Retrieve a branch
+@cindex Access a branch
+@cindex Identifying a branch
+@cindex Branch, check out
+@cindex Branch, retrieving
+@cindex Branch, accessing
+@cindex Branch, identifying
+
+You can retrieve a branch in one of two ways: by
+checking it out fresh from the repository, or by
+switching an existing working copy over to the branch.
+
+To check out a branch from the repository, invoke
+@samp{checkout} with the @samp{-r} flag, followed by
+the tag name of the branch (@pxref{Creating a branch}):
@example
$ cvs checkout -r release-1-0-patches tc
+@end example
+
+Or, if you already have a working copy, you can switch
+it to a given branch with @samp{update -r}:
+
+@example
+$ cvs update -r release-1-0-patches tc
+@end example
+
+or equivalently:
+
+@example
+$ cd tc
+$ cvs update -r release-1-0-patches
+@end example
+
+It does not matter if the working copy was originally
+on the main trunk or on some other branch -- the above
+command will switch it to the named branch. And
+similarly to a regular @samp{update} command,
+@samp{update -r} merges any changes you have made,
+notifying you of conflicts where they occur.
+
+Once you have a working copy tied to a particular
+branch, it remains there until you tell it otherwise.
+This means that changes checked in from the working
+copy will add new revisions on that branch, while
+leaving the main trunk and other branches unaffected.
+
+@cindex Branches, sticky
+To find out what branch a working copy is on, you can
+use the @samp{status} command. In its output, look for
+the field named @samp{Sticky tag} (@pxref{Sticky tags})
+-- that's @sc{cvs}'s way of telling you the branch, if
+any, of the current working files:
+
+@example
$ cvs status -v driver.c backend.c
===================================================================
File: driver.c Status: Up-to-date
@@ -4203,119 +3558,104 @@ File: backend.c Status: Up-to-date
@end example
-@cindex Branch numbers
-As the output from the @code{status} command shows the branch
-number is created by adding a digit at the tail of the revision number
-it is based on. (If @samp{release-1-0} corresponds to revision 1.4, the
-branch's revision number will be 1.4.2. For obscure reasons @sc{cvs} always
-gives branches even numbers, starting at 2.
-@xref{Revision numbers}.).
+Don't be confused by the fact that the branch numbers
+for each file are different (@samp{1.7.2} and
+@samp{1.4.2} respectively). The branch tag is the
+same, @samp{release-1-0-patches}, and the files are
+indeed on the same branch. The numbers simply reflect
+the point in each file's revision history at which the
+branch was made. In the above example, one can deduce
+that @samp{driver.c} had been through more changes than
+@samp{backend.c} before this branch was created.
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node Sticky tags
-@section Sticky tags
-@cindex Sticky tags
-@cindex Tags, sticky
-@cindex Branches, sticky
+See @ref{Branches and revisions} for details about how
+branch numbers are constructed.
-@c FIXME: make this stand alone better; many places
-@c @xref to this node.
-The @samp{-r release-1-0-patches} flag that was given
-to @code{checkout} in the previous example
-is @dfn{sticky}, that is, it will apply to subsequent commands
-in this directory. If you commit any modifications, they are
-committed on the branch. You can later merge the modifications into
-the main trunk. @xref{Merging}.
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Branches and revisions
+@section Branches and revisions
+@cindex Branch number
+@cindex Number, branch
+@cindex Revision numbers (branches)
-You can use the @code{status} command to see what
-sticky tags or dates are set:
+Ordinarily, a file's revision history is a linear
+series of increments (@pxref{Revision numbers}):
-@c FIXME: This example needs to stand alone better and it
-@c would also better if it didn't use -v which only
-@c clutters the output in this context.
@example
-$ vi driver.c # @r{Fix the bugs}
-$ cvs commit -m "Fixed initialization bug" driver.c
-Checking in driver.c;
-/usr/local/cvsroot/yoyodyne/tc/driver.c,v <-- driver.c
-new revision: 1.7.2.1; previous revision: 1.7
-done
-$ cvs status -v driver.c
-===================================================================
-File: driver.c Status: Up-to-date
-
- Version: 1.7.2.1 Sat Dec 5 19:35:03 1992
- RCS Version: 1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
- Sticky Tag: release-1-0-patches (branch: 1.7.2)
- Sticky Date: (none)
- Sticky Options: (none)
-
- Existing Tags:
- release-1-0-patches (branch: 1.7.2)
- release-1-0 (revision: 1.7)
-
+ +-----+ +-----+ +-----+ +-----+ +-----+
+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
+ +-----+ +-----+ +-----+ +-----+ +-----+
@end example
-@cindex Resetting sticky tags
-@cindex Sticky tags, resetting
-@cindex Deleting sticky tags
-The sticky tags will remain on your working files until
-you delete them with @samp{cvs update -A}. The
-@samp{-A} option retrieves the version of the file from
-the head of the trunk, and forgets any sticky tags,
-dates, or options.
+However, @sc{cvs} is not limited to linear development. The
+@dfn{revision tree} can be split into @dfn{branches},
+where each branch is a self-maintained line of
+development. Changes made on one branch can easily be
+moved back to the main trunk.
-@cindex sticky date
-Sticky tags are not just for branches. For example,
-suppose that you want to avoid updating your working
-directory, to isolate yourself from possibly
-destabilizing changes other people are making. You
-can, of course, just refrain from running @code{cvs
-update}. But if you want to avoid updating only a
-portion of a larger tree, then sticky tags can help.
-If you check out a certain revision (such as 1.4) it
-will become sticky. Subsequent @code{cvs update} will
-not retrieve the latest revision until you reset the
-tag with @code{cvs update -A}. Likewise, use of the
-@samp{-D} option to @code{update} or @code{checkout}
-sets a @dfn{sticky date}, which, similarly, causes that
-date to be used for future retrievals.
+Each branch has a @dfn{branch number}, consisting of an
+odd number of period-separated decimal integers. The
+branch number is created by appending an integer to the
+revision number where the corresponding branch forked
+off. Having branch numbers allows more than one branch
+to be forked off from a certain revision.
-@cindex Restoring old version of removed file
-@cindex Resurrecting old version of dead file
-Many times you will want to retrieve an old version of
-a file without setting a sticky tag. The way to do
-that is with the @samp{-p} option to @code{checkout} or
-@code{update}, which sends the contents of the file to
-standard output. For example, suppose you have a file
-named @file{file1} which existed as revision 1.1, and
-you then removed it (thus adding a dead revision 1.2).
-Now suppose you want to add it again, with the same
-contents it had previously. Here is how to do it:
+@need 3500
+All revisions on a branch have revision numbers formed
+by appending an ordinal number to the branch number.
+The following figure illustrates branching with an
+example.
@example
-$ cvs update -p -r 1.1 file1 >file1
-===================================================================
-Checking out file1
-RCS: /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
-VERS: 1.1
-***************
-$ cvs add file1
-cvs add: re-adding file file1 (in place of dead revision 1.2)
-cvs add: use 'cvs commit' to add this file permanently
-$ cvs commit -m test
-Checking in file1;
-/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1
-new revision: 1.3; previous revision: 1.2
-done
-$
+@group
+ +-------------+
+ Branch 1.2.2.3.2 -> ! 1.2.2.3.2.1 !
+ / +-------------+
+ /
+ /
+ +---------+ +---------+ +---------+
+Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
+ / +---------+ +---------+ +---------+
+ /
+ /
++-----+ +-----+ +-----+ +-----+ +-----+
+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk
++-----+ +-----+ +-----+ +-----+ +-----+
+ !
+ !
+ ! +---------+ +---------+ +---------+
+Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
+ +---------+ +---------+ +---------+
+
+@end group
@end example
+@c -- However, at least for me the figure is not enough. I suggest more
+@c -- text to accompany it. "A picture is worth a thousand words", so you
+@c -- have to make sure the reader notices the couple of hundred words
+@c -- *you* had in mind more than the others!
+
+@c -- Why an even number of segments? This section implies that this is
+@c -- how the main trunk is distinguished from branch roots, but you never
+@c -- explicitly say that this is the purpose of the [by itself rather
+@c -- surprising] restriction to an even number of segments.
+
+The exact details of how the branch number is
+constructed is not something you normally need to be
+concerned about, but here is how it works: When
+@sc{cvs} creates a branch number it picks the first
+unused even integer, starting with 2. So when you want
+to create a branch from revision 6.4 it will be
+numbered 6.4.2. All branch numbers ending in a zero
+(such as 6.4.0) are used internally by @sc{cvs}
+(@pxref{Magic branch numbers}). The branch 1.1.1 has a
+special meaning. @xref{Tracking sources}.
+
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Magic branch numbers
@section Magic branch numbers
-@c Want xref to here from "log" and "admin"?
+@c Want xref to here from "log"?
This section describes a @sc{cvs} feature called
@dfn{magic branches}. For most purposes, you need not
@@ -4328,8 +3668,8 @@ Externally, branch numbers consist of an odd number of
dot-separated decimal integers. @xref{Revision
numbers}. That is not the whole truth, however. For
efficiency reasons @sc{cvs} sometimes inserts an extra 0
-in the second rightmost position (1.2.3 becomes
-1.2.0.3, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
+in the second rightmost position (1.2.4 becomes
+1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
on).
@sc{cvs} does a pretty good job at hiding these so
@@ -4378,27 +3718,6 @@ committed on the branch. Be very careful so that you
do not assign the tag to the wrong number. (There is
no way to see how the tag was assigned yesterday).
-@c ---------------------------------------------------------------------
-@node Merging
-@chapter Merging
-@cindex Merging
-@cindex Copying changes
-@cindex Branches, copying changes between
-@cindex Changes, copying between branches
-@cindex Modifications, copying between branches
-
-You can include the changes made between any two
-revisions into your working copy, by @dfn{merging}.
-You can then commit that revision, and thus effectively
-copy the changes onto another branch.
-
-@menu
-* Merging a branch:: Merging an entire branch
-* Merging more than once:: Merging from a branch several times
-* Merging two revisions:: Merging differences between two revisions
-* Merging adds and removals:: What if files are added or removed?
-@end menu
-
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Merging a branch
@section Merging an entire branch
@@ -4579,6 +3898,10 @@ cvs update -A
cvs update -jbranchtag
@end example
+After these commands are executed and a @samp{cvs commit} is done,
+file @file{a} will be removed and file @file{d} added in the main branch.
+@c (which was determined by trying it)
+
@c ---------------------------------------------------------------------
@node Recursive behavior
@chapter Recursive behavior
@@ -4656,8 +3979,28 @@ $ cvs update -l # @r{Don't update files in subdirectories}
@end example
@c ---------------------------------------------------------------------
+@node Adding and removing
+@chapter Adding, removing, and renaming files and directories
+
+In the course of a project, one will often add new
+files. Likewise with removing or renaming, or with
+directories. The general concept to keep in mind in
+all these cases is that instead of making an
+irreversible change you want @sc{cvs} to record the
+fact that a change has taken place, just as with
+modifying an existing file. The exact mechanisms to do
+this in @sc{cvs} vary depending on the situation.
+
+@menu
+* Adding files:: Adding files
+* Removing files:: Removing files
+* Removing directories:: Removing directories
+* Moving files:: Moving and renaming files
+* Moving directories:: Moving and renaming directories
+@end menu
+
@node Adding files
-@chapter Adding files to a directory
+@section Adding files to a directory
@cindex Adding files
To add a new file to a directory, follow these steps.
@@ -4693,7 +4036,7 @@ Unlike most other commands, the @code{add} command is
not recursive. You cannot even type @samp{cvs add
foo/bar}! Instead, you have to
@c FIXCVS: This is, of course, not a feature. It is
-@c just that noone has gotten around to fixing "cvs add
+@c just that no one has gotten around to fixing "cvs add
@c foo/bar".
@example
@@ -4751,7 +4094,7 @@ $ cvs commit -m "Early version. Not yet compilable." backend.c
@end example
When you add a file it is added only on the branch
-which you are working on (@pxref{Revisions and branches}). You can
+which you are working on (@pxref{Branching and merging}). You can
later merge the additions to another branch if you want
(@pxref{Merging adds and removals}).
@c Should we mention that earlier versions of CVS
@@ -4768,14 +4111,13 @@ later merge the additions to another branch if you want
@c ---------------------------------------------------------------------
@node Removing files
-@chapter Removing files
+@section Removing files
@cindex Removing files
@cindex Deleting files
@c FIXME: this node wants to be split into several
-@c smaller nodes. Probably would fit well with merging
-@c this chapter with "adding files" and the others, as
-@c suggested at the top-level menu (death support could
+@c smaller nodes. Could make these children of
+@c "Adding and removing", probably (death support could
@c be its own section, for example, as could the
@c various bits about undoing mistakes in adding and
@c removing).
@@ -4915,12 +4257,12 @@ U oj.c
@end example
When you remove a file it is removed only on the branch
-which you are working on (@pxref{Revisions and branches}). You can
+which you are working on (@pxref{Branching and merging}). You can
later merge the removals to another branch if you want
(@pxref{Merging adds and removals}).
@node Removing directories
-@chapter Removing directories
+@section Removing directories
@cindex removing directories
@cindex directories, removing
@@ -4931,7 +4273,9 @@ be able to retrieve old releases in which the directory
existed.
The way that you remove a directory is to remove all
-the files in it. Then specify the @samp{-P} option to
+the files in it. You don't remove the directory
+itself; there is no way to do that.
+Instead you specify the @samp{-P} option to
@code{cvs update}, @code{cvs checkout}, or @code{cvs
export}, which will cause @sc{cvs} to remove empty
directories from working directories. Probably the
@@ -4953,257 +4297,8 @@ or not depending on whether the particular version you
are checking out contains any files in that directory.
@c ---------------------------------------------------------------------
-@node Tracking sources
-@chapter Tracking third-party sources
-@cindex Third-party sources
-@cindex Tracking sources
-
-@c FIXME: Need discussion of added and removed files.
-@c FIXME: This doesn't really adequately introduce the
-@c concepts of "vendor" and "you". They don't *have*
-@c to be separate organizations or separate people.
-@c We want a description which is somewhat more based on
-@c the technical issues of which sources go where, but
-@c also with enough examples of how this relates to
-@c relationships like customer-supplier, developer-QA,
-@c maintainer-contributor, or whatever, to make it
-@c seem concrete.
-If you modify a program to better fit your site, you
-probably want to include your modifications when the next
-release of the program arrives. @sc{cvs} can help you with
-this task.
-
-@cindex Vendor
-@cindex Vendor branch
-@cindex Branch, vendor-
-In the terminology used in @sc{cvs}, the supplier of the
-program is called a @dfn{vendor}. The unmodified
-distribution from the vendor is checked in on its own
-branch, the @dfn{vendor branch}. @sc{cvs} reserves branch
-1.1.1 for this use.
-
-When you modify the source and commit it, your revision
-will end up on the main trunk. When a new release is
-made by the vendor, you commit it on the vendor branch
-and copy the modifications onto the main trunk.
-
-Use the @code{import} command to create and update
-the vendor branch. After a successful @code{import}
-the vendor branch is made the `head' revision, so
-anyone that checks out a copy of the file gets that
-revision. When a local modification is committed it is
-placed on the main trunk, and made the `head'
-revision.
-
-@menu
-* First import:: Importing a module for the first time
-* Update imports:: Updating a module with the import command
-* Reverting local changes:: Reverting a module to the latest vendor release
-* Binary files in imports:: Binary files require special handling
-* Keywords in imports:: Keyword substitution might be undesirable
-* Multiple vendor branches:: What if you get sources from several places?
-@end menu
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node First import
-@section Importing a module for the first time
-@cindex Importing modules
-
-@c Should mention naming conventions for vendor tags,
-@c release tags, and perhaps directory names.
-Use the @code{import} command to check in the sources
-for the first time. When you use the @code{import}
-command to track third-party sources, the @dfn{vendor
-tag} and @dfn{release tags} are useful. The
-@dfn{vendor tag} is a symbolic name for the branch
-(which is always 1.1.1, unless you use the @samp{-b
-@var{branch}} flag---@xref{Multiple vendor branches}.). The
-@dfn{release tags} are symbolic names for a particular
-release, such as @samp{FSF_0_04}.
-
-@c I'm not completely sure this belongs here. But
-@c we need to say it _somewhere_ reasonably obvious; it
-@c is a common misconception among people first learning CVS
-Note that @code{import} does @emph{not} change the
-directory in which you invoke it. In particular, it
-does not set up that directory as a @sc{cvs} working
-directory; if you want to work with the sources import
-them first and then check them out into a different
-directory (@pxref{Getting the source}).
-
-@cindex Wdiff (import example)
-Suppose you have the sources to a program called
-@code{wdiff} in a directory @file{wdiff-0.04},
-and are going to make private modifications that you
-want to be able to use even when new releases are made
-in the future. You start by importing the source to
-your repository:
-
-@example
-$ cd wdiff-0.04
-$ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04
-@end example
-
-The vendor tag is named @samp{FSF_DIST} in the above
-example, and the only release tag assigned is
-@samp{WDIFF_0_04}.
-@c FIXME: Need to say where fsf/wdiff comes from.
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node Update imports
-@section Updating a module with the import command
-
-When a new release of the source arrives, you import it into the
-repository with the same @code{import} command that you used to set up
-the repository in the first place. The only difference is that you
-specify a different release tag this time.
-
-@example
-$ tar xfz wdiff-0.05.tar.gz
-$ cd wdiff-0.05
-$ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05
-@end example
-
-For files that have not been modified locally, the newly created
-revision becomes the head revision. If you have made local
-changes, @code{import} will warn you that you must merge the changes
-into the main trunk, and tell you to use @samp{checkout -j} to do so.
-
-@c FIXME: why "wdiff" here and "fsf/wdiff" in the
-@c "import"? I think the assumption is that one has
-@c "wdiff fsf/wdiff" or some such in modules, but it
-@c would be better to not use modules in this example.
-@example
-$ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
-@end example
-
-@noindent
-The above command will check out the latest revision of
-@samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST}
-since yesterday into the working copy. If any conflicts arise during
-the merge they should be resolved in the normal way (@pxref{Conflicts
-example}). Then, the modified files may be committed.
-
-Using a date, as suggested above, assumes that you do
-not import more than one release of a product per
-day. If you do, you can always use something like this
-instead:
-
-@example
-$ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
-@end example
-
-@noindent
-In this case, the two above commands are equivalent.
-
-@node Reverting local changes
-@section Reverting to the latest vendor release
-
-You can also revert local changes completely and return
-to the latest vendor release by changing the `head'
-revision back to the vendor branch on all files. For
-example, if you have a checked-out copy of the sources
-in @file{~/work.d/wdiff}, and you want to revert to the
-vendor's version for all the files in that directory,
-you would type:
-
-@example
-$ cd ~/work.d/wdiff
-$ cvs admin -bWDIFF .
-@end example
-
-@noindent
-You must specify the @samp{-bWDIFF} without any space
-after the @samp{-b}. @xref{admin options}.
-
-@node Binary files in imports
-@section How to handle binary files with cvs import
-
-Use the @samp{-k} wrapper option to tell import which
-files are binary. @xref{Wrappers}.
-
-@node Keywords in imports
-@section How to handle keyword substitution with cvs import
-
-The sources which you are importing may contain
-keywords (@pxref{Keyword substitution}). For example,
-the vendor may use @sc{cvs} or some other system
-which uses similar keyword expansion syntax. If you
-just import the files in the default fashion, then
-the keyword expansions supplied by the vendor will
-be replaced by keyword expansions supplied by your
-own copy of @sc{cvs}. It may be more convenient to
-maintain the expansions supplied by the vendor, so
-that this information can supply information about
-the sources that you imported from the vendor.
-
-To maintain the keyword expansions supplied by the
-vendor, supply the @samp{-ko} option to @code{cvs
-import} the first time you import the file.
-This will turn off keyword expansion
-for that file entirely, so if you want to be more
-selective you'll have to think about what you want
-and use the @samp{-k} option to @code{cvs update} or
-@code{cvs admin} as appropriate.
-@c Supplying -ko to import if the file already existed
-@c has no effect. Not clear to me whether it should
-@c or not.
-
-@node Multiple vendor branches
-@section Multiple vendor branches
-
-All the examples so far assume that there is only one
-vendor from which you are getting sources. In some
-situations you might get sources from a variety of
-places. For example, suppose that you are dealing with
-a project where many different people and teams are
-modifying the software. There are a variety of ways to
-handle this, but in some cases you have a bunch of
-source trees lying around and what you want to do more
-than anything else is just to all put them in CVS so
-that you at least have them in one place.
-
-For handling situations in which there may be more than
-one vendor, you may specify the @samp{-b} option to
-@code{cvs import}. It takes as an argument the vendor
-branch to import to. The default is @samp{-b 1.1.1}.
-
-For example, suppose that there are two teams, the red
-team and the blue team, that are sending you sources.
-You want to import the red team's efforts to branch
-1.1.1 and use the vendor tag RED. You want to import
-the blue team's efforts to branch 1.1.3 and use the
-vendor tag BLUE. So the commands you might use are:
-
-@example
-$ cvs import dir RED RED_1-0
-$ cvs import -b 1.1.3 dir BLUE BLUE_1-5
-@end example
-
-Note that if your vendor tag does not match your
-@samp{-b} option, CVS will not detect this case! For
-example,
-
-@example
-$ cvs import -b 1.1.3 dir RED RED_1-0
-@end example
-
-@noindent
-Be careful; this kind of mismatch is sure to sow
-confusion or worse. I can't think of a useful purpose
-for the ability to specify a mismatch here, but if you
-discover such a use, don't. CVS is likely to make this
-an error in some future release.
-
-@c Probably should say more about the semantics of
-@c multiple branches. What about the default branch?
-@c What about joining (perhaps not as useful with
-@c multiple branches, or perhaps it is. Either way
-@c should be mentioned).
-
-@c ---------------------------------------------------------------------
@node Moving files
-@chapter Moving and renaming files
+@section Moving and renaming files
@cindex Moving files
@cindex Renaming files
@cindex Files, moving
@@ -5224,7 +4319,7 @@ The examples below assume that the file @var{old} is renamed to
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Outside
-@section The Normal way to Rename
+@subsection The Normal way to Rename
@c More rename issues. Not sure whether these are
@c worth documenting; I'm putting them here because
@@ -5270,7 +4365,7 @@ information see @ref{Assigning revisions}.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Inside
-@section Moving the history file
+@subsection Moving the history file
This method is more dangerous, since it involves moving
files inside the repository. Read this entire section
@@ -5312,7 +4407,7 @@ commands while you move it.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Rename by copying
-@section Copying the history file
+@subsection Copying the history file
This way also involves direct modifications to the
repository. It is safe, but not without drawbacks.
@@ -5378,7 +4473,7 @@ numbers will start at 1.0 again.
@c ---------------------------------------------------------------------
@node Moving directories
-@chapter Moving and renaming directories
+@section Moving and renaming directories
@cindex Moving directories
@cindex Renaming directories
@cindex Directories, moving
@@ -5676,6 +4771,1281 @@ in more detail in @ref{Common options}.
@c changed this line *before* 1.4"...).
@c ---------------------------------------------------------------------
+@node Binary files
+@chapter Handling binary files
+@cindex Binary files
+
+The most common use for @sc{cvs} is to store text
+files. With text files, @sc{cvs} can merge revisions,
+display the differences between revisions in a
+human-visible fashion, and other such operations.
+However, if you are willing to give up a few of these
+abilities, @sc{cvs} can store binary files. For
+example, one might store a web site in @sc{cvs}
+including both text files and binary images.
+
+@menu
+* Binary why:: More details on issues with binary files
+* Binary howto:: How to store them
+@end menu
+
+@node Binary why
+@section The issues with binary files
+
+While the need to manage binary files may seem obvious
+if the files that you customarily work with are binary,
+putting them into version control does present some
+additional issues.
+
+One basic function of version control is to show the
+differences between two revisions. For example, if
+someone else checked in a new version of a file, you
+may wish to look at what they changed and determine
+whether their changes are good. For text files,
+@sc{cvs} provides this functionality via the @code{cvs
+diff} command. For binary files, it may be possible to
+extract the two revisions and then compare them with a
+tool external to @sc{cvs} (for example, word processing
+software often has such a feature). If there is no
+such tool, one must track changes via other mechanisms,
+such as urging people to write good log messages, and
+hoping that the changes they actually made were the
+changes that they intended to make.
+
+Another ability of a version control system is the
+ability to merge two revisions. For @sc{cvs} this
+happens in two contexts. The first is when users make
+changes in separate working directories
+(@pxref{Multiple developers}). The second is when one
+merges explicitly with the @samp{update -j} command
+(@pxref{Branching and merging}).
+
+In the case of text
+files, @sc{cvs} can merge changes made independently,
+and signal a conflict if the changes conflict. With
+binary files, the best that @sc{cvs} can do is present
+the two different copies of the file, and leave it to
+the user to resolve the conflict. The user may choose
+one copy or the other, or may run an external merge
+tool which knows about that particular file format, if
+one exists.
+Note that having the user merge relies primarily on the
+user to not accidentally omit some changes, and thus is
+potentially error prone.
+
+If this process is thought to be undesirable, the best
+choice may be to avoid merging. To avoid the merges
+that result from separate working directories, see the
+discussion of reserved checkouts (file locking) in
+@ref{Multiple developers}. To avoid the merges
+resulting from branches, restrict use of branches.
+
+@node Binary howto
+@section How to store binary files
+
+There are two issues with using @sc{cvs} to store
+binary files. The first is that @sc{cvs} by default
+converts line endings between the canonical form in
+which they are stored in the repository (linefeed
+only), and the form appropriate to the operating system
+in use on the client (for example, carriage return
+followed by line feed for Windows NT).
+
+The second is that a binary file might happen to
+contain data which looks like a keyword (@pxref{Keyword
+substitution}), so keyword expansion must be turned
+off.
+
+@c FIXME: the third is that one can't do merges with
+@c binary files. xref to Multiple Developers and the
+@c reserved checkout issues.
+
+The @samp{-kb} option available with some @sc{cvs}
+commands insures that neither line ending conversion
+nor keyword expansion will be done.
+
+Here is an example of how you can create a new file
+using the @samp{-kb} flag:
+
+@example
+$ echo '$@asis{}Id$' > kotest
+$ cvs add -kb -m"A test file" kotest
+$ cvs ci -m"First checkin; contains a keyword" kotest
+@end example
+
+If a file accidentally gets added without @samp{-kb},
+one can use the @code{cvs admin} command to recover.
+For example:
+
+@example
+$ echo '$@asis{}Id$' > kotest
+$ cvs add -m"A test file" kotest
+$ cvs ci -m"First checkin; contains a keyword" kotest
+$ cvs admin -kb kotest
+$ cvs update -A kotest
+# @r{For non-unix systems:}
+# @r{Copy in a good copy of the file from outside CVS}
+$ cvs commit -m "make it binary" kotest
+@end example
+
+@c Trying to describe this for both unix and non-unix
+@c in the same description is very confusing. Might
+@c want to split the two, or just ditch the unix "shortcut"
+@c (unixheads don't do much with binary files, anyway).
+@c This used to say "(Try the above example, and do a
+@c @code{cat kotest} after every command)". But that
+@c only really makes sense for the unix case.
+When you check in the file @file{kotest} the file is
+not preserved as a binary file, because you did not
+check it in as a binary file. The @code{cvs
+admin -kb} command sets the default keyword
+substitution method for this file, but it does not
+alter the working copy of the file that you have. If you need to
+cope with line endings (that is, you are using
+@sc{cvs} on a non-unix system), then you need to
+check in a new copy of the file, as shown by the
+@code{cvs commit} command above.
+On unix, the @code{cvs update -A} command suffices.
+@c FIXME: should also describe what the *other users*
+@c need to do, if they have checked out copies which
+@c have been corrupted by lack of -kb. I think maybe
+@c "cvs update -kb" or "cvs
+@c update -A" would suffice, although the user who
+@c reported this suggested removing the file, manually
+@c removing it from CVS/Entries, and then "cvs update"
+
+However, in using @code{cvs admin -k} to change the
+keyword expansion, be aware that the keyword expansion
+mode is not version controlled. This means that, for
+example, that if you have a text file in old releases,
+and a binary file with the same name in new releases,
+@sc{cvs} provides no way to check out the file in text
+or binary mode depending on what version you are
+checking out. There is no good workaround for this
+problem.
+
+You can also set a default for whether @code{cvs add}
+and @code{cvs import} treat a file as binary based on
+its name; for example you could say that files who
+names end in @samp{.exe} are binary. @xref{Wrappers}.
+There is currently no way to have @sc{cvs} detect
+whether a file is binary based on its contents. The
+main difficulty with designing such a feature is that
+it is not clear how to distinguish between binary and
+non-binary files, and the rules to apply would vary
+considerably with the operating system.
+@c For example, it would be good on MS-DOS-family OSes
+@c for anything containing ^Z to be binary. Having
+@c characters with the 8th bit set imply binary is almost
+@c surely a bad idea in the context of ISO-8859-* and
+@c other such character sets. On VMS or the Mac, we
+@c could use the OS's file typing. This is a
+@c commonly-desired feature, and something of this sort
+@c may make sense. But there are a lot of pitfalls here.
+@c
+@c Another, probably better, way to tell is to read the
+@c file in text mode, write it to a temp file in text
+@c mode, and then do a binary mode compare of the two
+@c files. If they differ, it is a binary file. This
+@c might have problems on VMS (or some other system
+@c with several different text modes), but in general
+@c should be relatively portable. The only other
+@c downside I can think of is that it would be fairly
+@c slow, but that is perhaps a small price to pay for
+@c not having your files corrupted. Another issue is
+@c what happens if you import a text file with bare
+@c linefeeds on Windows. Such files will show up on
+@c Windows sometimes (I think some native windows
+@c programs even write them, on occasion). Perhaps it
+@c is reasonable to treat such files as binary; after
+@c all it is something of a presumption to assume that
+@c the user would want the linefeeds converted to CRLF.
+
+@c ---------------------------------------------------------------------
+@node Multiple developers
+@chapter Multiple developers
+@cindex Multiple developers
+@cindex Team of developers
+@cindex File locking
+@cindex Locking files
+@cindex Working copy
+@cindex reserved checkouts
+@cindex unreserved checkouts
+@cindex RCS-style locking
+
+When more than one person works on a software project
+things often get complicated. Often, two people try to
+edit the same file simultaneously. One solution, known
+as @dfn{file locking} or @dfn{reserved checkouts}, is
+to allow only one person to edit each file at a time.
+This is the only solution with some version control
+systems, including @sc{rcs} and @sc{sccs}. Currently
+the usual way to get reserved checkouts with @sc{cvs}
+is the @code{cvs admin -l} command (@pxref{admin
+options}). This is not as nicely integrated into
+@sc{cvs} as the watch features, described below, but it
+seems that most people with a need for reserved
+checkouts find it adequate.
+@c Or "find it better than worrying about implementing
+@c nicely integrated reserved checkouts" or ...?
+It also may be possible to use the watches
+features described below, together with suitable
+procedures (not enforced by software), to avoid having
+two people edit at the same time.
+
+@c Our unreserved checkout model might not
+@c be quite the same as others. For example, I
+@c think that some systems will tend to create a branch
+@c in the case where CVS prints "up-to-date check failed".
+@c It isn't clear to me whether we should try to
+@c explore these subtleties; it could easily just
+@c confuse people.
+The default model with @sc{cvs} is known as
+@dfn{unreserved checkouts}. In this model, developers
+can edit their own @dfn{working copy} of a file
+simultaneously. The first person that commits his
+changes has no automatic way of knowing that another
+has started to edit it. Others will get an error
+message when they try to commit the file. They must
+then use @sc{cvs} commands to bring their working copy
+up to date with the repository revision. This process
+is almost automatic.
+
+@c FIXME? should probably use the word "watch" here, to
+@c tie this into the text below and above.
+@sc{Cvs} also supports mechanisms which facilitate
+various kinds of communcation, without actually
+enforcing rules like reserved checkouts do.
+
+The rest of this chapter describes how these various
+models work, and some of the issues involved in
+choosing between them.
+
+@ignore
+Here is a draft reserved checkout design or discussion
+of the issues. This seems like as good a place as any
+for this.
+
+Might want a cvs lock/cvs unlock--in which the names
+differ from edit/unedit because the network must be up
+for these to work. unedit gives an error if there is a
+reserved checkout in place (so that people don't
+accidentally leave locks around); unlock gives an error
+if one is not in place (this is more arguable; perhaps
+it should act like unedit in that case).
+
+On the other hand, might want it so that emacs,
+scripts, etc., can get ready to edit a file without
+having to know which model is in use. In that case we
+would have a "cvs watch lock" (or .cvsrc?) (that is,
+three settings, "on", "off", and "lock"). Having cvs
+watch lock set would cause a get to record in the CVS
+directory which model is in use, and cause "cvs edit"
+to change behaviors. We'd want a way to query which
+setting is in effect (this would be handy even if it is
+only "on" or "off" as presently). If lock is in
+effect, then commit would require a lock before
+allowing a checkin; chmod wouldn't suffice (might be
+debatable--see chmod comment below, in watches--but it
+is the way people expect RCS to work and I can't think
+of any significant downside. On the other hand, maybe
+it isn't worth bothering, because people who are used
+to RCS wouldn't think to use chmod anyway).
+
+Implementation: use file attributes or use RCS
+locking. The former avoids more dependence on RCS
+behaviors we will need to reimplement as we librarify
+RCS, and makes it easier to import/export RCS files (in
+that context, want to ignore the locker field). But
+note that RCS locks are per-branch, which is the
+correct behavior (this is also an issue for the "watch
+on" features; they should be per-branch too).
+
+Here are a few more random notes about implementation
+details, assuming "cvs watch lock" and
+
+CVS/Watched file? Or try to fit this into CVS/Entries somehow?
+Cases: (1) file is checked out (unreserved or with watch on) by old
+version of CVS, now we do something with new one, (2) file is checked
+out by new version, now we do something with old one.
+
+Remote protocol would have a "Watched" analogous to "Mode". Of course
+it would apply to all Updated-like requests. How do we keep this
+setting up to date? I guess that there wants to be a Watched request,
+and the server would send a new one if it isn't up to date? (Ugh--hard
+to implement and slows down "cvs -q update"--is there an easier way?)
+
+"cvs edit"--checks CVS/Watched, and if watch lock, then sends
+"edit-lock" request. Which comes back with a Checked-in with
+appropriate Watched (off, on, lock, locked, or some such?), or error
+message if already locked.
+
+"cvs commit"--only will commit if off/on/locked. lock is not OK.
+
+Doc:
+note that "cvs edit" must be connected to network if watch lock is in
+effect.
+
+Talk about what to do if someone has locked a file and you want to
+edit that file. (breaking locks, or lack thereof).
+
+
+One other idea (which could work along with the
+existing "cvs admin -l" reserved checkouts, as well as
+the above):
+
+"cvs editors" could show who has the file locked, if
+someone does.
+
+@end ignore
+
+@menu
+* File status:: A file can be in several states
+* Updating a file:: Bringing a file up-to-date
+* Conflicts example:: An informative example
+* Informing others:: To cooperate you must inform
+* Concurrency:: Simultaneous repository access
+* Watches:: Mechanisms to track who is editing files
+* Choosing a model:: Reserved or unreserved checkouts?
+@end menu
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node File status
+@section File status
+@cindex File status
+@cindex Status of a file
+
+@c Shouldn't this start with an example or something,
+@c introducing the unreserved checkout model? Before we
+@c dive into listing states?
+Based on what operations you have performed on a
+checked out file, and what operations others have
+performed to that file in the repository, one can
+classify a file in a number of states. The states, as
+reported by the @code{status} command, are:
+
+@c The order of items is chosen to group logically
+@c similar outputs together.
+@c People who want alphabetical can use the index...
+@table @asis
+@cindex Up-to-date
+@item Up-to-date
+The file is identical with the latest revision in the
+repository for the branch in use.
+@c FIXME: should we clarify "in use"? The answer is
+@c sticky tags, and trying to distinguish branch sticky
+@c tags from non-branch sticky tags seems rather awkward
+@c here.
+@c FIXME: What happens with non-branch sticky tags? Is
+@c a stuck file "Up-to-date" or "Needs checkout" or what?
+
+@item Locally Modified
+@cindex Locally Modified
+You have edited the file, and not yet committed your changes.
+
+@item Locally Added
+@cindex Locally Added
+You have added the file with @code{add}, and not yet
+committed your changes.
+@c There are many cases involving the file being
+@c added/removed/modified in the working directory, and
+@c added/removed/modified in the repository, which we
+@c don't try to describe here. I'm not sure that "cvs
+@c status" produces a non-confusing output in most of
+@c those cases.
+
+@item Locally Removed
+@cindex Locally Removed
+You have removed the file with @code{remove}, and not yet
+committed your changes.
+
+@item Needs Checkout
+@cindex Needs Checkout
+Someone else has committed a newer revision to the
+repository. The name is slightly misleading; you will
+ordinarily use @code{update} rather than
+@code{checkout} to get that newer revision.
+
+@item Needs Patch
+@cindex Needs Patch
+@c See also newb-123j0 in sanity.sh (although that case
+@c should probably be changed rather than documented).
+Like Needs Checkout, but the @sc{cvs} server will send
+a patch rather than the entire file. Sending a patch or
+sending an entire file accomplishes the same thing.
+
+@item Needs Merge
+@cindex Needs Merge
+Someone else has committed a newer revision to the repository, and you
+have also made modifications to the file.
+
+@item File had conflicts on merge
+@cindex File had conflicts on merge
+@c is it worth saying that this message was "Unresolved
+@c Conflict" in CVS 1.9 and earlier? I'm inclined to
+@c think that is unnecessarily confusing to new users.
+This is like Locally Modified, except that a previous
+@code{update} command gave a conflict. If you have not
+already done so, you need to
+resolve the conflict as described in @ref{Conflicts example}.
+
+@item Unknown
+@cindex Unknown
+@sc{Cvs} doesn't know anything about this file. For
+example, you have created a new file and have not run
+@code{add}.
+@c
+@c "Entry Invalid" and "Classify Error" are also in the
+@c status.c. The latter definitely indicates a CVS bug
+@c (should it be worded more like "internal error" so
+@c people submit bug reports if they see it?). The former
+@c I'm not as sure; I haven't tracked down whether/when it
+@c appears in "cvs status" output.
+
+@end table
+
+To help clarify the file status, @code{status} also
+reports the @code{Working revision} which is the
+revision that the file in the working directory derives
+from, and the @code{Repository revision} which is the
+latest revision in the repository for the branch in
+use.
+@c FIXME: should we clarify "in use"? The answer is
+@c sticky tags, and trying to distinguish branch sticky
+@c tags from non-branch sticky tags seems rather awkward
+@c here.
+@c FIXME: What happens with non-branch sticky tags?
+@c What is the Repository Revision there? See the
+@c comment at vn_rcs in cvs.h, which is kind of
+@c confused--we really need to document better what this
+@c field contains.
+@c Q: Should we document "New file!" and other such
+@c outputs or are they self-explanatory?
+@c FIXME: what about the date to the right of "Working
+@c revision"? It doesn't appear with client/server and
+@c seems unnecessary (redundant with "ls -l") so
+@c perhaps it should be removed for non-client/server too?
+@c FIXME: Need some examples.
+@c FIXME: Working revision can also be something like
+@c "-1.3" for a locally removed file. Not at all
+@c self-explanatory (and it is possible that CVS should
+@c be changed rather than documenting this).
+
+@c Would be nice to have an @example showing output
+@c from cvs status, with comments showing the xref
+@c where each part of the output is described. This
+@c might fit in nicely if it is desirable to split this
+@c node in two; one to introduce "cvs status" and one
+@c to list each of the states.
+The options to @code{status} are listed in
+@ref{Invoking CVS}. For information on its @code{Sticky tag}
+and @code{Sticky date} output, see @ref{Sticky tags}.
+For information on its @code{Sticky options} output,
+see the @samp{-k} option in @ref{update options}.
+
+You can think of the @code{status} and @code{update}
+commands as somewhat complementary. You use
+@code{update} to bring your files up to date, and you
+can use @code{status} to give you some idea of what an
+@code{update} would do (of course, the state of the
+repository might change before you actually run
+@code{update}). In fact, if you want a command to
+display file status in a more brief format than is
+displayed by the @code{status} command, you can invoke
+
+@cindex update, to display file status
+@example
+$ cvs -n -q update
+@end example
+
+The @samp{-n} option means to not actually do the
+update, but merely to display statuses; the @samp{-q}
+option avoids printing the name of each directory. For
+more information on the @code{update} command, and
+these options, see @ref{Invoking CVS}.
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Updating a file
+@section Bringing a file up to date
+@cindex Bringing a file up to date
+@cindex Updating a file
+@cindex Merging a file
+@cindex update, introduction
+
+When you want to update or merge a file, use the @code{update}
+command. For files that are not up to date this is roughly equivalent
+to a @code{checkout} command: the newest revision of the file is
+extracted from the repository and put in your working copy of the
+module.
+
+Your modifications to a file are never lost when you
+use @code{update}. If no newer revision exists,
+running @code{update} has no effect. If you have
+edited the file, and a newer revision is available,
+@sc{cvs} will merge all changes into your working copy.
+
+For instance, imagine that you checked out revision 1.4 and started
+editing it. In the meantime someone else committed revision 1.5, and
+shortly after that revision 1.6. If you run @code{update} on the file
+now, @sc{cvs} will incorporate all changes between revision 1.4 and 1.6 into
+your file.
+
+@cindex Overlap
+If any of the changes between 1.4 and 1.6 were made too
+close to any of the changes you have made, an
+@dfn{overlap} occurs. In such cases a warning is
+printed, and the resulting file includes both
+versions of the lines that overlap, delimited by
+special markers.
+@xref{update}, for a complete description of the
+@code{update} command.
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Conflicts example
+@section Conflicts example
+@cindex Merge, an example
+@cindex Example of merge
+@cindex driver.c (merge example)
+
+Suppose revision 1.4 of @file{driver.c} contains this:
+
+@example
+#include <stdio.h>
+
+void main()
+@{
+ parse();
+ if (nerr == 0)
+ gencode();
+ else
+ fprintf(stderr, "No code generated.\n");
+ exit(nerr == 0 ? 0 : 1);
+@}
+@end example
+
+@noindent
+Revision 1.6 of @file{driver.c} contains this:
+
+@example
+#include <stdio.h>
+
+int main(int argc,
+ char **argv)
+@{
+ parse();
+ if (argc != 1)
+ @{
+ fprintf(stderr, "tc: No args expected.\n");
+ exit(1);
+ @}
+ if (nerr == 0)
+ gencode();
+ else
+ fprintf(stderr, "No code generated.\n");
+ exit(!!nerr);
+@}
+@end example
+
+@noindent
+Your working copy of @file{driver.c}, based on revision
+1.4, contains this before you run @samp{cvs update}:
+@c -- Really include "cvs"?
+
+@example
+#include <stdlib.h>
+#include <stdio.h>
+
+void main()
+@{
+ init_scanner();
+ parse();
+ if (nerr == 0)
+ gencode();
+ else
+ fprintf(stderr, "No code generated.\n");
+ exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+@}
+@end example
+
+@noindent
+You run @samp{cvs update}:
+@c -- Really include "cvs"?
+
+@example
+$ cvs update driver.c
+RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
+retrieving revision 1.4
+retrieving revision 1.6
+Merging differences between 1.4 and 1.6 into driver.c
+rcsmerge warning: overlaps during merge
+cvs update: conflicts found in driver.c
+C driver.c
+@end example
+
+@noindent
+@cindex Conflicts (merge example)
+@sc{cvs} tells you that there were some conflicts.
+Your original working file is saved unmodified in
+@file{.#driver.c.1.4}. The new version of
+@file{driver.c} contains this:
+
+@example
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc,
+ char **argv)
+@{
+ init_scanner();
+ parse();
+ if (argc != 1)
+ @{
+ fprintf(stderr, "tc: No args expected.\n");
+ exit(1);
+ @}
+ if (nerr == 0)
+ gencode();
+ else
+ fprintf(stderr, "No code generated.\n");
+@asis{}<<<<<<< driver.c
+ exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+@asis{}=======
+ exit(!!nerr);
+@asis{}>>>>>>> 1.6
+@}
+@end example
+
+@noindent
+@cindex Markers, conflict
+@cindex Conflict markers
+@cindex <<<<<<<
+@cindex >>>>>>>
+@cindex =======
+
+Note how all non-overlapping modifications are incorporated in your working
+copy, and that the overlapping section is clearly marked with
+@samp{<<<<<<<}, @samp{=======} and @samp{>>>>>>>}.
+
+@cindex Resolving a conflict
+@cindex Conflict resolution
+You resolve the conflict by editing the file, removing the markers and
+the erroneous line. Suppose you end up with this file:
+@c -- Add xref to the pcl-cvs manual when it talks
+@c -- about this.
+@example
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc,
+ char **argv)
+@{
+ init_scanner();
+ parse();
+ if (argc != 1)
+ @{
+ fprintf(stderr, "tc: No args expected.\n");
+ exit(1);
+ @}
+ if (nerr == 0)
+ gencode();
+ else
+ fprintf(stderr, "No code generated.\n");
+ exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+@}
+@end example
+
+@noindent
+You can now go ahead and commit this as revision 1.7.
+
+@example
+$ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c
+Checking in driver.c;
+/usr/local/cvsroot/yoyodyne/tc/driver.c,v <-- driver.c
+new revision: 1.7; previous revision: 1.6
+done
+@end example
+
+For your protection, @sc{cvs} will refuse to check in a
+file if a conflict occurred and you have not resolved
+the conflict. Currently to resolve a conflict, you
+must change the timestamp on the file. In previous
+versions of @sc{cvs}, you also needed to
+insure that the file contains no conflict markers.
+Because
+your file may legitimately contain conflict markers (that
+is, occurrences of @samp{>>>>>>> } at the start of a
+line that don't mark a conflict), the current
+version of @sc{cvs} will print a warning and proceed to
+check in the file.
+@c The old behavior was really icky; the only way out
+@c was to start hacking on
+@c the @code{CVS/Entries} file or other such workarounds.
+@c
+@c If the timestamp thing isn't considered nice enough,
+@c maybe there should be a "cvs resolved" command
+@c which clears the conflict indication. For a nice user
+@c interface, this should be invoked by an interactive
+@c merge tool like emerge rather than by the user
+@c directly--such a tool can verify that the user has
+@c really dealt with each conflict.
+
+@cindex emerge
+If you use release 1.04 or later of pcl-cvs (a @sc{gnu}
+Emacs front-end for @sc{cvs}) you can use an Emacs
+package called emerge to help you resolve conflicts.
+See the documentation for pcl-cvs.
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Informing others
+@section Informing others about commits
+@cindex Informing others
+@cindex Spreading information
+@cindex Mail, automatic mail on commit
+
+It is often useful to inform others when you commit a
+new revision of a file. The @samp{-i} option of the
+@file{modules} file, or the @file{loginfo} file, can be
+used to automate this process. @xref{modules}.
+@xref{loginfo}. You can use these features of @sc{cvs}
+to, for instance, instruct @sc{cvs} to mail a
+message to all developers, or post a message to a local
+newsgroup.
+@c -- More text would be nice here.
+
+@node Concurrency
+@section Several developers simultaneously attempting to run CVS
+
+@cindex locks, cvs
+@c For a discussion of *why* CVS creates locks, see
+@c the comment at the start of src/lock.c
+If several developers try to run @sc{cvs} at the same
+time, one may get the following message:
+
+@example
+[11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo
+@end example
+
+@sc{cvs} will try again every 30 seconds, and either
+continue with the operation or print the message again,
+if it still needs to wait. If a lock seems to stick
+around for an undue amount of time, find the person
+holding the lock and ask them about the cvs command
+they are running. If they aren't running a cvs
+command, look in the repository directory mentioned in
+the message and remove files which they own whose names
+start with @file{#cvs.tfl}, @file{#cvs.rfl}, or
+@file{#cvs.wfl}.
+
+Note that these locks are to protect @sc{cvs}'s
+internal data structures and have no relationship to
+the word @dfn{lock} in the sense used by
+@sc{rcs}---which refers to reserved checkouts
+(@pxref{Multiple developers}).
+
+Any number of people can be reading from a given
+repository at a time; only when someone is writing do
+the locks prevent other people from reading or writing.
+
+@cindex Atomic transactions, lack of
+@cindex Transactions, atomic, lack of
+@c the following talks about what one might call commit/update
+@c atomicity.
+@c Probably also should say something about
+@c commit/commit atomicity, that is, "An update will
+@c not get partial versions of more than one commit".
+@c CVS currently has this property and I guess we can
+@c make it a documented feature.
+@c For example one person commits
+@c a/one.c and b/four.c and another commits a/two.c and
+@c b/three.c. Then an update cannot get the new a/one.c
+@c and a/two.c and the old b/four.c and b/three.c.
+One might hope for the following property
+
+@example
+If someone commits some changes in one cvs command,
+then an update by someone else will either get all the
+changes, or none of them.
+@end example
+
+but @sc{cvs} does @emph{not} have this property. For
+example, given the files
+
+@example
+a/one.c
+a/two.c
+b/three.c
+b/four.c
+@end example
+
+if someone runs
+
+@example
+cvs ci a/two.c b/three.c
+@end example
+
+and someone else runs @code{cvs update} at the same
+time, the person running @code{update} might get only
+the change to @file{b/three.c} and not the change to
+@file{a/two.c}.
+
+@node Watches
+@section Mechanisms to track who is editing files
+@cindex Watches
+
+For many groups, use of @sc{cvs} in its default mode is
+perfectly satisfactory. Users may sometimes go to
+check in a modification only to find that another
+modification has intervened, but they deal with it and
+proceed with their check in. Other groups prefer to be
+able to know who is editing what files, so that if two
+people try to edit the same file they can choose to
+talk about who is doing what when rather than be
+surprised at check in time. The features in this
+section allow such coordination, while retaining the
+ability of two developers to edit the same file at the
+same time.
+
+@c Some people might ask why CVS does not enforce the
+@c rule on chmod, by requiring a cvs edit before a cvs
+@c commit. The main reason is that it could always be
+@c circumvented--one could edit the file, and
+@c then when ready to check it in, do the cvs edit and put
+@c in the new contents and do the cvs commit. One
+@c implementation note: if we _do_ want to have cvs commit
+@c require a cvs edit, we should store the state on
+@c whether the cvs edit has occurred in the working
+@c directory, rather than having the server try to keep
+@c track of what working directories exist.
+@c FIXME: should the above discussion be part of the
+@c manual proper, somewhere, not just in a comment?
+For maximum benefit developers should use @code{cvs
+edit} (not @code{chmod}) to make files read-write to
+edit them, and @code{cvs release} (not @code{rm}) to
+discard a working directory which is no longer in use,
+but @sc{cvs} is not able to enforce this behavior.
+
+@c I'm a little dissatisfied with this presentation,
+@c because "watch on"/"edit"/"editors" are one set of
+@c functionality, and "watch add"/"watchers" is another
+@c which is somewhat orthogonal even though they interact in
+@c various ways. But I think it might be
+@c confusing to describe them separately (e.g. "watch
+@c add" with loginfo). I don't know.
+
+@menu
+* Setting a watch:: Telling CVS to watch certain files
+* Getting Notified:: Telling CVS to notify you
+* Editing files:: How to edit a file which is being watched
+* Watch information:: Information about who is watching and editing
+* Watches Compatibility:: Watches interact poorly with CVS 1.6 or earlier
+@end menu
+
+@node Setting a watch
+@subsection Telling CVS to watch certain files
+
+To enable the watch features, you first specify that
+certain files are to be watched.
+
+@cindex watch on (subcommand)
+@deffn Command {cvs watch on} [@code{-lR}] files @dots{}
+
+@cindex read-only files, and watches
+Specify that developers should run @code{cvs edit}
+before editing @var{files}. CVS will create working
+copies of @var{files} read-only, to remind developers
+to run the @code{cvs edit} command before working on
+them.
+
+If @var{files} includes the name of a directory, CVS
+arranges to watch all files added to the corresponding
+repository directory, and sets a default for files
+added in the future; this allows the user to set
+notification policies on a per-directory basis. The
+contents of the directory are processed recursively,
+unless the @code{-l} option is given.
+The @code{-R} option can be used to force recursion if the @code{-l}
+option is set in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
+
+If @var{files} is omitted, it defaults to the current directory.
+
+@cindex watch off (subcommand)
+@end deffn
+
+@deffn Command {cvs watch off} [@code{-lR}] files @dots{}
+
+Do not provide notification about work on @var{files}. CVS will create
+working copies of @var{files} read-write.
+
+The @var{files} and options are processed as for @code{cvs
+watch on}.
+
+@end deffn
+
+@node Getting Notified
+@subsection Telling CVS to notify you
+
+You can tell @sc{cvs} that you want to receive
+notifications about various actions taken on a file.
+You can do this without using @code{cvs watch on} for
+the file, but generally you will want to use @code{cvs
+watch on}, so that developers use the @code{cvs edit}
+command.
+
+@cindex watch add (subcommand)
+@deffn Command {cvs watch add} [@code{-a} action] [@code{-lR}] files @dots{}
+
+Add the current user to the list of people to receive notification of
+work done on @var{files}.
+
+The @code{-a} option specifies what kinds of events CVS should notify
+the user about. @var{action} is one of the following:
+
+@table @code
+
+@item edit
+Another user has applied the @code{cvs edit} command (described
+below) to a file.
+
+@item unedit
+Another user has applied the @code{cvs unedit} command (described
+below) or the @code{cvs release} command to a file, or has deleted
+the file and allowed @code{cvs update} to recreate it.
+
+@item commit
+Another user has committed changes to a file.
+
+@item all
+All of the above.
+
+@item none
+None of the above. (This is useful with @code{cvs edit},
+described below.)
+
+@end table
+
+The @code{-a} option may appear more than once, or not at all. If
+omitted, the action defaults to @code{all}.
+
+The @var{files} and options are processed as for the
+@code{cvs watch} commands.
+
+@end deffn
+
+
+@cindex watch remove (subcommand)
+@deffn Command {cvs watch remove} [@code{-a} action] [@code{-lR}] files @dots{}
+
+Remove a notification request established using @code{cvs watch add};
+the arguments are the same. If the @code{-a} option is present, only
+watches for the specified actions are removed.
+
+@end deffn
+
+@cindex notify (admin file)
+When the conditions exist for notification, @sc{cvs}
+calls the @file{notify} administrative file. Edit
+@file{notify} as one edits the other administrative
+files (@pxref{Intro administrative files}). This
+file follows the usual conventions for administrative
+files (@pxref{syntax}), where each line is a regular
+expression followed by a command to execute. The
+command should contain a single ocurrence of @samp{%s}
+which will be replaced by the user to notify; the rest
+of the information regarding the notification will be
+supplied to the command on standard input. The
+standard thing to put in the @code{notify} file is the
+single line:
+
+@example
+ALL mail %s -s \"CVS notification\"
+@end example
+
+This causes users to be notified by electronic mail.
+@c FIXME: should it be this hard to set up this
+@c behavior (and the result when one fails to do so,
+@c silent failure to notify, so non-obvious)? Should
+@c CVS give a warning if no line in notify matches (and
+@c document the use of "DEFAULT :" for the case where
+@c skipping the notification is indeed desired)?
+
+@cindex users (admin file)
+Note that if you set this up in the straightforward
+way, users receive notifications on the server machine.
+One could of course write a @file{notify} script which
+directed notifications elsewhere, but to make this
+easy, @sc{cvs} allows you to associate a notification
+address for each user. To do so create a file
+@file{users} in @file{CVSROOT} with a line for each
+user in the format @var{user}:@var{value}. Then
+instead of passing the name of the user to be notified
+to @file{notify}, @sc{cvs} will pass the @var{value}
+(normally an email address on some other machine).
+
+@sc{Cvs} does not notify you for your own changes.
+Currently this check is done based on whether the user
+name of the person taking the action which triggers
+notification matches the user name of the person
+getting notification. In fact, in general, the watches
+features only track one edit by each user. It probably
+would be more useful if watches tracked each working
+directory separately, so this behavior might be worth
+changing.
+@c "behavior might be worth changing" is an effort to
+@c point to future directions while also not promising
+@c that "they" (as in "why don't they fix CVS to....")
+@c will do this.
+@c one implementation issue is identifying whether a
+@c working directory is same or different. Comparing
+@c pathnames/hostnames is hopeless, but having the server
+@c supply a serial number which the client stores in the
+@c CVS directory as a magic cookie should work.
+
+@node Editing files
+@subsection How to edit a file which is being watched
+
+@cindex checkout, as term for getting ready to edit
+Since a file which is being watched is checked out
+read-only, you cannot simply edit it. To make it
+read-write, and inform others that you are planning to
+edit it, use the @code{cvs edit} command. Some systems
+call this a @dfn{checkout}, but @sc{cvs} uses that term
+for obtaining a copy of the sources (@pxref{Getting the
+source}), an operation which those systems call a
+@dfn{get} or a @dfn{fetch}.
+@c Issue to think about: should we transition CVS
+@c towards the "get" terminology? "cvs get" is already a
+@c synonym for "cvs checkout" and that section of the
+@c manual refers to "Getting the source". If this is
+@c done, needs to be done gingerly (for example, we should
+@c still accept "checkout" in .cvsrc files indefinitely
+@c even if the CVS's messages are changed from "cvs checkout: "
+@c to "cvs get: ").
+@c There is a concern about whether "get" is not as
+@c good for novices because it is a more general term
+@c than "checkout" (and thus arguably harder to assign
+@c a technical meaning for).
+
+@cindex edit (subcommand)
+@deffn Command {cvs edit} [options] files @dots{}
+
+Prepare to edit the working files @var{files}. CVS makes the
+@var{files} read-write, and notifies users who have requested
+@code{edit} notification for any of @var{files}.
+
+The @code{cvs edit} command accepts the same @var{options} as the
+@code{cvs watch add} command, and establishes a temporary watch for the
+user on @var{files}; CVS will remove the watch when @var{files} are
+@code{unedit}ed or @code{commit}ted. If the user does not wish to
+receive notifications, she should specify @code{-a none}.
+
+The @var{files} and options are processed as for the @code{cvs
+watch} commands.
+
+@end deffn
+
+Normally when you are done with a set of changes, you
+use the @code{cvs commit} command, which checks in your
+changes and returns the watched files to their usual
+read-only state. But if you instead decide to abandon
+your changes, or not to make any changes, you can use
+the @code{cvs unedit} command.
+
+@cindex unedit (subcommand)
+@cindex abandoning work
+@cindex reverting to repository version
+@deffn Command {cvs unedit} [@code{-lR}] files @dots{}
+
+Abandon work on the working files @var{files}, and revert them to the
+repository versions on which they are based. CVS makes those
+@var{files} read-only for which users have requested notification using
+@code{cvs watch on}. CVS notifies users who have requested @code{unedit}
+notification for any of @var{files}.
+
+The @var{files} and options are processed as for the
+@code{cvs watch} commands.
+
+If watches are not in use, the @code{unedit} command
+probably does not work, and the way to revert to the
+repository version is to remove the file and then use
+@code{cvs update} to get a new copy. The meaning is
+not precisely the same; removing and updating may also
+bring in some changes which have been made in the
+repository since the last time you updated.
+@c It would be a useful enhancement to CVS to make
+@c unedit work in the non-watch case as well.
+@end deffn
+
+When using client/server @sc{cvs}, you can use the
+@code{cvs edit} and @code{cvs unedit} commands even if
+@sc{cvs} is unable to succesfully communicate with the
+server; the notifications will be sent upon the next
+successful @sc{cvs} command.
+
+@node Watch information
+@subsection Information about who is watching and editing
+
+@cindex watchers (subcommand)
+@deffn Command {cvs watchers} [@code{-lR}] files @dots{}
+
+List the users currently watching changes to @var{files}. The report
+includes the files being watched, and the mail address of each watcher.
+
+The @var{files} and options are processed as for the
+@code{cvs watch} commands.
+
+@end deffn
+
+
+@cindex editors (subcommand)
+@deffn Command {cvs editors} [@code{-lR}] files @dots{}
+
+List the users currently working on @var{files}. The report
+includes the mail address of each user, the time when the user began
+working with the file, and the host and path of the working directory
+containing the file.
+
+The @var{files} and options are processed as for the
+@code{cvs watch} commands.
+
+@end deffn
+
+@node Watches Compatibility
+@subsection Using watches with old versions of CVS
+
+@cindex CVS 1.6, and watches
+If you use the watch features on a repository, it
+creates @file{CVS} directories in the repository and
+stores the information about watches in that directory.
+If you attempt to use @sc{cvs} 1.6 or earlier with the
+repository, you get an error message such as the
+following (all on one line):
+
+@example
+cvs update: cannot open CVS/Entries for reading:
+No such file or directory
+@end example
+
+and your operation will likely be aborted. To use the
+watch features, you must upgrade all copies of @sc{cvs}
+which use that repository in local or server mode. If
+you cannot upgrade, use the @code{watch off} and
+@code{watch remove} commands to remove all watches, and
+that will restore the repository to a state which
+@sc{cvs} 1.6 can cope with.
+
+@node Choosing a model
+@section Choosing between reserved or unreserved checkouts
+@cindex choosing, reserved or unreserved checkouts
+
+Reserved and unreserved checkouts each have pros and
+cons. Let it be said that a lot of this is a matter of
+opinion or what works given different groups' working
+styles, but here is a brief description of some of the
+issues. There are many ways to organize a team of
+developers. @sc{cvs} does not try to enforce a certain
+organization. It is a tool that can be used in several
+ways.
+
+Reserved checkouts can be very counter-productive. If
+two persons want to edit different parts of a file,
+there may be no reason to prevent either of them from
+doing so. Also, it is common for someone to take out a
+lock on a file, because they are planning to edit it,
+but then forget to release the lock.
+
+@c "many groups"? specifics? cites to papers on this?
+@c some way to weasel-word it a bit more so we don't
+@c need facts :-)?
+People, especially people who are familiar with
+reserved checkouts, often wonder how often conflicts
+occur if unreserved checkouts are used, and how
+difficult they are to resolve. The experience with
+many groups is that they occur rarely and usually are
+relatively straightforward to resolve.
+
+The rarity of serious conflicts may be surprising, until one realizes
+that they occur only when two developers disagree on the proper design
+for a given section of code; such a disagreement suggests that the
+team has not been communicating properly in the first place. In order
+to collaborate under @emph{any} source management regimen, developers
+must agree on the general design of the system; given this agreement,
+overlapping changes are usually straightforward to merge.
+
+In some cases unreserved checkouts are clearly
+inappropriate. If no merge tool exists for the kind of
+file you are managing (for example word processor files
+or files edited by Computer Aided Design programs), and
+it is not desirable to change to a program which uses a
+mergeable data format, then resolving conflicts is
+going to be unpleasant enough that you generally will
+be better off to simply avoid the conflicts instead, by
+using reserved checkouts.
+
+The watches features described above in @ref{Watches}
+can be considered to be an intermediate model between
+reserved checkouts and unreserved checkouts. When you
+go to edit a file, it is possible to find out who else
+is editing it. And rather than having the system
+simply forbid both people editing the file, it can tell
+you what the situation is and let you figure out
+whether it is a problem in that particular case or not.
+Therefore, for some groups it can be considered the
+best of both the reserved checkout and unreserved
+checkout worlds.
+
+@c ---------------------------------------------------------------------
+@node Revision management
+@chapter Revision management
+@cindex Revision management
+
+@c -- This chapter could be expanded a lot.
+@c -- Experiences are very welcome!
+
+If you have read this far, you probably have a pretty
+good grasp on what @sc{cvs} can do for you. This
+chapter talks a little about things that you still have
+to decide.
+
+If you are doing development on your own using @sc{cvs}
+you could probably skip this chapter. The questions
+this chapter takes up become more important when more
+than one person is working in a repository.
+
+@menu
+* When to commit:: Some discussion on the subject
+@end menu
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node When to commit
+@section When to commit?
+@cindex When to commit
+@cindex Commit, when to
+@cindex Policy
+
+Your group should decide which policy to use regarding
+commits. Several policies are possible, and as your
+experience with @sc{cvs} grows you will probably find
+out what works for you.
+
+If you commit files too quickly you might commit files
+that do not even compile. If your partner updates his
+working sources to include your buggy file, he will be
+unable to compile the code. On the other hand, other
+persons will not be able to benefit from the
+improvements you make to the code if you commit very
+seldom, and conflicts will probably be more common.
+
+It is common to only commit files after making sure
+that they can be compiled. Some sites require that the
+files pass a test suite. Policies like this can be
+enforced using the commitinfo file
+(@pxref{commitinfo}), but you should think twice before
+you enforce such a convention. By making the
+development environment too controlled it might become
+too regimented and thus counter-productive to the real
+goal, which is to get software written.
+
+@c ---------------------------------------------------------------------
@node Keyword substitution
@chapter Keyword substitution
@cindex Keyword substitution
@@ -5713,8 +6083,8 @@ a new revision of the file.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Keyword list
-@section RCS Keywords
-@cindex RCS keywords
+@section Keyword List
+@cindex Keyword List
@c FIXME: need some kind of example here I think,
@c perhaps in a
@@ -5766,10 +6136,26 @@ header containing the @sc{rcs} filename, the revision
number, the author, and the date (UTC). Existing log
messages are @emph{not} replaced. Instead, the new log
message is inserted after @code{$@asis{Log:@dots{}}$}.
-Each new line is prefixed with a @dfn{comment leader}
-which @sc{rcs} guesses from the file name extension.
-It can be changed with @code{cvs admin -c}.
-@xref{admin options}. This keyword is useful for
+Each new line is prefixed with the same string which
+precedes the @code{$Log} keyword. For example, if the
+file contains
+
+@example
+ /* Here is what people have been up to:
+ *
+ * $@asis{}Log: frob.c,v $
+ * Revision 1.1 1997/01/03 14:23:51 joe
+ * Add the superfrobnicate option
+ *
+ */
+@end example
+
+@noindent
+then additional lines which are added when expanding
+the @code{$Log} keyword will be preceded by @samp{ * }.
+Unlike previous versions of @sc{cvs} and @sc{rcs}, the
+@dfn{comment leader} from the @sc{rcs} file is not used.
+The @code{$Log} keyword is useful for
accumulating a complete change log in a source file,
but for several reasons it can be problematic.
@xref{Log keyword}.
@@ -5789,7 +6175,7 @@ The full pathname of the RCS file.
@cindex State keyword
@item $@asis{State}$
The state assigned to the revision. States can be
-assigned with @code{cvs admin -s}---@xref{admin options}.
+assigned with @code{cvs admin -s}---see @ref{admin options}.
@end table
@@ -5808,6 +6194,15 @@ C source code. This example shows the first few lines
of a typical file, after keyword substitution has been
performed:
+@c Hmm. Someone says that
+@c "static const char rcsid[] = "foo"
+@c is a simpler way to shut up GCC. But I really
+@c suspect that we should be avoiding specifics in general
+@c (what about Java, Ada, and who knows how many other
+@c languages? What about #pragma ident and #ident and
+@c other non-GCC C compilers? What about the VMS help
+@c system and other systems which take text and convert
+@c them to a generated file?
@example
static char *rcsid="$@asis{}Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
/* @r{The following lines will prevent @code{gcc} version 2.@var{x}}
@@ -5862,7 +6257,7 @@ static char *id="@@(#) $@asis{}Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
Keyword substitution has its disadvantages. Sometimes
you might want the literal text string
@samp{$@asis{}Author$} to appear inside a file without
-@sc{rcs} interpreting it as a keyword and expanding it
+@sc{cvs} interpreting it as a keyword and expanding it
into something like @samp{$@asis{}Author: ceder $}.
There is unfortunately no way to selectively turn off
@@ -5890,10 +6285,23 @@ Each file has a stored default substitution mode, and
each working directory copy of a file also has a
substitution mode. The former is set by the @samp{-k}
option to @code{cvs add} and @code{cvs admin}; the
-latter is set by the -k or -A options to @code{cvs
+latter is set by the @samp{-k} or @samp{-A} options to @code{cvs
checkout} or @code{cvs update}. @code{cvs diff} also
has a @samp{-k} option. For some examples,
-@xref{Binary files}.
+see @ref{Binary files}.
+@c The fact that -A is overloaded to mean both reset
+@c sticky options and reset sticky tags/dates is
+@c somewhat questionable. Perhaps there should be
+@c separate options to reset sticky options (e.g. -k
+@c A") and tags/dates (someone suggested -r HEAD could
+@c do this instead of setting a sticky tag of "HEAD"
+@c as in the status quo but I haven't thought much
+@c about that idea. Of course -r .reset or something
+@c could be coined if this needs to be a new option).
+@c On the other hand, having -A mean "get things back
+@c into the state after a fresh checkout" has a certain
+@c appeal, and maybe there is no sufficient reason for
+@c creeping featurism in this area.
The modes available are:
@@ -5968,10 +6376,9 @@ A more serious concern is that @sc{cvs} is not good at
handling @code{$@asis{}Log$} entries when a branch is
merged onto the main trunk. Conflicts often result
from the merging operation.
-@c We say "cvs" even though it is done via rcsmerge;
-@c this is an implementation detail. If the merging is
-@c done in CVS instead, should check if this problem
-@c still persists.
+@c Might want to check whether the CVS implementation
+@c of RCS_merge has this problem the same way rcsmerge
+@c does. I would assume so....
People also tend to "fix" the log entries in the file
(correcting spelling mistakes and maybe even factual
@@ -5987,107 +6394,253 @@ That way the long list of change messages will not
interfere with everyday source file browsing.
@c ---------------------------------------------------------------------
-@node Binary files
-@chapter Handling binary files
-@cindex Binary files
+@node Tracking sources
+@chapter Tracking third-party sources
+@cindex Third-party sources
+@cindex Tracking sources
-There are two issues with using @sc{cvs} to store
-binary files. The first is that @sc{cvs} by default
-convert line endings between the canonical form in
-which they are stored in the repository (linefeed
-only), and the form appropriate to the operating system
-in use on the client (for example, carriage return
-followed by line feed for Windows NT).
+@c FIXME: Need discussion of added and removed files.
+@c FIXME: This doesn't really adequately introduce the
+@c concepts of "vendor" and "you". They don't *have*
+@c to be separate organizations or separate people.
+@c We want a description which is somewhat more based on
+@c the technical issues of which sources go where, but
+@c also with enough examples of how this relates to
+@c relationships like customer-supplier, developer-QA,
+@c maintainer-contributor, or whatever, to make it
+@c seem concrete.
+If you modify a program to better fit your site, you
+probably want to include your modifications when the next
+release of the program arrives. @sc{cvs} can help you with
+this task.
-The second is that a binary file might happen to
-contain data which looks like a keyword (@pxref{Keyword
-substitution}), so keyword expansion must be turned
-off.
+@cindex Vendor
+@cindex Vendor branch
+@cindex Branch, vendor-
+In the terminology used in @sc{cvs}, the supplier of the
+program is called a @dfn{vendor}. The unmodified
+distribution from the vendor is checked in on its own
+branch, the @dfn{vendor branch}. @sc{cvs} reserves branch
+1.1.1 for this use.
-@c FIXME: the third is that one can't do merges with
-@c binary files. xref to Multiple Developers and the
-@c reserved checkout issues.
+When you modify the source and commit it, your revision
+will end up on the main trunk. When a new release is
+made by the vendor, you commit it on the vendor branch
+and copy the modifications onto the main trunk.
-The @samp{-kb} option available with some @sc{cvs}
-commands insures that neither line ending conversion
-nor keyword expansion will be done. If you are using
-an old version of @sc{rcs} without this option, and you
-are using an operating system, such as unix, which
-terminates lines with linefeeds only, you can use
-@samp{-ko} instead; if you are on another operating
-system, upgrade to a version of @sc{rcs}, such as 5.7
-or later, which supports @samp{-kb}.
+Use the @code{import} command to create and update
+the vendor branch. After a successful @code{import}
+the vendor branch is made the `head' revision, so
+anyone that checks out a copy of the file gets that
+revision. When a local modification is committed it is
+placed on the main trunk, and made the `head'
+revision.
-Here is an example of how you can create a new file
-using the @samp{-kb} flag:
+@menu
+* First import:: Importing a module for the first time
+* Update imports:: Updating a module with the import command
+* Reverting local changes:: Reverting a module to the latest vendor release
+* Binary files in imports:: Binary files require special handling
+* Keywords in imports:: Keyword substitution might be undesirable
+* Multiple vendor branches:: What if you get sources from several places?
+@end menu
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node First import
+@section Importing a module for the first time
+@cindex Importing modules
+
+@c Should mention naming conventions for vendor tags,
+@c release tags, and perhaps directory names.
+Use the @code{import} command to check in the sources
+for the first time. When you use the @code{import}
+command to track third-party sources, the @dfn{vendor
+tag} and @dfn{release tags} are useful. The
+@dfn{vendor tag} is a symbolic name for the branch
+(which is always 1.1.1, unless you use the @samp{-b
+@var{branch}} flag---@xref{Multiple vendor branches}.). The
+@dfn{release tags} are symbolic names for a particular
+release, such as @samp{FSF_0_04}.
+
+@c I'm not completely sure this belongs here. But
+@c we need to say it _somewhere_ reasonably obvious; it
+@c is a common misconception among people first learning CVS
+Note that @code{import} does @emph{not} change the
+directory in which you invoke it. In particular, it
+does not set up that directory as a @sc{cvs} working
+directory; if you want to work with the sources import
+them first and then check them out into a different
+directory (@pxref{Getting the source}).
+
+@cindex Wdiff (import example)
+Suppose you have the sources to a program called
+@code{wdiff} in a directory @file{wdiff-0.04},
+and are going to make private modifications that you
+want to be able to use even when new releases are made
+in the future. You start by importing the source to
+your repository:
@example
-$ echo '$@asis{}Id$' > kotest
-$ cvs add -kb -m"A test file" kotest
-$ cvs ci -m"First checkin; contains a keyword" kotest
+$ cd wdiff-0.04
+$ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04
@end example
-If a file accidentally gets added without @samp{-kb},
-one can use the @code{cvs admin} command to recover.
-For example:
+The vendor tag is named @samp{FSF_DIST} in the above
+example, and the only release tag assigned is
+@samp{WDIFF_0_04}.
+@c FIXME: Need to say where fsf/wdiff comes from.
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Update imports
+@section Updating a module with the import command
+
+When a new release of the source arrives, you import it into the
+repository with the same @code{import} command that you used to set up
+the repository in the first place. The only difference is that you
+specify a different release tag this time.
@example
-$ echo '$@asis{}Id$' > kotest
-$ cvs add -m"A test file" kotest
-$ cvs ci -m"First checkin; contains a keyword" kotest
-$ cvs admin -kb kotest
-$ cvs update -A kotest
-$ cvs commit -m "make it binary" kotest # @r{For non-unix systems}
+$ tar xfz wdiff-0.05.tar.gz
+$ cd wdiff-0.05
+$ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05
@end example
-When you check in the file @file{kotest} the keywords
-are expanded. (Try the above example, and do a
-@code{cat kotest} after every command). The @code{cvs
-admin -kb} 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
-@file{kotest} is @code{cvs update -A}. If you need to
-cope with line endings (that is, you are using a
-@sc{cvs} client on a non-unix system), then you need to
-check in a new copy of the file, as shown by the
-@code{cvs commit} command above.
-@c FIXME: should also describe what the *other users*
-@c need to do, if they have checked out copies which
-@c have been corrupted by lack of -kb. I think maybe
-@c "cvs update -kb" or "cvs
-@c update -A" would suffice, although the user who
-@c reported this suggested removing the file, manually
-@c removing it from CVS/Entries, and then "cvs update"
+For files that have not been modified locally, the newly created
+revision becomes the head revision. If you have made local
+changes, @code{import} will warn you that you must merge the changes
+into the main trunk, and tell you to use @samp{checkout -j} to do so.
-However, in using @code{cvs admin -k} to change the
-keyword expansion, be aware that the keyword expansion
-mode is not version controlled. This means that, for
-example, that if you have a text file in old releases,
-and a binary file with the same name in new releases,
-@sc{cvs} provides no way to check out the file in text
-or binary mode depending on what version you are
-checking out. There is no good workaround for this
-problem.
+@c FIXME: why "wdiff" here and "fsf/wdiff" in the
+@c "import"? I think the assumption is that one has
+@c "wdiff fsf/wdiff" or some such in modules, but it
+@c would be better to not use modules in this example.
+@example
+$ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
+@end example
-You can also set a default for whether @code{cvs add}
-and @code{cvs import} treat a file as binary based on
-its name; for example you could say that files who
-names end in @samp{.exe} are binary. @xref{Wrappers}.
-There is currently no way to have @sc{cvs} detect
-whether a file is binary based on its contents. The
-main difficulty with designing such a feature is that
-it is not clear how to distinguish between binary and
-non-binary files, and the rules to apply would vary
-considerably with the operating system.
-@c For example, it would be good on MS-DOS-family OSes
-@c for anything containing ^Z to be binary. Having
-@c characters with the 8th bit set imply binary is almost
-@c surely a bad idea in the context of ISO-8859-* and
-@c other such character sets. On VMS or the Mac, we
-@c could use the OS's file typing. This is a
-@c commonly-desired feature, and something of this sort
-@c may make sense. But there are a lot of pitfalls here.
+@noindent
+The above command will check out the latest revision of
+@samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST}
+since yesterday into the working copy. If any conflicts arise during
+the merge they should be resolved in the normal way (@pxref{Conflicts
+example}). Then, the modified files may be committed.
+
+Using a date, as suggested above, assumes that you do
+not import more than one release of a product per
+day. If you do, you can always use something like this
+instead:
+
+@example
+$ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
+@end example
+
+@noindent
+In this case, the two above commands are equivalent.
+
+@node Reverting local changes
+@section Reverting to the latest vendor release
+
+You can also revert local changes completely and return
+to the latest vendor release by changing the `head'
+revision back to the vendor branch on all files. For
+example, if you have a checked-out copy of the sources
+in @file{~/work.d/wdiff}, and you want to revert to the
+vendor's version for all the files in that directory,
+you would type:
+
+@example
+$ cd ~/work.d/wdiff
+$ cvs admin -bWDIFF .
+@end example
+
+@noindent
+You must specify the @samp{-bWDIFF} without any space
+after the @samp{-b}. @xref{admin options}.
+
+@node Binary files in imports
+@section How to handle binary files with cvs import
+
+Use the @samp{-k} wrapper option to tell import which
+files are binary. @xref{Wrappers}.
+
+@node Keywords in imports
+@section How to handle keyword substitution with cvs import
+
+The sources which you are importing may contain
+keywords (@pxref{Keyword substitution}). For example,
+the vendor may use @sc{cvs} or some other system
+which uses similar keyword expansion syntax. If you
+just import the files in the default fashion, then
+the keyword expansions supplied by the vendor will
+be replaced by keyword expansions supplied by your
+own copy of @sc{cvs}. It may be more convenient to
+maintain the expansions supplied by the vendor, so
+that this information can supply information about
+the sources that you imported from the vendor.
+
+To maintain the keyword expansions supplied by the
+vendor, supply the @samp{-ko} option to @code{cvs
+import} the first time you import the file.
+This will turn off keyword expansion
+for that file entirely, so if you want to be more
+selective you'll have to think about what you want
+and use the @samp{-k} option to @code{cvs update} or
+@code{cvs admin} as appropriate.
+@c Supplying -ko to import if the file already existed
+@c has no effect. Not clear to me whether it should
+@c or not.
+
+@node Multiple vendor branches
+@section Multiple vendor branches
+
+All the examples so far assume that there is only one
+vendor from which you are getting sources. In some
+situations you might get sources from a variety of
+places. For example, suppose that you are dealing with
+a project where many different people and teams are
+modifying the software. There are a variety of ways to
+handle this, but in some cases you have a bunch of
+source trees lying around and what you want to do more
+than anything else is just to all put them in CVS so
+that you at least have them in one place.
+
+For handling situations in which there may be more than
+one vendor, you may specify the @samp{-b} option to
+@code{cvs import}. It takes as an argument the vendor
+branch to import to. The default is @samp{-b 1.1.1}.
+
+For example, suppose that there are two teams, the red
+team and the blue team, that are sending you sources.
+You want to import the red team's efforts to branch
+1.1.1 and use the vendor tag RED. You want to import
+the blue team's efforts to branch 1.1.3 and use the
+vendor tag BLUE. So the commands you might use are:
+
+@example
+$ cvs import dir RED RED_1-0
+$ cvs import -b 1.1.3 dir BLUE BLUE_1-5
+@end example
+
+Note that if your vendor tag does not match your
+@samp{-b} option, CVS will not detect this case! For
+example,
+
+@example
+$ cvs import -b 1.1.3 dir RED RED_1-0
+@end example
+
+@noindent
+Be careful; this kind of mismatch is sure to sow
+confusion or worse. I can't think of a useful purpose
+for the ability to specify a mismatch here, but if you
+discover such a use, don't. CVS is likely to make this
+an error in some future release.
+
+@c Probably should say more about the semantics of
+@c multiple branches. What about the default branch?
+@c What about joining (perhaps not as useful with
+@c multiple branches, or perhaps it is. Either way
+@c should be mentioned).
@c I'm not sure about the best location for this. In
@c one sense, it might belong right after we've introduced
@@ -6161,7 +6714,7 @@ location. Many people have come up with some such a
@c a previous employer)
@c and gtornblo@senet.abb.se (spicm and related tools),
@c but as far as I know
-@c noone has nicely packaged or released such a system (or
+@c no one has nicely packaged or released such a system (or
@c instructions for constructing one).
system using features such as the symbolic link feature
found in many operating systems, or the @code{VPATH}
@@ -6186,130 +6739,6 @@ is Odin (see
@c there is any point in mentioning them here unless they
@c can work with CVS.
-@node Compatibility
-@chapter Compatibility between CVS Versions
-
-@cindex CVS, versions of
-@cindex versions, of CVS
-@cindex compatibility, between CVS versions
-@c We don't mention versions older than CVS 1.3
-@c on the theory that it would clutter it up for the vast
-@c majority of people, who don't have anything that old.
-@c
-The repository format is compatible going back to
-@sc{cvs} 1.3. But see @ref{Watches Compatibility}, if
-you have copies of @sc{cvs} 1.6 or older and you want
-to use the optional developer communication features.
-@c If you "cvs rm" and commit using 1.3, then you'll
-@c want to run "rcs -sdead <file,v>" on each of the
-@c files in the Attic if you then want 1.5 and
-@c later to recognize those files as dead (I think the
-@c symptom if this is not done is that files reappear
-@c in joins). (Wait: the above will work but really to
-@c be strictly correct we should suggest checking
-@c in a new revision rather than just changing the
-@c state of the head revision, shouldn't we?).
-@c The old convert.sh script was for this, but it never
-@c did get updated to reflect use of the RCS "dead"
-@c state.
-@c Note: this is tricky to document without confusing
-@c people--need to carefully say what CVS version we
-@c are talking about and keep in mind the distinction
-@c between a
-@c repository created with 1.3 and on which one now
-@c uses 1.5+, and a repository on which one wants to
-@c use both versions side by side (e.g. during a
-@c transition period).
-@c We might want to separate out the 1.3 compatibility
-@c section (for repository & working directory) from the
-@c rest--that might help avoid confusing people who
-@c are upgrading (for example) from 1.6 to 1.8.
-@c
-@c A minor incompatibility is if a current version of CVS
-@c puts "Nfoo" into CVS/Tag, then CVS 1.9 or older will
-@c see this as if there is no tag. Seems to me this is
-@c too obscure to mention.
-
-The working directory format is compatible going back
-to @sc{cvs} 1.5. It did change between @sc{cvs} 1.3
-and @sc{cvs} 1.5. If you run @sc{cvs} 1.5 or newer on
-a working directory checked out with @sc{cvs} 1.3,
-@sc{cvs} will convert it, but to go back to @sc{cvs}
-1.3 you need to check out a new working directory with
-@sc{cvs} 1.3.
-
-The remote protocol is interoperable going back to @sc{cvs} 1.5, but no
-further (1.5 was the first official release with the remote protocol,
-but some older versions might still be floating around). In many
-cases you need to upgrade both the client and the server to take
-advantage of new features and bugfixes, however.
-
-@c Perhaps should be saying something here about the
-@c "D" lines in Entries (written by CVS 1.9; 1.8 and
-@c older don't use them). These are supposed to be
-@c compatible in both directions, but I'm not sure
-@c they quite are 100%. One common gripe is if you
-@c "rm -r" a directory and 1.9 gets confused, as it
-@c still sees it in Entries. That one is fixed in
-@c (say) 1.9.6. Someone else reported problems with
-@c starting with a directory which was checked out with
-@c an old version, and then using a new version, and
-@c some "D" lines appeared, but not for every
-@c directory, causing some directories to be skipped.
-@c They weren't sure how to reproduce this, though.
-
-@c ---------------------------------------------------------------------
-@node Revision management
-@chapter Revision management
-@cindex Revision management
-
-@c -- This chapter could be expanded a lot.
-@c -- Experiences are very welcome!
-
-If you have read this far, you probably have a pretty
-good grasp on what @sc{cvs} can do for you. This
-chapter talks a little about things that you still have
-to decide.
-
-If you are doing development on your own using @sc{cvs}
-you could probably skip this chapter. The questions
-this chapter takes up become more important when more
-than one person is working in a repository.
-
-@menu
-* When to commit:: Some discussion on the subject
-@end menu
-
-@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@node When to commit
-@section When to commit?
-@cindex When to commit
-@cindex Commit, when to
-@cindex Policy
-
-Your group should decide which policy to use regarding
-commits. Several policies are possible, and as your
-experience with @sc{cvs} grows you will probably find
-out what works for you.
-
-If you commit files too quickly you might commit files
-that do not even compile. If your partner updates his
-working sources to include your buggy file, he will be
-unable to compile the code. On the other hand, other
-persons will not be able to benefit from the
-improvements you make to the code if you commit very
-seldom, and conflicts will probably be more common.
-
-It is common to only commit files after making sure
-that they can be compiled. Some sites require that the
-files pass a test suite. Policies like this can be
-enforced using the commitinfo file
-(@pxref{commitinfo}), but you should think twice before
-you enforce such a convention. By making the
-development environment too controlled it might become
-too regimented and thus counter-productive to the real
-goal, which is to get software written.
-
@c ---------------------------------------------------------------------
@node CVS commands
@appendix Guide to CVS commands
@@ -6330,7 +6759,7 @@ reference to @sc{cvs} commands, @pxref{Invoking CVS}).
* ~/.cvsrc:: Default options with the ~/.csvrc file
* Global options:: Options you give to the left of cvs_command
* Common options:: Options you give to the right of cvs_command
-* admin:: Administration front end for rcs
+* admin:: Administration
* checkout:: Checkout sources for editing
* commit:: Check files into the repository
* diff:: Show differences between revisions
@@ -6435,7 +6864,7 @@ There are some @code{command_options} that are used so
often that you might have set up an alias or some other
means to make sure you always specify that option. One
example (the one that drove the implementation of the
-.cvsrc support, actually) is that many people find the
+@file{.cvsrc} support, actually) is that many people find the
default output of the @samp{diff} command to be very
hard to read, and that either context diffs or unidiffs
are much easier to understand.
@@ -6486,7 +6915,7 @@ example the following line in @file{.cvsrc}
cvs -z6
@end example
-causes @sc{cvs} to use compression level 6
+causes @sc{cvs} to use compression level 6.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Global options
@@ -6503,13 +6932,25 @@ left of @samp{cvs_command}) are:
Specify legal @sc{cvsroot} directory. See
@ref{Password authentication server}.
+@cindex authentication, stream
+@cindex stream authentication
+@item -a
+Authenticate all communication between the client and
+the server. Only has an effect on the @sc{cvs} client.
+As of this writing, this is only implemented when using
+a GSSAPI connection (@pxref{GSSAPI authenticated}).
+Authentication prevents certain sorts of attacks
+involving hijacking the active @sc{tcp} connection.
+Enabling authentication does not enable encryption.
+
@cindex RCSBIN, overriding
@cindex Overriding RCSBIN
@item -b @var{bindir}
-Use @var{bindir} as the directory where @sc{rcs} programs are
-located. Overrides the setting of the @code{$RCSBIN} environment
-variable and any precompiled directory. This parameter should be
-specified as an absolute pathname.
+In @sc{cvs} 1.9.18 and older, this specified that
+@sc{rcs} programs are in the @var{bindir} directory.
+Current versions of @sc{cvs} do not run @sc{rcs}
+programs; for compatibility this option is accepted,
+but it does nothing.
@cindex TMPDIR, overriding
@cindex Overriding TMPDIR
@@ -6556,7 +6997,7 @@ a command name, @samp{cvs -H} displays overall help for
@c perhaps that is confusing...
@item -l
-Do not log the cvs_command in the command history (but execute it
+Do not log the @samp{cvs_command} in the command history (but execute it
anyway). @xref{history}, for information on command history.
@cindex Read-only mode
@@ -6608,15 +7049,25 @@ Make new working files read-write. Overrides the
setting of the @code{$CVSREAD} environment variable.
Files are created read-write by default, unless @code{$CVSREAD} is
set or @samp{-r} is given.
-
+@c Note that -w only overrides -r and CVSREAD; it has
+@c no effect on files which are readonly because of
+@c "cvs watch on". My guess is that is the way it
+@c should be (or should "cvs -w get" on a watched file
+@c be the same as a get and a cvs edit?), but I'm not
+@c completely sure whether to document it this way.
+
+@cindex encryption
@item -x
Encrypt all communication between the client and the
server. Only has an effect on the @sc{cvs} client. As
of this writing, this is only implemented when using a
+GSSAPI connection (@pxref{GSSAPI authenticated}) or a
Kerberos connection (@pxref{Kerberos authenticated}).
-Encryption support is not available by default; it must
-be enabled using a special configure option,
-@file{--enable-encryption}, when you build @sc{cvs}.
+Enabling encryption implies that message traffic is
+also authenticated. Encryption support is not
+available by default; it must be enabled using a
+special configure option, @file{--enable-encryption},
+when you build @sc{cvs}.
@item -z @var{gzip-level}
Set the compression level. Only has an effect on the
@@ -6795,6 +7246,13 @@ These two date formats are preferred. However,
formats. They are intentionally not documented here in
any detail, and future versions of @sc{cvs} might not
accept all of them.
+@c We should document and testsuite "now" and
+@c "yesterday". "now" is mentioned in the FAQ and
+@c "yesterday" is mentioned in this document (and the
+@c message from "cvs import" suggesting a merge
+@c command). What else? Probably some/all of the "3
+@c weeks ago" family.
+@c
@c Maybe at
@c some point have CVS start give warnings on "unofficial"
@c formats (many of which might be typos or user
@@ -6830,12 +7288,14 @@ will be used).
@code{annotate}, @code{checkout}, @code{export},
@code{rdiff}, @code{rtag}, and @code{update}.
-@strong{Warning:} The @code{commit} command also has a
+@strong{Warning:} The @code{commit} and @code{remove}
+commands also have a
@samp{-f} option, but it has a different behavior for
-that command. @xref{commit options}.
+those commands. See @ref{commit options}, and
+@ref{Removing files}.
@item -k @var{kflag}
-Alter the default @sc{rcs} processing of keywords.
+Alter the default processing of keywords.
@xref{Keyword substitution}, for the meaning of
@var{kflag}. Your @var{kflag} specification is
@dfn{sticky} when you use it to create a private copy
@@ -6884,7 +7344,7 @@ Available with the @code{checkout}, @code{commit}, @code{export},
and @code{rtag} commands.
@item -P
-Prune empty directories. See @xref{Removing directories}.
+Prune empty directories. See @ref{Removing directories}.
@item -p
Pipe the files retrieved from the repository to standard output,
@@ -6901,6 +7361,8 @@ Available with the following commands: @code{annotate}, @code{checkout},
and @code{watchers}.
@item -r @var{tag}
+@cindex HEAD, special tag
+@cindex BASE, special tag
Use the revision specified by the @var{tag} argument instead of the
default @dfn{head} revision. As well as arbitrary tags defined
with the @code{tag} or @code{rtag} command, two special tags are
@@ -6919,14 +7381,20 @@ revision you last checked out into the current working directory.
@c presumably be
@c little problem changing it. (b) is ugly as it differs
@c from what HEAD means for other commands, but people
-@c might be used to it (note a change in NEWS? Or provide
-@c advance warning of it changing?) and possible useful
-@c (could be fixed by a new tag ".bhead" which would mean
-@c the head of the appropriate branch). This
-@c should be investigated, test cases written, and
-@c documented (but HEAD should mean the same thing for all
-@c CVS commands, so I don't know if we should be
-@c documenting the current "cvs diff" behavior).
+@c and/or scripts are quite possibly used to it.
+@c See "head" tests in sanity.sh.
+@c Probably the best fix is to introduce two new
+@c special tags, ".thead" for the head of the trunk,
+@c and ".bhead" for the head of the current branch.
+@c Then deprecate HEAD. This has the advantage of
+@c not suprising people with a change to HEAD, and a
+@c side benefit of also phasing out the poorly-named
+@c HEAD (see discussion of reserved tag names in node
+@c "Tags"). Of course, .thead and .bhead should be
+@c carefully implemented (with the implementation the
+@c same for "diff" as for everyone else), test cases
+@c written (similar to the ones in "head"), new tests
+@c cases written for things like default branches, &c.
The tag specification is sticky when you use this
@c option
@@ -6939,11 +7407,11 @@ tag can be either a symbolic or numeric tag.
Specifying the @samp{-q} global option along with the
@samp{-r} command option is often useful, to suppress
-the warning messages when the @sc{rcs} history file
+the warning messages when the @sc{rcs} file
does not contain the specified tag.
-@strong{Warning:} this is not the same as the overall `cvs -r' option,
-which you can specify to the left of a cvs command!
+@strong{Warning:} this is not the same as the overall @samp{cvs -r} option,
+which you can specify to the left of a @sc{cvs} command!
@samp{-r} is available with the @code{checkout}, @code{commit},
@code{diff}, @code{history}, @code{export}, @code{rdiff},
@@ -6954,14 +7422,14 @@ Specify file names that should be filtered. You can
use this option repeatedly. The spec can be a file
name pattern of the same type that you can specify in
the @file{.cvswrappers} file.
-Avaliable with the following commands: @code{import},
+Available with the following commands: @code{import},
and @code{update}.
@end table
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node admin
-@appendixsec admin---Administration front end for rcs
+@appendixsec admin---Administration
@cindex Admin (subcommand)
@itemize @bullet
@@ -6973,38 +7441,34 @@ Changes: repository.
Synonym: rcs
@end itemize
-This is the @sc{cvs} interface to assorted administrative @sc{rcs}
-facilities, documented in rcs(1). @code{admin} simply passes
-all its options and arguments to the @code{rcs} command; it does
-no filtering or other processing. This command @emph{does} work
-recursively, however, so extreme care should be used.
-
-@c "group" should probably read "unix group" (but what
-@c does NT local do?). "compiled in value" is
-@c unclear--compiled in to what?
-If there is a group whose name matches a compiled in
-value which defaults to @code{cvsadmin}, only members
-of that group can use @code{cvs admin}. To disallow
+This is the @sc{cvs} interface to assorted
+administrative facilities. Some of them have
+questionable usefulness for @sc{cvs} but exist for
+historical purposes. Some of the questionable options
+are likely to disappear in the future. This command
+@emph{does} work recursively, so extreme care should be
+used.
+
+On unix, if there is a group named @code{cvsadmin},
+only members of that group can run @code{cvs admin}.
+This group should exist on the server, or any system
+running the non-client/server @sc{cvs}. To disallow
@code{cvs admin} for all users, create a group with no
-users in it.
+users in it. On NT, the @code{cvsadmin} feature does
+not exist and all users can run @code{cvs admin}.
@menu
* admin options:: admin options
-* admin examples:: admin examples
@end menu
@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node admin options
@appendixsubsec admin options
-Not all valid @code{rcs} options are useful together
-with @sc{cvs}. Some even makes it impossible to use
-@sc{cvs} until you undo the effect!
-
-This description of the available options is based on
-the @samp{rcs(1)} man page, but modified to suit
-readers that are more interested in @sc{cvs} than
-@sc{rcs}.
+Some of these options have questionable usefulness for
+@sc{cvs} but exist for historical purposes. Some even
+make it impossible to use @sc{cvs} until you undo the
+effect!
@table @code
@item -A@var{oldfile}
@@ -7018,23 +7482,27 @@ login names appearing in the comma-separated list
@var{logins} to the access list of the @sc{rcs} file.
@item -b[@var{rev}]
-When used with bare @sc{rcs}, this
-option sets the default branch to @var{rev}; in
-@sc{cvs} sticky tags (@pxref{Sticky tags}) are a better
-way to decide which branch you want to work on. There
-is one use with @sc{cvs}: to revert to the vendor's
+Set the default branch to @var{rev}. In @sc{cvs}, you
+normally do not manipulate default branches; sticky
+tags (@pxref{Sticky tags}) are a better way to decide
+which branch you want to work on. There is one reason
+to run @code{cvs admin -b}: to revert to the vendor's
version when using vendor branches (@pxref{Reverting
local changes}).
-
+There can be no space between @samp{-b} and its argument.
+@c Hmm, we don't document the usage where rev is
+@c omitted. Maybe that usage can/should be deprecated
+@c (and replaced with -bHEAD or something?) (so we can toss
+@c the optional argument). Note that -bHEAD does not
+@c work, as of 17 Sep 1997, but probably will once "cvs
+@c admin" is internal to CVS.
+
+@cindex comment leader
@item -c@var{string}
-Useful with @sc{cvs}. Sets the comment leader to
-@var{string}. The comment leader is printed before
-every log message line generated by the keyword
-@code{$@asis{}Log$} (@pxref{Keyword substitution}).
-This is useful for programming languages without
-multi-line comments. @sc{Rcs} initially guesses the
-value of the comment leader from the file name
-extension when the file is first committed.
+Sets the comment leader to @var{string}. The comment
+leader is not used by current versions of @sc{cvs} or
+@sc{rcs} 5.7. Therefore, you can almost surely not
+worry about it. @xref{Keyword substitution}.
@item -e[@var{logins}]
Might not work together with @sc{cvs}. Erase the login
@@ -7042,19 +7510,20 @@ names appearing in the comma-separated list
@var{logins} from the access list of the RCS file. If
@var{logins} is omitted, erase the entire access list.
-@c FIXME: Doesn't work with client/server CVS; we
-@c should probably just not accept the option.
@item -I
Run interactively, even if the standard input is not a
-terminal.
+terminal. This option does not work with the
+client/server @sc{cvs} and is likely to disappear in
+a future release of @sc{cvs}.
@item -i
-Useless with @sc{cvs}. When using bare @sc{rcs}, this
-is used to create and initialize a new @sc{rcs} file,
-without depositing a revision.
+Useless with @sc{cvs}. This creates and initializes a
+new @sc{rcs} file, without depositing a revision. With
+@sc{cvs}, add files with the @code{cvs add} command
+(@pxref{Adding files}).
@item -k@var{subst}
-Useful with @sc{cvs}. Set the default keyword
+Set the default keyword
substitution to @var{subst}. @xref{Keyword
substitution}. Giving an explicit @samp{-k} option to
@code{cvs update}, @code{cvs export}, or @code{cvs
@@ -7064,7 +7533,8 @@ checkout} overrides this default.
Lock the revision with number @var{rev}. If a branch
is given, lock the latest revision on that branch. If
@var{rev} is omitted, lock the latest revision on the
-default branch.
+default branch. There can be no space between
+@samp{-l} and its argument.
This can be used in conjunction with the
@file{rcslock.pl} script in the @file{contrib}
@@ -7091,9 +7561,13 @@ set; see the discussion under the @samp{-l} option above.
Replace the log message of revision @var{rev} with
@var{msg}.
+@c The rcs -M option, to suppress sending mail, has never been
+@c documented as a cvs admin option.
+
@item -N@var{name}[:[@var{rev}]]
Act like @samp{-n}, except override any previous
-assignment of @var{name}.
+assignment of @var{name}. For use with magic branches,
+see @ref{Magic branch numbers}.
@item -n@var{name}[:[@var{rev}]]
Associate the symbolic name @var{name} with the branch
@@ -7108,9 +7582,9 @@ followed by a @samp{.} stands for the current latest
revision in the branch. A @samp{:} with an empty
@var{rev} stands for the current latest revision on the
default branch, normally the trunk. For example,
-@samp{rcs -n@var{name}: RCS/*} associates @var{name} with the
-current latest revision of all the named RCS files;
-this contrasts with @samp{rcs -n@var{name}:$ RCS/*} which
+@samp{cvs admin -n@var{name}:} associates @var{name} with the
+current latest revision of all the RCS files;
+this contrasts with @samp{cvs admin -n@var{name}:$} which
associates @var{name} with the revision numbers
extracted from keyword strings in the corresponding
working files.
@@ -7119,23 +7593,103 @@ working files.
@cindex Outdating revisions
@cindex Saving space
@item -o@var{range}
-Potentially useful, but dangerous, with @sc{cvs} (see below).
Deletes (@dfn{outdates}) the revisions given by
-@var{range}. A range consisting of a single revision
-number means that revision. A range consisting of a
-branch number means the latest revision on that branch.
-A range of the form @samp{@var{rev1}:@var{rev2}} means
-revisions @var{rev1} to @var{rev2} on the same branch,
-@samp{:@var{rev}} means from the beginning of the
+@var{range}.
+
+Note that this command can be quite dangerous unless
+you know @emph{exactly} what you are doing (for example
+see the warnings below about how the
+@var{rev1}:@var{rev2} syntax is confusing).
+
+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!
+If you delete different revisions than you planned,
+either due to carelessness or (heaven forbid) a CVS
+bug, there is no opportunity to correct the error
+before the revisions are deleted. It probably would be
+a good idea to experiment on a copy of the repository
+first.
+
+Specify @var{range} in one of the following ways:
+
+@table @code
+@item @var{rev1}::@var{rev2}
+Collapse all revisions between rev1 and rev2, so that
+CVS only stores the differences associated with going
+from rev1 to rev2, not intermediate steps. For
+example, after @samp{-o 1.3::1.5} one can retrieve
+revision 1.3, revision 1.5, or the differences to get
+from 1.3 to 1.5, but not the revision 1.4, or the
+differences between 1.3 and 1.4. Other examples:
+@samp{-o 1.3::1.4} and @samp{-o 1.3::1.3} have no
+effect, because there are no intermediate revisions to
+remove.
+
+@item ::@var{rev}
+Collapse revisions between the beginning of the branch
+containing @var{rev} and @var{rev} itself. The
+branchpoint and @var{rev} are left intact. For
+example, @samp{-o ::1.3.2.6} deletes revision 1.3.2.1,
+revision 1.3.2.5, and everything in between, but leaves
+1.3 and 1.3.2.6 intact.
+
+@item @var{rev}::
+Collapse revisions between @var{rev} and the end of the
+branch containing @var{rev}. Revision @var{rev} is
+left intact but the head revision is deleted.
+
+@item @var{rev}
+Delete the revision @var{rev}. For example, @samp{-o
+1.3} is equivalent to @samp{-o 1.2::1.4}.
+
+@item @var{rev1}:@var{rev2}
+Delete the revisions from @var{rev1} to @var{rev2},
+inclusive, on the same branch. One will not be able to
+retrieve @var{rev1} or @var{rev2} or any of the
+revisions in between. For example, the command
+@samp{cvs admin -oR_1_01:R_1_02 .} is rarely useful.
+It means to delete revisions up to, and including, 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
+@emph{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! In most cases you want to
+specify @var{rev1}::@var{rev2} instead.
+
+@item :@var{rev}
+Delete revisions from the beginning of the
branch containing @var{rev} up to and including
-@var{rev}, and @samp{@var{rev}:} means from revision
-@var{rev} to the end of the branch containing
-@var{rev}. None of the outdated revisions may have
+@var{rev}.
+
+@item @var{rev}:
+Delete revisions from revision @var{rev}, including
+@var{rev} itself, to the end of the branch containing
+@var{rev}.
+@end table
+
+None of the revisions to be deleted may have
branches or locks.
+If any of the revisions to be deleted have symbolic
+names, and one specifies one of the @samp{::} syntaxes,
+then @sc{cvs} will give an error and not delete any
+revisions. If you really want to delete both the
+symbolic names and the revisions, first delete the
+symbolic names with @code{cvs tag -d}, then run
+@code{cvs admin -o}. If one specifies the
+non-@samp{::} syntaxes, then @sc{cvs} will delete the
+revisions but leave the symbolic names pointing to
+nonexistent revisions. This behavior is preserved for
+compatibility with previous versions of @sc{cvs}, but
+because it isn't very useful, in the future it may
+change to be like the @samp{::} case.
+
Due to the way @sc{cvs} handles branches @var{rev}
cannot be specified symbolically if it is a branch.
@xref{Magic branch numbers}, for an explanation.
+@c FIXME: is this still true? I suspect not.
Make sure that no-one has checked out a copy of the
revision you outdate. Strange things will happen if he
@@ -7170,17 +7724,31 @@ commands like @code{cvs remove} and @code{cvs add}, not
Useful with @sc{cvs}. Write descriptive text from the
contents of the named @var{file} into the RCS file,
deleting the existing text. The @var{file} pathname
-may not begin with @samp{-}. If @var{file} is omitted,
+may not begin with @samp{-}. The descriptive text can be seen in the
+output from @samp{cvs log} (@pxref{log}).
+There can be no space between @samp{-t} and its argument.
+
+If @var{file} is omitted,
obtain the text from standard input, terminated by
end-of-file or by a line containing @samp{.} by itself.
Prompt for the text if interaction is possible; see
-@samp{-I}. The descriptive text can be seen in the
-output from @samp{cvs log} (@pxref{log}).
+@samp{-I}. Reading from standard input does not work
+for client/server @sc{cvs} and may change in a future
+release of @sc{cvs}.
+@c Changing it to doeditor() is the most obvious thing
+@c (but with a different syntax, as we would like to
+@c phase out optional arguments). I don't know. I'm
+@c tempted to say the whole concept is unnecessary.
@item -t-@var{string}
Similar to @samp{-t@var{file}}. Write descriptive text
from the @var{string} into the @sc{rcs} file, deleting
the existing text.
+There can be no space between @samp{-t} and its argument.
+
+@c The rcs -T option, do not update last-mod time for
+@c minor changes, has never been documented as a
+@c cvs admin option.
@item -U
Set locking to non-strict. Non-strict locking means
@@ -7201,72 +7769,31 @@ This causes a mail message to be sent to the original
locker. The message contains a commentary solicited
from the breaker. The commentary is terminated by
end-of-file or by a line containing @code{.} by itself.
+There can be no space between @samp{-u} and its argument.
+@c In the future "send mail" probably will go via the
+@c CVSROOT/notify mechanism. But for now it means
+@c whatever it means to "rcs".
@item -V@var{n}
-Emulate @sc{rcs} version @var{n}. Use -V@var{n} to make
-an @sc{rcs} file acceptable to @sc{rcs} version @var{n}
-by discarding information that would confuse version
-@var{n}.
+In previous versions of @sc{cvs}, this option meant to
+write an @sc{rcs} file which would be acceptable to
+@sc{rcs} version @var{n}, but it is now obsolete and
+specifying it will produce an error.
+@c Note that -V without an argument has never been
+@c documented as a cvs admin option.
@item -x@var{suffixes}
-Useless with @sc{cvs}. Use @var{suffixes} to
-characterize RCS files.
+In previous versions of @sc{cvs}, this was documented
+as a way of specifying the names of the @sc{rcs}
+files. However, @sc{cvs} has always required that the
+@sc{rcs} files used by @sc{cvs} end in @samp{,v}, so
+this option has never done anything useful.
+
+@c The rcs -z option, to specify the timezone, has
+@c never been documented as a cvs admin option.
@end table
-@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-@node admin examples
-@appendixsubsec admin examples
-
-@appendixsubsubsec Outdating is dangerous
-
-First, an example of how @emph{not} to use the
-@code{admin} command. It is included to stress the
-fact that this command can be quite dangerous unless
-you know @emph{exactly} what you are doing.
-
-The @samp{-o} option can be used to @dfn{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
-@emph{not} like to execute.
-
-@example
-$ cvs admin -o:R_1_02 .
-@end example
-
-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
-@emph{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!
-
-@appendixsubsubsec Comment leaders
-@cindex Comment leader
-@cindex Log keyword, selecting comment leader
-@cindex Nroff (selecting comment leader)
-
-If you use the @code{$@asis{}Log$} keyword and you do
-not agree with the guess for comment leader that
-@sc{cvs} has done, you can enforce your will with
-@code{cvs admin -c}. This might be suitable for
-@code{nroff} source:
-
-@example
-$ cvs admin -c'.\" ' *.man
-$ rm *.man
-$ cvs update
-@end example
-
-The two last steps are to make sure that you get the
-versions with correct comment leaders in your working
-files.
-
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node checkout
@appendixsec checkout---Check out sources for editing
@@ -7284,13 +7811,13 @@ Changes: working directory.
Synonyms: co, get
@end itemize
-Make a working directory containing copies of the
+Create or update a working directory containing copies of the
source files specified by @var{modules}. You must execute
@code{checkout} before using most of the other @sc{cvs}
commands, since most of them operate on your working
directory.
-The @var{modules} part of the command are either
+The @var{modules} are either
symbolic names for some
collection of source directories and files, or paths to
directories or files in the repository. The symbolic
@@ -7299,6 +7826,10 @@ names are defined in the @samp{modules} file.
@c Needs an example, particularly of the non-"modules"
@c case but probably of both.
+@c FIXME: this seems like a very odd place to introduce
+@c people to how CVS works. The bit about unreserved
+@c checkouts is also misleading as it depends on how
+@c things are set up.
Depending on the modules you specify, @code{checkout} may
recursively create directories and populate them with
the appropriate source files. You can then edit these
@@ -7326,15 +7857,20 @@ read-write, unless the @samp{-r} option to @sc{cvs}
(@pxref{Environment variables}), or a watch is in
effect for that file (@pxref{Watches}).
-@c FIXME: misleading--checkout takes a module as
-@c argument, and update does not--so -d behavior is not the only
-@c difference.
-Running @code{checkout} on a directory that was already
-built by a prior @code{checkout} is also permitted, and
-has the same effect as specifying the @samp{-d} option
-to the @code{update} command, that is, any new
+Note that running @code{checkout} on a directory that was already
+built by a prior @code{checkout} is also permitted.
+This is similar to specifying the @samp{-d} option
+to the @code{update} command in the sense that new
directories that have been created in the repository
-will appear in your work area. @xref{update}.
+will appear in your work area.
+However, @code{checkout} takes a module name whereas
+@code{update} takes a directory name. Also
+to use @code{checkout} this way it must be run from the
+top level directory (where you originally ran
+@code{checkout} from), so before you run
+@code{checkout} to update an existing directory, don't
+forget to change your directory to the top level
+directory.
For the output produced by the @code{checkout} command
see @ref{update output}.
@@ -7365,8 +7901,9 @@ retrieve the most recent revision (instead of ignoring
the file).
@item -k @var{kflag}
-Process @sc{rcs} keywords according to @var{kflag}. See
-co(1). This option is sticky; future updates of
+Process keywords according to @var{kflag}. See
+@ref{Keyword substitution}.
+This option is sticky; future updates of
this file in this working directory will use the same
@var{kflag}. The @code{status} command can be viewed
to see the sticky options. See @ref{Invoking CVS}, for
@@ -7407,18 +7944,35 @@ Copy the module file, sorted, to the standard output,
instead of creating or modifying any files or
directories in your working directory.
-@c Should clarify whether dir can specify a
-@c subdirectory (for example "foo/bar"). As of May,
-@c 1996, it is said to work for local CVS if the parent
-@c directories already exist, and not at all for remote
-@c CVS. The remote CVS behavior at least seems like it
-@c is clearly a bug.
@item -d @var{dir}
Create a directory called @var{dir} for the working
-files, instead of using the module name. Unless you
-also use @samp{-N}, the paths created under @var{dir}
-will be as short as possible.
-@c FIXME: What the #$@!#$# does "short as possible" mean?
+files, instead of using the module name. In general,
+using this flag is equivalent to using @samp{mkdir
+@var{dir}; cd @var{dir}} followed by the checkout
+command without the @samp{-d} flag.
+
+There is an important exception, however. It is very
+convenient when checking out a single item to have the
+output appear in a directory that doesn't contain empty
+intermediate directories. In this case @emph{only},
+CVS tries to ``shorten'' pathnames to avoid those empty
+directories.
+
+For example, given a module @samp{foo} that contains
+the file @samp{bar.c}, the command @samp{cvs co -d dir
+foo} will create directory @samp{dir} and place
+@samp{bar.c} inside. Similarly, given a module
+@samp{bar} which has subdirectory @samp{baz} wherein
+there is a file @samp{quux.c}, the command @samp{cvs -d
+dir co bar/baz} will create directory @samp{dir} and
+place @samp{quux.c} inside.
+
+Using the @samp{-N} flag will defeat this behavior.
+Given the same module definitions above, @samp{cvs co
+-N -d dir foo} will create directories @samp{dir/foo}
+and place @samp{bar.c} inside, while @samp{cvs co -N -d
+dir bar/baz} will create directories @samp{dir/bar/baz}
+and place @samp{quux.c} inside.
@item -j @var{tag}
With two @samp{-j} options, merge changes from the
@@ -7440,14 +7994,14 @@ date. An optional date is specified by adding a colon
(:) to the tag:
@samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}.
-@xref{Merging}.
+@xref{Branching and merging}.
@item -N
-Only useful together with @samp{-d @var{dir}}. With this
-option, @sc{cvs} will not shorten module paths in your
-working directory. (Normally, @sc{cvs} shortens paths as
-much as possible when you specify an explicit target
-directory).
+Only useful together with @samp{-d @var{dir}}. With
+this option, @sc{cvs} will not ``shorten'' module paths
+in your working directory when you check out a single
+module. See the @samp{-d} flag for examples and a
+discussion.
@item -s
Like @samp{-c}, but include the status of all modules,
@@ -7516,9 +8070,9 @@ time is right.
When all is well, an editor is invoked to allow you to
enter a log message that will be written to one or more
logging programs (@pxref{modules}, and @pxref{loginfo})
-and placed in the @sc{rcs} history file inside the
+and placed in the @sc{rcs} file inside the
repository. This log message can be retrieved with the
-@code{log} command; @xref{log}. You can specify the
+@code{log} command; see @ref{log}. You can specify the
log message on the command line with the @samp{-m
@var{message}} option, and thus avoid the editor invocation,
or use the @samp{-F @var{file}} option to specify
@@ -7565,7 +8119,7 @@ of invoking an editor.
@item -f
Note that this is not the standard behavior of
-the @samp{-f} option as defined in @xref{Common options}.
+the @samp{-f} option as defined in @ref{Common options}.
Force @sc{cvs} to commit a new revision even if you haven't
made any changes to the file. If the current revision
@@ -7677,7 +8231,7 @@ $ cvs checkout -r EXPR1 whatever_module
@itemize @bullet
@item
-Synopsis: diff [-lR] [rcsdiff_options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files@dots{}]
+Synopsis: diff [-lR] [format_options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files@dots{}]
@item
Requires: working directory, repository.
@item
@@ -7715,8 +8269,8 @@ Use the most recent revision no later than @var{date}.
See @samp{-r} for how this affects the comparison.
@item -k @var{kflag}
-Process @sc{rcs} keywords according to @var{kflag}. See
-co(1).
+Process keywords according to @var{kflag}. See
+@ref{Keyword substitution}.
@item -l
Local; run only in current working directory.
@@ -7734,43 +8288,32 @@ revision will be compared to your current working file.
With two @samp{-r} options those two revisions will be
compared (and your working file will not affect the
outcome in any way).
+@c We should be a lot more explicit, with examples,
+@c about the difference between "cvs diff" and "cvs
+@c diff -r HEAD". This often confuses new users.
One or both @samp{-r} options can be replaced by a
@samp{-D @var{date}} option, described above.
-
-@item --ifdef=@var{arg}
-Output in ifdef format. Consult the documentation of
-your underlying diff program concerning the @samp{-D}
-option to diff, for more information on this format.
@end table
-@c FIXME? Probably should document -c here, and
-@c perhaps arrange for CVS to support it via a diff library or
-@c some such. Or perhaps figure that "all" diff
-@c programs support -c? Ideas is to preserve the
-@c ability to pass the buck to diff on all the hairy
-@c stuff, while still providing at least one, and
-@c perhaps several popular standard formats. But this
-@c is all in the idea stage, and probably needs more
-@c thought and refinement. -u might be similar, in
-@c terms of being something that it might make sense to
-@c document here.
-@c FIXME: also should be a way to pass through
+@c Conceptually, this is a disaster. There are 3
+@c zillion diff formats that we support via the diff
+@c library. It is not obvious to me that we should
+@c document them all. Maybe just the most common ones
+@c like -c and -u, and think about phasing out the
+@c obscure ones.
+@c FIXCVS: also should be a way to specify an external
+@c diff program (which can be different for different
+@c file types) and pass through
@c arbitrary options, so that the user can do
@c "--pass=-Z --pass=foo" or something even if CVS
-@c doesn't know about the -Z option to diff.
-@c Note on -N: The current CVS implementation does require that the
-@c underlying diff supports -N so we can document it as
-@c a pass-through even if the implementation details
-@c are more complicated.
-@c
-@c FIXME? Reference to discussion of which diff CVS
-@c uses (one in path, or....).
-The following options are passed through to
-@code{rcsdiff}, which in turn passes them to
-@code{diff}. The exact meaning of the options depends
-on which @code{diff} you are using. See the
-documentation for your @code{diff} for details.
+@c doesn't know about the "-Z foo" option to diff.
+@c This would fit nicely with deprecating/eliminating
+@c the obscure options of the diff library, because it
+@c would let people specify an external GNU diff if
+@c they are into that sort of thing.
+The following options specify the format of the
+output. They have the same meaning as in GNU diff.
@code{-a} @code{-b} @code{-B} @code{-c} @w{@code{-C}
@var{nlines}} @code{-d} @code{-e} @code{-f} @code{-h}
@@ -7786,6 +8329,7 @@ documentation for your @code{diff} for details.
@code{--context[=@var{lines}]} @code{--ed}
@code{--expand-tabs} @code{--forward-ed}
@code{--horizon-lines=@var{arg}}
+@code{--ifdef=@var{arg}}
@code{--ignore-all-space} @code{--ignore-blank-lines}
@code{--ignore-case}
@code{--ignore-matching-lines=@var{regexp}}
@@ -7864,14 +8408,14 @@ date or tag (with @samp{-D} or @samp{-r}), so that you
can count on reproducing the source you ship to others.
One often would like to use @samp{-kv} with @code{cvs
-export}. This causes any @sc{rcs} keywords to be
+export}. This causes any keywords to be
expanded such that an import done at some other site
will not lose the keyword revision information. But be
aware that doesn't handle an export containing binary
files correctly. Also be aware that after having used
@samp{-kv}, one can no longer use the @code{ident}
command (which is part of the @sc{rcs} suite---see
-ident(1)) which looks for @sc{rcs} keyword strings. If
+ident(1)) which looks for keyword strings. If
you want to be able to use @code{ident} you must not
use @samp{-kv}.
@@ -7914,19 +8458,17 @@ In addition, these options (that are common to
@table @code
@item -d @var{dir}
Create a directory called @var{dir} for the working
-files, instead of using the module name. Unless you
-also use @samp{-N}, the paths created under @var{dir}
-will be as short as possible.
+files, instead of using the module name.
+@xref{checkout options}, for complete details on how
+@sc{cvs} handles this flag.
@item -k @var{subst}
Set keyword expansion mode (@pxref{Substitution modes}).
@item -N
-Only useful together with @samp{-d @var{dir}}. With this
-option, @sc{cvs} will not shorten module paths in your
-working directory. (Normally, @sc{cvs} shortens paths as
-much as possible when you specify an explicit target
-directory.)
+Only useful together with @samp{-d @var{dir}}.
+@xref{checkout options}, for complete details on how
+@sc{cvs} handles this flag.
@end table
@ignore
@@ -7982,8 +8524,12 @@ Report on each time commit was used (i.e., each time
the repository was modified).
@item -e
-Everything (all record types); equivalent to specifying
-@samp{-xMACFROGWUT}.
+Everything (all record types). Equivalent to
+specifying @samp{-x} with all record types. Of course,
+@samp{-e} will also include record types which are
+added in a future version of @sc{cvs}; if you are
+writing a script which can only handle certain record
+types, you'll want to specify @samp{-x}.
@item -m @var{module}
Report on a particular module. (You can meaningfully
@@ -8085,7 +8631,7 @@ files. Each @sc{rcs} file is searched for the revision or
tag.
@item -t @var{tag}
-Show records since tag @var{tag} was last added to the the
+Show records since tag @var{tag} was last added to the
history file. This differs from the @samp{-r} flag
above in that it reads only the history file, not the
@sc{rcs} files, and is much faster.
@@ -8148,9 +8694,9 @@ If the file @file{$CVSROOT/CVSROOT/cvswrappers} exists,
any file whose names match the specifications in that
file will be treated as packages and the appropriate
filtering will be performed on the file/directory
-before being imported, @xref{Wrappers}.
+before being imported. @xref{Wrappers}.
-The outside source is saved in a first-level @sc{rcs}
+The outside source is saved in a first-level
branch, by default 1.1.1. Updates are leaves of this
branch; for example, files from the first imported
collection of source will be revision 1.1.1.1, then
@@ -8193,14 +8739,14 @@ Use @var{message} as log information, instead of
invoking an editor.
@end table
-There are three additional special options.
+There are the following additional special options.
@table @code
@item -b @var{branch}
See @ref{Multiple vendor branches}.
@item -k @var{subst}
-Indicate the RCS keyword expansion mode desired. This
+Indicate the keyword expansion mode desired. This
setting will apply to all files created during the
import, but not to any files that previously existed in
the repository. See @ref{Substitution modes}, for a
@@ -8270,7 +8816,7 @@ to recreate symbolic links on checkout, update, etc.;
@node import examples
@appendixsubsec import examples
-@xref{Tracking sources}, and @xref{From files}.
+See @ref{Tracking sources}, and @ref{From files}.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node log
@@ -8373,7 +8919,8 @@ exclusive one.
Note that the separator is a semicolon (;).
@item -h
-Print only the @sc{rcs} pathname, working pathname, head,
+Print only the name of the @sc{rcs} file, name
+of the file in the working directory, head,
default branch, access list, locks, symbolic names, and
suffix.
@@ -8389,8 +8936,26 @@ information, the log information is presented without
tags at all.
@item -R
-Print only the name of the @sc{rcs} history file.
-
+Print only the name of the @sc{rcs} file.
+
+@c Note that using a bare revision (in addition to not
+@c being explicitly documented here) is potentially
+@c confusing; it shows the log message to get from the
+@c previous revision to that revision. "-r1.3 -r1.6"
+@c (equivalent to "-r1.3,1.6") is even worse; it
+@c prints the messages to get from 1.2 to 1.3 and 1.5
+@c to 1.6. By analogy with "cvs diff", users might
+@c expect that it is more like specifying a range.
+@c It is not 100% clear to me how much of this should
+@c be documented (for example, multiple -r options
+@c perhaps could/should be deprecated given the false
+@c analogy with "cvs diff").
+@c In general, this section should be rewritten to talk
+@c about messages to get from revision rev1 to rev2,
+@c rather than messages for revision rev2 (that is, the
+@c messages are associated with a change not a static
+@c revision and failing to make this distinction causes
+@c much confusion).
@item -r@var{revisions}
Print information about revisions given in the
comma-separated list @var{revisions} of revisions and
@@ -8471,7 +9036,7 @@ Synonym: patch
@end itemize
Builds a Larry Wall format patch(1) file between two
-releases, that can be fed directly into the patch
+releases, that can be fed directly into the @code{patch}
program to bring an old release up-to-date with the new
release. (This is one of the few @sc{cvs} commands that
operates directly from the repository, and doesn't
@@ -8487,8 +9052,8 @@ the @sc{rcs} file.
Note that if the software release affected is contained
in more than one directory, then it may be necessary to
-specify the @samp{-p} option to the patch command when
-patching the old sources, so that patch is able to find
+specify the @samp{-p} option to the @code{patch} command when
+patching the old sources, so that @code{patch} is able to find
the files that are located in other directories.
@menu
@@ -8543,14 +9108,14 @@ last change to a file was.
@item -u
Use the unidiff format for the context diffs.
-This option is not available if your diff does not
+This option is not available if your @code{diff} does not
support the unidiff format. Remember that old versions
of the @code{patch} program can't handle the unidiff
format, so if you plan to post this patch to the net
you should probably not use @samp{-u}.
@item -V @var{vn}
-Expand @sc{rcs} keywords according to the rules current in
+Expand keywords according to the rules current in
@sc{rcs} version @var{vn} (the expansion format changed with
@sc{rcs} version 5).
@end table
@@ -8780,6 +9345,10 @@ Do not run any tag program that was specified with the
@item -R
Tag directories recursively. This is on by default.
+@c FIXME: this discussion is confusing. What part of
+@c the rename operation being discussed relates to
+@c "rtag -r" (that whole discussion needs an example,
+@c and probably to be moved somewhere else)?
@item -r @var{tag}
Only tag those files that contain @var{tag}. This can
be used to rename a tag: tag only the files identified
@@ -8802,7 +9371,7 @@ symbolic tag as development continues (and files get
removed from the up-coming distribution).
@item -b
-Make the tag a branch tag. @xref{Revisions and branches}.
+Make the tag a branch tag. @xref{Branching and merging}.
@item -d
Delete the tag instead of creating it.
@@ -8887,6 +9456,13 @@ them):
@cindex renaming tags
@cindex tags, renaming
@cindex moving tags
+@c FIXME: Where does this talk about renaming tags?
+@c And what about rtag? This needs to be moved to
+@c the body of the manual.
+@c Also see:
+@c "How do I move or rename a magic branch tag?"
+@c in the FAQ (I think the issues it talks about still
+@c apply, but this could use some sanity.sh work).
@item -F
Overwrite an existing tag of the same name on a
different revision.
@@ -8903,13 +9479,13 @@ Two special options are available:
@table @code
@item -b
-The -b option makes the tag a branch tag
-(@pxref{Revisions and branches}), allowing concurrent, isolated
+Make the tag a branch tag
+(@pxref{Branching and merging}), allowing concurrent, isolated
development. This is most useful for creating a patch
to a previously released software distribution.
@item -c
-The -c option checks that all files which are to be tagged are
+Check that all files which are to be tagged are
unmodified. This can be used to make sure that you can reconstruct the
current file contents.
@@ -8981,8 +9557,9 @@ retrieve the most recent revision (instead of ignoring
the file).
@item -k @var{kflag}
-Process @sc{rcs} keywords according to @var{kflag}. See
-co(1). This option is sticky; future updates of
+Process keywords according to @var{kflag}. See
+@ref{Keyword substitution}.
+This option is sticky; future updates of
this file in this working directory will use the same
@var{kflag}. The @code{status} command can be viewed
to see the sticky options. See @ref{Invoking CVS}, for
@@ -9001,8 +9578,8 @@ Pipe files to the standard output.
Update directories recursively (default). @xref{Recursive
behavior}.
-@item -r tag
-Retrieve revision @var{tag}. This option is sticky,
+@item -r rev
+Retrieve revision/tag @var{rev}. This option is sticky,
and implies @samp{-P}.
See @ref{Sticky tags}, for more information on sticky tags/dates.
@end table
@@ -9061,14 +9638,14 @@ ancestor revision is the common ancestor of the
revision which the working directory is based on, and
the revision specified in the @samp{-j} option.
-In addition, each -j option can contain an optional
+In addition, each @samp{-j} option can contain an optional
date specification which, when used with branches, can
limit the chosen revision to one within a specific
date. An optional date is specified by adding a colon
(:) to the tag:
@samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}.
-@xref{Merging}.
+@xref{Branching and merging}.
@end table
@@ -9077,7 +9654,7 @@ date. An optional date is specified by adding a colon
@appendixsubsec update output
@code{update} and @code{checkout} keep you informed of
-its progress by printing a line for each file, preceded
+their progress by printing a line for each file, preceded
by one character indicating the status of the file:
@table @code
@@ -9127,13 +9704,13 @@ name of that file is printed while @code{update} runs.
A conflict was detected while trying to merge your
changes to @var{file} with changes from the source
repository. @var{file} (the copy in your working
-directory) is now the output of the rcsmerge(1) command
-on the two revisions; an unmodified copy of your file
+directory) is now the result of attempting to merge
+the two revisions; an unmodified copy of your file
is also in your working directory, with the name
@file{.#@var{file}.@var{revision}} where @var{revision}
-is the @sc{rcs} revision that your modified file started
+is the revision that your modified file started
from. Resolve the conflict as described in
-@ref{Conflicts example}
+@ref{Conflicts example}.
@c "some systems" as in out-of-the-box OSes? Not as
@c far as I know. We need to advise sysadmins as well
@c as users how to set up this kind of purge, if that is
@@ -9215,7 +9792,8 @@ Replace the log message of revision @var{rev} with
@var{msg}.
@item -o@var{range}
-Delete revisions from the history files
+Delete revisions from the repository. See
+@ref{admin options}.
@item -q
Run quietly; do not print diagnostics.
@@ -9296,7 +9874,8 @@ Use @var{kflag} keyword expansion. See
Local; run only in current working directory. @xref{Recursive behavior}.
@item -N
-Don't shorten module paths if -d specified. See @ref{checkout options}.
+Don't ``shorten'' module paths if -d specified. See
+@ref{checkout options}.
@item -n
Do not run module program (if any). See @ref{checkout options}.
@@ -9439,7 +10018,8 @@ Use @var{kflag} keyword expansion. See
Local; run only in current working directory. @xref{Recursive behavior}.
@item -N
-Don't shorten module paths if -d specified. See @ref{export options}.
+Don't ``shorten'' module paths if -d specified. See
+@ref{export options}.
@item -n
Do not run module program (if any). See @ref{export options}.
@@ -9530,7 +10110,7 @@ Use the file's modification time as the time of
import. See @ref{import options}.
@item -k @var{kflag}
-Set default RCS keyword substitution mode. See
+Set default keyword substitution mode. See
@ref{import options}.
@item -m @var{msg}
@@ -9877,7 +10457,7 @@ Inside the repository, in the directory
supportive files for @sc{cvs}. You can use @sc{cvs} in a limited
fashion without any of them, but if they are set up
properly they can help make life easier. For a
-discussion of how to edit them, @xref{Intro
+discussion of how to edit them, see @ref{Intro
administrative files}.
The most important of these files is the @file{modules}
@@ -9896,6 +10476,7 @@ file, which defines the modules inside the repository.
* cvsignore:: Ignoring files via cvsignore
* history file:: History information
* Variables:: Various variables are expanded
+* config:: Miscellaneous CVS configuration
@end menu
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -9916,10 +10497,31 @@ module definitions. Long lines can be continued on the
next line by specifying a backslash (@samp{\}) as the
last character on the line.
-A module definition is a single line of the
-@file{modules} file, in either of two formats. In both
-cases, @var{mname} represents the symbolic module name,
-and the remainder of the line is its definition.
+There are three basic types of modules: alias modules,
+regular modules, and ampersand modules. The difference
+between them is the way that they map files in the
+repository to files in the working directory. In all
+of the following examples, the top-level repository
+contains a directory called @file{first-dir}, which
+contains two files, @file{file1} and @file{file2}, and a
+directory @file{sdir}. @file{first-dir/sdir} contains
+a file @file{sfile}.
+
+@c FIXME: should test all the examples in this section.
+
+@menu
+* Alias modules:: The simplest kind of module
+* Regular modules::
+* Ampersand modules::
+* Module options:: Regular and ampersand modules can take options
+@end menu
+
+@node Alias modules
+@appendixsubsec Alias modules
+@cindex Alias modules
+@cindex -a, in modules file
+
+Alias modules are the simplest kind of module:
@table @code
@item @var{mname} -a @var{aliases}@dots{}
@@ -9933,8 +10535,39 @@ paths. When you use paths in aliases, @code{checkout}
creates all intermediate directories in the working
directory, just as if the path had been specified
explicitly in the @sc{cvs} arguments.
+@end table
+
+For example, if the modules file contains:
-@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ] [ &@var{module}@dots{} ]
+@example
+amodule -a first-dir
+@end example
+
+@noindent
+then the following two commands are equivalent:
+
+@example
+$ cvs co amodule
+$ cvs co first-dir
+@end example
+
+@noindent
+and they each would provide output such as:
+
+@example
+cvs checkout: Updating first-dir
+U first-dir/file1
+U first-dir/file2
+cvs checkout: Updating first-dir/sdir
+U first-dir/sdir/sfile
+@end example
+
+@node Regular modules
+@appendixsubsec Regular modules
+@cindex Regular modules
+
+@table @code
+@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ]
In the simplest case, this form of module definition
reduces to @samp{@var{mname} @var{dir}}. This defines
all the files in directory @var{dir} as module mname.
@@ -9945,47 +10578,104 @@ case, on checkout, a single directory called
intermediate directory levels are used by default, even
if @var{dir} was a path involving several directory
levels.
+@end table
+
+For example, if a module is defined by:
+
+@example
+regmodule first-dir
+@end example
+
+@noindent
+then regmodule will contain the files from first-dir:
+
+@example
+$ cvs co regmodule
+cvs checkout: Updating regmodule
+U regmodule/file1
+U regmodule/file2
+cvs checkout: Updating regmodule/sdir
+U regmodule/sdir/sfile
+$
+@end example
By explicitly specifying files in the module definition
after @var{dir}, you can select particular files from
-directory @var{dir}. The sample definition for
-@samp{modules} is an example of a module defined with a
-single file from a particular directory. Here is
-another example:
+directory @var{dir}. Here is
+an example:
@example
-m4test unsupported/gnu/m4 foreach.m4 forloop.m4
+regfiles first-dir/sdir sfile
@end example
@noindent
-With this definition, executing @samp{cvs checkout
-m4test} will create a single working directory
-@file{m4test} containing the two files listed, which
-both come from a common directory several levels deep
-in the @sc{cvs} source repository.
+With this definition, getting the regfiles module
+will create a single working directory
+@file{regfiles} containing the file listed, which
+comes from a directory deeper
+in the @sc{cvs} source repository:
+
+@example
+$ cvs co regfiles
+U regfiles/sfile
+$
+@end example
+
+@node Ampersand modules
+@appendixsubsec Ampersand modules
+@cindex Ampersand modules
+@cindex &, in modules file
A module definition can refer to other modules by
including @samp{&@var{module}} in its definition.
-@code{checkout} creates a subdirectory for each such
+@example
+@var{mname} [ options ] @var{&module}@dots{}
+@end example
+
+Then getting the module creates a subdirectory for each such
module, in the directory containing the module. For
example, if modules contains
@example
-m4test &unsupported
+ampermod &first-dir
@end example
-then a checkout will create an @code{m4test} directory
-which contains a directory called @code{unsupported},
+then a checkout will create an @code{ampermod} directory
+which contains a directory called @code{first-dir},
which in turns contains all the directories and files
-which live there.
-@c FIXME: this is hard to describe since we don't tell
-@c the user what the repository contains. Best way to
-@c fix this whole mess is an extended example where we
-@c first say what is in the repository, then show a
-@c regular module, an alias module, and an & module.
-@c We should mention the concept of options only
-@c *after* we've taken care of those basics.
-@c
+which live there. For example, the command
+
+@example
+$ cvs co ampermod
+@end example
+
+@noindent
+will create the following files:
+
+@example
+ampermod/first-dir/file1
+ampermod/first-dir/file2
+ampermod/first-dir/sdir/sfile
+@end example
+
+There is one quirk/bug: the messages that @sc{cvs}
+prints omit the @file{ampermod}, and thus do not
+correctly display the location to which it is checking
+out the files:
+
+@example
+$ cvs co ampermod
+cvs checkout: Updating first-dir
+U first-dir/file1
+U first-dir/file2
+cvs checkout: Updating first-dir/sdir
+U first-dir/sdir/sfile
+$
+@end example
+
+Do not rely on this buggy behavior; it may get fixed in
+a future release of @sc{cvs}.
+
@c FIXCVS: What happens if regular and & modules are
@c combined, as in "ampermodule first-dir &second-dir"?
@c When I tried it, it seemed to just ignore the
@@ -9995,12 +10685,25 @@ which live there.
@c should put in a few words about why you would use one or
@c the other in various situations.
+@node Module options
+@appendixsubsec Module options
+@cindex options, in modules file
+
+Either regular modules or ampersand modules can contain
+options, which supply additional information concerning
+the module.
+
@table @code
+@cindex -d, in modules file
@item -d @var{name}
Name the working directory something other than the
module name.
+@c FIXME: Needs a bunch of examples, analogous to the
+@c examples for alias, regular, and ampersand modules
+@c which show where the files go without -d.
@cindex Export program
+@cindex -e, in modules file
@item -e @var{prog}
Specify a program @var{prog} to run whenever files in a
module are exported. @var{prog} runs with a single
@@ -10008,6 +10711,7 @@ argument, the module name.
@c FIXME: Is it run on server? client?
@cindex Checkin program
+@cindex -i, in modules file
@item -i @var{prog}
Specify a program @var{prog} to run whenever files in a
module are committed. @var{prog} runs with a single
@@ -10018,6 +10722,7 @@ ways to call a program on commit.
@c FIXME: Is it run on server? client?
@cindex Checkout program
+@cindex -o, in modules file
@item -o @var{prog}
Specify a program @var{prog} to run whenever files in a
module are checked out. @var{prog} runs with a single
@@ -10026,6 +10731,7 @@ argument, the module name.
@cindex Status of a module
@cindex Module status
+@cindex -s, in modules file
@item -s @var{status}
Assign a status to the module. When the module file is
printed with @samp{cvs checkout -s} the modules are
@@ -10036,15 +10742,23 @@ several things besides status: for instance, list the
person that is responsible for this module.
@cindex Tag program
+@cindex -t, in modules file
@item -t @var{prog}
Specify a program @var{prog} to run whenever files in a
module are tagged with @code{rtag}. @var{prog} runs
with two arguments: the module name and the symbolic
-tag specified to @code{rtag}. There is no way to
-specify a program to run when @code{tag} is executed.
+tag specified to @code{rtag}. It is not run
+when @code{tag} is executed. Generally you will find
+that taginfo is a better solution (@pxref{user-defined logging}).
@c FIXME: Is it run on server? client?
+@c Problems with -t include:
+@c * It is run after the tag not before
+@c * It doesn't get passed all the information that
+@c taginfo does ("mov", &c).
+@c * It only is run for rtag, not tag.
@cindex Update program
+@cindex -u, in modules file
@item -u @var{prog}
Specify a program @var{prog} to run whenever @samp{cvs
update} is executed from the top-level directory of the
@@ -10052,7 +10766,11 @@ checked-out module. @var{prog} runs with a single
argument, the full path to the source repository for
this module.
@c FIXME: Is it run on server? client?
-@end table
+@c One drawback of -u and -i are that CVS/Update.prog
+@c and CVS/Checkin.prog only get updated on initial
+@c checkout, and don't get updated if the modules file
+@c changes. Also, the user can edit them, which means
+@c they are no good for security-type stuff.
@end table
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -10088,16 +10806,23 @@ not work with client/server @sc{cvs}.
The @file{cvswrappers} also has a @samp{-m} option to
specify the merge methodology that should be used when
the file is updated. @code{MERGE} means the usual
-@sc{cvs} behavior: try to merge the files (this
-generally will not work for binary files). @code{COPY}
-means that @code{cvs update} will merely copy one
-version over the other, and require the user using
+@sc{cvs} behavior: try to merge the files. @code{COPY}
+means that @code{cvs update} will refuse to merge
+files, as it also does for files specified as binary
+with @samp{-kb}. CVS will provide the user with the
+two versions of the files, and require the user using
mechanisms outside @sc{cvs}, to insert any necessary
-changes.
-@c FIXME: which version is copied over which version?
+changes. @strong{WARNING}: do not use @code{COPY} with
+@sc{cvs} 1.9 or earlier--such versions of @sc{cvs} will
+copy one version of your file over the other, wiping
+out the previous contents.
+@c Ordinarily we don't document the behavior of old
+@c versions. But this one is so dangerous, I think we
+@c must. I almost renamed it to -m 'NOMERGE' so we
+@c could say "never use -m 'COPY'".
The @samp{-m} wrapper option only affects behavior when
merging is done on update; it does not affect how files
-are stored. See @xref{Binary files}, for more on
+are stored. See @ref{Binary files}, for more on
binary files.
The basic format of the file @file{cvswrappers} is:
@@ -10120,6 +10845,13 @@ and value is a single-quote delimited value.
*.nib -f 'unwrap %s' -t 'wrap %s %s' -m 'COPY'
*.c -t 'indent %s %s'
@end example
+@c When does the filter need to be an absolute pathname
+@c and when will something like the above work? I
+@c suspect it relates to the PATH of the server (which
+@c in turn depends on all kinds of stuff, e.g. inetd
+@c for pserver). I'm not sure whether/where to discuss
+@c this.
+@c FIXME: What do the %s's stand for?
@noindent
The above example of a @file{cvswrappers} file
@@ -10130,7 +10862,7 @@ be filtered though the @file{unwrap} program when the
file is checked out of the repository. The
@file{cvswrappers} file also states that a @code{COPY}
methodology should be used when updating the files in
-the repository (that is no merging should be performed).
+the repository (that is, no merging should be performed).
@c What pitfalls arise when using indent this way? Is
@c it a winning thing to do? Would be nice to at least
@@ -10138,9 +10870,9 @@ the repository (that is no merging should be performed).
@c how to solve problems, not just to say that cvs can
@c do certain things.
The last example line says that all files that end with
-a @code{*.c} should be filtered with @file{indent}
+@code{.c} should be filtered with @file{indent}
before being checked into the repository. Unlike the previous
-example no filtering of the @code{*.c} file is done when
+example, no filtering of the @code{.c} file is done when
it is checked out of the repository.
@noindent
The @code{-t} filter is called with two arguments,
@@ -10290,6 +11022,8 @@ expression in the syntax used by GNU emacs.
@c support all the obscure emacs extensions like \<.
@c Also need to better cite (or include) full
@c documentation for the syntax.
+@c Also see comment in configure.in about what happens to the
+@c syntax if we pick up a system-supplied regexp matcher.
@item
A whitespace separator---one or more spaces and/or tabs.
@@ -10595,6 +11329,9 @@ The @file{rcsinfo} file contains this line:
@cindex Distributing log messages
@cindex Log messages
+@c "cvs commit" is not quite right. What we
+@c mean is "when the repository gets changed" which
+@c also includes "cvs import" and "cvs add" on a directory.
The @file{loginfo} file is used to control where
@samp{cvs commit} log information is sent. The first
entry on a line is a regular expression which is tested
@@ -10640,7 +11377,7 @@ For example, some valid format strings are @samp{%},
@samp{%s}, @samp{%@{s@}}, and @samp{%@{sVv@}}.
The output will be a string of tokens separated by
-spaces. For backwards compatibility, the the first
+spaces. For backwards compatibility, the first
token will be the repository name. The rest of the
tokens will be comma-delimited lists of the information
requested in the format string. For example, if
@@ -10783,8 +11520,8 @@ matching regular expression or @samp{DEFAULT}.
@c it or anything. In particular we should say
@c how to version control the template file. A
@c probably better answer than the /usr/cvsssupport
-@c stuff is to use checkoutlist. FIXME: it doesn't
-@c seem like checkoutlist is documented at all!
+@c stuff is to use checkoutlist (with xref to the
+@c checkoutlist doc).
@c Also I am starting to see a connection between
@c this and the Keeping a checked out copy node.
@c Probably want to say something about that.
@@ -10899,6 +11636,18 @@ import. Because this is awkward, in the future
@samp{-I !} might be modified to override
@file{.cvsignore} files in each directory.
+Note that the syntax of the ignore files consists of a
+series of lines, each of which contains a space
+separated list of filenames. This offers no clean way
+to specify filenames which contain spaces, but you can
+use a workaround like @file{foo?bar} to match a file
+named @file{foo bar} (it also matches @file{fooxbar}
+and the like). Also note that there is currently no
+way to specify comments.
+@c FIXCVS? I don't _like_ this syntax at all, but
+@c changing it raises all the usual compatibility
+@c issues and I'm also not sure what to change it to.
+
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node history file
@appendixsec The history file
@@ -10931,9 +11680,9 @@ To find the home directory of the user running @sc{cvs}
@samp{~} followed by @samp{/} or the end of the line.
Likewise for the home directory of @var{user}, use
@samp{~@var{user}}. These variables are expanded on
-the server machine, and don't get any resonable
+the server machine, and don't get any reasonable
expansion if pserver (@pxref{Password authenticated})
-is in used; therefore user variables (see below) may be
+is in use; therefore user variables (see below) may be
a better choice to customize behavior based on the user
running @sc{cvs}.
@c Based on these limitations, should we deprecate ~?
@@ -10956,9 +11705,11 @@ This is the value of the @sc{cvs} root in use.
ways to specify this.
@item RCSBIN
-This is the value @sc{cvs} is using for where to find
-@sc{rcs} binaries. @xref{Global options}, for a
-description of how to specify this.
+In @sc{cvs} 1.9.18 and older, this specified the
+directory where @sc{cvs} was looking for @sc{rcs}
+programs. Because @sc{cvs} no longer runs @sc{rcs}
+programs, specifying this internal variable is now an
+error.
@item CVSEDITOR
@itemx VISUAL
@@ -10973,7 +11724,7 @@ server machine).
@end table
If you want to pass a value to the administrative files
-which the user that is running @sc{cvs} can specify,
+which the user who is running @sc{cvs} can specify,
use a user variable. To expand a user variable, the
administrative file contains
@code{$@{=@var{variable}@}}. To set a user variable,
@@ -11001,6 +11752,47 @@ All other strings containing @samp{$} are reserved;
there is no way to quote a @samp{$} character so that
@samp{$} represents itself.
+@node config
+@appendixsec The CVSROOT/config configuration file
+
+@cindex config, in CVSROOT
+@cindex CVSROOT/config
+
+The administrative file @file{config} contains various
+miscellaneous settings which affect the behavior of
+@sc{cvs}. The syntax is slightly different from the
+other administrative files. Variables are not
+expanded. Lines which start with @samp{#} are
+considered comments.
+@c FIXME: where do we define comments for the other
+@c administrative files.
+Other lines consist of a keyword, @samp{=}, and a
+value. Note that this syntax is very strict.
+Extraneous spaces or tabs are not permitted.
+@c See comments in parseinfo.c:parse_config for more
+@c discussion of this strictness.
+
+Currently defined keywords are:
+
+@table @code
+@cindex RCSBIN, in CVSROOT/config
+@item RCSBIN=@var{bindir}
+For @sc{cvs} 1.9.12 through 1.9.18, this setting told
+@sc{cvs} to look for @sc{rcs} programs in the
+@var{bindir} directory. Current versions of @sc{cvs}
+do not run @sc{rcs} programs; for compatibility this
+setting is accepted, but it does nothing.
+
+@cindex SystemAuth, in CVSROOT/config
+@item SystemAuth=@var{value}
+If @var{value} is @samp{yes}, then pserver should check
+for users in the system's user database if not found in
+@file{CVSROOT/passwd}. If it is @samp{no}, then all
+pserver users must exist in @file{CVSROOT/passwd}.
+The default is @samp{yes}. For more on pserver, see
+@ref{Password authenticated}.
+@end table
+
@c ---------------------------------------------------------------------
@node Environment variables
@appendix All environment variables which affect CVS
@@ -11011,17 +11803,17 @@ This is a complete list of all environment variables
that affect @sc{cvs}.
@table @code
-@cindex CVSIGNORE
+@cindex CVSIGNORE, environment variable
@item $CVSIGNORE
A whitespace-separated list of file name patterns that
@sc{cvs} should ignore. @xref{cvsignore}.
-@cindex CVSWRAPPERS
+@cindex CVSWRAPPERS, environment variable
@item $CVSWRAPPERS
A whitespace-separated list of file name patterns that
@sc{cvs} should treat as wrappers. @xref{Wrappers}.
-@cindex CVSREAD
+@cindex CVSREAD, environment variable
@cindex read-only files, and CVSREAD
@item $CVSREAD
If this is set, @code{checkout} and @code{update} will
@@ -11033,10 +11825,9 @@ is to permit modification of your working files.
Controls permissions of files in the repository. See
@ref{File permissions}.
-@cindex CVSROOT
@item $CVSROOT
Should contain the full pathname to the root of the @sc{cvs}
-source repository (where the @sc{rcs} history files are
+source repository (where the @sc{rcs} files are
kept). This information must be available to @sc{cvs} for
most commands to execute; if @code{$CVSROOT} is not set,
or if you wish to override it for one invocation, you
@@ -11047,36 +11838,34 @@ the file @file{CVS/Root}), so normally you only need to
worry about this when initially checking out a working
directory.
-@cindex EDITOR
-@cindex CVSEDITOR
@item $EDITOR
@itemx $CVSEDITOR
Specifies the program to use for recording log messages
during commit. @code{$CVSEDITOR} overrides
@code{$EDITOR}. See @ref{Committing your changes}.
-@cindex PATH
+@cindex PATH, environment variable
@item $PATH
If @code{$RCSBIN} is not set, and no path is compiled
into @sc{cvs}, it will use @code{$PATH} to try to find all
programs it uses.
-@cindex RCSBIN
-@item $RCSBIN
-This is the value @sc{cvs} is using for where to find
-@sc{rcs} binaries. @xref{Global options}, for a
-description of how to specify this. If not set, a
-compiled-in value is used, or your @code{$PATH} is searched.
-
-@cindex HOME
+@cindex HOME, environment variable
@item $HOME
-@cindex HOMEPATH
+@cindex HOMEPATH, environment variable
@item $HOMEPATH
+@cindex HOMEDRIVE, environment variable
+@item $HOMEDRIVE
Used to locate the directory where the @file{.cvsrc}
-file is searched (@code{$HOMEPATH} is used for Windows-NT).
-@pxref{~/.cvsrc}
-
-@cindex CVS_RSH
+file, and other such files, are searched. On Unix, CVS
+just checks for HOME. On Windows NT, the system will
+set HOMEDRIVE, for example to @samp{d:} and HOMEPATH,
+for example to @file{\joe}. On Windows 95, you'll
+probably need to set HOMEDRIVE and HOMEPATH yourself.
+@c We are being vague about whether HOME works on
+@c Windows; see long comment in windows-NT/filesubr.c.
+
+@cindex CVS_RSH, environment variable
@item $CVS_RSH
Specifies the external program which CVS connects with,
when @code{:ext:} access method is specified.
@@ -11099,13 +11888,13 @@ Used in client-server mode when accessing the server
via Kerberos.
@pxref{Kerberos authenticated}
-@cindex CVS_RCMD_PORT
+@cindex CVS_RCMD_PORT, environment variable
@item $CVS_RCMD_PORT
Used in client-server mode. If set, specifies the port
number to be used when accessing the @sc{rcmd} demon on
the server side. (Currently not used for Unix clients).
-@cindex CVS_CLIENT_LOG
+@cindex CVS_CLIENT_LOG, environment variable
@item $CVS_CLIENT_LOG
Used for debugging only in client-server
mode. If set, everything send to the server is logged
@@ -11113,38 +11902,37 @@ into @file{@code{$CVS_CLIENT_LOG}.in} and everything
send from the server is logged into
@file{@code{$CVS_CLIENT_LOG}.out}.
-@cindex CVS_SERVER_SLEEP
+@cindex CVS_SERVER_SLEEP, environment variable
@item $CVS_SERVER_SLEEP
Used only for debugging the server side in
client-server mode. If set, delays the start of the
-server child process the the specified amount of
+server child process the specified amount of
seconds so that you can attach to it with a debugger.
-@cindex CVS_IGNORE_REMOTE_ROOT
+@cindex CVS_IGNORE_REMOTE_ROOT, environment variable
@item $CVS_IGNORE_REMOTE_ROOT
(What is the purpose of this variable?)
-@cindex COMSPEC
+@cindex COMSPEC, environment variable
@item $COMSPEC
Used under OS/2 only. It specifies the name of the
command interpreter and defaults to @sc{cmd.exe}.
-@cindex TMPDIR
+@cindex TMPDIR, environment variable
@item $TMPDIR
-@cindex TMP
+@cindex TMP, environment variable
@itemx $TMP
-@cindex TEMP
+@cindex TEMP, environment variable
@itemx $TEMP
@cindex temporary files, location of
-@c I'm not even sure I've documented all the
-@c conventions here. Furthermore, those conventions are
+@c This is quite nuts. We don't talk about tempnam
+@c or mkstemp which we sometimes use. The discussion
+@c of "Global options" is semi-incoherent.
+@c I'm not even sure those are the only inaccuracies.
+@c Furthermore, the conventions are
@c pretty crazy and they should be simplified.
-Directory in which temporary files are located. Those
-parts of @sc{cvs} which are implemented using @sc{rcs}
-inspect the above variables in the order they appear
-above and the first value found is taken; if none of
-them are set, a host-dependent default is used,
-typically @file{/tmp}. The @sc{cvs} server uses
+Directory in which temporary files are located.
+The @sc{cvs} server uses
@code{TMPDIR}. @xref{Global options}, for a
description of how to specify this.
Some parts of @sc{cvs} will always use @file{/tmp} (via
@@ -11155,34 +11943,89 @@ function provided by the system).
The @code{patch} program which is used by the @sc{cvs}
client uses @code{TMPDIR}, and if it is not set, uses
-@file{/tmp} (at least with GNU patch 2.1).
+@file{/tmp} (at least with GNU patch 2.1). Note that
+if your server and client are both running @sc{cvs}
+1.9.10 or later, @sc{cvs} will not invoke an external
+@code{patch} program.
@end table
-@sc{cvs} invokes @sc{rcs} to perform certain
-operations. The following environment
-variables affect @sc{rcs}. Note that if you are using
-the client/server @sc{cvs}, these variables need to be
-set on the server side (which may or not may be
-possible depending on how you are connecting). There
-is probably not any need to set any of them, however.
+@node Compatibility
+@appendix Compatibility between CVS Versions
-@table @code
-@cindex LOGNAME
-@item $LOGNAME
-@cindex USER
-@itemx $USER
-If set, they affect who @sc{rcs} thinks you are. If you
-have trouble checking in files it might be because your
-login name differs from the setting of e.g.
-@code{$LOGNAME}.
-
-@cindex RCSINIT
-@item $RCSINIT
-Options prepended to the argument list, separated by
-spaces. A backslash escapes spaces within an option.
-The @code{$RCSINIT} options are prepended to the
-argument lists of most @sc{rcs} commands.
-@end table
+@cindex CVS, versions of
+@cindex versions, of CVS
+@cindex compatibility, between CVS versions
+@c We don't mention versions older than CVS 1.3
+@c on the theory that it would clutter it up for the vast
+@c majority of people, who don't have anything that old.
+@c
+The repository format is compatible going back to
+@sc{cvs} 1.3. But see @ref{Watches Compatibility}, if
+you have copies of @sc{cvs} 1.6 or older and you want
+to use the optional developer communication features.
+@c If you "cvs rm" and commit using 1.3, then you'll
+@c want to run "rcs -sdead <file,v>" on each of the
+@c files in the Attic if you then want 1.5 and
+@c later to recognize those files as dead (I think the
+@c symptom if this is not done is that files reappear
+@c in joins). (Wait: the above will work but really to
+@c be strictly correct we should suggest checking
+@c in a new revision rather than just changing the
+@c state of the head revision, shouldn't we?).
+@c The old convert.sh script was for this, but it never
+@c did get updated to reflect use of the RCS "dead"
+@c state.
+@c Note: this is tricky to document without confusing
+@c people--need to carefully say what CVS version we
+@c are talking about and keep in mind the distinction
+@c between a
+@c repository created with 1.3 and on which one now
+@c uses 1.5+, and a repository on which one wants to
+@c use both versions side by side (e.g. during a
+@c transition period).
+@c Wait, can't CVS just detect the case in which a file
+@c is in the Attic but the head revision is not dead?
+@c Not sure whether this should produce a warning or
+@c something, and probably needs further thought, but
+@c it would appear that the situation can be detected.
+@c
+@c We might want to separate out the 1.3 compatibility
+@c section (for repository & working directory) from the
+@c rest--that might help avoid confusing people who
+@c are upgrading (for example) from 1.6 to 1.8.
+@c
+@c A minor incompatibility is if a current version of CVS
+@c puts "Nfoo" into CVS/Tag, then CVS 1.9 or older will
+@c see this as if there is no tag. Seems to me this is
+@c too obscure to mention.
+
+The working directory format is compatible going back
+to @sc{cvs} 1.5. It did change between @sc{cvs} 1.3
+and @sc{cvs} 1.5. If you run @sc{cvs} 1.5 or newer on
+a working directory checked out with @sc{cvs} 1.3,
+@sc{cvs} will convert it, but to go back to @sc{cvs}
+1.3 you need to check out a new working directory with
+@sc{cvs} 1.3.
+
+The remote protocol is interoperable going back to @sc{cvs} 1.5, but no
+further (1.5 was the first official release with the remote protocol,
+but some older versions might still be floating around). In many
+cases you need to upgrade both the client and the server to take
+advantage of new features and bugfixes, however.
+
+@c Perhaps should be saying something here about the
+@c "D" lines in Entries (written by CVS 1.9; 1.8 and
+@c older don't use them). These are supposed to be
+@c compatible in both directions, but I'm not sure
+@c they quite are 100%. One common gripe is if you
+@c "rm -r" a directory and 1.9 gets confused, as it
+@c still sees it in Entries. That one is fixed in
+@c (say) 1.9.6. Someone else reported problems with
+@c starting with a directory which was checked out with
+@c an old version, and then using a new version, and
+@c some "D" lines appeared, but not for every
+@c directory, causing some directories to be skipped.
+@c They weren't sure how to reproduce this, though.
@c ---------------------------------------------------------------------
@node Troubleshooting
@@ -11226,11 +12069,29 @@ In some cases the list includes messages printed by old
versions of @sc{cvs} (partly because users may not be
sure which version of @sc{cvs} they are using at any
particular moment).
+@c If we want to start retiring messages, perhaps we
+@c should pick a cutoff version (for example, no more
+@c messages which are specific to versions before 1.9)
+@c and then move the old messages to an "old messages"
+@c node rather than deleting them completely.
@table @code
@c FIXME: What is the correct way to format a multiline
@c error message here? Maybe @table is the wrong
@c choice? Texinfo gurus?
+@item cvs @var{command}: authorization failed: server @var{host} rejected access
+This is a generic response when trying to connect to a
+pserver server which chooses not to provide a
+specific reason for denying authorization. Check that
+the username and password specified are correct and
+that the CVSROOT specified is allowed by --allow-root
+in inetd.conf. See @ref{Password authenticated}.
+
+@item @var{file}:@var{line}: Assertion '@var{text}' failed
+The exact format of this message may vary depending on
+your system. It indicates a bug in @sc{cvs}, which can
+be handled as described in @ref{BUGS}.
+
@item cannot change permissions on temporary directory
@example
Operation not permitted
@@ -11248,8 +12109,10 @@ you have any information to add, please let us know as
described in @ref{BUGS}. If you experience this error
while using @sc{cvs}, retrying the operation which
produced it should work fine.
-@c Most recently this was in the multibranch-5 test.
-@c But I'm not sure it is specific to that test.
+@c This has been seen in a variety of tests, including
+@c multibranch-2, multibranch-5, and basic1-24-rm-rm,
+@c so it doesn't seem particularly specific to any one
+@c test.
@c For one example see basica-1a10 in the testsuite
@c For another example, "cvs co ." on NT; see comment
@@ -11262,23 +12125,80 @@ can be handled as with other @sc{cvs} bugs
exact nature of which would depend on the situation but
which hopefully could be figured out.
+@c This is more obscure than it might sound; it only
+@c happens if you run "cvs init" from a directory which
+@c contains a CVS/Root file at the start.
+@item cvs [init aborted]: cannot open CVS/Root: No such file or directory
+This message is harmless. Provided it is not
+accompanied by other errors, the operation has
+completed successfully. This message should not occur
+with current versions of @sc{cvs}, but it is documented
+here for the benefit of @sc{cvs} 1.9 and older.
+
@item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument
This message has been reported as intermittently
happening with CVS 1.9 on Solaris 2.5. The cause is
unknown; if you know more about what causes it, let us
know as described in @ref{BUGS}.
+@item cvs [@var{command} aborted]: cannot start server via rcmd
+This, unfortunately, is a rather nonspecific error
+message which @sc{cvs} 1.9 will print if you are
+running the @sc{cvs} client and it is having trouble
+connecting to the server. Current versions of @sc{cvs}
+should print a much more specific error message. If
+you get this message when you didn't mean to run the
+client at all, you probably forgot to specify
+@code{:local:}, as described in @ref{Repository}.
+
+@item ci: @var{file},v: bad diff output line: Binary files - and /tmp/T2a22651 differ
+CVS 1.9 and older will print this message
+when trying to check in a binary file if
+@sc{rcs} is not correctly installed. Re-read the
+instructions that came with your @sc{rcs} distribution
+and the @sc{install} file in the @sc{cvs}
+distribution. Alternately, upgrade to a current
+version of @sc{cvs}, which checks in files itself
+rather than via @sc{rcs}.
+
+@item cvs checkout: could not check out @var{file}
+With CVS 1.9, this can mean that the @code{co} program
+(part of @sc{rcs}) returned a failure. It should be
+preceded by another error message, however it has been
+observed without another error message and the cause is
+not well-understood. With the current version of CVS,
+which does not run @code{co}, if this message occurs
+without another error message, it is definitely a CVS
+bug (@pxref{BUGS}).
+@c My current suspicion is that the RCS in the rcs (not
+@c cvs/winnt/rcs57nt.zip) directory on the _Practical_
+@c CD is bad (remains to be confirmed).
+@c There is also a report of something which looks
+@c very similar on SGI, Irix 5.2, so I dunno.
+
+@item cvs [login aborted]: could not find out home directory
+This means that you need to set the environment
+variables that CVS uses to locate your home directory.
+See the discussion of HOME, HOMEDRIVE, and HOMEPATH in
+@ref{Environment variables}.
+
+@item cvs update: could not merge revision @var{rev} of @var{file}: No such file or directory
+CVS 1.9 and older will print this message if there was
+a problem finding the @code{rcsmerge} program. Make
+sure that it is in your @code{PATH}, or upgrade to a
+current version of CVS, which does not require
+an external @code{rcsmerge} program.
+
@item cvs [update aborted]: could not patch @var{file}: No such file or directory
This means that there was a problem finding the
@code{patch} program. Make sure that it is in your
@code{PATH}. Note that despite appearances the message
is @emph{not} referring to whether it can find @var{file}.
-@c Future versions of @sc{cvs} are
-@c expected to dispense with the need for an external
-@c patch program, but might as well not advertise
-@c vaporware.
-@c Even after that change is made, probably want to
-@c preserve this message, see above about old messages.
+If both the client and the server are running a current
+version of @sc{cvs}, then there is no need for an
+external patch program and you should not see this
+message. But if either client or server is running
+@sc{cvs} 1.9, then you need @code{patch}.
@item cvs update: could not patch @var{file}; will refetch
This means that for whatever reason the client was
@@ -11291,9 +12211,12 @@ has no effect on what @sc{cvs} does.
@c explains this whole "patch"/P/Needs Patch thing?
@item dying gasps from @var{server} unexpected
-This message seems to be caused by a hard-to-track-down
-bug in @sc{cvs} or the systems it runs on (we don't
-know---we haven't tracked it down yet!). If you see it,
+There is a known bug in the server for @sc{cvs} 1.9.18
+and older which can cause this. For me, this was
+reproducible if I used the @samp{-t} global option. It
+was fixed by Andy Piper's 14 Nov 1997 change to
+src/filesubr.c, if anyone is curious.
+If you see the message,
you probably can just retry the operation which failed,
or if you have discovered information concerning its
cause, please let us know as described in @ref{BUGS}.
@@ -11324,6 +12247,33 @@ every place it appears in your @code{modules}
file. For more information on the @code{modules} file,
see @ref{modules}.
+@c This messsage comes from "co", and I believe is
+@c possible only with older versions of CVS which call
+@c co. The problem with being able to create the bogus
+@c RCS file still exists, though (and I think maybe
+@c there is a different symptom(s) now).
+@c FIXME: Would be nice to have a more exact wording
+@c for this message.
+@item missing author
+Typically this can happen if you created an RCS file
+with your username set to empty. CVS will, bogusly,
+create an illegal RCS file with no value for the author
+field. The solution is to make sure your username is
+set to a non-empty value and re-create the RCS file.
+@c "make sure your username is set" is complicated in
+@c and of itself, as there are the environment
+@c variables the system login name, &c, and it depends
+@c on the version of CVS.
+
+@item *PANIC* administration files missing
+This typically means that there is a directory named
+CVS but it does not contain the administrative files
+which CVS puts in a CVS directory. If the problem is
+that you created a CVS directory via some mechanism
+other than CVS, then the answer is simple, use a name
+other than CVS. If not, it indicates a CVS bug
+(@pxref{BUGS}).
+
@item rcs error: Unknown option: -x,v/
This message will be followed by a usage message for
@sc{rcs}. It means that you have an old version of
@@ -11333,6 +12283,8 @@ later.
@c For more information on installing @sc{cvs}, see
@c (FIXME: where? it depends on whether you are
@c getting binaries or sources or what).
+@c The message can also say "ci error" or something
+@c instead of "rcs error", I suspect.
@item cvs [server aborted]: received broken pipe signal
This message seems to be caused by a hard-to-track-down
@@ -11343,6 +12295,22 @@ you should be able to just ignore the message.
However, if you have discovered information concerning its
cause, please let us know as described in @ref{BUGS}.
+@item Too many arguments!
+This message is typically printed by the @file{log.pl}
+script which is in the @file{contrib} directory in the
+@sc{cvs} source distribution. In some versions of
+@sc{cvs}, @file{log.pl} has been part of the default
+@sc{cvs} installation. The @file{log.pl} script gets
+called from the @file{loginfo} administrative file.
+Check that the arguments passed in @file{loginfo} match
+what your version of @file{log.pl} expects. In
+particular, the @file{log.pl} from @sc{cvs} 1.3 and
+older expects the logfile as an argument whereas the
+@file{log.pl} from @sc{cvs} 1.5 and newer expects the
+logfile to be specified with a @samp{-f} option. Of
+course, if you don't need @file{log.pl} you can just
+comment it out of @file{loginfo}.
+
@item cvs commit: Up-to-date check failed for `@var{file}'
This means that someone else has committed a change to
that file since the last time that you did a @code{cvs
@@ -11366,13 +12334,26 @@ This indicates a problem with the installation of
@code{rcsmerge} was compiled to look for GNU diff3, but
it is finding unix diff3 instead. The exact text of
the message will vary depending on the system. The
-solution is to make sure @code{rcsmerge} finds GNU
-diff3. Depending on how @code{rcsmerge} was compiled,
-it might be sufficient to place GNU diff3 in your
-@code{PATH}, or it might be necessary to recompile
-@code{rcsmerge} or find a binary distribution of
-@code{rcsmerge} which looks in the @code{PATH}.
-@c Should we mention the cvsaux binaries here?
+simplest solution is to upgrade to a current version of
+@sc{cvs}, which does not rely on external
+@code{rcsmerge} or @code{diff3} programs.
+
+@item warning: unrecognized response `@var{text}' from cvs server
+If @var{text} contains a valid response (such as
+@samp{ok}) followed by an extra carriage return
+character (on many systems this will cause the second
+part of the message to overwrite the first part), then
+it probably means that you are using the @samp{:ext:}
+access method with a version of rsh, such as most
+non-unix rsh versions, which does not by default
+provide a transparent data stream. In such cases you
+probably want to try @samp{:server:} instead of
+@samp{:ext:}. If @var{text} is something else, this
+may signify a problem with your CVS server.
+Double-check your installation against the instructions
+for setting up the CVS server.
+@c FIXCVS: should be printing CR as \r or \015 or some
+@c such, probably.
@item cvs commit: warning: editor session failed
@cindex exit status, of editor
@@ -11402,15 +12383,171 @@ particular order.
@itemize @bullet
@item
-If @code{cvs update} finds a conflict and tries to
+If you are running @sc{cvs} 1.9.18 or older, and
+@code{cvs update} finds a conflict and tries to
merge, as described in @ref{Conflicts example}, but
doesn't tell you there were conflicts, then you may
-have an old version of @sc{rcs}. For more information
-on how to set this up, see the @file{INSTALL} file in
-the @sc{cvs} source distribution.
+have an old version of @sc{rcs}. The easiest solution
+probably is to upgrade to a current version of
+@sc{cvs}, which does not rely on external @sc{rcs}
+programs.
@end itemize
@c ---------------------------------------------------------------------
+@node Credits
+@appendix Credits
+
+@cindex Contributors (manual)
+@cindex Credits (manual)
+Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}>
+wrote the manual pages which were distributed with
+@sc{cvs} 1.3. Much of their text was copied into this
+manual. He also read an early draft
+of this manual and contributed many ideas and
+corrections.
+
+The mailing-list @code{info-cvs} is sometimes
+informative. I have included information from postings
+made by the following persons:
+David G. Grubbs <@t{dgg@@think.com}>.
+
+Some text has been extracted from the man pages for
+@sc{rcs}.
+
+The @sc{cvs} @sc{faq} by David G. Grubbs has provided
+useful material. The @sc{faq} is no longer maintained,
+however, and this manual is about the closest thing there
+is to a successor (with respect to documenting how to
+use @sc{cvs}, at least).
+
+In addition, the following persons have helped by
+telling me about mistakes I've made:
+
+@display
+Roxanne Brunskill <@t{rbrunski@@datap.ca}>,
+Kathy Dyer <@t{dyer@@phoenix.ocf.llnl.gov}>,
+Karl Pingle <@t{pingle@@acuson.com}>,
+Thomas A Peterson <@t{tap@@src.honeywell.com}>,
+Inge Wallin <@t{ingwa@@signum.se}>,
+Dirk Koschuetzki <@t{koschuet@@fmi.uni-passau.de}>
+and Michael Brown <@t{brown@@wi.extrel.com}>.
+@end display
+
+The list of contributors here is not comprehensive; for a more
+complete list of who has contributed to this manual see
+the file @file{doc/ChangeLog} in the @sc{cvs} source
+distribution.
+
+@c ---------------------------------------------------------------------
+@node BUGS
+@appendix Dealing with bugs in CVS or this manual
+
+@cindex Bugs in this manual or CVS
+Neither @sc{cvs} nor this manual is perfect, and they
+probably never will be. If you are having trouble
+using @sc{cvs}, or think you have found a bug, there
+are a number of things you can do about it. Note that
+if the manual is unclear, that can be considered a bug
+in the manual, so these problems are often worth doing
+something about as well as problems with @sc{cvs} itself.
+
+@cindex Reporting bugs
+@cindex Bugs, reporting
+@cindex Errors, reporting
+@itemize @bullet
+@item
+If you want someone to help you and fix bugs that you
+report, there are companies which will do that for a
+fee. Two such companies are:
+
+@cindex Signum Support
+@cindex Cyclic Software
+@cindex Support, getting CVS support
+@example
+Signum Support AB
+Box 2044
+S-580 02 Linkoping
+Sweden
+Email: info@@signum.se
+Phone: +46 (0)13 - 21 46 00
+Fax: +46 (0)13 - 21 47 00
+http://www.signum.se/
+
+Cyclic Software
+United States of America
+http://www.cyclic.com/
+info@@cyclic.com
+@end example
+
+@item
+If you got @sc{cvs} through a distributor, such as an
+operating system vendor or a vendor of freeware
+@sc{cd-rom}s, you may wish to see whether the
+distributor provides support. Often, they will provide
+no support or minimal support, but this may vary from
+distributor to distributor.
+
+@item
+If you have the skills and time to do so, you may wish
+to fix the bug yourself. If you wish to submit your
+fix for inclusion in future releases of @sc{cvs}, see
+the file @sc{hacking} in the @sc{cvs} source
+distribution. It contains much more information on the
+process of submitting fixes.
+
+@item
+There may be resources on the net which can help. Two
+good places to start are:
+
+@example
+http://www.cyclic.com
+http://www.loria.fr/~molli/cvs-index.html
+@end example
+
+If you are so inspired, increasing the information
+available on the net is likely to be appreciated. For
+example, before the standard @sc{cvs} distribution
+worked on Windows 95, there was a web page with some
+explanation and patches for running @sc{cvs} on Windows
+95, and various people helped out by mentioning this
+page on mailing lists or newsgroups when the subject
+came up.
+
+@item
+It is also possible to report bugs to @code{bug-cvs}.
+Note that someone may or may not want to do anything
+with your bug report---if you need a solution consider
+one of the options mentioned above. People probably do
+want to hear about bugs which are particularly severe
+in consequences and/or easy to fix, however. You can
+also increase your odds by being as clear as possible
+about the exact nature of the bug and any other
+relevant information. The way to report bugs is to
+send email to @code{bug-cvs@@gnu.org}. Note
+that submissions to @code{bug-cvs} may be distributed
+under the terms of the @sc{gnu} Public License, so if
+you don't like this, don't submit them. There is
+usually no justification for sending mail directly to
+one of the @sc{cvs} maintainers rather than to
+@code{bug-cvs}; those maintainers who want to hear
+about such bug reports read @code{bug-cvs}. Also note
+that sending a bug report to other mailing lists or
+newsgroups is @emph{not} a substitute for sending it to
+@code{bug-cvs}. It is fine to discuss @sc{cvs} bugs on
+whatever forum you prefer, but there are not
+necessarily any maintainers reading bug reports sent
+anywhere except @code{bug-cvs}.
+@end itemize
+
+@cindex Known bugs in this manual or CVS
+People often ask if there is a list of known bugs or
+whether a particular bug is a known one. The file
+@sc{bugs} in the @sc{cvs} source distribution is one
+list of known bugs, but it doesn't necessarily try to
+be comprehensive. Perhaps there will never be a
+comprehensive, detailed list of known bugs.
+
+@c ---------------------------------------------------------------------
@node Copying
@appendix GNU GENERAL PUBLIC LICENSE
@center Version 2, June 1991
diff --git a/contrib/cvs/doc/cvsclient.texi b/contrib/cvs/doc/cvsclient.texi
index d0aac35..f81ff92 100644
--- a/contrib/cvs/doc/cvsclient.texi
+++ b/contrib/cvs/doc/cvsclient.texi
@@ -15,9 +15,10 @@ means.
@menu
* Introduction:: What is CVS and what is the client/server protocol for?
* Goals:: Basic design decisions, requirements, scope, etc.
-* Protocol Notes:: Possible enhancements, limitations, etc. of the protocol
* Connection and Authentication:: Various ways to connect to the server
+* Password scrambling:: Scrambling used by pserver
* Protocol:: Complete description of the protocol
+* Protocol Notes:: Possible enhancements, limitations, etc. of the protocol
@end menu
@node Introduction
@@ -111,80 +112,19 @@ current @sc{cvs} server) will make sure that it does not have any such
locks in place whenever it is waiting for communication with the client;
this prevents one client on a slow or flaky network from interfering
with the work of others.
-@end itemize
-
-@node Protocol Notes
-@chapter Notes on the Protocol
-A number of enhancements are possible:
-
-@itemize @bullet
@item
-The @code{Modified} request could be speeded up by sending diffs rather
-than entire files. The client would need some way to keep the version
-of the file which was originally checked out; probably requiring the use
-of "cvs edit" in this case is the most sensible course (the "cvs edit"
-could be handled by a package like VC for emacs). This would also allow
-local operation of @code{cvs diff} without arguments.
-
-@item
-Have the client keep a copy of some part of the repository. This allows
-all of @code{cvs diff} and large parts of @code{cvs update} and
-@code{cvs ci} to be local. The local copy could be made consistent with
-the master copy at night (but if the master copy has been updated since
-the latest nightly re-sync, then it would read what it needs to from the
-master).
-
-It isn't clear exactly how this should relate to a more general
-multisite feature (in which one can modify the local copy even if the
-network is down between the local and the master, and then they get
-reconciled by a potentially manual process). Another variant of a
-multisite feature would be where version history is cached to speed up
-operations such as @code{cvs diff}, but in which checkins still must be
-checked in to all sites, or to a master site.
-
-@item
-The current procedure for @code{cvs update} is highly sub-optimal if
-there are many modified files. One possible alternative would be to
-have the client send a first request without the contents of every
-modified file, then have the server tell it what files it needs. Note
-the server needs to do the what-needs-to-be-updated check twice (or
-more, if changes in the repository mean it has to ask the client for
-more files), because it can't keep locks open while waiting for the
-network. Perhaps this whole thing is irrelevant if client-side
-repositories are implemented, and the rcsmerge is done by the client.
-
-@item
-The fact that @code{pserver} requires an extra network turnaround in
-order to perform authentication would be nice to avoid. This relates to
-the issue of reporting errors; probably the clean solution is to defer
-the error until the client has issued a request which expects a
-response. To some extent this might relate to the next item (in terms
-of how easy it is to skip a whole bunch of requests until we get to one
-that expects a response). I know that the kerberos code doesn't wait in
-this fashion, but that probably can cause network deadlocks and perhaps
-future problems running over a transport which is more transaction
-oriented than TCP. On the other hand I'm not sure it is wise to make
-the client conduct a lengthy upload only to find there is an
-authentication failure.
-
-@item
-The protocol uses an extra network turnaround for protocol negotiation
-(@code{valid-requests}). It might be nice to avoid this by having the
-client be able to send requests and tell the server to ignore them if
-they are unrecognized (different requests could produce a fatal error if
-unrecognized). To do this there should be a standard syntax for
-requests. For example, perhaps all future requests should be a single
-line, with mechanisms analogous to @code{Argumentx}, or several requests
-working together, to provide greater amounts of information. Or there
-might be a standard mechanism for counted data (analogous to that used
-by @code{Modified}) or continuation lines (like a generalized
-@code{Argumentx}). It would be useful to compare what HTTP is planning
-in this area; last I looked they were contemplating something called
-Protocol Extension Protocol but I haven't looked at the relevant IETF
-documents in any detail. Obviously, we want something as simple as
-possible (but no simpler).
-
+It is a general design goal to provide only one way to do a given
+operation (where possible). For example, implementations have no choice
+about whether to terminate lines with linefeeds or some other
+character(s), and request and response names are case-sensitive. This
+is to enhance interoperability. If a protocol allows more than one way
+to do something, it is all too easy for some implementations to support
+only some of them (perhaps accidentally).
+@c I vaguely remember reading, probably in an RFC, about the problems
+@c that were caused when some people decided that SMTP should accept
+@c other line termination (in the message ("DATA")?) than CRLF. However, I
+@c can't seem to track down the reference.
@end itemize
@node Connection and Authentication
@@ -209,60 +149,191 @@ by having inetd call "cvs kserver") which defaults to 1999. The client
connects, sends the usual kerberos authentication information, and then
starts the cvs protocol. Note: port 1999 is officially registered for
another use, and in any event one cannot register more than one port for
-CVS, so the kerberized client and server should be changed to use port
-2401 (see below), and send a different string in place of @samp{BEGIN
-AUTH REQUEST} to identify the authentication method in use. However,
-noone has yet gotten around to implementing this.
+CVS, so GSS-API (see below) is recommended instead of kserver as a way
+to support kerberos.
@item pserver
-The password authenticated server listens on a port (in the current
+The name @dfn{pserver} is somewhat confusing. It refers to both a
+generic framework which allows the CVS protocol to support several
+authentication mechanisms, and a name for a specific mechanism which
+transfers a username and a cleartext password. Servers need not support
+all mechanisms, and in fact servers will typically want to support only
+those mechanisms which meet the relevant security needs.
+
+The pserver server listens on a port (in the current
implementation, by having inetd call "cvs pserver") which defaults to
2401 (this port is officially registered). The client
-connects, sends the string @samp{BEGIN AUTH REQUEST}, a linefeed, the
-cvs root, a linefeed, the username, a linefeed, the password trivially
-encoded (see scramble.c in the cvs sources), a linefeed, the string
-@samp{END AUTH REQUEST}, and a linefeed. The client must send the
+connects, and sends the following:
+
+@itemize @bullet
+@item
+the string @samp{BEGIN AUTH REQUEST}, a linefeed,
+@item
+the cvs root, a linefeed,
+@item
+the username, a linefeed,
+@item
+the password trivially encoded (see @ref{Password scrambling}), a
+linefeed,
+@item
+the string @samp{END AUTH REQUEST}, and a linefeed.
+@end itemize
+
+The client must send the
identical string for cvs root both here and later in the
@code{Root} request of the cvs
protocol itself. Servers are encouraged to enforce this restriction.
-The server responds with
-@samp{I LOVE YOU} and a linefeed if the authentication is successful or
-@samp{I HATE YOU} and a linefeed if the authentication fails. After
-receiving @samp{I LOVE YOU}, the client proceeds with the cvs protocol.
+The possible server responses (each of which is followed by a linefeed)
+are the following. Note that although there is a small similarity
+between this authentication protocol and the cvs protocol, they are
+separate.
+
+@table @code
+@item I LOVE YOU
+The authentication is successful. The client proceeds with the cvs
+protocol itself.
+
+@item I HATE YOU
+The authentication fails. After sending this response, the server may
+close the connection. It is up to the server to decide whether to give
+this response, which is generic, or a more specific response using
+@samp{E} and/or @samp{error}.
+
+@item E @var{text}
+Provide a message for the user. After this reponse, the authentication
+protocol continues with another response. Typically the server will
+provide a series of @samp{E} responses followed by @samp{error}.
+Compatibility note: @sc{cvs} 1.9.10 and older clients will print
+@code{unrecognized auth response} and @var{text}, and then exit, upon
+receiving this response.
+
+@item error @var{code} @var{text}
+The authentication fails. After sending this response, the server may
+close the connection. The @var{code} is a code describing why it
+failed, intended for computer consumption. The only code currently
+defined is @samp{0} which is nonspecific, but clients must silently
+treat any unrecognized codes as nonspecific.
+The @var{text} should be supplied to the
+user. Compatibility note: @sc{cvs} 1.9.10 and older clients will print
+@code{unrecognized auth response} and @var{text}, and then exit, upon
+receiving this response.
+@end table
+
+@c If you are thinking of putting samp or code around BEGIN AUTH REQUEST
+@c and friends, watch for overfull hboxes.
If the client wishes to merely authenticate without starting the cvs
-protocol, the procedure is the same, except @samp{BEGIN AUTH REQUEST} is
-replaced with @samp{BEGIN VERIFICATION REQUEST}, @samp{END AUTH REQUEST}
-is replaced with @samp{END VERIFICATION REQUEST}, and upon receipt of
-@samp{I LOVE YOU} the connection is closed rather than continuing.
+protocol, the procedure is the same, except BEGIN AUTH REQUEST is
+replaced with BEGIN VERIFICATION REQUEST, END AUTH REQUEST
+is replaced with END VERIFICATION REQUEST, and upon receipt of
+I LOVE YOU the connection is closed rather than continuing.
+
+Another mechanism is GSSAPI authentication. GSSAPI is a
+generic interface to security services such as kerberos. GSSAPI is
+specified in RFC2078 (GSSAPI version 2) and RFC1508 (GSSAPI version 1);
+we are not aware of differences between the two which affect the
+protocol in incompatible ways, so we make no attempt to specify one
+version or the other.
+The procedure here is to start with @samp{BEGIN
+GSSAPI REQUEST}. GSSAPI authentication information is then exchanged
+between the client and the server. Each packet of information consists
+of a two byte big endian length, followed by that many bytes of data.
+After the GSSAPI authentication is complete, the server continues with
+the responses described above (@samp{I LOVE YOU}, etc.).
@item future possibilities
There are a nearly unlimited number of ways to connect and authenticate.
One might want to allow access based on IP address (similar to the usual
rsh protocol but with different/no restrictions on ports < 1024), to
-adopt mechanisms such as the General Security Service (GSS) API or
-Pluggable Authentication Modules (PAM), to allow users to run their own
-servers under their own usernames without root access, or any number of
-other possibilities. The way to add future mechanisms, for the most
-part, should be to continue to use port 2401, but to use different
-strings in place of @samp{BEGIN AUTH REQUEST}.
+adopt mechanisms such as Pluggable Authentication Modules (PAM), to
+allow users to run their own servers under their own usernames without
+root access, or any number of other possibilities. The way to add
+future mechanisms, for the most part, should be to continue to use port
+2401, but to use different strings in place of @samp{BEGIN AUTH
+REQUEST}.
@end table
+@node Password scrambling
+@chapter Password scrambling algorithm
+
+The pserver authentication protocol, as described in @ref{Connection and
+Authentication}, trivially encodes the passwords. This is only to
+prevent inadvertent compromise; it provides no protection against even a
+relatively unsophisticated attacker. For comparison, HTTP Basic
+Authentication (as described in RFC2068) uses BASE64 for a similar
+purpose. CVS uses its own algorithm, described here.
+
+The scrambled password starts with @samp{A}, which serves to identify
+the scrambling algorithm in use. After that follows a single octet for
+each character in the password, according to a fixed encoding. The
+values are shown here, with the encoded values in decimal. Control
+characters, space, and characters outside the invariant ISO 646
+character set are not shown; such characters are not recommended for use
+in passwords. There is a long discussion of character set issues in
+@ref{Protocol Notes}.
+
+@example
+ 0 111 P 125 p 58
+! 120 1 52 A 57 Q 55 a 121 q 113
+" 53 2 75 B 83 R 54 b 117 r 32
+ 3 119 C 43 S 66 c 104 s 90
+ 4 49 D 46 T 124 d 101 t 44
+% 109 5 34 E 102 U 126 e 100 u 98
+& 72 6 82 F 40 V 59 f 69 v 60
+' 108 7 81 G 89 W 47 g 73 w 51
+( 70 8 95 H 38 X 92 h 99 x 33
+) 64 9 65 I 103 Y 71 i 63 y 97
+* 76 : 112 J 45 Z 115 j 94 z 62
++ 67 ; 86 K 50 k 93
+, 116 < 118 L 42 l 39
+- 74 = 110 M 123 m 37
+. 68 > 122 N 91 n 61
+/ 87 ? 105 O 35 _ 56 o 48
+@end example
+
@node Protocol
@chapter The CVS client/server protocol
-In the following, @samp{\n} refers to a linefeed and @samp{\t} refers
-to a horizontal tab.
-
+In the following, @samp{\n} refers to a linefeed and @samp{\t} refers to
+a horizontal tab; @dfn{requests} are what the client sends and
+@dfn{responses} are what the server sends. In general, the connection is
+governed by the client---the server does not send responses without
+first receiving requests to do so; see @ref{Response intro} for more
+details of this convention.
+
+It is typical, early in the connection, for the client to transmit a
+@code{Valid-responses} request, containing all the responses it
+supports, followed by a @code{valid-requests} request, which elicits
+from the server a @code{Valid-requests} response containing all the
+requests it understands. In this way, the client and server each find
+out what the other supports before exchanging large amounts of data
+(such as file contents).
+
+@c Hmm, having 3 sections in this menu makes a certain amount of sense
+@c but that structure gets lots in the printed manual (not sure about
+@c HTML). Perhaps there is a better way.
@menu
-* Entries Lines::
-* Modes::
+
+General protocol conventions:
+
+* Entries Lines:: Transmitting RCS data
+* File Modes:: Read, write, execute, and possibly more...
* Filenames:: Conventions regarding filenames
* File transmissions:: How file contents are transmitted
* Strings:: Strings in various requests and responses
-* Requests::
-* Responses::
-* Example::
-* Requirements::
+
+The protocol itself:
+
+* Request intro:: General conventions relating to requests
+* Requests:: List of requests
+* Response intro:: General conventions relating to responses
+* Response pathnames:: The "pathname" in responses
+* Responses:: List of responses
+* Text tags:: More details about the MT response
+
+An example session, and some further observations:
+
+* Example:: A conversation between client and server
+* Requirements:: Things not to omit from an implementation
* Obsolete:: Former protocol features
@end menu
@@ -290,8 +361,16 @@ conflicts in it. The rest of @var{conflict} is @samp{=} if the
timestamp matches the file, or anything else if it doesn't. If
@var{conflict} does not start with a @samp{+}, it is silently ignored.
-@node Modes
-@section Modes
+@var{options} signifies the keyword expansion options (for example
+@samp{-ko}). In an @code{Entry} request, this indicates the options
+that were specified with the file from the previous file updating
+response (@pxref{Response intro}, for a list of file updating
+responses); if the client is specifying the @samp{-k} or @samp{-A}
+option to @code{update}, then it is the server which figures out what
+overrides what.
+
+@node File Modes
+@section File Modes
A mode is any number of repetitions of
@@ -389,8 +468,8 @@ existing practice is probably to just transmit whatever the user
specifies, and hope that everyone involved agrees which character set is
in use, or sticks to a common subset.
-@node Requests
-@section Requests
+@node Request intro
+@section Request intro
By convention, requests which begin with a capital letter do not elicit
a response from the server, while all others do -- save one. The
@@ -398,6 +477,11 @@ exception is @samp{gzip-file-contents}. Unrecognized requests will
always elicit a response from the server, even if that request begins
with a capital letter.
+@node Requests
+@section Requests
+
+Here are the requests:
+
@table @code
@item Root @var{pathname} \n
Response expected: no. Tell the server which @code{CVSROOT} to use.
@@ -408,6 +492,10 @@ already exist; if creating a new root, use the @code{init} request, not
server, how to access the server, etc.; by the time the CVS protocol is
in use, connection, authentication, etc., are already taken care of.
+The @code{Root} request must be sent only once, and it must be sent
+before any requests other than @code{Valid-responses},
+@code{valid-requests}, @code{UseUnchanged}, or @code{init}.
+
@item Valid-responses @var{request-list} \n
Response expected: no.
Tell the server what responses the client will accept.
@@ -426,8 +514,7 @@ also for @code{ci} and the other commands; normal usage is to send
@code{Directory} for each directory in which there will be an
@code{Entry} or @code{Modified}, and then a final @code{Directory}
for the original directory, then the command.
-If the client uses this request, it affects the way the server returns
-pathnames; see @ref{Responses}. @var{local-directory} is relative to
+The @var{local-directory} is relative to
the top level at which the command is occurring (i.e. the last
@code{Directory} which is sent before the command);
to indicate that top level, @samp{.} should be send for
@@ -549,6 +636,15 @@ sent for the same file, @code{Entry} must be sent first. For a
given file, one can send @code{Modified}, @code{Is-modified}, or
@code{Unchanged}, but not more than one of these three.
+@item Kopt @var{option} \n
+This indicates to the server which keyword expansion options to use for
+the file specified by the next @code{Modified} or @code{Is-modified}
+request (for example @samp{-kb} for a binary file). This is similar to
+@code{Entry}, but is used for a file for which there is no entries line.
+Typically this will be a file being added via an @code{add} or
+@code{import} request. The client may not send both @code{Kopt} and
+@code{Entry} for the same file.
+
@item Modified @var{filename} \n
Response expected: no. Additional data: mode, \n, file transmission.
Send the server a copy of one locally modified file. @var{filename} is
@@ -703,6 +799,38 @@ the client and server encrypt the compressed data, as opposed to
compressing the encrypted data. Encrypted data is generally
incompressible.
+Note that this request does not fully prevent an attacker from hijacking
+the connection, in the sense that it does not prevent hijacking the
+connection between the initial authentication and the
+@code{Kerberos-encrypt} request.
+
+@item Gssapi-encrypt \n
+Response expected: no.
+Use GSSAPI encryption to encrypt all further communication between the
+client and the server. This will only work if the connection was made
+over GSSAPI in the first place. See @code{Kerberos-encrypt}, above, for
+the relation between @code{Gssapi-encrypt} and @code{Gzip-stream}.
+
+Note that this request does not fully prevent an attacker from hijacking
+the connection, in the sense that it does not prevent hijacking the
+connection between the initial authentication and the
+@code{Gssapi-encrypt} request.
+
+@item Gssapi-authenticate \n
+Response expected: no.
+Use GSSAPI authentication to authenticate all further communication
+between the client and the server. This will only work if the
+connection was made over GSSAPI in the first place. Encrypted data is
+automatically authenticated, so using both @code{Gssapi-authenticate}
+and @code{Gssapi-encrypt} has no effect beyond that of
+@code{Gssapi-encrypt}. Unlike encrypted data, it is reasonable to
+compress authenticated data.
+
+Note that this request does not fully prevent an attacker from hijacking
+the connection, in the sense that it does not prevent hijacking the
+connection between the initial authentication and the
+@code{Gssapi-authenticate} request.
+
@item Set @var{variable}=@var{value} \n
Response expected: no.
Set a user variable @var{variable} to @var{value}.
@@ -766,7 +894,6 @@ directory.
@itemx log \n
@itemx remove \n
@itemx admin \n
-@itemx export \n
@itemx history \n
@itemx watchers \n
@itemx editors \n
@@ -788,6 +915,19 @@ correspond to except by (1) just sending the @code{co} request, and then
seeing what directory names the server sends back in its responses, and
(2) the @code{expand-modules} request.
+@item export \n
+Response expected: yes. Get files from the repository. This uses any
+previous @code{Argument}, @code{Directory}, @code{Entry}, or
+@code{Modified} requests, if they have been sent. Arguments to this
+command are module names, as described for the @code{co} request. The
+intention behind this command is that a client can get sources from a
+server without storing CVS information about those sources. That is, a
+client probably should not count on being able to take the entries line
+returned in the @code{Created} response from an @code{export} request
+and send it in a future @code{Entry} request. Note that the entries
+line in the @code{Created} response must indicate whether the file is
+binary or text, so the client can create it correctly.
+
@item rdiff \n
@itemx rtag \n
Response expected: yes. Actually do a cvs command. This uses any
@@ -882,17 +1022,17 @@ to perform a few more checks.
The client sends a subsequent @code{ci} to actually add the file to the
repository.
-Another quirk of the @code{add} request is that a pathname specified in
+Another quirk of the @code{add} request is that with CVS 1.9 and older,
+a pathname specified in
an @code{Argument} request cannot contain @samp{/}. There is no good
-reason for this restriction, and it could be eliminated if someone took
-the effort to rewrite the @code{add} code in the CVS server to not have
-it. But in the meantime, the way to comply with it is to ensure that
+reason for this restriction, and in fact more recent CVS servers don't
+have it.
+But the way to interoperate with the older servers is to ensure that
all @code{Directory} requests for @code{add} (except those used to add
directories, as described above), use @samp{.} for
@var{local-directory}. Specifying another string for
@var{local-directory} may not get an error, but it will get you strange
-@code{Checked-in} responses, until servers are fixed to send the correct
-responses.
+@code{Checked-in} responses from the buggy servers.
@item watch-on \n
@itemx watch-off \n
@@ -951,8 +1091,8 @@ a previous command which doesn't expect a response produced an error.
When the client is done, it drops the connection.
-@node Responses
-@section Responses
+@node Response intro
+@section Introduction to Responses
After a command which expects a response, the server sends however many
of the following responses are appropriate. The server should not send
@@ -960,9 +1100,31 @@ data at other times (the current implementation may violate this
principle in a few minor places, where the server is printing an error
message and exiting---this should be investigated further).
+Any set of responses always ends with @samp{error} or @samp{ok}. This
+indicates that the response is over.
+
+@c "file updating response" and "file update modifying response" are
+@c lame terms (mostly because they are so awkward). Any better ideas?
+The responses @code{Checked-in}, @code{New-entry}, @code{Updated},
+@code{Created}, @code{Update-existing}, @code{Merged}, and
+@code{Patched} are refered to as @dfn{file updating} responses, because
+they change the status of a file in the working directory in some way.
+The responses @code{Mode}, @code{Mod-time}, and @code{Checksum} are
+referred to as @dfn{file update modifying} responses because they modify
+the next file updating response. In no case shall a file update
+modifying response apply to a file updating response other than the next
+one. Nor can the same file update modifying response occur twice for
+a given file updating response (if servers diagnose this problem, it may
+aid in detecting the case where clients send an update modifying
+response without following it by a file updating response).
+
+@node Response pathnames
+@section The "pathname" in responses
+
+Many of the responses contain something called @var{pathname}.
@c FIXME: should better document when the specified repository needs to
@c end in "/.".
-In the following, @var{pathname} actually indicates a pair of
+The name is somewhat misleading; it actually indicates a pair of
pathnames. First, a local directory name
relative to the directory in which the command was given (i.e. the last
@code{Directory} before the command). Then a linefeed and a repository
@@ -1001,8 +1163,10 @@ greatly by only telling the client to create directories if the
directory in question should exist, but until servers do this, clients
will need to offer the @samp{-P} behavior described above.
-Any response always ends with @samp{error} or @samp{ok}. This indicates
-that the response is over.
+@node Responses
+@section Responses
+
+Here are the responses:
@table @code
@item Valid-requests @var{request-list} \n
@@ -1096,13 +1260,14 @@ only support @code{Patched}.
@item Mode @var{mode} \n
This @var{mode} applies to the next file mentioned in
-@code{Checked-in}. It does not apply to any request which follows a
-@code{Checked-in}, @code{New-entry}, @code{Updated}, @code{Merged}, or
-@code{Patched} response.
+@code{Checked-in}. @code{Mode} is a file update modifying response
+as described in @ref{Response intro}.
@item Mod-time @var{time} \n
-Set the modification time of the next file sent to @var{time}. Next
-file sent means sent by @code{Checked-in}, @code{Created}, etc. The
+Set the modification time of the next file sent to @var{time}.
+@code{Mod-time} is a file update modifying response
+as described in @ref{Response intro}.
+The
@var{time} is in the format specified by RFC822 as modified by RFC1123.
The server may specify any timezone it chooses; clients will want to
convert that to their own timezone as appropriate. An example of this
@@ -1118,13 +1283,16 @@ synchronized. The server just sends its recommendation for a timestamp
it (this means that the time might be in the future, for example).
@item Checksum @var{checksum}\n
-The @var{checksum} applies to the next file sent over via
-@code{Updated}, @code{Merged}, or @code{Patched}. In the case of
+The @var{checksum} applies to the next file sent (that is,
+@code{Checksum} is a file update modifying response
+as described in @ref{Response intro}).
+In the case of
@code{Patched}, the checksum applies to the file after being patched,
not to the patch itself. The client should compute the checksum itself,
after receiving the file or patch, and signal an error if the checksums
do not match. The checksum is the 128 bit MD5 checksum represented as
-32 hex digits. This response is optional, and is only used if the
+32 hex digits (MD5 is described in RFC1321).
+This response is optional, and is only used if the
client supports it (as judged by the @code{Valid-responses} request).
@item Copy-file @var{pathname} \n
@@ -1194,7 +1362,8 @@ request; if there are several @code{Notify} requests for a single file,
the requests should be processed in order; the first @code{Notified}
response pertains to the first @code{Notify} request, etc.
-@item Module-expansion @var{pathname} \n Return a file or directory
+@item Module-expansion @var{pathname} \n
+Return a file or directory
which is included in a particular module. @var{pathname} is relative
to cvsroot, unlike most pathnames in responses. @var{pathname} should
be used to look and see whether some or all of the module exists on
@@ -1206,6 +1375,13 @@ contains the @samp{-d} option, it will be the directory specified with
@item M @var{text} \n
A one-line message for the user.
+@item Mbinary \n
+Additional data: file transmission (note: compressed file transmissions
+are not supported). This is like @samp{M}, except the contents of the
+file transmission are binary and should be copied to standard output
+without translation to local text file conventions. To transmit a text
+file to standard output, servers should use a series of @samp{M} requests.
+
@item E @var{text} \n
Same as @code{M} but send to stderr not stdout.
@@ -1217,6 +1393,77 @@ Flush stderr. That is, make it possible for the user to see what has
been written to stderr (it is up to the implementation to decide exactly
how far it should go to ensure this).
+@item MT @var{tagname} @var{data} \n
+
+This response provides for tagged text. It is similar to
+SGML/HTML/XML in that the data is structured and a naive application
+can also make some sense of it without understanding the structure.
+The syntax is not SGML-like, however, in order to fit into the CVS
+protocol better and (more importantly) to make it easier to parse,
+especially in a language like perl or awk.
+
+The @var{tagname} can have several forms. If it starts with @samp{a}
+to @samp{z} or @samp{A} to @samp{Z}, then it represents tagged text.
+If the implementation recognizes @var{tagname}, then it may interpret
+@var{data} in some particular fashion. If the implementation does not
+recognize @var{tagname}, then it should simply treat @var{data} as
+text to be sent to the user (similar to an @samp{M} response). There
+are two tags which are general purpose. The @samp{text} tag is
+similar to an unrecognized tag in that it provides text which will
+ordinarily be sent to the user. The @samp{newline} tag is used
+without @var{data} and indicates that a newline will ordinarily be
+sent to the user (there is no provision for embedding newlines in the
+@var{data} of other tagged text responses).
+
+If @var{tagname} starts with @samp{+} it indicates a start tag and if
+it starts with @samp{-} it indicates an end tag. The remainder of
+@var{tagname} should be the same for matching start and end tags, and
+tags should be nested (for example one could have tags in the
+following order @code{+bold} @code{+italic} @code{text} @code{-italic}
+@code{-bold} but not @code{+bold} @code{+italic} @code{text}
+@code{-bold} @code{-italic}). A particular start and end tag may be
+documented to constrain the tagged text responses which are valid
+between them.
+
+Note that if @var{data} is present there will always be exactly one
+space between @var{tagname} and @var{data}; if there is more than one
+space, then the spaces beyond the first are part of @var{data}.
+
+Here is an example of some tagged text responses. Note that there is
+a trailing space after @samp{Checking in} and @samp{initial revision:}
+and there are two trailing spaces after @samp{<--}. Such trailing
+spaces are, of course, part of @var{data}.
+
+@example
+MT +checking-in
+MT text Checking in
+MT fname gz.tst
+MT text ;
+MT newline
+MT rcsfile /home/kingdon/zwork/cvsroot/foo/gz.tst,v
+MT text <--
+MT fname gz.tst
+MT newline
+MT text initial revision:
+MT init-rev 1.1
+MT newline
+MT text done
+MT newline
+MT -checking-in
+@end example
+
+If the client does not support the @samp{MT} response, the same
+responses might be sent as:
+
+@example
+M Checking in gz.tst;
+M /home/kingdon/zwork/cvsroot/foo/gz.tst,v <-- gz.tst
+M initial revision: 1.1
+M done
+@end example
+
+For a list of specific tags, see @ref{Text tags}.
+
@item error @var{errno-code} @samp{ } @var{text} \n
The command completed with an error. @var{errno-code} is a symbolic
error code (e.g. @code{ENOENT}); if the server doesn't support this
@@ -1229,6 +1476,35 @@ strerror(), or any other message the server wants to use.
The command completed successfully.
@end table
+@node Text tags
+@section Tags for the MT tagged text response
+
+The @code{MT} response, as described in @ref{Responses}, offers a
+way for the server to send tagged text to the client. This section
+describes specific tags. The intention is to update this section as
+servers add new tags.
+
+In the following descriptions, @code{text} and @code{newline} tags are
+omitted. Such tags contain information which is intended for users (or
+to be discarded), and are subject to change at the whim of the server.
+To avoid being vulnerable to such whim, clients should look for the tags
+listed here, not @code{text}, @code{newline}, or other tags.
+
+The following tag means to indicate to the user that a file has been
+updated. It is more or less redundant with the @code{Created} and
+@code{Update-existing} responses, but we don't try to specify here
+whether it occurs in exactly the same circumstances as @code{Created}
+and @code{Update-existing}. The @var{name} is the pathname of the file
+being updated relative to the directory in which the command is
+occurring (that is, the last @code{Directory} request which is sent
+before the command).
+
+@example
+MT +updated
+MT fname @var{name}
+MT -updated
+@end example
+
@node Example
@section Example
@@ -1236,9 +1512,9 @@ The command completed successfully.
@c other RFC's). In other formatting concerns, we might want to think
@c about whether there is an easy way to provide RFC1543 formatting
@c (without negating the advantages of texinfo), and whether we should
-@c use RFC822-style BNF (I fear that would be less clear than
-@c what we do now, however). Plus what about IETF terminology (SHOULD,
-@c MUST, etc.) or ISO terminology (shall, should, or whatever they are)?
+@c use RFC2234 BNF (I fear that would be less clear than
+@c what we do now, however). Plus what about RFC2119 terminology (MUST,
+@c SHOULD, &c) or ISO terminology (shall, should, or whatever they are)?
Here is an example; lines are prefixed by @samp{C: } to indicate the
client sends them or @samp{S: } to indicate the server sends them.
@@ -1410,4 +1686,102 @@ working directory, and the meaning of sending @code{Entries} without
@code{Lost} or @code{Modified} was different. All current clients (CVS
1.5 and later) will send @code{UseUnchanged} if it is supported.
+@node Protocol Notes
+@chapter Notes on the Protocol
+
+A number of enhancements are possible. Also see the file @sc{todo} in
+the @sc{cvs} source distribution, which has further ideas concerning
+various aspects of @sc{cvs}, some of which impact the protocol.
+
+@itemize @bullet
+@item
+The @code{Modified} request could be speeded up by sending diffs rather
+than entire files. The client would need some way to keep the version
+of the file which was originally checked out; probably requiring the use
+of "cvs edit" in this case is the most sensible course (the "cvs edit"
+could be handled by a package like VC for emacs). This would also allow
+local operation of @code{cvs diff} without arguments.
+
+@item
+The current procedure for @code{cvs update} is highly sub-optimal if
+there are many modified files. One possible alternative would be to
+have the client send a first request without the contents of every
+modified file, then have the server tell it what files it needs. Note
+the server needs to do the what-needs-to-be-updated check twice (or
+more, if changes in the repository mean it has to ask the client for
+more files), because it can't keep locks open while waiting for the
+network. Perhaps this whole thing is irrelevant if there is a multisite
+capability (as noted in @sc{todo}), and therefore the rcsmerge can be
+done with a repository which is connected via a fast connection.
+
+@item
+The fact that @code{pserver} requires an extra network turnaround in
+order to perform authentication would be nice to avoid. This relates to
+the issue of reporting errors; probably the clean solution is to defer
+the error until the client has issued a request which expects a
+response. To some extent this might relate to the next item (in terms
+of how easy it is to skip a whole bunch of requests until we get to one
+that expects a response). I know that the kerberos code doesn't wait in
+this fashion, but that probably can cause network deadlocks and perhaps
+future problems running over a transport which is more transaction
+oriented than TCP. On the other hand I'm not sure it is wise to make
+the client conduct a lengthy upload only to find there is an
+authentication failure.
+
+@item
+The protocol uses an extra network turnaround for protocol negotiation
+(@code{valid-requests}). It might be nice to avoid this by having the
+client be able to send requests and tell the server to ignore them if
+they are unrecognized (different requests could produce a fatal error if
+unrecognized). To do this there should be a standard syntax for
+requests. For example, perhaps all future requests should be a single
+line, with mechanisms analogous to @code{Argumentx}, or several requests
+working together, to provide greater amounts of information. Or there
+might be a standard mechanism for counted data (analogous to that used
+by @code{Modified}) or continuation lines (like a generalized
+@code{Argumentx}). It would be useful to compare what HTTP is planning
+in this area; last I looked they were contemplating something called
+Protocol Extension Protocol but I haven't looked at the relevant IETF
+documents in any detail. Obviously, we want something as simple as
+possible (but no simpler).
+
+@item
+The scrambling algorithm in the CVS client and server actually support
+more characters than those documented in @ref{Password scrambling}.
+Someday we are going to either have to document them all (but this is
+not as easy as it may look, see below), or (gradually and with adequate
+process) phase out the support for other characters in the CVS
+implementation. This business of having the feature partly undocumented
+isn't a desirable state long-term.
+
+The problem with documenting other characters is that unless we know
+what character set is in use, there is no way to make a password
+portable from one system to another. For example, a with a circle on
+top might have different encodings in different character sets.
+
+It @emph{almost} works to say that the client picks an arbitrary,
+unknown character set (indeed, having the CVS client know what character
+set the user has in mind is a hard problem otherwise), and scrambles
+according to a certain octet<->octet mapping. There are two problems
+with this. One is that the protocol has no way to transmit character 10
+decimal (linefeed), and the current server and clients have no way to
+handle 0 decimal (NUL). This may cause problems with certain multibyte
+character sets, in which octets 10 and 0 will appear in the middle of
+other characters. The other problem, which is more minor and possibly
+not worth worrying about, is that someone can type a password on one
+system and then go to another system which uses a different encoding for
+the same characters, and have their password not work.
+
+The restriction to the ISO646 invariant subset is the best approach for
+strings which are not particularly significant to users. Passwords are
+visible enough that this is somewhat doubtful as applied here. ISO646
+does, however, have the virtue (!?) of offending everyone. It is easy
+to say "But the $ is right on people's keyboards! Surely we can't
+forbid that". From a human factors point of view, that makes quite a
+bit of sense. The contrary argument, of course, is that a with a circle
+on top, or some of the characters poorly handled by Unicode, are on
+@emph{someone}'s keyboard.
+
+@end itemize
+
@bye
OpenPOWER on IntegriCloud