cvs.texi(,2) @comment Documentation for CVS.
cvs.texi(,3) @setfilename cvs.info
cvs.texi(,4) @macro copyleftnotice
cvs.texi(,5) @noindent
cvs.texi(,6) Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
cvs.texi(,7)                        2001, 2002, 2003 Free Software Foundation, Inc.
cvs.texi(,8) 
cvs.texi(,9) @multitable @columnfractions .12 .88
cvs.texi(,10) @item Portions
cvs.texi(,11) @item @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003 Derek R. Price,
cvs.texi(,12) @item @tab Copyright @copyright{} 2002, 2003 Ximbiot <http://ximbiot.com>,
cvs.texi(,13) @item @tab Copyright @copyright{} 1992, 1993, 1999 Signum Support AB,
cvs.texi(,14) @item @tab and Copyright @copyright{} others.
cvs.texi(,15) @end multitable
cvs.texi(,16) 
cvs.texi(,17) @ignore
cvs.texi(,18) Permission is granted to process this file through Tex and print the
cvs.texi(,19) results, provided the printed document carries copying permission
cvs.texi(,20) notice identical to this one except for the removal of this paragraph
cvs.texi(,21) (this paragraph not being relevant to the printed manual).
cvs.texi(,22) 
cvs.texi(,23) @end ignore
cvs.texi(,24) Permission is granted to make and distribute verbatim copies of
cvs.texi(,25) this manual provided the copyright notice and this permission notice
cvs.texi(,26) are preserved on all copies.
cvs.texi(,27) 
cvs.texi(,28) Permission is granted to copy and distribute modified versions of this
cvs.texi(,29) manual under the conditions for verbatim copying, provided also that the
cvs.texi(,30) entire resulting derived work is distributed under the terms of a
cvs.texi(,31) permission notice identical to this one.
cvs.texi(,32) 
cvs.texi(,33) Permission is granted to copy and distribute translations of this manual
cvs.texi(,34) into another language, under the above conditions for modified versions,
cvs.texi(,35) except that this permission notice may be stated in a translation
cvs.texi(,36) approved by the Free Software Foundation.
cvs.texi(,37) @end macro
cvs.texi(,38) 
cvs.texi(,39) @comment This file is part of the CVS distribution.
cvs.texi(,40) 
cvs.texi(,41) @comment CVS is free software; you can redistribute it and/or modify
cvs.texi(,42) @comment it under the terms of the GNU General Public License as published by
cvs.texi(,43) @comment the Free Software Foundation; either version 2, or (at your option)
cvs.texi(,44) @comment any later version.
cvs.texi(,45) 
cvs.texi(,46) @comment CVS is distributed in the hope that it will be useful,
cvs.texi(,47) @comment but WITHOUT ANY WARRANTY; without even the implied warranty of
cvs.texi(,48) @comment MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
cvs.texi(,49) @comment GNU General Public License for more details.
cvs.texi(,50) 
cvs.texi(,51) @c See ../README for A4 vs. US letter size.
cvs.texi(,52) @c When we provided A4 postscript, and people tried to
cvs.texi(,53) @c print it on US letter, the usual complaint was that the
cvs.texi(,54) @c page numbers would get cut off.
cvs.texi(,55) @c If one prints US letter on A4, reportedly there is
cvs.texi(,56) @c some extra space at the top and/or bottom, and the side
cvs.texi(,57) @c margins are a bit narrow, but no text is lost.
cvs.texi(,58) @c
cvs.texi(,59) @c See
cvs.texi(,60) @c http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html
cvs.texi(,61) @c for more on paper sizes.  Insuring that margins are
cvs.texi(,62) @c big enough to print on either A4 or US letter does
cvs.texi(,63) @c indeed seem to be the usual approach (RFC2346).
cvs.texi(,64) 
cvs.texi(,65) @c This document seems to get overfull hboxes with some
cvs.texi(,66) @c frequency (probably because the tendency is to
cvs.texi(,67) @c sanity-check it with "make info" and run TeX less
cvs.texi(,68) @c often).  The big ugly boxes just seem to add insult
cvs.texi(,69) @c to injury, and I'm not aware of them helping to fix
cvs.texi(,70) @c the overfull hboxes at all.
cvs.texi(,71) @finalout
cvs.texi(,72) 
version.texi(,1) @set UPDATED 28 March 2002
version.texi(,2) @set UPDATED-MONTH March 2002
version.texi(,3) @set EDITION 4.2
version.texi(,4) @set VERSION 4.2
cvs.texi(,74) @settitle CVS---Concurrent Versions System v4.2
cvs.texi(,75) @setchapternewpage odd
cvs.texi(,76) 
cvs.texi(,77) @c -- TODO list:
cvs.texi(,78) @c -- Fix all lines that match "^@c -- "
cvs.texi(,79) @c -- Also places marked with FIXME should be manual
cvs.texi(,80) @c problems (as opposed to FIXCVS for CVS problems).
cvs.texi(,81) 
cvs.texi(,82) @c @splitrcskeyword{} is used to avoid keyword expansion.  It is replaced by
cvs.texi(,83) @c @asis when generating info and dvi, and by <i></i> in the generated html,
cvs.texi(,84) @c such that keywords are not expanded in the generated html. 
cvs.texi(,85) 
cvs.texi(,86) @macro splitrcskeyword {arg}
cvs.texi(,87)  \arg\
cvs.texi(,88) @end macro
cvs.texi(,89) 
cvs.texi(,95) 
cvs.texi(,101) 
cvs.texi(,107) 
cvs.texi(,108) @dircategory GNU Packages
cvs.texi(,109) @direntry
cvs.texi(,110) * CVS: (cvs).                   Concurrent Versions System
cvs.texi(,111) @end direntry
cvs.texi(,112) @dircategory Individual utilities
cvs.texi(,113) @direntry
cvs.texi(,114) * cvs: (cvs)CVS commands.       Concurrent Versions System
cvs.texi(,115) @end direntry
cvs.texi(,116) 
cvs.texi(,117) @comment The titlepage section does not appear in the Info file.
cvs.texi(,138) 
cvs.texi(,139) @comment ================================================================
cvs.texi(,140) @comment                   The real text starts here
cvs.texi(,141) @comment ================================================================
cvs.texi(,142) 
cvs.texi(,144) @c ---------------------------------------------------------------------
cvs.texi(,145) @node    Top
cvs.texi(,146) @top
cvs.texi(,147) 
cvs.texi(,148) This info manual describes how to use and administer
cvs.texi(,149) @sc{cvs} version 4.2.
cvs.texi(,151) 
cvs.texi(,155) 
cvs.texi(,156) @c This menu is pretty long.  Not sure how easily that
cvs.texi(,157) @c can be fixed (no brilliant ideas right away)...
cvs.texi(,158) @menu
cvs.texi(,159) * Overview::                    An introduction to CVS
cvs.texi(,160) * Repository::                  Where all your sources are stored
cvs.texi(,161) * Starting a new project::      Starting a project with CVS
cvs.texi(,162) * Revisions::                   Numeric and symbolic names for revisions
cvs.texi(,163) * Branching and merging::       Diverging/rejoining branches of development
cvs.texi(,164) * Recursive behavior::          CVS descends directories
cvs.texi(,165) * Adding and removing::         Adding/removing/renaming files/directories
cvs.texi(,166) * History browsing::            Viewing the history of files in various ways
cvs.texi(,167) 
cvs.texi(,168) CVS and the Real World.
cvs.texi(,169) -----------------------
cvs.texi(,170) * Binary files::                CVS can handle binary files
cvs.texi(,171) * Multiple developers::         How CVS helps a group of developers
cvs.texi(,172) * Revision management::         Policy questions for revision management
cvs.texi(,173) * Keyword substitution::        CVS can include the revision inside the file
cvs.texi(,174) * Tracking sources::            Tracking third-party sources
cvs.texi(,175) * Builds::                      Issues related to CVS and builds
cvs.texi(,176) * Special Files::		Devices, links and other non-regular files
cvs.texi(,177) 
cvs.texi(,178) References.
cvs.texi(,179) -----------
cvs.texi(,180) * CVS commands::                CVS commands share some things
cvs.texi(,181) * Invoking CVS::                Quick reference to CVS commands
cvs.texi(,182) * Administrative files::        Reference manual for the Administrative files
cvs.texi(,183) * Environment variables::       All environment variables which affect CVS
cvs.texi(,184) * Compatibility::               Upgrading CVS versions
cvs.texi(,185) * Troubleshooting::             Some tips when nothing works
cvs.texi(,186) * Credits::                     Some of the contributors to this manual
cvs.texi(,187) * BUGS::                        Dealing with bugs in CVS or this manual
cvs.texi(,188) * Index::                       Index
cvs.texi(,189) @end menu
cvs.texi(,190) 
cvs.texi(,191) @c ---------------------------------------------------------------------
cvs.texi(,192) @node Overview
cvs.texi(,193) @chapter Overview
cvs.texi(,194) @cindex Overview
cvs.texi(,195) 
cvs.texi(,196) This chapter is for people who have never used
cvs.texi(,197) @sc{cvs}, and perhaps have never used version control
cvs.texi(,198) software before.
cvs.texi(,199) 
cvs.texi(,200) If you are already familiar with @sc{cvs} and are just
cvs.texi(,201) trying to learn a particular feature or remember a
cvs.texi(,202) certain command, you can probably skip everything here.
cvs.texi(,203) 
cvs.texi(,204) @menu
cvs.texi(,205) * What is CVS?::                What you can do with @sc{cvs}
cvs.texi(,206) * What is CVS not?::            Problems @sc{cvs} doesn't try to solve
cvs.texi(,207) * A sample session::            A tour of basic @sc{cvs} usage
cvs.texi(,208) @end menu
cvs.texi(,209) 
cvs.texi(,210) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,211) @node What is CVS?
cvs.texi(,212) @section What is CVS?
cvs.texi(,213) @cindex What is CVS?
cvs.texi(,214) @cindex Introduction to CVS
cvs.texi(,215) @cindex CVS, introduction to
cvs.texi(,216) 
cvs.texi(,217) @sc{cvs} is a version control system.  Using it, you can
cvs.texi(,218) record the history of your source files.
cvs.texi(,219) 
cvs.texi(,220) @c -- ///
cvs.texi(,221) @c -- ///Those who cannot remember the past are condemned to repeat it.
cvs.texi(,222) @c -- ///               -- George Santayana
cvs.texi(,223) @c -- //////
cvs.texi(,224) 
cvs.texi(,225) @c -- Insert history  quote here!
cvs.texi(,226) For example, bugs sometimes creep in when
cvs.texi(,227) software is modified, and you might not detect the bug
cvs.texi(,228) until a long time after you make the modification.
cvs.texi(,229) With @sc{cvs}, you can easily retrieve old versions to see
cvs.texi(,230) exactly which change caused the bug.  This can
cvs.texi(,231) sometimes be a big help.
cvs.texi(,232) 
cvs.texi(,233) You could of course save every version of every file
cvs.texi(,234) you have ever created.  This would
cvs.texi(,235) however waste an enormous amount of disk space.  @sc{cvs}
cvs.texi(,236) stores all the versions of a file in a single file in a
cvs.texi(,237) clever way that only stores the differences between
cvs.texi(,238) versions.
cvs.texi(,239) 
cvs.texi(,240) @sc{cvs} also helps you if you are part of a group of people working
cvs.texi(,241) on the same project.  It is all too easy to overwrite
cvs.texi(,242) each others' changes unless you are extremely careful.
cvs.texi(,243) Some editors, like @sc{gnu} Emacs, try to make sure that
cvs.texi(,244) the same file is never modified by two people at the
cvs.texi(,245) same time.  Unfortunately, if someone is using another
cvs.texi(,246) editor, that safeguard will not work.  @sc{cvs} solves this problem
cvs.texi(,247) by insulating the different developers from each other.  Every
cvs.texi(,248) developer works in his own directory, and @sc{cvs} merges
cvs.texi(,249) the work when each developer is done.
cvs.texi(,250) 
cvs.texi(,251) @cindex History of CVS
cvs.texi(,252) @cindex CVS, history of
cvs.texi(,253) @cindex Credits (CVS program)
cvs.texi(,254) @cindex Contributors (CVS program)
cvs.texi(,255) @sc{cvs} started out as a bunch of shell scripts written by
cvs.texi(,256) Dick Grune, posted to the newsgroup
cvs.texi(,257) @code{comp.sources.unix} in the volume 6
cvs.texi(,258) release of July, 1986.  While no actual code from
cvs.texi(,259) these shell scripts is present in the current version
cvs.texi(,260) of @sc{cvs} much of the @sc{cvs} conflict resolution algorithms
cvs.texi(,261) come from them.
cvs.texi(,262) 
cvs.texi(,263) In April, 1989, Brian Berliner designed and coded @sc{cvs}.
cvs.texi(,264) Jeff Polk later helped Brian with the design of the @sc{cvs}
cvs.texi(,265) module and vendor branch support.
cvs.texi(,266) 
cvs.texi(,267) @cindex Source, getting CVS source
cvs.texi(,268) You can get @sc{cvs} in a variety of ways, including
cvs.texi(,269) free download from the internet.  For more information
cvs.texi(,270) on downloading @sc{cvs} and other @sc{cvs} topics, see:
cvs.texi(,271) 
cvs.texi(,272) @example
cvs.texi(,273) http://www.cvshome.org/
cvs.texi(,274) http://www.loria.fr/~molli/cvs-index.html
cvs.texi(,275) @end example
cvs.texi(,276) 
cvs.texi(,277) @cindex Mailing list
cvs.texi(,278) @cindex List, mailing list
cvs.texi(,279) @cindex Newsgroups
cvs.texi(,280) There is a mailing list, known as @w{@code{info-cvs}},
cvs.texi(,281) devoted to @sc{cvs}.  To subscribe or
cvs.texi(,282) unsubscribe
cvs.texi(,283) write to
cvs.texi(,284) @w{@code{info-cvs-request@@gnu.org}}.
cvs.texi(,285) If you prefer a usenet group, the right
cvs.texi(,286) group is @code{comp.software.config-mgmt} which is for
cvs.texi(,287) @sc{cvs} discussions (along with other configuration
cvs.texi(,288) management systems).  In the future, it might be
cvs.texi(,289) possible to create a
cvs.texi(,290) @code{comp.software.config-mgmt.cvs}, but probably only
cvs.texi(,291) if there is sufficient @sc{cvs} traffic on
cvs.texi(,292) @code{comp.software.config-mgmt}.
cvs.texi(,293) @c Other random data is that past attempts to create a
cvs.texi(,294) @c gnu.* group have failed (the relevant authorities
cvs.texi(,295) @c say they'll do it, but don't), and that tale was very
cvs.texi(,296) @c skeptical of comp.software.config-mgmt.cvs when the
cvs.texi(,297) @c subject came up around 1995 or so (for one
cvs.texi(,298) @c thing, because creating it would be a "reorg" which
cvs.texi(,299) @c would need to take a more comprehensive look at the
cvs.texi(,300) @c whole comp.software.config-mgmt.* hierarchy).
cvs.texi(,301) 
cvs.texi(,302) You can also subscribe to the @code{bug-cvs} mailing list,
cvs.texi(,303) described in more detail in @ref{BUGS}.  To subscribe
cvs.texi(,304) send mail to @code{bug-cvs-request@@gnu.org}.
cvs.texi(,305) 
cvs.texi(,306) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,307) @node What is CVS not?
cvs.texi(,308) @section What is CVS not?
cvs.texi(,309) @cindex What is CVS not?
cvs.texi(,310) 
cvs.texi(,311) @sc{cvs} can do a lot of things for you, but it does
cvs.texi(,312) not try to be everything for everyone.
cvs.texi(,313) 
cvs.texi(,314) @table @asis
cvs.texi(,315) @item @sc{cvs} is not a build system.
cvs.texi(,316) 
cvs.texi(,317) Though the structure of your repository and modules
cvs.texi(,318) file interact with your build system
cvs.texi(,319) (e.g. @file{Makefile}s), they are essentially
cvs.texi(,320) independent.
cvs.texi(,321) 
cvs.texi(,322) @sc{cvs} does not dictate how you build anything.  It
cvs.texi(,323) merely stores files for retrieval in a tree structure
cvs.texi(,324) you devise.
cvs.texi(,325) 
cvs.texi(,326) @sc{cvs} does not dictate how to use disk space in the
cvs.texi(,327) checked out working directories.  If you write your
cvs.texi(,328) @file{Makefile}s or scripts in every directory so they
cvs.texi(,329) have to know the relative positions of everything else,
cvs.texi(,330) you wind up requiring the entire repository to be
cvs.texi(,331) checked out.
cvs.texi(,332) 
cvs.texi(,333) If you modularize your work, and construct a build
cvs.texi(,334) system that will share files (via links, mounts,
cvs.texi(,335) @code{VPATH} in @file{Makefile}s, etc.), you can
cvs.texi(,336) arrange your disk usage however you like.
cvs.texi(,337) 
cvs.texi(,338) But you have to remember that @emph{any} such system is
cvs.texi(,339) a lot of work to construct and maintain.  @sc{cvs} does
cvs.texi(,340) not address the issues involved.
cvs.texi(,341) 
cvs.texi(,342) Of course, you should place the tools created to
cvs.texi(,343) support such a build system (scripts, @file{Makefile}s,
cvs.texi(,344) etc) under @sc{cvs}.
cvs.texi(,345) 
cvs.texi(,346) Figuring out what files need to be rebuilt when
cvs.texi(,347) something changes is, again, something to be handled
cvs.texi(,348) outside the scope of @sc{cvs}.  One traditional
cvs.texi(,349) approach is to use @code{make} for building, and use
cvs.texi(,350) some automated tool for generating the dependencies which
cvs.texi(,351) @code{make} uses.
cvs.texi(,352) 
cvs.texi(,353) See @ref{Builds}, for more information on doing builds
cvs.texi(,354) in conjunction with @sc{cvs}.
cvs.texi(,355) 
cvs.texi(,356) @item @sc{cvs} is not a substitute for management.
cvs.texi(,357) 
cvs.texi(,358) Your managers and project leaders are expected to talk
cvs.texi(,359) to you frequently enough to make certain you are aware
cvs.texi(,360) of schedules, merge points, branch names and release
cvs.texi(,361) dates.  If they don't, @sc{cvs} can't help.
cvs.texi(,362) 
cvs.texi(,363) @sc{cvs} is an instrument for making sources dance to
cvs.texi(,364) your tune.  But you are the piper and the composer.  No
cvs.texi(,365) instrument plays itself or writes its own music.
cvs.texi(,366) 
cvs.texi(,367) @item @sc{cvs} is not a substitute for developer communication.
cvs.texi(,368) 
cvs.texi(,369) When faced with conflicts within a single file, most
cvs.texi(,370) developers manage to resolve them without too much
cvs.texi(,371) effort.  But a more general definition of ``conflict''
cvs.texi(,372) includes problems too difficult to solve without
cvs.texi(,373) communication between developers.
cvs.texi(,374) 
cvs.texi(,375) @sc{cvs} cannot determine when simultaneous changes
cvs.texi(,376) within a single file, or across a whole collection of
cvs.texi(,377) files, will logically conflict with one another.  Its
cvs.texi(,378) concept of a @dfn{conflict} is purely textual, arising
cvs.texi(,379) when two changes to the same base file are near enough
cvs.texi(,380) to spook the merge (i.e. @code{diff3}) command.
cvs.texi(,381) 
cvs.texi(,382) @sc{cvs} does not claim to help at all in figuring out
cvs.texi(,383) non-textual or distributed conflicts in program logic.
cvs.texi(,384) 
cvs.texi(,385) For example: Say you change the arguments to function
cvs.texi(,386) @code{X} defined in file @file{A}.  At the same time,
cvs.texi(,387) someone edits file @file{B}, adding new calls to
cvs.texi(,388) function @code{X} using the old arguments.  You are
cvs.texi(,389) outside the realm of @sc{cvs}'s competence.
cvs.texi(,390) 
cvs.texi(,391) Acquire the habit of reading specs and talking to your
cvs.texi(,392) peers.
cvs.texi(,393) 
cvs.texi(,394) 
cvs.texi(,395) @item @sc{cvs} does not have change control
cvs.texi(,396) 
cvs.texi(,397) Change control refers to a number of things.  First of
cvs.texi(,398) all it can mean @dfn{bug-tracking}, that is being able
cvs.texi(,399) to keep a database of reported bugs and the status of
cvs.texi(,400) each one (is it fixed?  in what release?  has the bug
cvs.texi(,401) submitter agreed that it is fixed?).  For interfacing
cvs.texi(,402) @sc{cvs} to an external bug-tracking system, see the
cvs.texi(,403) @file{rcsinfo} and @file{verifymsg} files
cvs.texi(,404) (@pxref{Administrative files}).
cvs.texi(,405) 
cvs.texi(,406) Another aspect of change control is keeping track of
cvs.texi(,407) the fact that changes to several files were in fact
cvs.texi(,408) changed together as one logical change.  If you check
cvs.texi(,409) in several files in a single @code{cvs commit}
cvs.texi(,410) operation, @sc{cvs} then forgets that those files were
cvs.texi(,411) checked in together, and the fact that they have the
cvs.texi(,412) same log message is the only thing tying them
cvs.texi(,413) together.  Keeping a @sc{gnu} style @file{ChangeLog}
cvs.texi(,414) can help somewhat.
cvs.texi(,415) @c FIXME: should have an xref to a section which talks
cvs.texi(,416) @c more about keeping ChangeLog's with CVS, but that
cvs.texi(,417) @c section hasn't been written yet.
cvs.texi(,418) 
cvs.texi(,419) Another aspect of change control, in some systems, is
cvs.texi(,420) the ability to keep track of the status of each
cvs.texi(,421) change.  Some changes have been written by a developer,
cvs.texi(,422) others have been reviewed by a second developer, and so
cvs.texi(,423) on.  Generally, the way to do this with @sc{cvs} is to
cvs.texi(,424) generate a diff (using @code{cvs diff} or @code{diff})
cvs.texi(,425) and email it to someone who can then apply it using the
cvs.texi(,426) @code{patch} utility.  This is very flexible, but
cvs.texi(,427) depends on mechanisms outside @sc{cvs} to make sure
cvs.texi(,428) nothing falls through the cracks.
cvs.texi(,429) 
cvs.texi(,430) @item @sc{cvs} is not an automated testing program
cvs.texi(,431) 
cvs.texi(,432) It should be possible to enforce mandatory use of a
cvs.texi(,433) testsuite using the @code{commitinfo} file.  I haven't
cvs.texi(,434) heard a lot about projects trying to do that or whether
cvs.texi(,435) there are subtle gotchas, however.
cvs.texi(,436) 
cvs.texi(,437) @item @sc{cvs} does not have a builtin process model
cvs.texi(,438) 
cvs.texi(,439) Some systems provide ways to ensure that changes or
cvs.texi(,440) releases go through various steps, with various
cvs.texi(,441) approvals as needed.  Generally, one can accomplish
cvs.texi(,442) this with @sc{cvs} but it might be a little more work.
cvs.texi(,443) In some cases you'll want to use the @file{commitinfo},
cvs.texi(,444) @file{loginfo}, @file{rcsinfo}, or @file{verifymsg}
cvs.texi(,445) files, to require that certain steps be performed
cvs.texi(,446) before cvs will allow a checkin.  Also consider whether
cvs.texi(,447) features such as branches and tags can be used to
cvs.texi(,448) perform tasks such as doing work in a development tree
cvs.texi(,449) and then merging certain changes over to a stable tree
cvs.texi(,450) only once they have been proven.
cvs.texi(,451) @end table
cvs.texi(,452) 
cvs.texi(,453) @c ---------------------------------------------------------------------
cvs.texi(,454) @node A sample session
cvs.texi(,455) @section A sample session
cvs.texi(,456) @cindex Example of a work-session
cvs.texi(,457) @cindex Getting started
cvs.texi(,458) @cindex Work-session, example of
cvs.texi(,459) @cindex tc, Trivial Compiler (example)
cvs.texi(,460) @cindex Trivial Compiler (example)
cvs.texi(,461) 
cvs.texi(,462) @c I think an example is a pretty good way to start.  But
cvs.texi(,463) @c somewhere in here, maybe after the sample session,
cvs.texi(,464) @c we need something which is kind of
cvs.texi(,465) @c a "roadmap" which is more directed at sketching out
cvs.texi(,466) @c the functionality of CVS and pointing people to
cvs.texi(,467) @c various other parts of the manual.  As it stands now
cvs.texi(,468) @c people who read in order get dumped right into all
cvs.texi(,469) @c manner of hair regarding remote repositories,
cvs.texi(,470) @c creating a repository, etc.
cvs.texi(,471) @c
cvs.texi(,472) @c The following was in the old Basic concepts node.  I don't
cvs.texi(,473) @c know how good a job it does at introducing modules,
cvs.texi(,474) @c or whether they need to be introduced so soon, but
cvs.texi(,475) @c something of this sort might go into some
cvs.texi(,476) @c introductory material somewhere.
cvs.texi(,485) 
cvs.texi(,486) As a way of introducing @sc{cvs}, we'll go through a
cvs.texi(,487) typical work-session using @sc{cvs}.  The first thing
cvs.texi(,488) to understand is that @sc{cvs} stores all files in a
cvs.texi(,489) centralized @dfn{repository} (@pxref{Repository}); this
cvs.texi(,490) section assumes that a repository is set up.
cvs.texi(,491) @c I'm not sure that the sentence concerning the
cvs.texi(,492) @c repository quite tells the user what they need to
cvs.texi(,493) @c know at this point.  Might need to expand on "centralized"
cvs.texi(,494) @c slightly (maybe not here, maybe further down in the example?)
cvs.texi(,495) 
cvs.texi(,496) Suppose you are working on a simple compiler.  The source
cvs.texi(,497) consists of a handful of C files and a @file{Makefile}.
cvs.texi(,498) The compiler is called @samp{tc} (Trivial Compiler),
cvs.texi(,499) and the repository is set up so that there is a module
cvs.texi(,500) called @samp{tc}.
cvs.texi(,501) 
cvs.texi(,502) @menu
cvs.texi(,503) * Getting the source::          Creating a workspace
cvs.texi(,504) * Committing your changes::     Making your work available to others
cvs.texi(,505) * Cleaning up::                 Cleaning up
cvs.texi(,506) * Viewing differences::         Viewing differences
cvs.texi(,507) @end menu
cvs.texi(,508) 
cvs.texi(,509) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,510) @node Getting the source
cvs.texi(,511) @subsection Getting the source
cvs.texi(,512) @cindex Getting the source
cvs.texi(,513) @cindex Checking out source
cvs.texi(,514) @cindex Fetching source
cvs.texi(,515) @cindex Source, getting from CVS
cvs.texi(,516) @cindex Checkout, example
cvs.texi(,517) 
cvs.texi(,518) The first thing you must do is to get your own working copy of the
cvs.texi(,519) source for @samp{tc}.  For this, you use the @code{checkout} command:
cvs.texi(,520) 
cvs.texi(,521) @example
cvs.texi(,522) $ cvs checkout tc
cvs.texi(,523) @end example
cvs.texi(,524) 
cvs.texi(,525) @noindent
cvs.texi(,526) This will create a new directory called @file{tc} and populate it with
cvs.texi(,527) the source files.
cvs.texi(,528) 
cvs.texi(,529) @example
cvs.texi(,530) $ cd tc
cvs.texi(,531) $ ls
cvs.texi(,532) CVS         Makefile    backend.c   driver.c    frontend.c  parser.c
cvs.texi(,533) @end example
cvs.texi(,534) 
cvs.texi(,535) The @file{CVS} directory is used internally by
cvs.texi(,536) @sc{cvs}.  Normally, you should not modify or remove
cvs.texi(,537) any of the files in it.
cvs.texi(,538) 
cvs.texi(,539) You start your favorite editor, hack away at @file{backend.c}, and a couple
cvs.texi(,540) of hours later you have added an optimization pass to the compiler.
cvs.texi(,541) A note to @sc{rcs} and @sc{sccs} users: There is no need to lock the files that
cvs.texi(,542) you want to edit.  @xref{Multiple developers}, for an explanation.
cvs.texi(,543) 
cvs.texi(,544) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,545) @node Committing your changes
cvs.texi(,546) @subsection Committing your changes
cvs.texi(,547) @cindex Committing changes to files
cvs.texi(,548) @cindex Log message entry
cvs.texi(,549) 
cvs.texi(,550) When you have checked that the compiler is still compilable you decide
cvs.texi(,551) to make a new version of @file{backend.c}.  This will
cvs.texi(,552) store your new @file{backend.c} in the repository and
cvs.texi(,553) make it available to anyone else who is using that same
cvs.texi(,554) repository.
cvs.texi(,555) 
cvs.texi(,556) @example
cvs.texi(,557) $ cvs commit backend.c
cvs.texi(,558) @end example
cvs.texi(,559) 
cvs.texi(,560) @noindent
cvs.texi(,561) @sc{cvs} starts an editor, to allow you to enter a log
cvs.texi(,562) message.  You type in ``Added an optimization pass.'',
cvs.texi(,563) save the temporary file, and exit the editor.
cvs.texi(,564) 
cvs.texi(,565) @cindex CVSEDITOR, environment variable
cvs.texi(,566) @cindex EDITOR, environment variable
cvs.texi(,567) The environment variable @code{$CVSEDITOR} determines
cvs.texi(,568) which editor is started.  If @code{$CVSEDITOR} is not
cvs.texi(,569) set, then if the environment variable @code{$EDITOR} is
cvs.texi(,570) set, it will be used. If both @code{$CVSEDITOR} and
cvs.texi(,571) @code{$EDITOR} are not set then there is a default
cvs.texi(,572) which will vary with your operating system, for example
cvs.texi(,573) @code{vi} for unix or @code{notepad} for Windows
cvs.texi(,574) NT/95.
cvs.texi(,575) 
cvs.texi(,576) @cindex VISUAL, environment variable
cvs.texi(,577) In addition, @sc{cvs} checks the @code{$VISUAL} environment
cvs.texi(,578) variable.  Opinions vary on whether this behavior is desirable and
cvs.texi(,579) whether future releases of @sc{cvs} should check @code{$VISUAL} or
cvs.texi(,580) ignore it.  You will be OK either way if you make sure that
cvs.texi(,581) @code{$VISUAL} is either unset or set to the same thing as
cvs.texi(,582) @code{$EDITOR}.
cvs.texi(,583) 
cvs.texi(,584) @c This probably should go into some new node
cvs.texi(,585) @c containing detailed info on the editor, rather than
cvs.texi(,586) @c the intro.  In fact, perhaps some of the stuff with
cvs.texi(,587) @c CVSEDITOR and -m and so on should too.
cvs.texi(,588) When @sc{cvs} starts the editor, it includes a list of
cvs.texi(,589) files which are modified.  For the @sc{cvs} client,
cvs.texi(,590) this list is based on comparing the modification time
cvs.texi(,591) of the file against the modification time that the file
cvs.texi(,592) had when it was last gotten or updated.  Therefore, if
cvs.texi(,593) a file's modification time has changed but its contents
cvs.texi(,594) have not, it will show up as modified.  The simplest
cvs.texi(,595) way to handle this is simply not to worry about it---if
cvs.texi(,596) you proceed with the commit @sc{cvs} will detect that
cvs.texi(,597) the contents are not modified and treat it as an
cvs.texi(,598) unmodified file.  The next @code{update} will clue
cvs.texi(,599) @sc{cvs} in to the fact that the file is unmodified,
cvs.texi(,600) and it will reset its stored timestamp so that the file
cvs.texi(,601) will not show up in future editor sessions.
cvs.texi(,602) @c FIXCVS: Might be nice if "commit" and other commands
cvs.texi(,603) @c would reset that timestamp too, but currently commit
cvs.texi(,604) @c doesn't.
cvs.texi(,605) @c FIXME: Need to talk more about the process of
cvs.texi(,606) @c prompting for the log message.  Like show an example
cvs.texi(,607) @c of what it pops up in the editor, for example.  Also
cvs.texi(,608) @c a discussion of how to get the "a)bort, c)ontinue,
cvs.texi(,609) @c e)dit" prompt and what to do with it.  Might also
cvs.texi(,610) @c work in the suggestion that if you want a diff, you
cvs.texi(,611) @c should make it before running commit (someone
cvs.texi(,612) @c suggested that the diff pop up in the editor.  I'm
cvs.texi(,613) @c not sure that is better than telling people to run
cvs.texi(,614) @c "cvs diff" first if that is what they want, but if
cvs.texi(,615) @c we want to tell people that, the manual possibly
cvs.texi(,616) @c should say it).
cvs.texi(,617) 
cvs.texi(,618) If you want to avoid
cvs.texi(,619) starting an editor you can specify the log message on
cvs.texi(,620) the command line using the @samp{-m} flag instead, like
cvs.texi(,621) this:
cvs.texi(,622) 
cvs.texi(,623) @example
cvs.texi(,624) $ cvs commit -m "Added an optimization pass" backend.c
cvs.texi(,625) @end example
cvs.texi(,626) 
cvs.texi(,627) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,628) @node Cleaning up
cvs.texi(,629) @subsection Cleaning up
cvs.texi(,630) @cindex Cleaning up
cvs.texi(,631) @cindex Working copy, removing
cvs.texi(,632) @cindex Removing your working copy
cvs.texi(,633) @cindex Releasing your working copy
cvs.texi(,634) 
cvs.texi(,635) Before you turn to other tasks you decide to remove your working copy of
cvs.texi(,636) tc.  One acceptable way to do that is of course
cvs.texi(,637) 
cvs.texi(,638) @example
cvs.texi(,639) $ cd ..
cvs.texi(,640) $ rm -r tc
cvs.texi(,641) @end example
cvs.texi(,642) 
cvs.texi(,643) @noindent
cvs.texi(,644) but a better way is to use the @code{release} command (@pxref{release}):
cvs.texi(,645) 
cvs.texi(,646) @example
cvs.texi(,647) $ cd ..
cvs.texi(,648) $ cvs release -d tc
cvs.texi(,649) M driver.c
cvs.texi(,650) ? tc
cvs.texi(,651) You have [1] altered files in this repository.
cvs.texi(,652) Are you sure you want to release (and delete) directory `tc': n
cvs.texi(,653) ** `release' aborted by user choice.
cvs.texi(,654) @end example
cvs.texi(,655) 
cvs.texi(,656) The @code{release} command checks that all your modifications have been
cvs.texi(,657) committed.  If history logging is enabled it also makes a note in the
cvs.texi(,658) history file.  @xref{history file}.
cvs.texi(,659) 
cvs.texi(,660) When you use the @samp{-d} flag with @code{release}, it
cvs.texi(,661) also removes your working copy.
cvs.texi(,662) 
cvs.texi(,663) In the example above, the @code{release} command wrote a couple of lines
cvs.texi(,664) of output.  @samp{? tc} means that the file @file{tc} is unknown to @sc{cvs}.
cvs.texi(,665) That is nothing to worry about: @file{tc} is the executable compiler,
cvs.texi(,666) and it should not be stored in the repository.  @xref{cvsignore},
cvs.texi(,667) for information about how to make that warning go away.
cvs.texi(,668) @xref{release output}, for a complete explanation of
cvs.texi(,669) all possible output from @code{release}.
cvs.texi(,670) 
cvs.texi(,671) @samp{M driver.c} is more serious.  It means that the
cvs.texi(,672) file @file{driver.c} has been modified since it was
cvs.texi(,673) checked out.
cvs.texi(,674) 
cvs.texi(,675) The @code{release} command always finishes by telling
cvs.texi(,676) you how many modified files you have in your working
cvs.texi(,677) copy of the sources, and then asks you for confirmation
cvs.texi(,678) before deleting any files or making any note in the
cvs.texi(,679) history file.
cvs.texi(,680) 
cvs.texi(,681) You decide to play it safe and answer @kbd{n @key{RET}}
cvs.texi(,682) when @code{release} asks for confirmation.
cvs.texi(,683) 
cvs.texi(,684) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,685) @node Viewing differences
cvs.texi(,686) @subsection Viewing differences
cvs.texi(,687) @cindex Viewing differences
cvs.texi(,688) @cindex Diff
cvs.texi(,689) 
cvs.texi(,690) You do not remember modifying @file{driver.c}, so you want to see what
cvs.texi(,691) has happened to that file.
cvs.texi(,692) 
cvs.texi(,693) @example
cvs.texi(,694) $ cd tc
cvs.texi(,695) $ cvs diff driver.c
cvs.texi(,696) @end example
cvs.texi(,697) 
cvs.texi(,698) This command runs @code{diff} to compare the version of @file{driver.c}
cvs.texi(,699) that you checked out with your working copy.  When you see the output
cvs.texi(,700) you remember that you added a command line option that enabled the
cvs.texi(,701) optimization pass.  You check it in, and release the module.
cvs.texi(,702) @c FIXME: we haven't yet defined the term "check in".
cvs.texi(,703) 
cvs.texi(,704) @example
cvs.texi(,705) $ cvs commit -m "Added an optimization pass" driver.c
cvs.texi(,706) Checking in driver.c;
cvs.texi(,707) /usr/local/cvsroot/tc/driver.c,v  <--  driver.c
cvs.texi(,708) new revision: 1.2; previous revision: 1.1
cvs.texi(,709) done
cvs.texi(,710) $ cd ..
cvs.texi(,711) $ cvs release -d tc
cvs.texi(,712) ? tc
cvs.texi(,713) You have [0] altered files in this repository.
cvs.texi(,714) Are you sure you want to release (and delete) directory `tc': y
cvs.texi(,715) @end example
cvs.texi(,716) 
cvs.texi(,717) @c ---------------------------------------------------------------------
cvs.texi(,718) @node Repository
cvs.texi(,719) @chapter The Repository
cvs.texi(,720) @cindex Repository (intro)
cvs.texi(,721) @cindex Repository, example
cvs.texi(,722) @cindex Layout of repository
cvs.texi(,723) @cindex Typical repository
cvs.texi(,724) @cindex /usr/local/cvsroot, as example repository
cvs.texi(,725) @cindex cvsroot
cvs.texi(,726) 
cvs.texi(,727) The @sc{cvs} @dfn{repository} stores a complete copy of
cvs.texi(,728) all the files and directories which are under version
cvs.texi(,729) control.
cvs.texi(,730) 
cvs.texi(,731) Normally, you never access any of the files in the
cvs.texi(,732) repository directly.  Instead, you use @sc{cvs}
cvs.texi(,733) commands to get your own copy of the files into a
cvs.texi(,734) @dfn{working directory}, and then
cvs.texi(,735) work on that copy.  When you've finished a set of
cvs.texi(,736) changes, you check (or @dfn{commit}) them back into the
cvs.texi(,737) repository.  The repository then contains the changes
cvs.texi(,738) which you have made, as well as recording exactly what
cvs.texi(,739) you changed, when you changed it, and other such
cvs.texi(,740) information.  Note that the repository is not a
cvs.texi(,741) subdirectory of the working directory, or vice versa;
cvs.texi(,742) they should be in separate locations.
cvs.texi(,743) @c Need some example, e.g. repository
cvs.texi(,744) @c /usr/local/cvsroot; working directory
cvs.texi(,745) @c /home/joe/sources.  But this node is too long
cvs.texi(,746) @c as it is; need a little reorganization...
cvs.texi(,747) 
cvs.texi(,748) @cindex :local:, setting up
cvs.texi(,749) @sc{cvs} can access a repository by a variety of
cvs.texi(,750) means.  It might be on the local computer, or it might
cvs.texi(,751) be on a computer across the room or across the world.
cvs.texi(,752) To distinguish various ways to access a repository, the
cvs.texi(,753) repository name can start with an @dfn{access method}.
cvs.texi(,754) For example, the access method @code{:local:} means to
cvs.texi(,755) access a repository directory, so the repository
cvs.texi(,756) @code{:local:/usr/local/cvsroot} means that the
cvs.texi(,757) repository is in @file{/usr/local/cvsroot} on the
cvs.texi(,758) computer running @sc{cvs}.  For information on other
cvs.texi(,759) access methods, see @ref{Remote repositories}.
cvs.texi(,760) 
cvs.texi(,761) @c Can se say this more concisely?  Like by passing
cvs.texi(,762) @c more of the buck to the Remote repositories node?
cvs.texi(,763) If the access method is omitted, then if the repository
cvs.texi(,764) starts with @samp{/}, then @code{:local:} is
cvs.texi(,765) assumed.  If it does not start with @samp{/} then either
cvs.texi(,766) @code{:ext:} or @code{:server:} is assumed.  For
cvs.texi(,767) example, if you have a local repository in
cvs.texi(,768) @file{/usr/local/cvsroot}, you can use
cvs.texi(,769) @code{/usr/local/cvsroot} instead of
cvs.texi(,770) @code{:local:/usr/local/cvsroot}.  But if (under
cvs.texi(,771) Windows NT, for example) your local repository is
cvs.texi(,772) @file{c:\src\cvsroot}, then you must specify the access
cvs.texi(,773) method, as in @code{:local:c:/src/cvsroot}.
cvs.texi(,774) 
cvs.texi(,775) @c This might appear to go in Repository storage, but
cvs.texi(,776) @c actually it is describing something which is quite
cvs.texi(,777) @c user-visible, when you do a "cvs co CVSROOT".  This
cvs.texi(,778) @c isn't necessary the perfect place for that, though.
cvs.texi(,779) The repository is split in two parts.  @file{$CVSROOT/CVSROOT} contains
cvs.texi(,780) administrative files for @sc{cvs}.  The other directories contain the actual
cvs.texi(,781) user-defined modules.
cvs.texi(,782) 
cvs.texi(,783) @menu
cvs.texi(,784) * Specifying a repository::     Telling CVS where your repository is
cvs.texi(,785) * Repository storage::          The structure of the repository
cvs.texi(,786) * Working directory storage::   The structure of working directories
cvs.texi(,787) * Intro administrative files::  Defining modules
cvs.texi(,788) * Multiple repositories::       Multiple repositories
cvs.texi(,789) * Creating a repository::       Creating a repository
cvs.texi(,790) * Backing up::                  Backing up a repository
cvs.texi(,791) * Moving a repository::         Moving a repository
cvs.texi(,792) * Remote repositories::         Accessing repositories on remote machines
cvs.texi(,793) * Read-only access::            Granting read-only access to the repository
cvs.texi(,794) * Server temporary directory::  The server creates temporary directories
cvs.texi(,795) @end menu
cvs.texi(,796) 
cvs.texi(,797) @node Specifying a repository
cvs.texi(,798) @section Telling CVS where your repository is
cvs.texi(,799) 
cvs.texi(,800) There are several ways to tell @sc{cvs}
cvs.texi(,801) where to find the repository.  You can name the
cvs.texi(,802) repository on the command line explicitly, with the
cvs.texi(,803) @code{-d} (for "directory") option:
cvs.texi(,804) 
cvs.texi(,805) @example
cvs.texi(,806) cvs -d /usr/local/cvsroot checkout yoyodyne/tc
cvs.texi(,807) @end example
cvs.texi(,808) 
cvs.texi(,809) @cindex .profile, setting CVSROOT in
cvs.texi(,810) @cindex .cshrc, setting CVSROOT in
cvs.texi(,811) @cindex .tcshrc, setting CVSROOT in
cvs.texi(,812) @cindex .bashrc, setting CVSROOT in
cvs.texi(,813) @cindex CVSROOT, environment variable
cvs.texi(,814)         Or you can set the @code{$CVSROOT} environment
cvs.texi(,815) variable to an absolute path to the root of the
cvs.texi(,816) repository, @file{/usr/local/cvsroot} in this example.
cvs.texi(,817) To set @code{$CVSROOT}, @code{csh} and @code{tcsh}
cvs.texi(,818) users should have this line in their @file{.cshrc} or
cvs.texi(,819) @file{.tcshrc} files:
cvs.texi(,820) 
cvs.texi(,821) @example
cvs.texi(,822) setenv CVSROOT /usr/local/cvsroot
cvs.texi(,823) @end example
cvs.texi(,824) 
cvs.texi(,825) @noindent
cvs.texi(,826) @code{sh} and @code{bash} users should instead have these lines in their
cvs.texi(,827) @file{.profile} or @file{.bashrc}:
cvs.texi(,828) 
cvs.texi(,829) @example
cvs.texi(,830) CVSROOT=/usr/local/cvsroot
cvs.texi(,831) export CVSROOT
cvs.texi(,832) @end example
cvs.texi(,833) 
cvs.texi(,834) @cindex Root file, in CVS directory
cvs.texi(,835) @cindex CVS/Root file
cvs.texi(,836)         A repository specified with @code{-d} will
cvs.texi(,837) override the @code{$CVSROOT} environment variable.
cvs.texi(,838) Once you've checked a working copy out from the
cvs.texi(,839) repository, it will remember where its repository is
cvs.texi(,840) (the information is recorded in the
cvs.texi(,841) @file{CVS/Root} file in the working copy).
cvs.texi(,842) 
cvs.texi(,843) The @code{-d} option and the @file{CVS/Root} file both
cvs.texi(,844) override the @code{$CVSROOT} environment variable.  If
cvs.texi(,845) @code{-d} option differs from @file{CVS/Root}, the
cvs.texi(,846) former is used.  Of course, for proper operation they
cvs.texi(,847) should be two ways of referring to the same repository.
cvs.texi(,848) 
cvs.texi(,849) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,850) @node Repository storage
cvs.texi(,851) @section How data is stored in the repository
cvs.texi(,852) @cindex Repository, how data is stored
cvs.texi(,853) 
cvs.texi(,854) For most purposes it isn't important @emph{how}
cvs.texi(,855) @sc{cvs} stores information in the repository.  In
cvs.texi(,856) fact, the format has changed in the past, and is likely
cvs.texi(,857) to change in the future.  Since in almost all cases one
cvs.texi(,858) accesses the repository via @sc{cvs} commands, such
cvs.texi(,859) changes need not be disruptive.
cvs.texi(,860) 
cvs.texi(,861) However, in some cases it may be necessary to
cvs.texi(,862) understand how @sc{cvs} stores data in the repository,
cvs.texi(,863) for example you might need to track down @sc{cvs} locks
cvs.texi(,864) (@pxref{Concurrency}) or you might need to deal with
cvs.texi(,865) the file permissions appropriate for the repository.
cvs.texi(,866) 
cvs.texi(,867) @menu
cvs.texi(,868) * Repository files::            What files are stored in the repository
cvs.texi(,869) * File permissions::            File permissions
cvs.texi(,870) * Windows permissions::         Issues specific to Windows
cvs.texi(,871) * Attic::                       Some files are stored in the Attic
cvs.texi(,872) * CVS in repository::           Additional information in CVS directory
cvs.texi(,873) * Locks::                       CVS locks control concurrent accesses
cvs.texi(,874) * CVSROOT storage::             A few things about CVSROOT are different
cvs.texi(,875) @end menu
cvs.texi(,876) 
cvs.texi(,877) @node Repository files
cvs.texi(,878) @subsection Where files are stored within the repository
cvs.texi(,879) 
cvs.texi(,880) @c @cindex Filenames, legal
cvs.texi(,881) @c @cindex Legal filenames
cvs.texi(,882) @c Somewhere we need to say something about legitimate
cvs.texi(,883) @c characters in filenames in working directory and
cvs.texi(,884) @c repository.  Not "/" (not even on non-unix).  And
cvs.texi(,885) @c here is a specific set of issues:
cvs.texi(,886) @c 	Files starting with a - are handled inconsistently. They can not
cvs.texi(,887) @c   be added to a repository with an add command, because it they are
cvs.texi(,888) @c   interpreted as a switch. They can appear in a repository if they are
cvs.texi(,889) @c   part of a tree that is imported. They can not be removed from the tree
cvs.texi(,890) @c   once they are there.
cvs.texi(,891) @c Note that "--" *is* supported (as a
cvs.texi(,892) @c consequence of using GNU getopt).  Should document
cvs.texi(,893) @c this somewhere ("Common options"?).  The other usual technique,
cvs.texi(,894) @c "./-foo", isn't as effective, at least for "cvs add"
cvs.texi(,895) @c which doesn't support pathnames containing "/".
cvs.texi(,896) 
cvs.texi(,897) The overall structure of the repository is a directory
cvs.texi(,898) tree corresponding to the directories in the working
cvs.texi(,899) directory.  For example, supposing the repository is in
cvs.texi(,900) 
cvs.texi(,901) @example
cvs.texi(,902) /usr/local/cvsroot
cvs.texi(,903) @end example
cvs.texi(,904) 
cvs.texi(,905) @noindent
cvs.texi(,906) here is a possible directory tree (showing only the
cvs.texi(,907) directories):
cvs.texi(,908) 
cvs.texi(,909) @example
cvs.texi(,910) @t{/usr}
cvs.texi(,911)  |
cvs.texi(,912)  +--@t{local}
cvs.texi(,913)  |   |
cvs.texi(,914)  |   +--@t{cvsroot}
cvs.texi(,915)  |   |    |
cvs.texi(,916)  |   |    +--@t{CVSROOT}
cvs.texi(,917)           |      (administrative files)
cvs.texi(,918)           |
cvs.texi(,919)           +--@t{gnu}
cvs.texi(,920)           |   |
cvs.texi(,921)           |   +--@t{diff}
cvs.texi(,922)           |   |   (source code to @sc{gnu} diff)
cvs.texi(,923)           |   |
cvs.texi(,924)           |   +--@t{rcs}
cvs.texi(,925)           |   |   (source code to @sc{rcs})
cvs.texi(,926)           |   |
cvs.texi(,927)           |   +--@t{cvs}
cvs.texi(,928)           |       (source code to @sc{cvs})
cvs.texi(,929)           |
cvs.texi(,930)           +--@t{yoyodyne}
cvs.texi(,931)               |
cvs.texi(,932)               +--@t{tc}
cvs.texi(,933)               |    |
cvs.texi(,934)               |    +--@t{man}
cvs.texi(,935)               |    |
cvs.texi(,936)               |    +--@t{testing}
cvs.texi(,937)               |
cvs.texi(,938)               +--(other Yoyodyne software)
cvs.texi(,939) @end example
cvs.texi(,940) 
cvs.texi(,941) With the directories are @dfn{history files} for each file
cvs.texi(,942) under version control.  The name of the history file is
cvs.texi(,943) the name of the corresponding file with @samp{,v}
cvs.texi(,944) appended to the end.  Here is what the repository for
cvs.texi(,945) the @file{yoyodyne/tc} directory might look like:
cvs.texi(,946) @c FIXME: Should also mention CVS (CVSREP)
cvs.texi(,947) @c FIXME? Should we introduce Attic with an xref to
cvs.texi(,948) @c Attic?  Not sure whether that is a good idea or not.
cvs.texi(,949) @example
cvs.texi(,950)   @code{$CVSROOT}
cvs.texi(,951)     |
cvs.texi(,952)     +--@t{yoyodyne}
cvs.texi(,953)     |   |
cvs.texi(,954)     |   +--@t{tc}
cvs.texi(,955)     |   |   |
cvs.texi(,956)             +--@t{Makefile,v}
cvs.texi(,957)             +--@t{backend.c,v}
cvs.texi(,958)             +--@t{driver.c,v}
cvs.texi(,959)             +--@t{frontend.c,v}
cvs.texi(,960)             +--@t{parser.c,v}
cvs.texi(,961)             +--@t{man}
cvs.texi(,962)             |    |
cvs.texi(,963)             |    +--@t{tc.1,v}
cvs.texi(,964)             |
cvs.texi(,965)             +--@t{testing}
cvs.texi(,966)                  |
cvs.texi(,967)                  +--@t{testpgm.t,v}
cvs.texi(,968)                  +--@t{test2.t,v}
cvs.texi(,969) @end example
cvs.texi(,970) 
cvs.texi(,971) @cindex History files
cvs.texi(,972) @cindex RCS history files
cvs.texi(,973) @c The first sentence, about what history files
cvs.texi(,974) @c contain, is kind of redundant with our intro to what the
cvs.texi(,975) @c repository does in node Repository....
cvs.texi(,976) The history files contain, among other things, enough
cvs.texi(,977) information to recreate any revision of the file, a log
cvs.texi(,978) of all commit messages and the user-name of the person
cvs.texi(,979) who committed the revision.  The history files are
cvs.texi(,980) known as @dfn{RCS files}, because the first program to
cvs.texi(,981) store files in that format was a version control system
cvs.texi(,982) known as @sc{rcs}.  For a full
cvs.texi(,983) description of the file format, see the @code{man} page
cvs.texi(,984) @cite{rcsfile(5)}, distributed with @sc{rcs}, or the
cvs.texi(,985) file @file{doc/RCSFILES} in the @sc{cvs} source
cvs.texi(,986) distribution.  This
cvs.texi(,987) file format has become very common---many systems other
cvs.texi(,988) than @sc{cvs} or @sc{rcs} can at least import history
cvs.texi(,989) files in this format.
cvs.texi(,990) @c FIXME: Think about including documentation for this
cvs.texi(,991) @c rather than citing it?  In the long run, getting
cvs.texi(,992) @c this to be a standard (not sure if we can cope with
cvs.texi(,993) @c a standards process as formal as IEEE/ANSI/ISO/etc,
cvs.texi(,994) @c though...) is the way to go, so maybe citing is
cvs.texi(,995) @c better.
cvs.texi(,996) 
cvs.texi(,997) The @sc{rcs} files used in @sc{cvs} differ in a few
cvs.texi(,998) ways from the standard format.  The biggest difference
cvs.texi(,999) is magic branches; for more information see @ref{Magic
cvs.texi(,1000) branch numbers}.  Also in @sc{cvs} the valid tag names
cvs.texi(,1001) are a subset of what @sc{rcs} accepts; for @sc{cvs}'s
cvs.texi(,1002) rules see @ref{Tags}.
cvs.texi(,1003) 
cvs.texi(,1004) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,1005) @node File permissions
cvs.texi(,1006) @subsection File permissions
cvs.texi(,1007) @c -- Move this to @node Creating a repository or similar
cvs.texi(,1008) @cindex Security, file permissions in repository
cvs.texi(,1009) @cindex File permissions, general
cvs.texi(,1010) @cindex Permissions, general
cvs.texi(,1011) @c FIXME: we need to somehow reflect "permissions in
cvs.texi(,1012) @c repository" versus "permissions in working
cvs.texi(,1013) @c directory" in the index entries.
cvs.texi(,1014) @cindex Group
cvs.texi(,1015) @cindex Read-only files, in repository
cvs.texi(,1016) All @samp{,v} files are created read-only, and you
cvs.texi(,1017) should not change the permission of those files.  The
cvs.texi(,1018) directories inside the repository should be writable by
cvs.texi(,1019) the persons that have permission to modify the files in
cvs.texi(,1020) each directory.  This normally means that you must
cvs.texi(,1021) create a UNIX group (see group(5)) consisting of the
cvs.texi(,1022) persons that are to edit the files in a project, and
cvs.texi(,1023) set up the repository so that it is that group that
cvs.texi(,1024) owns the directory.
cvs.texi(,1025) (On some systems, you also need to set the set-group-ID-on-execution bit
cvs.texi(,1026) on the repository directories (see chmod(1)) so that newly-created files
cvs.texi(,1027) and directories get the group-ID of the parent directory rather than
cvs.texi(,1028) that of the current process.)
cvs.texi(,1029) 
cvs.texi(,1030) @c See also comment in commitinfo node regarding cases
cvs.texi(,1031) @c which are really awkward with unix groups.
cvs.texi(,1032) 
cvs.texi(,1033) This means that you can only control access to files on
cvs.texi(,1034) a per-directory basis.
cvs.texi(,1035) 
cvs.texi(,1036) Note that users must also have write access to check
cvs.texi(,1037) out files, because @sc{cvs} needs to create lock files
cvs.texi(,1038) (@pxref{Concurrency}).  You can use LockDir in CVSROOT/config
cvs.texi(,1039) to put the lock files somewhere other than in the repository
cvs.texi(,1040) if you want to allow read-only access to some directories
cvs.texi(,1041) (@pxref{config}).
cvs.texi(,1042) 
cvs.texi(,1043) @c CVS seems to use CVSUMASK in picking permissions for
cvs.texi(,1044) @c val-tags, but maybe we should say more about this.
cvs.texi(,1045) @c Like val-tags gets created by someone who doesn't
cvs.texi(,1046) @c have CVSUMASK set right?
cvs.texi(,1047) Also note that users must have write access to the
cvs.texi(,1048) @file{CVSROOT/val-tags} file.  @sc{cvs} uses it to keep
cvs.texi(,1049) track of what tags are valid tag names (it is sometimes
cvs.texi(,1050) updated when tags are used, as well as when they are
cvs.texi(,1051) created).
cvs.texi(,1052) 
cvs.texi(,1053) Each @sc{rcs} file will be owned by the user who last
cvs.texi(,1054) checked it in.  This has little significance; what
cvs.texi(,1055) really matters is who owns the directories.
cvs.texi(,1056) 
cvs.texi(,1057) @cindex CVSUMASK, environment variable
cvs.texi(,1058) @cindex Umask, for repository files
cvs.texi(,1059) @sc{cvs} tries to set up reasonable file permissions
cvs.texi(,1060) for new directories that are added inside the tree, but
cvs.texi(,1061) you must fix the permissions manually when a new
cvs.texi(,1062) directory should have different permissions than its
cvs.texi(,1063) parent directory.  If you set the @code{CVSUMASK}
cvs.texi(,1064) environment variable that will control the file
cvs.texi(,1065) permissions which @sc{cvs} uses in creating directories
cvs.texi(,1066) and/or files in the repository.  @code{CVSUMASK} does
cvs.texi(,1067) not affect the file permissions in the working
cvs.texi(,1068) directory; such files have the permissions which are
cvs.texi(,1069) typical for newly created files, except that sometimes
cvs.texi(,1070) @sc{cvs} creates them read-only (see the sections on
cvs.texi(,1071) watches, @ref{Setting a watch}; -r, @ref{Global
cvs.texi(,1072) options}; or @code{CVSREAD}, @ref{Environment variables}).
cvs.texi(,1073) @c FIXME: Need more discussion of which
cvs.texi(,1074) @c group should own the file in the repository.
cvs.texi(,1075) @c Include a somewhat detailed example of the usual
cvs.texi(,1076) @c case where CVSUMASK is 007, the developers are all
cvs.texi(,1077) @c in a group, and that group owns stuff in the
cvs.texi(,1078) @c repository.  Need to talk about group ownership of
cvs.texi(,1079) @c newly-created directories/files (on some unices,
cvs.texi(,1080) @c such as SunOS4, setting the setgid bit on the
cvs.texi(,1081) @c directories will make files inherit the directory's
cvs.texi(,1082) @c group.  On other unices, your mileage may vary.  I
cvs.texi(,1083) @c can't remember what POSIX says about this, if
cvs.texi(,1084) @c anything).
cvs.texi(,1085) 
cvs.texi(,1086) Note that using the client/server @sc{cvs}
cvs.texi(,1087) (@pxref{Remote repositories}), there is no good way to
cvs.texi(,1088) set @code{CVSUMASK}; the setting on the client machine
cvs.texi(,1089) has no effect.  If you are connecting with @code{rsh}, you
cvs.texi(,1090) can set @code{CVSUMASK} in @file{.bashrc} or @file{.cshrc}, as
cvs.texi(,1091) described in the documentation for your operating
cvs.texi(,1092) system.  This behavior might change in future versions
cvs.texi(,1093) of @sc{cvs}; do not rely on the setting of
cvs.texi(,1094) @code{CVSUMASK} on the client having no effect.
cvs.texi(,1095) @c FIXME: need to explain what a umask is or cite
cvs.texi(,1096) @c someplace which does.
cvs.texi(,1097) @c
cvs.texi(,1098) @c There is also a larger (largely separate) issue
cvs.texi(,1099) @c about the meaning of CVSUMASK in a non-unix context.
cvs.texi(,1100) @c For example, whether there is
cvs.texi(,1101) @c an equivalent which fits better into other
cvs.texi(,1102) @c protection schemes like POSIX.6, VMS, &c.
cvs.texi(,1103) @c
cvs.texi(,1104) @c FIXME: Need one place which discusses this
cvs.texi(,1105) @c read-only files thing.  Why would one use -r or
cvs.texi(,1106) @c CVSREAD?  Why would one use watches?  How do they
cvs.texi(,1107) @c interact?
cvs.texi(,1108) @c
cvs.texi(,1109) @c FIXME: We need to state
cvs.texi(,1110) @c whether using CVSUMASK removes the need for manually
cvs.texi(,1111) @c fixing permissions (in fact, if we are going to mention
cvs.texi(,1112) @c manually fixing permission, we better document a lot
cvs.texi(,1113) @c better just what we mean by "fix").
cvs.texi(,1114) 
cvs.texi(,1115) Using pserver, you will generally need stricter
cvs.texi(,1116) permissions on the @sc{cvsroot} directory and
cvs.texi(,1117) directories above it in the tree; see @ref{Password
cvs.texi(,1118) authentication security}.
cvs.texi(,1119) 
cvs.texi(,1120) @cindex Setuid
cvs.texi(,1121) @cindex Setgid
cvs.texi(,1122) @cindex Security, setuid
cvs.texi(,1123) @cindex Installed images (VMS)
cvs.texi(,1124) Some operating systems have features which allow a
cvs.texi(,1125) particular program to run with the ability to perform
cvs.texi(,1126) operations which the caller of the program could not.
cvs.texi(,1127) For example, the set user ID (setuid) or set group ID
cvs.texi(,1128) (setgid) features of unix or the installed image
cvs.texi(,1129) feature of VMS.  @sc{cvs} was not written to use such
cvs.texi(,1130) features and therefore attempting to install @sc{cvs} in
cvs.texi(,1131) this fashion will provide protection against only
cvs.texi(,1132) accidental lapses; anyone who is trying to circumvent
cvs.texi(,1133) the measure will be able to do so, and depending on how
cvs.texi(,1134) you have set it up may gain access to more than just
cvs.texi(,1135) @sc{cvs}.  You may wish to instead consider pserver.  It
cvs.texi(,1136) shares some of the same attributes, in terms of
cvs.texi(,1137) possibly providing a false sense of security or opening
cvs.texi(,1138) security holes wider than the ones you are trying to
cvs.texi(,1139) fix, so read the documentation on pserver security
cvs.texi(,1140) carefully if you are considering this option
cvs.texi(,1141) (@ref{Password authentication security}).
cvs.texi(,1142) 
cvs.texi(,1143) @node Windows permissions
cvs.texi(,1144) @subsection File Permission issues specific to Windows
cvs.texi(,1145) @cindex Windows, and permissions
cvs.texi(,1146) @cindex File permissions, Windows-specific
cvs.texi(,1147) @cindex Permissions, Windows-specific
cvs.texi(,1148) 
cvs.texi(,1149) Some file permission issues are specific to Windows
cvs.texi(,1150) operating systems (Windows 95, Windows NT, and
cvs.texi(,1151) presumably future operating systems in this family.
cvs.texi(,1152) Some of the following might apply to OS/2 but I'm not
cvs.texi(,1153) sure).
cvs.texi(,1154) 
cvs.texi(,1155) If you are using local @sc{cvs} and the repository is on a
cvs.texi(,1156) networked file system which is served by the Samba SMB
cvs.texi(,1157) server, some people have reported problems with
cvs.texi(,1158) permissions.  Enabling WRITE=YES in the samba
cvs.texi(,1159) configuration is said to fix/workaround it.
cvs.texi(,1160) Disclaimer: I haven't investigated enough to know the
cvs.texi(,1161) implications of enabling that option, nor do I know
cvs.texi(,1162) whether there is something which @sc{cvs} could be doing
cvs.texi(,1163) differently in order to avoid the problem.  If you find
cvs.texi(,1164) something out, please let us know as described in
cvs.texi(,1165) @ref{BUGS}.
cvs.texi(,1166) 
cvs.texi(,1167) @node Attic
cvs.texi(,1168) @subsection The attic
cvs.texi(,1169) @cindex Attic
cvs.texi(,1170) 
cvs.texi(,1171) You will notice that sometimes @sc{cvs} stores an
cvs.texi(,1172) @sc{rcs} file in the @code{Attic}.  For example, if the
cvs.texi(,1173) @sc{cvsroot} is @file{/usr/local/cvsroot} and we are
cvs.texi(,1174) talking about the file @file{backend.c} in the
cvs.texi(,1175) directory @file{yoyodyne/tc}, then the file normally
cvs.texi(,1176) would be in
cvs.texi(,1177) 
cvs.texi(,1178) @example
cvs.texi(,1179) /usr/local/cvsroot/yoyodyne/tc/backend.c,v
cvs.texi(,1180) @end example
cvs.texi(,1181) 
cvs.texi(,1182) @noindent
cvs.texi(,1183) but if it goes in the attic, it would be in
cvs.texi(,1184) 
cvs.texi(,1185) @example
cvs.texi(,1186) /usr/local/cvsroot/yoyodyne/tc/Attic/backend.c,v
cvs.texi(,1187) @end example
cvs.texi(,1188) 
cvs.texi(,1189) @noindent
cvs.texi(,1190) @cindex Dead state
cvs.texi(,1191) instead.  It should not matter from a user point of
cvs.texi(,1192) view whether a file is in the attic; @sc{cvs} keeps
cvs.texi(,1193) track of this and looks in the attic when it needs to.
cvs.texi(,1194) But in case you want to know, the rule is that the RCS
cvs.texi(,1195) file is stored in the attic if and only if the head
cvs.texi(,1196) revision on the trunk has state @code{dead}.  A
cvs.texi(,1197) @code{dead} state means that file has been removed, or
cvs.texi(,1198) never added, for that revision.  For example, if you
cvs.texi(,1199) add a file on a branch, it will have a trunk revision
cvs.texi(,1200) in @code{dead} state, and a branch revision in a
cvs.texi(,1201) non-@code{dead} state.
cvs.texi(,1202) @c Probably should have some more concrete examples
cvs.texi(,1203) @c here, or somewhere (not sure exactly how we should
cvs.texi(,1204) @c arrange the discussion of the dead state, versus
cvs.texi(,1205) @c discussion of the attic).
cvs.texi(,1206) 
cvs.texi(,1207) @node CVS in repository
cvs.texi(,1208) @subsection The CVS directory in the repository
cvs.texi(,1209) @cindex CVS directory, in repository
cvs.texi(,1210) 
cvs.texi(,1211) The @file{CVS} directory in each repository directory
cvs.texi(,1212) contains information such as file attributes (in a file
cvs.texi(,1213) called @file{CVS/fileattr}.  In the
cvs.texi(,1214) future additional files may be added to this directory,
cvs.texi(,1215) so implementations should silently ignore additional
cvs.texi(,1216) files.
cvs.texi(,1217) 
cvs.texi(,1218) This behavior is implemented only by @sc{cvs} 1.7 and
cvs.texi(,1219) later; for details see @ref{Watches Compatibility}.
cvs.texi(,1220) 
cvs.texi(,1221) The format of the fileattr file is a series of entries
cvs.texi(,1222) of the following form (where @samp{@{} and @samp{@}}
cvs.texi(,1223) means the text between the braces can be repeated zero
cvs.texi(,1224) or more times):
cvs.texi(,1225) 
cvs.texi(,1226) @var{ent-type} @var{filename} <tab> @var{attrname} = @var{attrval}
cvs.texi(,1227)   @{; @var{attrname} = @var{attrval}@} <linefeed>
cvs.texi(,1228) 
cvs.texi(,1229) @var{ent-type} is @samp{F} for a file, in which case the entry specifies the
cvs.texi(,1230) attributes for that file.
cvs.texi(,1231) 
cvs.texi(,1232) @var{ent-type} is @samp{D},
cvs.texi(,1233) and @var{filename} empty, to specify default attributes
cvs.texi(,1234) to be used for newly added files.
cvs.texi(,1235) 
cvs.texi(,1236) Other @var{ent-type} are reserved for future expansion.  @sc{cvs} 1.9 and older
cvs.texi(,1237) will delete them any time it writes file attributes.
cvs.texi(,1238) @sc{cvs} 1.10 and later will preserve them.
cvs.texi(,1239) 
cvs.texi(,1240) Note that the order of the lines is not significant;
cvs.texi(,1241) a program writing the fileattr file may
cvs.texi(,1242) rearrange them at its convenience.
cvs.texi(,1243) 
cvs.texi(,1244) There is currently no way of quoting tabs or linefeeds in the
cvs.texi(,1245) filename, @samp{=} in @var{attrname},
cvs.texi(,1246) @samp{;} in @var{attrval}, etc.  Note: some implementations also
cvs.texi(,1247) don't handle a NUL character in any of the fields, but
cvs.texi(,1248) implementations are encouraged to allow it.
cvs.texi(,1249) 
cvs.texi(,1250) By convention, @var{attrname} starting with @samp{_} is for an attribute given
cvs.texi(,1251) special meaning by @sc{cvs}; other @var{attrname}s are for user-defined attributes
cvs.texi(,1252) (or will be, once implementations start supporting user-defined attributes).
cvs.texi(,1253) 
cvs.texi(,1254) Builtin attributes:
cvs.texi(,1255) 
cvs.texi(,1256) @table @code
cvs.texi(,1257) @item _watched
cvs.texi(,1258) Present means the file is watched and should be checked out
cvs.texi(,1259) read-only.
cvs.texi(,1260) 
cvs.texi(,1261) @item _watchers
cvs.texi(,1262) Users with watches for this file.  Value is
cvs.texi(,1263) @var{watcher} > @var{type} @{ , @var{watcher} > @var{type} @}
cvs.texi(,1264) where @var{watcher} is a username, and @var{type}
cvs.texi(,1265) is zero or more of edit,unedit,commit separated by
cvs.texi(,1266) @samp{+} (that is, nothing if none; there is no "none" or "all" keyword).
cvs.texi(,1267) 
cvs.texi(,1268) @item _editors
cvs.texi(,1269) Users editing this file.  Value is
cvs.texi(,1270) @var{editor} > @var{val} @{ , @var{editor} > @var{val} @}
cvs.texi(,1271) where @var{editor} is a username, and @var{val} is
cvs.texi(,1272) @var{time}+@var{hostname}+@var{pathname}, where
cvs.texi(,1273) @var{time} is when the @code{cvs edit} command (or
cvs.texi(,1274) equivalent) happened,
cvs.texi(,1275) and @var{hostname} and @var{pathname} are for the working directory.
cvs.texi(,1276) @end table
cvs.texi(,1277) 
cvs.texi(,1278) Example:
cvs.texi(,1279) 
cvs.texi(,1280) @c FIXME: sanity.sh should contain a similar test case
cvs.texi(,1281) @c so we can compare this example from something from
cvs.texi(,1282) @c Real Life(TM).  See cvsclient.texi (under Notify) for more
cvs.texi(,1283) @c discussion of the date format of _editors.
cvs.texi(,1284) @example
cvs.texi(,1285) Ffile1 _watched=;_watchers=joe>edit,mary>commit
cvs.texi(,1286) Ffile2 _watched=;_editors=sue>8 Jan 1975+workstn1+/home/sue/cvs
cvs.texi(,1287) D _watched=
cvs.texi(,1288) @end example
cvs.texi(,1289) 
cvs.texi(,1290) @noindent
cvs.texi(,1291) means that the file @file{file1} should be checked out
cvs.texi(,1292) read-only.  Furthermore, joe is watching for edits and
cvs.texi(,1293) mary is watching for commits.  The file @file{file2}
cvs.texi(,1294) should be checked out read-only; sue started editing it
cvs.texi(,1295) on 8 Jan 1975 in the directory @file{/home/sue/cvs} on
cvs.texi(,1296) the machine @code{workstn1}.  Future files which are
cvs.texi(,1297) added should be checked out read-only.  To represent
cvs.texi(,1298) this example here, we have shown a space after
cvs.texi(,1299) @samp{D}, @samp{Ffile1}, and @samp{Ffile2}, but in fact
cvs.texi(,1300) there must be a single tab character there and no spaces.
cvs.texi(,1301) 
cvs.texi(,1302) @node Locks
cvs.texi(,1303) @subsection CVS locks in the repository
cvs.texi(,1304) 
cvs.texi(,1305) @cindex #cvs.rfl, technical details
cvs.texi(,1306) @cindex #cvs.wfl, technical details
cvs.texi(,1307) @cindex #cvs.lock, technical details
cvs.texi(,1308) @cindex Locks, cvs, technical details
cvs.texi(,1309) For an introduction to @sc{cvs} locks focusing on
cvs.texi(,1310) user-visible behavior, see @ref{Concurrency}.  The
cvs.texi(,1311) following section is aimed at people who are writing
cvs.texi(,1312) tools which want to access a @sc{cvs} repository without
cvs.texi(,1313) interfering with other tools accessing the same
cvs.texi(,1314) repository.  If you find yourself confused by concepts
cvs.texi(,1315) described here, like @dfn{read lock}, @dfn{write lock},
cvs.texi(,1316) and @dfn{deadlock}, you might consult the literature on
cvs.texi(,1317) operating systems or databases.
cvs.texi(,1318) 
cvs.texi(,1319) @cindex #cvs.tfl
cvs.texi(,1320) Any file in the repository with a name starting
cvs.texi(,1321) with @file{#cvs.rfl.} is a read lock.  Any file in
cvs.texi(,1322) the repository with a name starting with
cvs.texi(,1323) @file{#cvs.wfl} is a write lock.  Old versions of @sc{cvs}
cvs.texi(,1324) (before @sc{cvs} 1.5) also created files with names starting
cvs.texi(,1325) with @file{#cvs.tfl}, but they are not discussed here.
cvs.texi(,1326) The directory @file{#cvs.lock} serves as a master
cvs.texi(,1327) lock.  That is, one must obtain this lock first before
cvs.texi(,1328) creating any of the other locks.
cvs.texi(,1329) 
cvs.texi(,1330) To obtain a readlock, first create the @file{#cvs.lock}
cvs.texi(,1331) directory.  This operation must be atomic (which should
cvs.texi(,1332) be true for creating a directory under most operating
cvs.texi(,1333) systems).  If it fails because the directory already
cvs.texi(,1334) existed, wait for a while and try again.  After
cvs.texi(,1335) obtaining the @file{#cvs.lock} lock, create a file
cvs.texi(,1336) whose name is @file{#cvs.rfl.} followed by information
cvs.texi(,1337) of your choice (for example, hostname and process
cvs.texi(,1338) identification number).  Then remove the
cvs.texi(,1339) @file{#cvs.lock} directory to release the master lock.
cvs.texi(,1340) Then proceed with reading the repository.  When you are
cvs.texi(,1341) done, remove the @file{#cvs.rfl} file to release the
cvs.texi(,1342) read lock.
cvs.texi(,1343) 
cvs.texi(,1344) To obtain a writelock, first create the
cvs.texi(,1345) @file{#cvs.lock} directory, as with a readlock.  Then
cvs.texi(,1346) check that there are no files whose names start with
cvs.texi(,1347) @file{#cvs.rfl.}.  If there are, remove
cvs.texi(,1348) @file{#cvs.lock}, wait for a while, and try again.  If
cvs.texi(,1349) there are no readers, then create a file whose name is
cvs.texi(,1350) @file{#cvs.wfl} followed by information of your choice
cvs.texi(,1351) (for example, hostname and process identification
cvs.texi(,1352) number).  Hang on to the @file{#cvs.lock} lock.  Proceed
cvs.texi(,1353) with writing the repository.  When you are done, first
cvs.texi(,1354) remove the @file{#cvs.wfl} file and then the
cvs.texi(,1355) @file{#cvs.lock} directory. Note that unlike the
cvs.texi(,1356) @file{#cvs.rfl} file, the @file{#cvs.wfl} file is just
cvs.texi(,1357) informational; it has no effect on the locking operation
cvs.texi(,1358) beyond what is provided by holding on to the
cvs.texi(,1359) @file{#cvs.lock} lock itself.
cvs.texi(,1360) 
cvs.texi(,1361) Note that each lock (writelock or readlock) only locks
cvs.texi(,1362) a single directory in the repository, including
cvs.texi(,1363) @file{Attic} and @file{CVS} but not including
cvs.texi(,1364) subdirectories which represent other directories under
cvs.texi(,1365) version control.  To lock an entire tree, you need to
cvs.texi(,1366) lock each directory (note that if you fail to obtain
cvs.texi(,1367) any lock you need, you must release the whole tree
cvs.texi(,1368) before waiting and trying again, to avoid deadlocks).
cvs.texi(,1369) 
cvs.texi(,1370) Note also that @sc{cvs} expects writelocks to control
cvs.texi(,1371) access to individual @file{foo,v} files.  @sc{rcs} has
cvs.texi(,1372) a scheme where the @file{,foo,} file serves as a lock,
cvs.texi(,1373) but @sc{cvs} does not implement it and so taking out a
cvs.texi(,1374) @sc{cvs} writelock is recommended.  See the comments at
cvs.texi(,1375) rcs_internal_lockfile in the @sc{cvs} source code for
cvs.texi(,1376) further discussion/rationale.
cvs.texi(,1377) 
cvs.texi(,1378) @node CVSROOT storage
cvs.texi(,1379) @subsection How files are stored in the CVSROOT directory
cvs.texi(,1380) @cindex CVSROOT, storage of files
cvs.texi(,1381) 
cvs.texi(,1382) The @file{$CVSROOT/CVSROOT} directory contains the
cvs.texi(,1383) various administrative files.  In some ways this
cvs.texi(,1384) directory is just like any other directory in the
cvs.texi(,1385) repository; it contains @sc{rcs} files whose names end
cvs.texi(,1386) in @samp{,v}, and many of the @sc{cvs} commands operate
cvs.texi(,1387) on it the same way.  However, there are a few
cvs.texi(,1388) differences.
cvs.texi(,1389) 
cvs.texi(,1390) For each administrative file, in addition to the
cvs.texi(,1391) @sc{rcs} file, there is also a checked out copy of the
cvs.texi(,1392) file.  For example, there is an @sc{rcs} file
cvs.texi(,1393) @file{loginfo,v} and a file @file{loginfo} which
cvs.texi(,1394) contains the latest revision contained in
cvs.texi(,1395) @file{loginfo,v}.  When you check in an administrative
cvs.texi(,1396) file, @sc{cvs} should print
cvs.texi(,1397) 
cvs.texi(,1398) @example
cvs.texi(,1399) cvs commit: Rebuilding administrative file database
cvs.texi(,1400) @end example
cvs.texi(,1401) 
cvs.texi(,1402) @noindent
cvs.texi(,1403) and update the checked out copy in
cvs.texi(,1404) @file{$CVSROOT/CVSROOT}.  If it does not, there is
cvs.texi(,1405) something wrong (@pxref{BUGS}).  To add your own files
cvs.texi(,1406) to the files to be updated in this fashion, you can add
cvs.texi(,1407) them to the @file{checkoutlist} administrative file
cvs.texi(,1408) (@pxref{checkoutlist}).
cvs.texi(,1409) 
cvs.texi(,1410) @cindex modules.db
cvs.texi(,1411) @cindex modules.pag
cvs.texi(,1412) @cindex modules.dir
cvs.texi(,1413) By default, the @file{modules} file behaves as
cvs.texi(,1414) described above.  If the modules file is very large,
cvs.texi(,1415) storing it as a flat text file may make looking up
cvs.texi(,1416) modules slow (I'm not sure whether this is as much of a
cvs.texi(,1417) concern now as when @sc{cvs} first evolved this
cvs.texi(,1418) feature; I haven't seen benchmarks).  Therefore, by
cvs.texi(,1419) making appropriate edits to the @sc{cvs} source code
cvs.texi(,1420) one can store the modules file in a database which
cvs.texi(,1421) implements the @code{ndbm} interface, such as Berkeley
cvs.texi(,1422) db or GDBM.  If this option is in use, then the modules
cvs.texi(,1423) database will be stored in the files @file{modules.db},
cvs.texi(,1424) @file{modules.pag}, and/or @file{modules.dir}.
cvs.texi(,1425) @c I think fileattr also will use the database stuff.
cvs.texi(,1426) @c Anything else?
cvs.texi(,1427) 
cvs.texi(,1428) For information on the meaning of the various
cvs.texi(,1429) administrative files, see @ref{Administrative files}.
cvs.texi(,1430) 
cvs.texi(,1431) @node Working directory storage
cvs.texi(,1432) @section How data is stored in the working directory
cvs.texi(,1433) 
cvs.texi(,1434) @c FIXME: Somewhere we should discuss timestamps (test
cvs.texi(,1435) @c case "stamps" in sanity.sh).  But not here.  Maybe
cvs.texi(,1436) @c in some kind of "working directory" chapter which
cvs.texi(,1437) @c would encompass the "Builds" one?  But I'm not sure
cvs.texi(,1438) @c whether that is a good organization (is it based on
cvs.texi(,1439) @c what the user wants to do?).
cvs.texi(,1440) 
cvs.texi(,1441) @cindex CVS directory, in working directory
cvs.texi(,1442) While we are discussing @sc{cvs} internals which may
cvs.texi(,1443) become visible from time to time, we might as well talk
cvs.texi(,1444) about what @sc{cvs} puts in the @file{CVS} directories
cvs.texi(,1445) in the working directories.  As with the repository,
cvs.texi(,1446) @sc{cvs} handles this information and one can usually
cvs.texi(,1447) access it via @sc{cvs} commands.  But in some cases it
cvs.texi(,1448) may be useful to look at it, and other programs, such
cvs.texi(,1449) as the @code{jCVS} graphical user interface or the
cvs.texi(,1450) @code{VC} package for emacs, may need to look at it.
cvs.texi(,1451) Such programs should follow the recommendations in this
cvs.texi(,1452) section if they hope to be able to work with other
cvs.texi(,1453) programs which use those files, including future
cvs.texi(,1454) versions of the programs just mentioned and the
cvs.texi(,1455) command-line @sc{cvs} client.
cvs.texi(,1456) 
cvs.texi(,1457) The @file{CVS} directory contains several files.
cvs.texi(,1458) Programs which are reading this directory should
cvs.texi(,1459) silently ignore files which are in the directory but
cvs.texi(,1460) which are not documented here, to allow for future
cvs.texi(,1461) expansion.
cvs.texi(,1462) 
cvs.texi(,1463) The files are stored according to the text file
cvs.texi(,1464) convention for the system in question.  This means that
cvs.texi(,1465) working directories are not portable between systems
cvs.texi(,1466) with differing conventions for storing text files.
cvs.texi(,1467) This is intentional, on the theory that the files being
cvs.texi(,1468) managed by @sc{cvs} probably will not be portable between
cvs.texi(,1469) such systems either.
cvs.texi(,1470) 
cvs.texi(,1471) @table @file
cvs.texi(,1472) @item Root
cvs.texi(,1473) This file contains the current @sc{cvs} root, as
cvs.texi(,1474) described in @ref{Specifying a repository}.
cvs.texi(,1475) 
cvs.texi(,1476) @cindex Repository file, in CVS directory
cvs.texi(,1477) @cindex CVS/Repository file
cvs.texi(,1478) @item Repository
cvs.texi(,1479) This file contains the directory within the repository
cvs.texi(,1480) which the current directory corresponds with.  It can
cvs.texi(,1481) be either an absolute pathname or a relative pathname;
cvs.texi(,1482) @sc{cvs} has had the ability to read either format
cvs.texi(,1483) since at least version 1.3 or so.  The relative
cvs.texi(,1484) pathname is relative to the root, and is the more
cvs.texi(,1485) sensible approach, but the absolute pathname is quite
cvs.texi(,1486) common and implementations should accept either.  For
cvs.texi(,1487) example, after the command
cvs.texi(,1488) 
cvs.texi(,1489) @example
cvs.texi(,1490) cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc
cvs.texi(,1491) @end example
cvs.texi(,1492) 
cvs.texi(,1493) @noindent
cvs.texi(,1494) @file{Root} will contain
cvs.texi(,1495) 
cvs.texi(,1496) @example
cvs.texi(,1497) :local:/usr/local/cvsroot
cvs.texi(,1498) @end example
cvs.texi(,1499) 
cvs.texi(,1500) @noindent
cvs.texi(,1501) and @file{Repository} will contain either
cvs.texi(,1502) 
cvs.texi(,1503) @example
cvs.texi(,1504) /usr/local/cvsroot/yoyodyne/tc
cvs.texi(,1505) @end example
cvs.texi(,1506) 
cvs.texi(,1507) @noindent
cvs.texi(,1508) or
cvs.texi(,1509) 
cvs.texi(,1510) @example
cvs.texi(,1511) yoyodyne/tc
cvs.texi(,1512) @end example
cvs.texi(,1513) 
cvs.texi(,1514) If the particular working directory does not correspond
cvs.texi(,1515) to a directory in the repository, then @file{Repository}
cvs.texi(,1516) should contain @file{CVSROOT/Emptydir}.
cvs.texi(,1517) @cindex Emptydir, in CVSROOT directory
cvs.texi(,1518) @cindex CVSROOT/Emptydir directory
cvs.texi(,1519) 
cvs.texi(,1520) @cindex Entries file, in CVS directory
cvs.texi(,1521) @cindex CVS/Entries file
cvs.texi(,1522) @item Entries
cvs.texi(,1523) This file lists the files and directories in the
cvs.texi(,1524) working directory.
cvs.texi(,1525) The first character of each line indicates what sort of
cvs.texi(,1526) line it is.  If the character is unrecognized, programs
cvs.texi(,1527) reading the file should silently skip that line, to
cvs.texi(,1528) allow for future expansion.
cvs.texi(,1529) 
cvs.texi(,1530) If the first character is @samp{/}, then the format is:
cvs.texi(,1531) 
cvs.texi(,1532) @example
cvs.texi(,1533) /@var{name}/@var{revision}/@var{timestamp}[+@var{conflict}]/@var{options}/@var{tagdate}
cvs.texi(,1534) @end example
cvs.texi(,1535) 
cvs.texi(,1536) @noindent
cvs.texi(,1537) where @samp{[} and @samp{]} are not part of the entry,
cvs.texi(,1538) but instead indicate that the @samp{+} and conflict
cvs.texi(,1539) marker are optional.  @var{name} is the name of the
cvs.texi(,1540) file within the directory.  @var{revision} is the
cvs.texi(,1541) revision that the file in the working derives from, or
cvs.texi(,1542) @samp{0} for an added file, or @samp{-} followed by a
cvs.texi(,1543) revision for a removed file.  @var{timestamp} is the
cvs.texi(,1544) timestamp of the file at the time that @sc{cvs} created
cvs.texi(,1545) it; if the timestamp differs with the actual
cvs.texi(,1546) modification time of the file it means the file has
cvs.texi(,1547) been modified.  It is stored in
cvs.texi(,1548) the format used by the ISO C asctime() function (for
cvs.texi(,1549) example, @samp{Sun Apr  7 01:29:26 1996}).  One may
cvs.texi(,1550) write a string which is not in that format, for
cvs.texi(,1551) example, @samp{Result of merge}, to indicate that the
cvs.texi(,1552) file should always be considered to be modified.  This
cvs.texi(,1553) is not a special case; to see whether a file is
cvs.texi(,1554) modified a program should take the timestamp of the file
cvs.texi(,1555) and simply do a string compare with @var{timestamp}.
cvs.texi(,1556) If there was a conflict, @var{conflict} can be set to
cvs.texi(,1557) the modification time of the file after the file has been
cvs.texi(,1558) written with conflict markers (@pxref{Conflicts example}).
cvs.texi(,1559) Thus if @var{conflict} is subsequently the same as the actual
cvs.texi(,1560) modification time of the file it means that the user
cvs.texi(,1561) has obviously not resolved the conflict.  @var{options}
cvs.texi(,1562) contains sticky options (for example @samp{-kb} for a
cvs.texi(,1563) binary file).  @var{tagdate} contains @samp{T} followed
cvs.texi(,1564) by a tag name, or @samp{D} for a date, followed by a
cvs.texi(,1565) sticky tag or date.  Note that if @var{timestamp}
cvs.texi(,1566) contains a pair of timestamps separated by a space,
cvs.texi(,1567) rather than a single timestamp, you are dealing with a
cvs.texi(,1568) version of @sc{cvs} earlier than @sc{cvs} 1.5 (not
cvs.texi(,1569) documented here).
cvs.texi(,1570) 
cvs.texi(,1571) The timezone on the timestamp in CVS/Entries (local or
cvs.texi(,1572) universal) should be the same as the operating system
cvs.texi(,1573) stores for the timestamp of the file itself.  For
cvs.texi(,1574) example, on Unix the file's timestamp is in universal
cvs.texi(,1575) time (UT), so the timestamp in CVS/Entries should be
cvs.texi(,1576) too.  On @sc{vms}, the file's timestamp is in local
cvs.texi(,1577) time, so @sc{cvs} on @sc{vms} should use local time.
cvs.texi(,1578) This rule is so that files do not appear to be modified
cvs.texi(,1579) merely because the timezone changed (for example, to or
cvs.texi(,1580) from summer time).
cvs.texi(,1581) @c See comments and calls to gmtime() and friends in
cvs.texi(,1582) @c src/vers_ts.c (function time_stamp).
cvs.texi(,1583) 
cvs.texi(,1584) If the first character of a line in @file{Entries} is
cvs.texi(,1585) @samp{D}, then it indicates a subdirectory.  @samp{D}
cvs.texi(,1586) on a line all by itself indicates that the program
cvs.texi(,1587) which wrote the @file{Entries} file does record
cvs.texi(,1588) subdirectories (therefore, if there is such a line and
cvs.texi(,1589) no other lines beginning with @samp{D}, one knows there
cvs.texi(,1590) are no subdirectories).  Otherwise, the line looks
cvs.texi(,1591) like:
cvs.texi(,1592) 
cvs.texi(,1593) @example
cvs.texi(,1594) D/@var{name}/@var{filler1}/@var{filler2}/@var{filler3}/@var{filler4}
cvs.texi(,1595) @end example
cvs.texi(,1596) 
cvs.texi(,1597) @noindent
cvs.texi(,1598) where @var{name} is the name of the subdirectory, and
cvs.texi(,1599) all the @var{filler} fields should be silently ignored,
cvs.texi(,1600) for future expansion.  Programs which modify
cvs.texi(,1601) @code{Entries} files should preserve these fields.
cvs.texi(,1602) 
cvs.texi(,1603) The lines in the @file{Entries} file can be in any order.
cvs.texi(,1604) 
cvs.texi(,1605) @cindex Entries.Log file, in CVS directory
cvs.texi(,1606) @cindex CVS/Entries.Log file
cvs.texi(,1607) @item Entries.Log
cvs.texi(,1608) This file does not record any information beyond that
cvs.texi(,1609) in @file{Entries}, but it does provide a way to update
cvs.texi(,1610) the information without having to rewrite the entire
cvs.texi(,1611) @file{Entries} file, including the ability to preserve
cvs.texi(,1612) the information even if the program writing
cvs.texi(,1613) @file{Entries} and @file{Entries.Log} abruptly aborts.
cvs.texi(,1614) Programs which are reading the @file{Entries} file
cvs.texi(,1615) should also check for @file{Entries.Log}.  If the latter
cvs.texi(,1616) exists, they should read @file{Entries} and then apply
cvs.texi(,1617) the changes mentioned in @file{Entries.Log}.  After
cvs.texi(,1618) applying the changes, the recommended practice is to
cvs.texi(,1619) rewrite @file{Entries} and then delete @file{Entries.Log}.
cvs.texi(,1620) The format of a line in @file{Entries.Log} is a single
cvs.texi(,1621) character command followed by a space followed by a
cvs.texi(,1622) line in the format specified for a line in
cvs.texi(,1623) @file{Entries}.  The single character command is
cvs.texi(,1624) @samp{A} to indicate that the entry is being added,
cvs.texi(,1625) @samp{R} to indicate that the entry is being removed,
cvs.texi(,1626) or any other character to indicate that the entire line
cvs.texi(,1627) in @file{Entries.Log} should be silently ignored (for
cvs.texi(,1628) future expansion).  If the second character of the line
cvs.texi(,1629) in @file{Entries.Log} is not a space, then it was
cvs.texi(,1630) written by an older version of @sc{cvs} (not documented
cvs.texi(,1631) here).
cvs.texi(,1632) 
cvs.texi(,1633) Programs which are writing rather than reading can
cvs.texi(,1634) safely ignore @file{Entries.Log} if they so choose.
cvs.texi(,1635) 
cvs.texi(,1636) @cindex Entries.Backup file, in CVS directory
cvs.texi(,1637) @cindex CVS/Entries.Backup file
cvs.texi(,1638) @item Entries.Backup
cvs.texi(,1639) This is a temporary file.  Recommended usage is to
cvs.texi(,1640) write a new entries file to @file{Entries.Backup}, and
cvs.texi(,1641) then to rename it (atomically, where possible) to @file{Entries}.
cvs.texi(,1642) 
cvs.texi(,1643) @cindex Entries.Static file, in CVS directory
cvs.texi(,1644) @cindex CVS/Entries.Static file
cvs.texi(,1645) @item Entries.Static
cvs.texi(,1646) The only relevant thing about this file is whether it
cvs.texi(,1647) exists or not.  If it exists, then it means that only
cvs.texi(,1648) part of a directory was gotten and @sc{cvs} will
cvs.texi(,1649) not create additional files in that directory.  To
cvs.texi(,1650) clear it, use the @code{update} command with the
cvs.texi(,1651) @samp{-d} option, which will get the additional files
cvs.texi(,1652) and remove @file{Entries.Static}.
cvs.texi(,1653) @c FIXME: This needs to be better documented, in places
cvs.texi(,1654) @c other than Working Directory Storage.
cvs.texi(,1655) @c FIXCVS: The fact that this setting exists needs to
cvs.texi(,1656) @c be more visible to the user.  For example "cvs
cvs.texi(,1657) @c status foo", in the case where the file would be
cvs.texi(,1658) @c gotten except for Entries.Static, might say
cvs.texi(,1659) @c something to distinguish this from other cases.
cvs.texi(,1660) @c One thing that periodically gets suggested is to
cvs.texi(,1661) @c have "cvs update" print something when it skips
cvs.texi(,1662) @c files due to Entries.Static, but IMHO that kind of
cvs.texi(,1663) @c noise pretty much makes the Entries.Static feature
cvs.texi(,1664) @c useless.
cvs.texi(,1665) 
cvs.texi(,1666) @cindex Tag file, in CVS directory
cvs.texi(,1667) @cindex CVS/Tag file
cvs.texi(,1668) @cindex Sticky tags/dates, per-directory
cvs.texi(,1669) @cindex Per-directory sticky tags/dates
cvs.texi(,1670) @item Tag
cvs.texi(,1671) This file contains per-directory sticky tags or dates.
cvs.texi(,1672) The first character is @samp{T} for a branch tag,
cvs.texi(,1673) @samp{N} for a non-branch tag, or @samp{D} for a date,
cvs.texi(,1674) or another character to mean the file should be
cvs.texi(,1675) silently ignored, for future expansion.  This character
cvs.texi(,1676) is followed by the tag or date.  Note that
cvs.texi(,1677) per-directory sticky tags or dates are used for things
cvs.texi(,1678) like applying to files which are newly added; they
cvs.texi(,1679) might not be the same as the sticky tags or dates on
cvs.texi(,1680) individual files.  For general information on sticky
cvs.texi(,1681) tags and dates, see @ref{Sticky tags}.
cvs.texi(,1682) @c FIXME: This needs to be much better documented,
cvs.texi(,1683) @c preferably not in the context of "working directory
cvs.texi(,1684) @c storage".
cvs.texi(,1685) @c FIXME: The Sticky tags node needs to discuss, or xref to
cvs.texi(,1686) @c someplace which discusses, per-directory sticky
cvs.texi(,1687) @c tags and the distinction with per-file sticky tags.
cvs.texi(,1688) 
cvs.texi(,1689) @cindex Notify file, in CVS directory
cvs.texi(,1690) @cindex CVS/Notify file
cvs.texi(,1691) @item Notify
cvs.texi(,1692) This file stores notifications (for example, for
cvs.texi(,1693) @code{edit} or @code{unedit}) which have not yet been
cvs.texi(,1694) sent to the server.  Its format is not yet documented
cvs.texi(,1695) here.
cvs.texi(,1696) 
cvs.texi(,1697) @cindex Notify.tmp file, in CVS directory
cvs.texi(,1698) @cindex CVS/Notify.tmp file
cvs.texi(,1699) @item Notify.tmp
cvs.texi(,1700) This file is to @file{Notify} as @file{Entries.Backup}
cvs.texi(,1701) is to @file{Entries}.  That is, to write @file{Notify},
cvs.texi(,1702) first write the new contents to @file{Notify.tmp} and
cvs.texi(,1703) then (atomically where possible), rename it to
cvs.texi(,1704) @file{Notify}.
cvs.texi(,1705) 
cvs.texi(,1706) @cindex Base directory, in CVS directory
cvs.texi(,1707) @cindex CVS/Base directory
cvs.texi(,1708) @item Base
cvs.texi(,1709) If watches are in use, then an @code{edit} command
cvs.texi(,1710) stores the original copy of the file in the @file{Base}
cvs.texi(,1711) directory.  This allows the @code{unedit} command to
cvs.texi(,1712) operate even if it is unable to communicate with the
cvs.texi(,1713) server.
cvs.texi(,1714) 
cvs.texi(,1715) @cindex Baserev file, in CVS directory
cvs.texi(,1716) @cindex CVS/Baserev file
cvs.texi(,1717) @item Baserev
cvs.texi(,1718) The file lists the revision for each of the files in
cvs.texi(,1719) the @file{Base} directory.  The format is:
cvs.texi(,1720) 
cvs.texi(,1721) @example
cvs.texi(,1722) B@var{name}/@var{rev}/@var{expansion}
cvs.texi(,1723) @end example
cvs.texi(,1724) 
cvs.texi(,1725) @noindent
cvs.texi(,1726) where @var{expansion} should be ignored, to allow for
cvs.texi(,1727) future expansion.
cvs.texi(,1728) 
cvs.texi(,1729) @cindex Baserev.tmp file, in CVS directory
cvs.texi(,1730) @cindex CVS/Baserev.tmp file
cvs.texi(,1731) @item Baserev.tmp
cvs.texi(,1732) This file is to @file{Baserev} as @file{Entries.Backup}
cvs.texi(,1733) is to @file{Entries}.  That is, to write @file{Baserev},
cvs.texi(,1734) first write the new contents to @file{Baserev.tmp} and
cvs.texi(,1735) then (atomically where possible), rename it to
cvs.texi(,1736) @file{Baserev}.
cvs.texi(,1737) 
cvs.texi(,1738) @cindex Template file, in CVS directory
cvs.texi(,1739) @cindex CVS/Template file
cvs.texi(,1740) @item Template
cvs.texi(,1741) This file contains the template specified by the
cvs.texi(,1742) @file{rcsinfo} file (@pxref{rcsinfo}).  It is only used
cvs.texi(,1743) by the client; the non-client/server @sc{cvs} consults
cvs.texi(,1744) @file{rcsinfo} directly.
cvs.texi(,1745) @end table
cvs.texi(,1746) 
cvs.texi(,1747) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,1748) @node Intro administrative files
cvs.texi(,1749) @section The administrative files
cvs.texi(,1750) @cindex Administrative files (intro)
cvs.texi(,1751) @cindex Modules file
cvs.texi(,1752) @cindex CVSROOT, module name
cvs.texi(,1753) @cindex Defining modules (intro)
cvs.texi(,1754) 
cvs.texi(,1755) @c FIXME: this node should be reorganized into "general
cvs.texi(,1756) @c information about admin files" and put the "editing
cvs.texi(,1757) @c admin files" stuff up front rather than jumping into
cvs.texi(,1758) @c the details of modules right away.  Then the
cvs.texi(,1759) @c Administrative files node can go away, the information
cvs.texi(,1760) @c on each admin file distributed to a place appropriate
cvs.texi(,1761) @c to its function, and this node can contain a table
cvs.texi(,1762) @c listing each file and a @ref to its detailed description.
cvs.texi(,1763) 
cvs.texi(,1764) The directory @file{$CVSROOT/CVSROOT} contains some @dfn{administrative
cvs.texi(,1765) files}.  @xref{Administrative files}, for a complete description.
cvs.texi(,1766) You can use @sc{cvs} without any of these files, but
cvs.texi(,1767) some commands work better when at least the
cvs.texi(,1768) @file{modules} file is properly set up.
cvs.texi(,1769) 
cvs.texi(,1770) The most important of these files is the @file{modules}
cvs.texi(,1771) file.  It defines all modules in the repository.  This
cvs.texi(,1772) is a sample @file{modules} file.
cvs.texi(,1773) 
cvs.texi(,1774) @c FIXME: The CVSROOT line is a goofy example now that
cvs.texi(,1775) @c mkmodules doesn't exist.
cvs.texi(,1776) @example
cvs.texi(,1777) CVSROOT         CVSROOT
cvs.texi(,1778) modules         CVSROOT modules
cvs.texi(,1779) cvs             gnu/cvs
cvs.texi(,1780) rcs             gnu/rcs
cvs.texi(,1781) diff            gnu/diff
cvs.texi(,1782) tc              yoyodyne/tc
cvs.texi(,1783) @end example
cvs.texi(,1784) 
cvs.texi(,1785) The @file{modules} file is line oriented.  In its
cvs.texi(,1786) simplest form each line contains the name of the
cvs.texi(,1787) module, whitespace, and the directory where the module
cvs.texi(,1788) resides.  The directory is a path relative to
cvs.texi(,1789) @code{$CVSROOT}.  The last four lines in the example
cvs.texi(,1790) above are examples of such lines.
cvs.texi(,1791) 
cvs.texi(,1792) @c FIXME: might want to introduce the concept of options in modules file
cvs.texi(,1793) @c (the old example which was here, -i mkmodules, is obsolete).
cvs.texi(,1794) 
cvs.texi(,1795) The line that defines the module called @samp{modules}
cvs.texi(,1796) uses features that are not explained here.
cvs.texi(,1797) @xref{modules}, for a full explanation of all the
cvs.texi(,1798) available features.
cvs.texi(,1799) 
cvs.texi(,1800) @c FIXME: subsection without node is bogus
cvs.texi(,1801) @subsection Editing administrative files
cvs.texi(,1802) @cindex Editing administrative files
cvs.texi(,1803) @cindex Administrative files, editing them
cvs.texi(,1804) 
cvs.texi(,1805) You edit the administrative files in the same way that you would edit
cvs.texi(,1806) any other module.  Use @samp{cvs checkout CVSROOT} to get a working
cvs.texi(,1807) copy, edit it, and commit your changes in the normal way.
cvs.texi(,1808) 
cvs.texi(,1809) It is possible to commit an erroneous administrative
cvs.texi(,1810) file.  You can often fix the error and check in a new
cvs.texi(,1811) revision, but sometimes a particularly bad error in the
cvs.texi(,1812) administrative file makes it impossible to commit new
cvs.texi(,1813) revisions.
cvs.texi(,1814) @c @xref{Bad administrative files} for a hint
cvs.texi(,1815) @c about how to solve such situations.
cvs.texi(,1816) @c -- administrative file checking--
cvs.texi(,1817) 
cvs.texi(,1818) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,1819) @node Multiple repositories
cvs.texi(,1820) @section Multiple repositories
cvs.texi(,1821) @cindex Multiple repositories
cvs.texi(,1822) @cindex Repositories, multiple
cvs.texi(,1823) @cindex Many repositories
cvs.texi(,1824) @cindex Parallel repositories
cvs.texi(,1825) @cindex Disjoint repositories
cvs.texi(,1826) @cindex CVSROOT, multiple repositories
cvs.texi(,1827) 
cvs.texi(,1828) In some situations it is a good idea to have more than
cvs.texi(,1829) one repository, for instance if you have two
cvs.texi(,1830) development groups that work on separate projects
cvs.texi(,1831) without sharing any code.  All you have to do to have
cvs.texi(,1832) several repositories is to specify the appropriate
cvs.texi(,1833) repository, using the @code{CVSROOT} environment
cvs.texi(,1834) variable, the @samp{-d} option to @sc{cvs}, or (once
cvs.texi(,1835) you have checked out a working directory) by simply
cvs.texi(,1836) allowing @sc{cvs} to use the repository that was used
cvs.texi(,1837) to check out the working directory
cvs.texi(,1838) (@pxref{Specifying a repository}).
cvs.texi(,1839) 
cvs.texi(,1840) The big advantage of having multiple repositories is
cvs.texi(,1841) that they can reside on different servers.  With @sc{cvs}
cvs.texi(,1842) version 1.10, a single command cannot recurse into
cvs.texi(,1843) directories from different repositories.  With development
cvs.texi(,1844) versions of @sc{cvs}, you can check out code from multiple
cvs.texi(,1845) servers into your working directory.  @sc{cvs} will
cvs.texi(,1846) recurse and handle all the details of making
cvs.texi(,1847) connections to as many server machines as necessary to
cvs.texi(,1848) perform the requested command.  Here is an example of
cvs.texi(,1849) how to set up a working directory:
cvs.texi(,1850) 
cvs.texi(,1851) @example
cvs.texi(,1852) cvs -d server1:/cvs co dir1
cvs.texi(,1853) cd dir1
cvs.texi(,1854) cvs -d server2:/root co sdir
cvs.texi(,1855) cvs update
cvs.texi(,1856) @end example
cvs.texi(,1857) 
cvs.texi(,1858) The @code{cvs co} commands set up the working
cvs.texi(,1859) directory, and then the @code{cvs update} command will
cvs.texi(,1860) contact server2, to update the dir1/sdir subdirectory,
cvs.texi(,1861) and server1, to update everything else.
cvs.texi(,1862) 
cvs.texi(,1863) @c FIXME: Does the FAQ have more about this?  I have a
cvs.texi(,1864) @c dim recollection, but I'm too lazy to check right now.
cvs.texi(,1865) 
cvs.texi(,1866) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,1867) @node Creating a repository
cvs.texi(,1868) @section Creating a repository
cvs.texi(,1869) 
cvs.texi(,1870) @cindex Repository, setting up
cvs.texi(,1871) @cindex Creating a repository
cvs.texi(,1872) @cindex Setting up a repository
cvs.texi(,1873) 
cvs.texi(,1874) To set up a @sc{cvs} repository, first choose the
cvs.texi(,1875) machine and disk on which you want to store the
cvs.texi(,1876) revision history of the source files.  CPU and memory
cvs.texi(,1877) requirements are modest, so most machines should be
cvs.texi(,1878) adequate.  For details see @ref{Server requirements}.
cvs.texi(,1879) @c Possible that we should be providing a quick rule of
cvs.texi(,1880) @c thumb, like the 32M memory for the server.  That
cvs.texi(,1881) @c might increase the number of people who are happy
cvs.texi(,1882) @c with the answer, without following the xref.
cvs.texi(,1883) 
cvs.texi(,1884) To estimate disk space
cvs.texi(,1885) requirements, if you are importing RCS files from
cvs.texi(,1886) another system, the size of those files is the
cvs.texi(,1887) approximate initial size of your repository, or if you
cvs.texi(,1888) are starting without any version history, a rule of
cvs.texi(,1889) thumb is to allow for the server approximately three
cvs.texi(,1890) times the size of the code to be under @sc{cvs} for the
cvs.texi(,1891) repository (you will eventually outgrow this, but not
cvs.texi(,1892) for a while).  On the machines on which the developers
cvs.texi(,1893) will be working, you'll want disk space for
cvs.texi(,1894) approximately one working directory for each developer
cvs.texi(,1895) (either the entire tree or a portion of it, depending
cvs.texi(,1896) on what each developer uses).
cvs.texi(,1897) 
cvs.texi(,1898) The repository should be accessible
cvs.texi(,1899) (directly or via a networked file system) from all
cvs.texi(,1900) machines which want to use @sc{cvs} in server or local
cvs.texi(,1901) mode; the client machines need not have any access to
cvs.texi(,1902) it other than via the @sc{cvs} protocol.  It is not
cvs.texi(,1903) possible to use @sc{cvs} to read from a repository
cvs.texi(,1904) which one only has read access to; @sc{cvs} needs to be
cvs.texi(,1905) able to create lock files (@pxref{Concurrency}).
cvs.texi(,1906) 
cvs.texi(,1907) @cindex init (subcommand)
cvs.texi(,1908) To create a repository, run the @code{cvs init}
cvs.texi(,1909) command.  It will set up an empty repository in the
cvs.texi(,1910) @sc{cvs} root specified in the usual way
cvs.texi(,1911) (@pxref{Repository}).  For example,
cvs.texi(,1912) 
cvs.texi(,1913) @example
cvs.texi(,1914) cvs -d /usr/local/cvsroot init
cvs.texi(,1915) @end example
cvs.texi(,1916) 
cvs.texi(,1917) @code{cvs init} is careful to never overwrite any
cvs.texi(,1918) existing files in the repository, so no harm is done if
cvs.texi(,1919) you run @code{cvs init} on an already set-up
cvs.texi(,1920) repository.
cvs.texi(,1921) 
cvs.texi(,1922) @code{cvs init} will enable history logging; if you
cvs.texi(,1923) don't want that, remove the history file after running
cvs.texi(,1924) @code{cvs init}.  @xref{history file}.
cvs.texi(,1925) 
cvs.texi(,1926) @node Backing up
cvs.texi(,1927) @section Backing up a repository
cvs.texi(,1928) @cindex Repository, backing up
cvs.texi(,1929) @cindex Backing up, repository
cvs.texi(,1930) 
cvs.texi(,1931) There is nothing particularly magical about the files
cvs.texi(,1932) in the repository; for the most part it is possible to
cvs.texi(,1933) back them up just like any other files.  However, there
cvs.texi(,1934) are a few issues to consider.
cvs.texi(,1935) 
cvs.texi(,1936) @cindex Locks, cvs, and backups
cvs.texi(,1937) @cindex #cvs.rfl, and backups
cvs.texi(,1938) The first is that to be paranoid, one should either not
cvs.texi(,1939) use @sc{cvs} during the backup, or have the backup
cvs.texi(,1940) program lock @sc{cvs} while doing the backup.  To not
cvs.texi(,1941) use @sc{cvs}, you might forbid logins to machines which
cvs.texi(,1942) can access the repository, turn off your @sc{cvs}
cvs.texi(,1943) server, or similar mechanisms.  The details would
cvs.texi(,1944) depend on your operating system and how you have
cvs.texi(,1945) @sc{cvs} set up.  To lock @sc{cvs}, you would create
cvs.texi(,1946) @file{#cvs.rfl} locks in each repository directory.
cvs.texi(,1947) See @ref{Concurrency}, for more on @sc{cvs} locks.
cvs.texi(,1948) Having said all this, if you just back up without any
cvs.texi(,1949) of these precautions, the results are unlikely to be
cvs.texi(,1950) particularly dire.  Restoring from backup, the
cvs.texi(,1951) repository might be in an inconsistent state, but this
cvs.texi(,1952) would not be particularly hard to fix manually.
cvs.texi(,1953) 
cvs.texi(,1954) When you restore a repository from backup, assuming
cvs.texi(,1955) that changes in the repository were made after the time
cvs.texi(,1956) of the backup, working directories which were not
cvs.texi(,1957) affected by the failure may refer to revisions which no
cvs.texi(,1958) longer exist in the repository.  Trying to run @sc{cvs}
cvs.texi(,1959) in such directories will typically produce an error
cvs.texi(,1960) message.  One way to get those changes back into the
cvs.texi(,1961) repository is as follows:
cvs.texi(,1962) 
cvs.texi(,1963) @itemize @bullet
cvs.texi(,1964) @item
cvs.texi(,1965) Get a new working directory.
cvs.texi(,1966) 
cvs.texi(,1967) @item
cvs.texi(,1968) Copy the files from the working directory from before
cvs.texi(,1969) the failure over to the new working directory (do not
cvs.texi(,1970) copy the contents of the @file{CVS} directories, of
cvs.texi(,1971) course).
cvs.texi(,1972) 
cvs.texi(,1973) @item
cvs.texi(,1974) Working in the new working directory, use commands such
cvs.texi(,1975) as @code{cvs update} and @code{cvs diff} to figure out
cvs.texi(,1976) what has changed, and then when you are ready, commit
cvs.texi(,1977) the changes into the repository.
cvs.texi(,1978) @end itemize
cvs.texi(,1979) 
cvs.texi(,1980) @node Moving a repository
cvs.texi(,1981) @section Moving a repository
cvs.texi(,1982) @cindex Repository, moving
cvs.texi(,1983) @cindex Moving a repository
cvs.texi(,1984) @cindex Copying a repository
cvs.texi(,1985) 
cvs.texi(,1986) Just as backing up the files in the repository is
cvs.texi(,1987) pretty much like backing up any other files, if you
cvs.texi(,1988) need to move a repository from one place to another it
cvs.texi(,1989) is also pretty much like just moving any other
cvs.texi(,1990) collection of files.
cvs.texi(,1991) 
cvs.texi(,1992) The main thing to consider is that working directories
cvs.texi(,1993) point to the repository.  The simplest way to deal with
cvs.texi(,1994) a moved repository is to just get a fresh working
cvs.texi(,1995) directory after the move.  Of course, you'll want to
cvs.texi(,1996) make sure that the old working directory had been
cvs.texi(,1997) checked in before the move, or you figured out some
cvs.texi(,1998) other way to make sure that you don't lose any
cvs.texi(,1999) changes.  If you really do want to reuse the existing
cvs.texi(,2000) working directory, it should be possible with manual
cvs.texi(,2001) surgery on the @file{CVS/Repository} files.  You can
cvs.texi(,2002) see @ref{Working directory storage}, for information on
cvs.texi(,2003) the @file{CVS/Repository} and @file{CVS/Root} files, but
cvs.texi(,2004) unless you are sure you want to bother, it probably
cvs.texi(,2005) isn't worth it.
cvs.texi(,2006) @c FIXME: Surgery on CVS/Repository should be avoided
cvs.texi(,2007) @c by making RELATIVE_REPOS the default.
cvs.texi(,2008) @c FIXME-maybe: might want some documented way to
cvs.texi(,2009) @c change the CVS/Root files in some particular tree.
cvs.texi(,2010) @c But then again, I don't know, maybe just having
cvs.texi(,2011) @c people do this in perl/shell/&c isn't so bad...
cvs.texi(,2012) 
cvs.texi(,2013) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,2014) @node Remote repositories
cvs.texi(,2015) @section Remote repositories
cvs.texi(,2016) @cindex Repositories, remote
cvs.texi(,2017) @cindex Remote repositories
cvs.texi(,2018) @cindex Client/Server Operation
cvs.texi(,2019) @cindex Server, CVS
cvs.texi(,2020) @cindex Remote repositories, port specification
cvs.texi(,2021) @cindex Repositories, remote, port specification
cvs.texi(,2022) @cindex Client/Server Operation, port specification
cvs.texi(,2023) @cindex pserver (client/server connection method), port specification
cvs.texi(,2024) @cindex kserver (client/server connection method), port specification
cvs.texi(,2025) @cindex gserver (client/server connection method), port specification
cvs.texi(,2026) @cindex port, specifying for remote repositories
cvs.texi(,2027) 
cvs.texi(,2028)         Your working copy of the sources can be on a
cvs.texi(,2029) different machine than the repository.  Using @sc{cvs}
cvs.texi(,2030) in this manner is known as @dfn{client/server}
cvs.texi(,2031) operation.  You run @sc{cvs} on a machine which can
cvs.texi(,2032) mount your working directory, known as the
cvs.texi(,2033) @dfn{client}, and tell it to communicate to a machine
cvs.texi(,2034) which can mount the repository, known as the
cvs.texi(,2035) @dfn{server}.  Generally, using a remote
cvs.texi(,2036) repository is just like using a local one, except that
cvs.texi(,2037) the format of the repository name is:
cvs.texi(,2038) 
cvs.texi(,2039) @example
cvs.texi(,2040) [:@var{method}:][[@var{user}][:@var{password}]@@]@var{hostname}[:[@var{port}]]/path/to/repository
cvs.texi(,2041) @end example
cvs.texi(,2042) 
cvs.texi(,2043) Specifying a password in the repository name is not recommended during
cvs.texi(,2044) checkout, since this will cause @sc{cvs} to store a cleartext copy of the
cvs.texi(,2045) password in each created directory.  @code{cvs login} first instead
cvs.texi(,2046) (@pxref{Password authentication client}).
cvs.texi(,2047) 
cvs.texi(,2048) The details of exactly what needs to be set up depend
cvs.texi(,2049) on how you are connecting to the server.
cvs.texi(,2050) 
cvs.texi(,2051) If @var{method} is not specified, and the repository
cvs.texi(,2052) name contains @samp{:}, then the default is @code{ext}
cvs.texi(,2053) or @code{server}, depending on your platform; both are
cvs.texi(,2054) described in @ref{Connecting via rsh}.
cvs.texi(,2055) @c Should we try to explain which platforms are which?
cvs.texi(,2056) @c Platforms like unix and VMS, which only allow
cvs.texi(,2057) @c privileged programs to bind to sockets <1024 lose on
cvs.texi(,2058) @c :server:
cvs.texi(,2059) @c Platforms like Mac and VMS, whose rsh program is
cvs.texi(,2060) @c unusable or nonexistent, lose on :ext:
cvs.texi(,2061) @c Platforms like OS/2 and NT probably could plausibly
cvs.texi(,2062) @c default either way (modulo -b troubles).
cvs.texi(,2063) 
cvs.texi(,2064) @c FIXME: We need to have a better way of explaining
cvs.texi(,2065) @c what method to use.  This presentation totally
cvs.texi(,2066) @c obscures the fact that :ext: and CVS_RSH is the way to
cvs.texi(,2067) @c use SSH, for example.  Plus it incorrectly implies
cvs.texi(,2068) @c that you need an @code{rsh} binary on the client to use
cvs.texi(,2069) @c :server:.
cvs.texi(,2070) @c Also note that rsh not pserver is the right choice if you want
cvs.texi(,2071) @c users to be able to create their own repositories
cvs.texi(,2072) @c (because of the --allow-root related issues).
cvs.texi(,2073) @menu
cvs.texi(,2074) * Server requirements::         Memory and other resources for servers
cvs.texi(,2075) * Connecting via rsh::          Using the @code{rsh} program to connect
cvs.texi(,2076) * Password authenticated::      Direct connections using passwords
cvs.texi(,2077) * GSSAPI authenticated::        Direct connections using GSSAPI
cvs.texi(,2078) * Kerberos authenticated::      Direct connections with kerberos
cvs.texi(,2079) * Connecting via fork::         Using a forked @code{cvs server} to connect
cvs.texi(,2080) @end menu
cvs.texi(,2081) 
cvs.texi(,2082) @node Server requirements
cvs.texi(,2083) @subsection Server requirements
cvs.texi(,2084) 
cvs.texi(,2085) The quick answer to what sort of machine is suitable as
cvs.texi(,2086) a server is that requirements are modest---a server
cvs.texi(,2087) with 32M of memory or even less can handle a fairly
cvs.texi(,2088) large source tree with a fair amount of activity.
cvs.texi(,2089) @c Say something about CPU speed too?  I'm even less sure
cvs.texi(,2090) @c what to say on that subject...
cvs.texi(,2091) 
cvs.texi(,2092) The real answer, of course, is more complicated.
cvs.texi(,2093) Estimating the known areas of large memory consumption
cvs.texi(,2094) should be sufficient to estimate memory requirements.
cvs.texi(,2095) There are two such areas documented here; other memory
cvs.texi(,2096) consumption should be small by comparison (if you find
cvs.texi(,2097) that is not the case, let us know, as described in
cvs.texi(,2098) @ref{BUGS}, so we can update this documentation).
cvs.texi(,2099) 
cvs.texi(,2100) The first area of big memory consumption is large
cvs.texi(,2101) checkouts, when using the @sc{cvs} server.  The server
cvs.texi(,2102) consists of two processes for each client that it is
cvs.texi(,2103) serving.  Memory consumption on the child process
cvs.texi(,2104) should remain fairly small.  Memory consumption on the
cvs.texi(,2105) parent process, particularly if the network connection
cvs.texi(,2106) to the client is slow, can be expected to grow to
cvs.texi(,2107) slightly more than the size of the sources in a single
cvs.texi(,2108) directory, or two megabytes, whichever is larger.
cvs.texi(,2109) @c "two megabytes" of course is SERVER_HI_WATER.  But
cvs.texi(,2110) @c we don't mention that here because we are
cvs.texi(,2111) @c documenting the default configuration of CVS.  If it
cvs.texi(,2112) @c is a "standard" thing to change that value, it
cvs.texi(,2113) @c should be some kind of run-time configuration.
cvs.texi(,2114) @c
cvs.texi(,2115) @c See cvsclient.texi for more on the design decision
cvs.texi(,2116) @c to not have locks in place while waiting for the
cvs.texi(,2117) @c client, which is what results in memory consumption
cvs.texi(,2118) @c as high as this.
cvs.texi(,2119) 
cvs.texi(,2120) Multiplying the size of each @sc{cvs} server by the
cvs.texi(,2121) number of servers which you expect to have active at
cvs.texi(,2122) one time should give an idea of memory requirements for
cvs.texi(,2123) the server.  For the most part, the memory consumed by
cvs.texi(,2124) the parent process probably can be swap space rather
cvs.texi(,2125) than physical memory.
cvs.texi(,2126) @c Has anyone verified that notion about swap space?
cvs.texi(,2127) @c I say it based pretty much on guessing that the
cvs.texi(,2128) @c ->text of the struct buffer_data only gets accessed
cvs.texi(,2129) @c in a first in, first out fashion, but I haven't
cvs.texi(,2130) @c looked very closely.
cvs.texi(,2131) 
cvs.texi(,2132) @c What about disk usage in /tmp on the server?  I think that
cvs.texi(,2133) @c it can be substantial, but I haven't looked at this
cvs.texi(,2134) @c again and tried to figure it out ("cvs import" is
cvs.texi(,2135) @c probably the worst case...).
cvs.texi(,2136) 
cvs.texi(,2137) The second area of large memory consumption is
cvs.texi(,2138) @code{diff}, when checking in large files.  This is
cvs.texi(,2139) required even for binary files.  The rule of thumb is
cvs.texi(,2140) to allow about ten times the size of the largest file
cvs.texi(,2141) you will want to check in, although five times may be
cvs.texi(,2142) adequate.  For example, if you want to check in a file
cvs.texi(,2143) which is 10 megabytes, you should have 100 megabytes of
cvs.texi(,2144) memory on the machine doing the checkin (the server
cvs.texi(,2145) machine for client/server, or the machine running
cvs.texi(,2146) @sc{cvs} for non-client/server).  This can be swap
cvs.texi(,2147) space rather than physical memory.  Because the memory
cvs.texi(,2148) is only required briefly, there is no particular need
cvs.texi(,2149) to allow memory for more than one such checkin at a
cvs.texi(,2150) time.
cvs.texi(,2151) @c The 5-10 times rule of thumb is from Paul Eggert for
cvs.texi(,2152) @c GNU diff.  I don't think it is in the GNU diff
cvs.texi(,2153) @c manual or anyplace like that.
cvs.texi(,2154) @c
cvs.texi(,2155) @c Probably we could be saying more about
cvs.texi(,2156) @c non-client/server CVS.
cvs.texi(,2157) @c I would guess for non-client/server CVS in an NFS
cvs.texi(,2158) @c environment the biggest issues are the network and
cvs.texi(,2159) @c the NFS server.
cvs.texi(,2160) 
cvs.texi(,2161) Resource consumption for the client is even more
cvs.texi(,2162) modest---any machine with enough capacity to run the
cvs.texi(,2163) operating system in question should have little
cvs.texi(,2164) trouble.
cvs.texi(,2165) @c Is that true?  I think the client still wants to
cvs.texi(,2166) @c (bogusly) store entire files in memory at times.
cvs.texi(,2167) 
cvs.texi(,2168) For information on disk space requirements, see
cvs.texi(,2169) @ref{Creating a repository}.
cvs.texi(,2170) 
cvs.texi(,2171) @node Connecting via rsh
cvs.texi(,2172) @subsection Connecting with rsh
cvs.texi(,2173) 
cvs.texi(,2174) @cindex rsh
cvs.texi(,2175) @sc{cvs} uses the @samp{rsh} protocol to perform these
cvs.texi(,2176) operations, so the remote user host needs to have a
cvs.texi(,2177) @file{.rhosts} file which grants access to the local
cvs.texi(,2178) user. Note that the program that @sc{cvs} uses for this
cvs.texi(,2179) purpose may be specified using the @file{--with-rsh}
cvs.texi(,2180) flag to configure.
cvs.texi(,2181) 
cvs.texi(,2182) For example, suppose you are the user @samp{mozart} on
cvs.texi(,2183) the local machine @samp{toe.example.com}, and the
cvs.texi(,2184) server machine is @samp{faun.example.org}.  On
cvs.texi(,2185) faun, put the following line into the file
cvs.texi(,2186) @file{.rhosts} in @samp{bach}'s home directory:
cvs.texi(,2187) 
cvs.texi(,2188) @example
cvs.texi(,2189) toe.example.com  mozart
cvs.texi(,2190) @end example
cvs.texi(,2191) 
cvs.texi(,2192) @noindent
cvs.texi(,2193) Then test that @samp{rsh} is working with
cvs.texi(,2194) 
cvs.texi(,2195) @example
cvs.texi(,2196) rsh -l bach faun.example.org 'echo $PATH'
cvs.texi(,2197) @end example
cvs.texi(,2198) 
cvs.texi(,2199) @cindex CVS_SERVER, environment variable
cvs.texi(,2200) Next you have to make sure that @code{rsh} will be able
cvs.texi(,2201) to find the server.  Make sure that the path which
cvs.texi(,2202) @code{rsh} printed in the above example includes the
cvs.texi(,2203) directory containing a program named @code{cvs} which
cvs.texi(,2204) is the server.  You need to set the path in
cvs.texi(,2205) @file{.bashrc}, @file{.cshrc}, etc., not @file{.login}
cvs.texi(,2206) or @file{.profile}.  Alternately, you can set the
cvs.texi(,2207) environment variable @code{CVS_SERVER} on the client
cvs.texi(,2208) machine to the filename of the server you want to use,
cvs.texi(,2209) for example @file{/usr/local/bin/cvs-1.6}.
cvs.texi(,2210) @c FIXME: there should be a way to specify the
cvs.texi(,2211) @c program in CVSROOT, not CVS_SERVER, so that one can use
cvs.texi(,2212) @c different ones for different roots.  e.g. ":server;cvs=cvs-1.6:"
cvs.texi(,2213) @c instead of ":server:".
cvs.texi(,2214) 
cvs.texi(,2215) There is no need to edit @file{inetd.conf} or start a
cvs.texi(,2216) @sc{cvs} server daemon.
cvs.texi(,2217) 
cvs.texi(,2218) @cindex :server:, setting up
cvs.texi(,2219) @cindex :ext:, setting up
cvs.texi(,2220) @cindex Kerberos, using kerberized rsh
cvs.texi(,2221) @cindex SSH (rsh replacement)
cvs.texi(,2222) @cindex rsh replacements (Kerberized, SSH, &c)
cvs.texi(,2223) There are two access methods that you use in @code{CVSROOT}
cvs.texi(,2224) for rsh.  @code{:server:} specifies an internal rsh
cvs.texi(,2225) client, which is supported only by some @sc{cvs} ports.
cvs.texi(,2226) @code{:ext:} specifies an external rsh program.  By
cvs.texi(,2227) default this is @code{rsh} (unless otherwise specified
cvs.texi(,2228) by the @file{--with-rsh} flag to configure) but you may set the
cvs.texi(,2229) @code{CVS_RSH} environment variable to invoke another
cvs.texi(,2230) program which can access the remote server (for
cvs.texi(,2231) example, @code{remsh} on HP-UX 9 because @code{rsh} is
cvs.texi(,2232) something different).  It must be a program which can
cvs.texi(,2233) transmit data to and from the server without modifying
cvs.texi(,2234) it; for example the Windows NT @code{rsh} is not
cvs.texi(,2235) suitable since it by default translates between CRLF
cvs.texi(,2236) and LF.  The OS/2 @sc{cvs} port has a hack to pass @samp{-b}
cvs.texi(,2237) to @code{rsh} to get around this, but since this could
cvs.texi(,2238) potentially cause problems for programs other than the
cvs.texi(,2239) standard @code{rsh}, it may change in the future.  If
cvs.texi(,2240) you set @code{CVS_RSH} to @code{SSH} or some other rsh
cvs.texi(,2241) replacement, the instructions in the rest of this
cvs.texi(,2242) section concerning @file{.rhosts} and so on are likely
cvs.texi(,2243) to be inapplicable; consult the documentation for your rsh
cvs.texi(,2244) replacement.
cvs.texi(,2245) @c FIXME: there should be a way to specify the
cvs.texi(,2246) @c program in CVSROOT, not CVS_RSH, so that one can use
cvs.texi(,2247) @c different ones for different roots.  e.g. ":ext;rsh=remsh:"
cvs.texi(,2248) @c instead of ":ext:".
cvs.texi(,2249) @c See also the comment in src/client.c for rationale
cvs.texi(,2250) @c concerning "rsh" being the default and never
cvs.texi(,2251) @c "remsh".
cvs.texi(,2252) 
cvs.texi(,2253) Continuing our example, supposing you want to access
cvs.texi(,2254) the module @file{foo} in the repository
cvs.texi(,2255) @file{/usr/local/cvsroot/}, on machine
cvs.texi(,2256) @file{faun.example.org}, you are ready to go:
cvs.texi(,2257) 
cvs.texi(,2258) @example
cvs.texi(,2259) cvs -d :ext:bach@@faun.example.org:/usr/local/cvsroot checkout foo
cvs.texi(,2260) @end example
cvs.texi(,2261) 
cvs.texi(,2262) @noindent
cvs.texi(,2263) (The @file{bach@@} can be omitted if the username is
cvs.texi(,2264) the same on both the local and remote hosts.)
cvs.texi(,2265) 
cvs.texi(,2266) @c Should we mention "rsh host echo hi" and "rsh host
cvs.texi(,2267) @c cat" (the latter followed by typing text and ^D)
cvs.texi(,2268) @c as troubleshooting techniques?  Probably yes
cvs.texi(,2269) @c (people tend to have trouble setting this up),
cvs.texi(,2270) @c but this kind of thing can be hard to spell out.
cvs.texi(,2271) 
cvs.texi(,2272) @node Password authenticated
cvs.texi(,2273) @subsection Direct connection with password authentication
cvs.texi(,2274) 
cvs.texi(,2275) The @sc{cvs} client can also connect to the server
cvs.texi(,2276) using a password protocol.  This is particularly useful
cvs.texi(,2277) if using @code{rsh} is not feasible (for example,
cvs.texi(,2278) the server is behind a firewall), and Kerberos also is
cvs.texi(,2279) not available.
cvs.texi(,2280) 
cvs.texi(,2281)         To use this method, it is necessary to make
cvs.texi(,2282) some adjustments on both the server and client sides.
cvs.texi(,2283) 
cvs.texi(,2284) @menu
cvs.texi(,2285) * Password authentication server::     Setting up the server
cvs.texi(,2286) * Password authentication client::     Using the client
cvs.texi(,2287) * Password authentication security::   What this method does and does not do
cvs.texi(,2288) @end menu
cvs.texi(,2289) 
cvs.texi(,2290) @node Password authentication server
cvs.texi(,2291) @subsubsection Setting up the server for password authentication
cvs.texi(,2292) 
cvs.texi(,2293) First of all, you probably want to tighten the
cvs.texi(,2294) permissions on the @file{$CVSROOT} and
cvs.texi(,2295) @file{$CVSROOT/CVSROOT} directories.  See @ref{Password
cvs.texi(,2296) authentication security}, for more details.
cvs.texi(,2297) 
cvs.texi(,2298) @cindex pserver (subcommand)
cvs.texi(,2299) @cindex Remote repositories, port specification
cvs.texi(,2300) @cindex Repositories, remote, port specification
cvs.texi(,2301) @cindex Client/Server Operation, port specification
cvs.texi(,2302) @cindex pserver (client/server connection method), port specification
cvs.texi(,2303) @cindex kserver (client/server connection method), port specification
cvs.texi(,2304) @cindex gserver (client/server connection method), port specification
cvs.texi(,2305) @cindex port, specifying for remote repositories
cvs.texi(,2306) @cindex Password server, setting up
cvs.texi(,2307) @cindex Authenticating server, setting up
cvs.texi(,2308) @cindex inetd, configuring for pserver
cvs.texi(,2309) @cindex xinetd, configuring for pserver
cvs.texi(,2310) @c FIXME: this isn't quite right regarding port
cvs.texi(,2311) @c numbers; CVS looks up "cvspserver" in
cvs.texi(,2312) @c /etc/services (on unix, but what about non-unix?).
cvs.texi(,2313) On the server side, the file @file{/etc/inetd.conf}
cvs.texi(,2314) needs to be edited so @code{inetd} knows to run the
cvs.texi(,2315) command @code{cvs pserver} when it receives a
cvs.texi(,2316) connection on the right port.  By default, the port
cvs.texi(,2317) number is 2401; it would be different if your client
cvs.texi(,2318) were compiled with @code{CVS_AUTH_PORT} defined to
cvs.texi(,2319) something else, though.  This can also be specified in the CVSROOT variable
cvs.texi(,2320) (@pxref{Remote repositories}) or overridden with the CVS_CLIENT_PORT
cvs.texi(,2321) environment variable (@pxref{Environment variables}).
cvs.texi(,2322) 
cvs.texi(,2323)         If your @code{inetd} allows raw port numbers in
cvs.texi(,2324) @file{/etc/inetd.conf}, then the following (all on a
cvs.texi(,2325) single line in @file{inetd.conf}) should be sufficient:
cvs.texi(,2326) 
cvs.texi(,2327) @example
cvs.texi(,2328) 2401  stream  tcp  nowait  root  /usr/local/bin/cvs
cvs.texi(,2329) cvs -f --allow-root=/usr/cvsroot pserver
cvs.texi(,2330) @end example
cvs.texi(,2331) 
cvs.texi(,2332) @noindent
cvs.texi(,2333) (You could also use the
cvs.texi(,2334) @samp{-T} option to specify a temporary directory.)
cvs.texi(,2335) 
cvs.texi(,2336) The @samp{--allow-root} option specifies the allowable
cvs.texi(,2337) @sc{cvsroot} directory.  Clients which attempt to use a
cvs.texi(,2338) different @sc{cvsroot} directory will not be allowed to
cvs.texi(,2339) connect.  If there is more than one @sc{cvsroot}
cvs.texi(,2340) directory which you want to allow, repeat the option.
cvs.texi(,2341) (Unfortunately, many versions of @code{inetd} have very small
cvs.texi(,2342) limits on the number of arguments and/or the total length
cvs.texi(,2343) of the command.  The usual solution to this problem is
cvs.texi(,2344) to have @code{inetd} run a shell script which then invokes
cvs.texi(,2345) @sc{cvs} with the necessary arguments.)
cvs.texi(,2346) 
cvs.texi(,2347)         If your @code{inetd} wants a symbolic service
cvs.texi(,2348) name instead of a raw port number, then put this in
cvs.texi(,2349) @file{/etc/services}:
cvs.texi(,2350) 
cvs.texi(,2351) @example
cvs.texi(,2352) cvspserver      2401/tcp
cvs.texi(,2353) @end example
cvs.texi(,2354) 
cvs.texi(,2355) @noindent
cvs.texi(,2356) and put @code{cvspserver} instead of @code{2401} in @file{inetd.conf}.
cvs.texi(,2357) 
cvs.texi(,2358) If your system uses @code{xinetd} instead of @code{inetd},
cvs.texi(,2359) the procedure is slightly different.
cvs.texi(,2360) Create a file called @file{/etc/xinetd.d/cvspserver} containing the following:
cvs.texi(,2361) 
cvs.texi(,2362) @example
cvs.texi(,2363) service cvspserver
cvs.texi(,2364) @{
cvs.texi(,2365)    port        = 2401
cvs.texi(,2366)    socket_type = stream
cvs.texi(,2367)    protocol    = tcp
cvs.texi(,2368)    wait        = no
cvs.texi(,2369)    user        = root
cvs.texi(,2370)    passenv     = PATH
cvs.texi(,2371)    server      = /usr/local/bin/cvs
cvs.texi(,2372)    server_args = -f --allow-root=/usr/cvsroot pserver
cvs.texi(,2373) @}
cvs.texi(,2374) @end example
cvs.texi(,2375) 
cvs.texi(,2376) @noindent
cvs.texi(,2377) (If @code{cvspserver} is defined in @file{/etc/services}, you can omit
cvs.texi(,2378) the @code{port} line.)
cvs.texi(,2379) 
cvs.texi(,2380)         Once the above is taken care of, restart your
cvs.texi(,2381) @code{inetd}, or do whatever is necessary to force it
cvs.texi(,2382) to reread its initialization files.
cvs.texi(,2383) 
cvs.texi(,2384) If you are having trouble setting this up, see
cvs.texi(,2385) @ref{Connection}.
cvs.texi(,2386) 
cvs.texi(,2387) @cindex CVS passwd file
cvs.texi(,2388) @cindex passwd (admin file)
cvs.texi(,2389) Because the client stores and transmits passwords in
cvs.texi(,2390) cleartext (almost---see @ref{Password authentication
cvs.texi(,2391) security}, for details), a separate @sc{cvs} password
cvs.texi(,2392) file is generally used, so people don't compromise
cvs.texi(,2393) their regular passwords when they access the
cvs.texi(,2394) repository.  This file is
cvs.texi(,2395) @file{$CVSROOT/CVSROOT/passwd} (@pxref{Intro
cvs.texi(,2396) administrative files}).  It uses a colon-separated
cvs.texi(,2397) format, similar to @file{/etc/passwd} on Unix systems,
cvs.texi(,2398) except that it has fewer fields: @sc{cvs} username,
cvs.texi(,2399) optional password, and an optional system username for
cvs.texi(,2400) @sc{cvs} to run as if authentication succeeds.  Here is
cvs.texi(,2401) an example @file{passwd} file with five entries:
cvs.texi(,2402) 
cvs.texi(,2403) @example
cvs.texi(,2404) anonymous:
cvs.texi(,2405) bach:ULtgRLXo7NRxs
cvs.texi(,2406) spwang:1sOp854gDF3DY
cvs.texi(,2407) melissa:tGX1fS8sun6rY:pubcvs
cvs.texi(,2408) qproj:XR4EZcEs0szik:pubcvs
cvs.texi(,2409) @end example
cvs.texi(,2410) 
cvs.texi(,2411) @noindent
cvs.texi(,2412) (The passwords are encrypted according to the standard
cvs.texi(,2413) Unix @code{crypt()} function, so it is possible to
cvs.texi(,2414) paste in passwords directly from regular Unix
cvs.texi(,2415) @file{/etc/passwd} files.)
cvs.texi(,2416) 
cvs.texi(,2417) The first line in the example will grant access to any
cvs.texi(,2418) @sc{cvs} client attempting to authenticate as user
cvs.texi(,2419) @code{anonymous}, no matter what password they use,
cvs.texi(,2420) including an empty password.  (This is typical for
cvs.texi(,2421) sites granting anonymous read-only access; for
cvs.texi(,2422) information on how to do the "read-only" part, see
cvs.texi(,2423) @ref{Read-only access}.)
cvs.texi(,2424) 
cvs.texi(,2425) The second and third lines will grant access to
cvs.texi(,2426) @code{bach} and @code{spwang} if they supply their
cvs.texi(,2427) respective plaintext passwords.
cvs.texi(,2428) 
cvs.texi(,2429) @cindex User aliases
cvs.texi(,2430) The fourth line will grant access to @code{melissa}, if
cvs.texi(,2431) she supplies the correct password, but her @sc{cvs}
cvs.texi(,2432) operations will actually run on the server side under
cvs.texi(,2433) the system user @code{pubcvs}.  Thus, there need not be
cvs.texi(,2434) any system user named @code{melissa}, but there
cvs.texi(,2435) @emph{must} be one named @code{pubcvs}.
cvs.texi(,2436) 
cvs.texi(,2437) The fifth line shows that system user identities can be
cvs.texi(,2438) shared: any client who successfully authenticates as
cvs.texi(,2439) @code{qproj} will actually run as @code{pubcvs}, just
cvs.texi(,2440) as @code{melissa} does.  That way you could create a
cvs.texi(,2441) single, shared system user for each project in your
cvs.texi(,2442) repository, and give each developer their own line in
cvs.texi(,2443) the @file{$CVSROOT/CVSROOT/passwd} file.  The @sc{cvs}
cvs.texi(,2444) username on each line would be different, but the
cvs.texi(,2445) system username would be the same.  The reason to have
cvs.texi(,2446) different @sc{cvs} usernames is that @sc{cvs} will log their
cvs.texi(,2447) actions under those names: when @code{melissa} commits
cvs.texi(,2448) a change to a project, the checkin is recorded in the
cvs.texi(,2449) project's history under the name @code{melissa}, not
cvs.texi(,2450) @code{pubcvs}.  And the reason to have them share a
cvs.texi(,2451) system username is so that you can arrange permissions
cvs.texi(,2452) in the relevant area of the repository such that only
cvs.texi(,2453) that account has write-permission there.
cvs.texi(,2454) 
cvs.texi(,2455) If the system-user field is present, all
cvs.texi(,2456) password-authenticated @sc{cvs} commands run as that
cvs.texi(,2457) user; if no system user is specified, @sc{cvs} simply
cvs.texi(,2458) takes the @sc{cvs} username as the system username and
cvs.texi(,2459) runs commands as that user.  In either case, if there
cvs.texi(,2460) is no such user on the system, then the @sc{cvs}
cvs.texi(,2461) operation will fail (regardless of whether the client
cvs.texi(,2462) supplied a valid password).
cvs.texi(,2463) 
cvs.texi(,2464) The password and system-user fields can both be omitted
cvs.texi(,2465) (and if the system-user field is omitted, then also
cvs.texi(,2466) omit the colon that would have separated it from the
cvs.texi(,2467) encrypted password).  For example, this would be a
cvs.texi(,2468) valid @file{$CVSROOT/CVSROOT/passwd} file:
cvs.texi(,2469) 
cvs.texi(,2470) @example
cvs.texi(,2471) anonymous::pubcvs
cvs.texi(,2472) fish:rKa5jzULzmhOo:kfogel
cvs.texi(,2473) sussman:1sOp854gDF3DY
cvs.texi(,2474) @end example
cvs.texi(,2475) 
cvs.texi(,2476) @noindent
cvs.texi(,2477) When the password field is omitted or empty, then the
cvs.texi(,2478) client's authentication attempt will succeed with any
cvs.texi(,2479) password, including the empty string.  However, the
cvs.texi(,2480) colon after the @sc{cvs} username is always necessary,
cvs.texi(,2481) even if the password is empty.
cvs.texi(,2482) 
cvs.texi(,2483) @sc{cvs} can also fall back to use system authentication.
cvs.texi(,2484) When authenticating a password, the server first checks
cvs.texi(,2485) for the user in the @file{$CVSROOT/CVSROOT/passwd}
cvs.texi(,2486) file.  If it finds the user, it will use that entry for
cvs.texi(,2487) authentication as described above.  But if it does not
cvs.texi(,2488) find the user, or if the @sc{cvs} @file{passwd} file
cvs.texi(,2489) does not exist, then the server can try to authenticate
cvs.texi(,2490) the username and password using the operating system's
cvs.texi(,2491) user-lookup routines (this "fallback" behavior can be
cvs.texi(,2492) disabled by setting @code{SystemAuth=no} in the
cvs.texi(,2493) @sc{cvs} @file{config} file, @pxref{config}).
cvs.texi(,2494) 
cvs.texi(,2495) The default fallback behaviour is to look in 
cvs.texi(,2496) @file{/etc/passwd} for this system password unless your
cvs.texi(,2497) system has PAM (Pluggable Authentication Modules)
cvs.texi(,2498) and your @sc{cvs} server executable was configured to
cvs.texi(,2499) use it at compile time (using @code{./configure --enable-pam} - see the
cvs.texi(,2500) INSTALL file for more).  In this case, PAM will be consulted instead.
cvs.texi(,2501) This means that @sc{cvs} can be configured to use any password
cvs.texi(,2502) authentication source PAM can be configured to use (possibilities
cvs.texi(,2503) include a simple UNIX password, NIS, LDAP, and others) in its
cvs.texi(,2504) global configuration file (usually @file{/etc/pam.conf}
cvs.texi(,2505) or possibly @file{/etc/pam.d/cvs}).  See your PAM documentation
cvs.texi(,2506) for more details on PAM configuration.
cvs.texi(,2507) 
cvs.texi(,2508) Note that PAM is an experimental feature in @sc{cvs} and feedback is
cvs.texi(,2509) encouraged.  Please send a mail to one of the @sc{cvs} mailing lists
cvs.texi(,2510) (@code{info-cvs@@gnu.org} or @code{bug-cvs@@gnu.org}) if you use the 
cvs.texi(,2511) @sc{cvs} PAM support.
cvs.texi(,2512) 
cvs.texi(,2513) @strong{WARNING: Using PAM gives the system administrator much more 
cvs.texi(,2514) flexibility about how @sc{cvs} users are authenticated but 
cvs.texi(,2515) no more security than other methods.  See below for more.} 
cvs.texi(,2516) 
cvs.texi(,2517) CVS needs an "auth" and "account" module in the 
cvs.texi(,2518) PAM configuration file. A typical PAM configuration 
cvs.texi(,2519) would therefore have the following lines 
cvs.texi(,2520) in @file{/etc/pam.conf} to emulate the standard @sc{cvs} 
cvs.texi(,2521) system @file{/etc/passwd} authentication:
cvs.texi(,2522) 
cvs.texi(,2523) @example
cvs.texi(,2524) cvs	auth	    required	pam_unix.so
cvs.texi(,2525) cvs	account	    required	pam_unix.so
cvs.texi(,2526) @end example
cvs.texi(,2527) 
cvs.texi(,2528) The the equivalent @file{/etc/pam.d/cvs} would contain
cvs.texi(,2529) 
cvs.texi(,2530) @example
cvs.texi(,2531) auth	    required	pam_unix.so
cvs.texi(,2532) account	    required	pam_unix.so
cvs.texi(,2533) @end example
cvs.texi(,2534) 
cvs.texi(,2535) Some systems require a full path to the module so that
cvs.texi(,2536) @file{pam_unix.so} (Linux) would become something like 
cvs.texi(,2537) @file{/usr/lib/security/$ISA/pam_unix.so.1} (Sun Solaris).
cvs.texi(,2538) See the @file{contrib/pam} subdirectory of the @sc{cvs}
cvs.texi(,2539) source distribution for further example configurations.
cvs.texi(,2540) 
cvs.texi(,2541) The PAM service name given above as "cvs" is just
cvs.texi(,2542) the service name in the default configuration amd can be
cvs.texi(,2543) set using
cvs.texi(,2544) @code{./configure --with-hardcoded-pam-service-name=<pam-service-name>}
cvs.texi(,2545) before compiling.  @sc{cvs} can also be configured to use whatever
cvs.texi(,2546) name it is invoked as as its PAM service name using
cvs.texi(,2547) @code{./configure --without-hardcoded-pam-service-name}, but this
cvs.texi(,2548) feature should not be used if you may not have control of the name
cvs.texi(,2549) @sc{cvs} will be invoked as.
cvs.texi(,2550) 
cvs.texi(,2551) Be aware, also, that falling back to system
cvs.texi(,2552) authentication might be a security risk: @sc{cvs}
cvs.texi(,2553) operations would then be authenticated with that user's
cvs.texi(,2554) regular login password, and the password flies across
cvs.texi(,2555) the network in plaintext.  See @ref{Password
cvs.texi(,2556) authentication security} for more on this.
cvs.texi(,2557) This may be more of a problem with PAM authentication
cvs.texi(,2558) because it is likely that the source of the system 
cvs.texi(,2559) password is some central authentication service like
cvs.texi(,2560) LDAP which is also used to authenticate other services.
cvs.texi(,2561) 
cvs.texi(,2562) On the other hand, PAM makes it very easy to change your password
cvs.texi(,2563) regularly.  If they are given the option of a one-password system for
cvs.texi(,2564) all of their activities, users are often more willing to change their
cvs.texi(,2565) password on a regular basis.
cvs.texi(,2566) 
cvs.texi(,2567) In the non-PAM configuration where the password is stored in the
cvs.texi(,2568) @file{CVSROOT/passwd} file, it is difficult to change passwords on a
cvs.texi(,2569) regular basis since only administrative users (or in some cases
cvs.texi(,2570) processes that act as an administrative user) are typicaly given
cvs.texi(,2571) access to modify this file.  Either there needs to be some
cvs.texi(,2572) hand-crafted web page or set-uid program to update the file, or the
cvs.texi(,2573) update needs to be done by submitting a request to an administrator to
cvs.texi(,2574) perform the duty by hand.  In the first case, having to remember to
cvs.texi(,2575) update a separate password on a periodic basis can be difficult.  In
cvs.texi(,2576) the second case, the manual nature of the change will typically mean
cvs.texi(,2577) that the password will not be changed unless it is absolutely
cvs.texi(,2578) necessary.
cvs.texi(,2579) 
cvs.texi(,2580) Note that PAM administrators should probably avoid configuring
cvs.texi(,2581) one-time-passwords (OTP) for @sc{cvs} authentication/authorization.  If
cvs.texi(,2582) OTPs are desired, the administrator may wish to encourage the use of
cvs.texi(,2583) one of the other Client/Server access methods.  See the section on
cvs.texi(,2584) @pxref{Remote repositories} for a list of other methods.
cvs.texi(,2585) 
cvs.texi(,2586) Right now, the only way to put a password in the
cvs.texi(,2587) @sc{cvs} @file{passwd} file is to paste it there from
cvs.texi(,2588) somewhere else.  Someday, there may be a @code{cvs
cvs.texi(,2589) passwd} command.
cvs.texi(,2590) 
cvs.texi(,2591) Unlike many of the files in @file{$CVSROOT/CVSROOT}, it
cvs.texi(,2592) is normal to edit the @file{passwd} file in-place,
cvs.texi(,2593) rather than via @sc{cvs}.  This is because of the
cvs.texi(,2594) possible security risks of having the @file{passwd}
cvs.texi(,2595) file checked out to people's working copies.  If you do
cvs.texi(,2596) want to include the @file{passwd} file in checkouts of
cvs.texi(,2597) @file{$CVSROOT/CVSROOT}, see @ref{checkoutlist}.
cvs.texi(,2598) 
cvs.texi(,2599) @c We might also suggest using the @code{htpasswd} command
cvs.texi(,2600) @c from freely available web servers as well, but that
cvs.texi(,2601) @c would open up a can of worms in that the users next
cvs.texi(,2602) @c questions are likely to be "where do I get it?" and
cvs.texi(,2603) @c "how do I use it?"
cvs.texi(,2604) @c Also note that htpasswd, at least the version I had,
cvs.texi(,2605) @c likes to clobber the third field.
cvs.texi(,2606) 
cvs.texi(,2607) @node Password authentication client
cvs.texi(,2608) @subsubsection Using the client with password authentication
cvs.texi(,2609) @cindex Login (subcommand)
cvs.texi(,2610) @cindex Password client, using
cvs.texi(,2611) @cindex Authenticated client, using
cvs.texi(,2612) @cindex :pserver:, setting up
cvs.texi(,2613) To run a @sc{cvs} command on a remote repository via
cvs.texi(,2614) the password-authenticating server, one specifies the
cvs.texi(,2615) @code{pserver} protocol, optional username, repository host, an
cvs.texi(,2616) optional port number, and path to the repository.  For example:
cvs.texi(,2617) 
cvs.texi(,2618) @example
cvs.texi(,2619) cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj
cvs.texi(,2620) @end example
cvs.texi(,2621) 
cvs.texi(,2622) @noindent
cvs.texi(,2623) or
cvs.texi(,2624) 
cvs.texi(,2625) @example
cvs.texi(,2626) CVSROOT=:pserver:bach@@faun.example.org:2401/usr/local/cvsroot
cvs.texi(,2627) cvs checkout someproj
cvs.texi(,2628) @end example
cvs.texi(,2629) 
cvs.texi(,2630) However, unless you're connecting to a public-access
cvs.texi(,2631) repository (i.e., one where that username doesn't
cvs.texi(,2632) require a password), you'll need to supply a password or @dfn{log in} first.
cvs.texi(,2633) Logging in verifies your password with the repository and stores it in a file.
cvs.texi(,2634) It's done with the @code{login} command, which will
cvs.texi(,2635) prompt you interactively for the password if you didn't supply one as part of
cvs.texi(,2636) @var{$CVSROOT}:
cvs.texi(,2637) 
cvs.texi(,2638) @example
cvs.texi(,2639) cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot login
cvs.texi(,2640) CVS password:
cvs.texi(,2641) @end example
cvs.texi(,2642) 
cvs.texi(,2643) @noindent
cvs.texi(,2644) or
cvs.texi(,2645) 
cvs.texi(,2646) @example
cvs.texi(,2647) cvs -d :pserver:bach:p4ss30rd@@faun.example.org:/usr/local/cvsroot login
cvs.texi(,2648) @end example
cvs.texi(,2649) 
cvs.texi(,2650) After you enter the password, @sc{cvs} verifies it with
cvs.texi(,2651) the server.  If the verification succeeds, then that
cvs.texi(,2652) combination of username, host, repository, and password
cvs.texi(,2653) is permanently recorded, so future transactions with
cvs.texi(,2654) that repository won't require you to run @code{cvs
cvs.texi(,2655) login}.  (If verification fails, @sc{cvs} will exit
cvs.texi(,2656) complaining that the password was incorrect, and
cvs.texi(,2657) nothing will be recorded.)
cvs.texi(,2658) 
cvs.texi(,2659) The records are stored, by default, in the file
cvs.texi(,2660) @file{$HOME/.cvspass}.  That file's format is
cvs.texi(,2661) human-readable, and to a degree human-editable, but
cvs.texi(,2662) note that the passwords are not stored in
cvs.texi(,2663) cleartext---they are trivially encoded to protect them
cvs.texi(,2664) from "innocent" compromise (i.e., inadvertent viewing
cvs.texi(,2665) by a system administrator or other non-malicious
cvs.texi(,2666) person).
cvs.texi(,2667) 
cvs.texi(,2668) @cindex CVS_PASSFILE, environment variable
cvs.texi(,2669) You can change the default location of this file by
cvs.texi(,2670) setting the @code{CVS_PASSFILE} environment variable.
cvs.texi(,2671) If you use this variable, make sure you set it
cvs.texi(,2672) @emph{before} @code{cvs login} is run.  If you were to
cvs.texi(,2673) set it after running @code{cvs login}, then later
cvs.texi(,2674) @sc{cvs} commands would be unable to look up the
cvs.texi(,2675) password for transmission to the server.
cvs.texi(,2676)   
cvs.texi(,2677) Once you have logged in, all @sc{cvs} commands using
cvs.texi(,2678) that remote repository and username will authenticate
cvs.texi(,2679) with the stored password.  So, for example
cvs.texi(,2680)   
cvs.texi(,2681) @example
cvs.texi(,2682) cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot checkout foo
cvs.texi(,2683) @end example
cvs.texi(,2684) 
cvs.texi(,2685) @noindent
cvs.texi(,2686) should just work (unless the password changes on the
cvs.texi(,2687) server side, in which case you'll have to re-run
cvs.texi(,2688) @code{cvs login}).
cvs.texi(,2689) 
cvs.texi(,2690) Note that if the @samp{:pserver:} were not present in
cvs.texi(,2691) the repository specification, @sc{cvs} would assume it
cvs.texi(,2692) should use @code{rsh} to connect with the server
cvs.texi(,2693) instead (@pxref{Connecting via rsh}).
cvs.texi(,2694) 
cvs.texi(,2695) Of course, once you have a working copy checked out and
cvs.texi(,2696) are running @sc{cvs} commands from within it, there is
cvs.texi(,2697) no longer any need to specify the repository
cvs.texi(,2698) explicitly, because @sc{cvs} can deduce the repository
cvs.texi(,2699) from the working copy's @file{CVS} subdirectory.
cvs.texi(,2700) 
cvs.texi(,2701) @c FIXME: seems to me this needs somewhat more
cvs.texi(,2702) @c explanation.
cvs.texi(,2703) @cindex Logout (subcommand)
cvs.texi(,2704) The password for a given remote repository can be
cvs.texi(,2705) removed from the @code{CVS_PASSFILE} by using the
cvs.texi(,2706) @code{cvs logout} command.
cvs.texi(,2707) 
cvs.texi(,2708) @node Password authentication security
cvs.texi(,2709) @subsubsection Security considerations with password authentication
cvs.texi(,2710) 
cvs.texi(,2711) @cindex Security, of pserver
cvs.texi(,2712) The passwords are stored on the client side in a
cvs.texi(,2713) trivial encoding of the cleartext, and transmitted in
cvs.texi(,2714) the same encoding.  The encoding is done only to
cvs.texi(,2715) prevent inadvertent password compromises (i.e., a
cvs.texi(,2716) system administrator accidentally looking at the file),
cvs.texi(,2717) and will not prevent even a naive attacker from gaining
cvs.texi(,2718) the password.
cvs.texi(,2719) 
cvs.texi(,2720) @c FIXME: The bit about "access to the repository
cvs.texi(,2721) @c implies general access to the system is *not* specific
cvs.texi(,2722) @c to pserver; it applies to kerberos and SSH and
cvs.texi(,2723) @c everything else too.  Should reorganize the
cvs.texi(,2724) @c documentation to make this clear.
cvs.texi(,2725) The separate @sc{cvs} password file (@pxref{Password
cvs.texi(,2726) authentication server}) allows people
cvs.texi(,2727) to use a different password for repository access than
cvs.texi(,2728) for login access.  On the other hand, once a user has
cvs.texi(,2729) non-read-only
cvs.texi(,2730) access to the repository, she can execute programs on
cvs.texi(,2731) the server system through a variety of means.  Thus, repository
cvs.texi(,2732) access implies fairly broad system access as well.  It
cvs.texi(,2733) might be possible to modify @sc{cvs} to prevent that,
cvs.texi(,2734) but no one has done so as of this writing.
cvs.texi(,2735) @c OpenBSD uses chroot() and copies the repository to
cvs.texi(,2736) @c provide anonymous read-only access (for details see
cvs.texi(,2737) @c http://www.openbsd.org/anoncvs.shar).  While this
cvs.texi(,2738) @c closes the most obvious holes, I'm not sure it
cvs.texi(,2739) @c closes enough holes to recommend it (plus it is
cvs.texi(,2740) @c *very* easy to accidentally screw up a setup of this
cvs.texi(,2741) @c type).
cvs.texi(,2742) 
cvs.texi(,2743) Note that because the @file{$CVSROOT/CVSROOT} directory
cvs.texi(,2744) contains @file{passwd} and other files which are used
cvs.texi(,2745) to check security, you must control the permissions on
cvs.texi(,2746) this directory as tightly as the permissions on
cvs.texi(,2747) @file{/etc}.  The same applies to the @file{$CVSROOT}
cvs.texi(,2748) directory itself and any directory
cvs.texi(,2749) above it in the tree.  Anyone who has write access to
cvs.texi(,2750) such a directory will have the ability to become any
cvs.texi(,2751) user on the system.  Note that these permissions are
cvs.texi(,2752) typically tighter than you would use if you are not
cvs.texi(,2753) using pserver.
cvs.texi(,2754) @c TODO: Would be really nice to document/implement a
cvs.texi(,2755) @c scheme where the CVS server can run as some non-root
cvs.texi(,2756) @c user, e.g. "cvs".  CVSROOT/passwd would contain a
cvs.texi(,2757) @c bunch of entries of the form foo:xxx:cvs (or the "cvs"
cvs.texi(,2758) @c would be implicit).  This would greatly reduce
cvs.texi(,2759) @c security risks such as those hinted at in the
cvs.texi(,2760) @c previous paragraph.  I think minor changes to CVS
cvs.texi(,2761) @c might be required but mostly this would just need
cvs.texi(,2762) @c someone who wants to play with it, document it, &c.
cvs.texi(,2763) 
cvs.texi(,2764) In summary, anyone who gets the password gets
cvs.texi(,2765) repository access (which may imply some measure of general system
cvs.texi(,2766) access as well).  The password is available to anyone
cvs.texi(,2767) who can sniff network packets or read a protected
cvs.texi(,2768) (i.e., user read-only) file.  If you want real
cvs.texi(,2769) security, get Kerberos.
cvs.texi(,2770) 
cvs.texi(,2771) @node GSSAPI authenticated
cvs.texi(,2772) @subsection Direct connection with GSSAPI
cvs.texi(,2773) 
cvs.texi(,2774) @cindex GSSAPI
cvs.texi(,2775) @cindex Security, GSSAPI
cvs.texi(,2776) @cindex :gserver:, setting up
cvs.texi(,2777) @cindex Kerberos, using :gserver:
cvs.texi(,2778) GSSAPI is a generic interface to network security
cvs.texi(,2779) systems such as Kerberos 5.
cvs.texi(,2780) If you have a working GSSAPI library, you can have
cvs.texi(,2781) @sc{cvs} connect via a direct @sc{tcp} connection,
cvs.texi(,2782) authenticating with GSSAPI.
cvs.texi(,2783) 
cvs.texi(,2784) To do this, @sc{cvs} needs to be compiled with GSSAPI
cvs.texi(,2785) support; when configuring @sc{cvs} it tries to detect
cvs.texi(,2786) whether GSSAPI libraries using kerberos version 5 are
cvs.texi(,2787) present.  You can also use the @file{--with-gssapi}
cvs.texi(,2788) flag to configure.
cvs.texi(,2789) 
cvs.texi(,2790) The connection is authenticated using GSSAPI, but the
cvs.texi(,2791) message stream is @emph{not} authenticated by default.
cvs.texi(,2792) You must use the @code{-a} global option to request
cvs.texi(,2793) stream authentication.
cvs.texi(,2794) 
cvs.texi(,2795) The data transmitted is @emph{not} encrypted by
cvs.texi(,2796) default.  Encryption support must be compiled into both
cvs.texi(,2797) the client and the server; use the
cvs.texi(,2798) @file{--enable-encrypt} configure option to turn it on.
cvs.texi(,2799) You must then use the @code{-x} global option to
cvs.texi(,2800) request encryption.
cvs.texi(,2801) 
cvs.texi(,2802) GSSAPI connections are handled on the server side by
cvs.texi(,2803) the same server which handles the password
cvs.texi(,2804) authentication server; see @ref{Password authentication
cvs.texi(,2805) server}.  If you are using a GSSAPI mechanism such as
cvs.texi(,2806) Kerberos which provides for strong authentication, you
cvs.texi(,2807) will probably want to disable the ability to
cvs.texi(,2808) authenticate via cleartext passwords.  To do so, create
cvs.texi(,2809) an empty @file{CVSROOT/passwd} password file, and set
cvs.texi(,2810) @code{SystemAuth=no} in the config file
cvs.texi(,2811) (@pxref{config}).
cvs.texi(,2812) 
cvs.texi(,2813) The GSSAPI server uses a principal name of
cvs.texi(,2814) cvs/@var{hostname}, where @var{hostname} is the
cvs.texi(,2815) canonical name of the server host.  You will have to
cvs.texi(,2816) set this up as required by your GSSAPI mechanism.
cvs.texi(,2817) 
cvs.texi(,2818) To connect using GSSAPI, use @samp{:gserver:}.  For
cvs.texi(,2819) example,
cvs.texi(,2820) 
cvs.texi(,2821) @example
cvs.texi(,2822) cvs -d :gserver:faun.example.org:/usr/local/cvsroot checkout foo
cvs.texi(,2823) @end example
cvs.texi(,2824) 
cvs.texi(,2825) @node Kerberos authenticated
cvs.texi(,2826) @subsection Direct connection with kerberos
cvs.texi(,2827) 
cvs.texi(,2828) @cindex Kerberos, using :kserver:
cvs.texi(,2829) @cindex Security, kerberos
cvs.texi(,2830) @cindex :kserver:, setting up
cvs.texi(,2831) The easiest way to use kerberos is to use the kerberos
cvs.texi(,2832) @code{rsh}, as described in @ref{Connecting via rsh}.
cvs.texi(,2833) The main disadvantage of using rsh is that all the data
cvs.texi(,2834) needs to pass through additional programs, so it may be
cvs.texi(,2835) slower.  So if you have kerberos installed you can
cvs.texi(,2836) connect via a direct @sc{tcp} connection,
cvs.texi(,2837) authenticating with kerberos.
cvs.texi(,2838) 
cvs.texi(,2839) This section concerns the kerberos network security
cvs.texi(,2840) system, version 4.  Kerberos version 5 is supported via
cvs.texi(,2841) the GSSAPI generic network security interface, as
cvs.texi(,2842) described in the previous section.
cvs.texi(,2843) 
cvs.texi(,2844) To do this, @sc{cvs} needs to be compiled with kerberos
cvs.texi(,2845) support; when configuring @sc{cvs} it tries to detect
cvs.texi(,2846) whether kerberos is present or you can use the
cvs.texi(,2847) @file{--with-krb4} flag to configure.
cvs.texi(,2848) 
cvs.texi(,2849) The data transmitted is @emph{not} encrypted by
cvs.texi(,2850) default.  Encryption support must be compiled into both
cvs.texi(,2851) the client and server; use the
cvs.texi(,2852) @file{--enable-encryption} configure option to turn it
cvs.texi(,2853) on.  You must then use the @code{-x} global option to
cvs.texi(,2854) request encryption.
cvs.texi(,2855) 
cvs.texi(,2856) @cindex CVS_CLIENT_PORT
cvs.texi(,2857) You need to edit @file{inetd.conf} on the server
cvs.texi(,2858) machine to run @code{cvs kserver}.  The client uses
cvs.texi(,2859) port 1999 by default; if you want to use another port
cvs.texi(,2860) specify it in the @code{CVSROOT} (@pxref{Remote repositories})
cvs.texi(,2861) or the @code{CVS_CLIENT_PORT} environment variable
cvs.texi(,2862) (@pxref{Environment variables}) on the client.
cvs.texi(,2863) 
cvs.texi(,2864) @cindex kinit
cvs.texi(,2865) When you want to use @sc{cvs}, get a ticket in the
cvs.texi(,2866) usual way (generally @code{kinit}); it must be a ticket
cvs.texi(,2867) which allows you to log into the server machine.  Then
cvs.texi(,2868) you are ready to go:
cvs.texi(,2869) 
cvs.texi(,2870) @example
cvs.texi(,2871) cvs -d :kserver:faun.example.org:/usr/local/cvsroot checkout foo
cvs.texi(,2872) @end example
cvs.texi(,2873) 
cvs.texi(,2874) Previous versions of @sc{cvs} would fall back to a
cvs.texi(,2875) connection via rsh; this version will not do so.
cvs.texi(,2876) 
cvs.texi(,2877) @node Connecting via fork
cvs.texi(,2878) @subsection Connecting with fork
cvs.texi(,2879) 
cvs.texi(,2880) @cindex fork, access method
cvs.texi(,2881) @cindex :fork:, setting up
cvs.texi(,2882) This access method allows you to connect to a
cvs.texi(,2883) repository on your local disk via the remote protocol.
cvs.texi(,2884) In other words it does pretty much the same thing as
cvs.texi(,2885) @code{:local:}, but various quirks, bugs and the like are
cvs.texi(,2886) those of the remote @sc{cvs} rather than the local
cvs.texi(,2887) @sc{cvs}.
cvs.texi(,2888) 
cvs.texi(,2889) For day-to-day operations you might prefer either
cvs.texi(,2890) @code{:local:} or @code{:fork:}, depending on your
cvs.texi(,2891) preferences.  Of course @code{:fork:} comes in
cvs.texi(,2892) particularly handy in testing or
cvs.texi(,2893) debugging @code{cvs} and the remote protocol.
cvs.texi(,2894) Specifically, we avoid all of the network-related
cvs.texi(,2895) setup/configuration, timeouts, and authentication
cvs.texi(,2896) inherent in the other remote access methods but still
cvs.texi(,2897) create a connection which uses the remote protocol.
cvs.texi(,2898) 
cvs.texi(,2899) To connect using the @code{fork} method, use
cvs.texi(,2900) @samp{:fork:} and the pathname to your local
cvs.texi(,2901) repository.  For example:
cvs.texi(,2902) 
cvs.texi(,2903) @example
cvs.texi(,2904) cvs -d :fork:/usr/local/cvsroot checkout foo
cvs.texi(,2905) @end example
cvs.texi(,2906) 
cvs.texi(,2907) @cindex CVS_SERVER, and :fork:
cvs.texi(,2908) As with @code{:ext:}, the server is called @samp{cvs}
cvs.texi(,2909) by default, or the value of the @code{CVS_SERVER}
cvs.texi(,2910) environment variable.
cvs.texi(,2911) 
cvs.texi(,2912) @c ---------------------------------------------------------------------
cvs.texi(,2913) @node Read-only access
cvs.texi(,2914) @section Read-only repository access
cvs.texi(,2915) @cindex Read-only repository access
cvs.texi(,2916) @cindex readers (admin file)
cvs.texi(,2917) @cindex writers (admin file)
cvs.texi(,2918) 
cvs.texi(,2919)         It is possible to grant read-only repository
cvs.texi(,2920) access to people using the password-authenticated
cvs.texi(,2921) server (@pxref{Password authenticated}).  (The
cvs.texi(,2922) other access methods do not have explicit support for
cvs.texi(,2923) read-only users because those methods all assume login
cvs.texi(,2924) access to the repository machine anyway, and therefore
cvs.texi(,2925) the user can do whatever local file permissions allow
cvs.texi(,2926) her to do.)
cvs.texi(,2927) 
cvs.texi(,2928)         A user who has read-only access can do only
cvs.texi(,2929) those @sc{cvs} operations which do not modify the
cvs.texi(,2930) repository, except for certain ``administrative'' files
cvs.texi(,2931) (such as lock files and the history file).  It may be
cvs.texi(,2932) desirable to use this feature in conjunction with
cvs.texi(,2933) user-aliasing (@pxref{Password authentication server}).
cvs.texi(,2934) 
cvs.texi(,2935) Unlike with previous versions of @sc{cvs}, read-only
cvs.texi(,2936) users should be able merely to read the repository, and
cvs.texi(,2937) not to execute programs on the server or otherwise gain
cvs.texi(,2938) unexpected levels of access.  Or to be more accurate,
cvs.texi(,2939) the @emph{known} holes have been plugged.  Because this
cvs.texi(,2940) feature is new and has not received a comprehensive
cvs.texi(,2941) security audit, you should use whatever level of
cvs.texi(,2942) caution seems warranted given your attitude concerning
cvs.texi(,2943) security.
cvs.texi(,2944) 
cvs.texi(,2945)         There are two ways to specify read-only access
cvs.texi(,2946) for a user: by inclusion, and by exclusion.
cvs.texi(,2947) 
cvs.texi(,2948)         "Inclusion" means listing that user
cvs.texi(,2949) specifically in the @file{$CVSROOT/CVSROOT/readers}
cvs.texi(,2950) file, which is simply a newline-separated list of
cvs.texi(,2951) users.  Here is a sample @file{readers} file:
cvs.texi(,2952) 
cvs.texi(,2953) @example
cvs.texi(,2954) melissa
cvs.texi(,2955) splotnik
cvs.texi(,2956) jrandom
cvs.texi(,2957) @end example
cvs.texi(,2958) 
cvs.texi(,2959) @noindent
cvs.texi(,2960)         (Don't forget the newline after the last user.)
cvs.texi(,2961) 
cvs.texi(,2962)         "Exclusion" means explicitly listing everyone
cvs.texi(,2963) who has @emph{write} access---if the file
cvs.texi(,2964) 
cvs.texi(,2965) @example
cvs.texi(,2966) $CVSROOT/CVSROOT/writers
cvs.texi(,2967) @end example
cvs.texi(,2968) 
cvs.texi(,2969) @noindent
cvs.texi(,2970) exists, then only
cvs.texi(,2971) those users listed in it have write access, and
cvs.texi(,2972) everyone else has read-only access (of course, even the
cvs.texi(,2973) read-only users still need to be listed in the
cvs.texi(,2974) @sc{cvs} @file{passwd} file).  The
cvs.texi(,2975) @file{writers} file has the same format as the
cvs.texi(,2976) @file{readers} file.
cvs.texi(,2977) 
cvs.texi(,2978)         Note: if your @sc{cvs} @file{passwd}
cvs.texi(,2979) file maps cvs users onto system users (@pxref{Password
cvs.texi(,2980) authentication server}), make sure you deny or grant
cvs.texi(,2981) read-only access using the @emph{cvs} usernames, not
cvs.texi(,2982) the system usernames.  That is, the @file{readers} and
cvs.texi(,2983) @file{writers} files contain cvs usernames, which may
cvs.texi(,2984) or may not be the same as system usernames.
cvs.texi(,2985) 
cvs.texi(,2986)         Here is a complete description of the server's
cvs.texi(,2987) behavior in deciding whether to grant read-only or
cvs.texi(,2988) read-write access:
cvs.texi(,2989) 
cvs.texi(,2990)         If @file{readers} exists, and this user is
cvs.texi(,2991) listed in it, then she gets read-only access.  Or if
cvs.texi(,2992) @file{writers} exists, and this user is NOT listed in
cvs.texi(,2993) it, then she also gets read-only access (this is true
cvs.texi(,2994) even if @file{readers} exists but she is not listed
cvs.texi(,2995) there).  Otherwise, she gets full read-write access.
cvs.texi(,2996) 
cvs.texi(,2997)         Of course there is a conflict if the user is
cvs.texi(,2998) listed in both files.  This is resolved in the more
cvs.texi(,2999) conservative way, it being better to protect the
cvs.texi(,3000) repository too much than too little: such a user gets
cvs.texi(,3001) read-only access.
cvs.texi(,3002) 
cvs.texi(,3003) @node Server temporary directory
cvs.texi(,3004) @section Temporary directories for the server
cvs.texi(,3005) @cindex Temporary directories, and server
cvs.texi(,3006) @cindex Server, temporary directories
cvs.texi(,3007) 
cvs.texi(,3008) While running, the @sc{cvs} server creates temporary
cvs.texi(,3009) directories.  They are named
cvs.texi(,3010) 
cvs.texi(,3011) @example
cvs.texi(,3012) cvs-serv@var{pid}
cvs.texi(,3013) @end example
cvs.texi(,3014) 
cvs.texi(,3015) @noindent
cvs.texi(,3016) where @var{pid} is the process identification number of
cvs.texi(,3017) the server.
cvs.texi(,3018) They are located in the directory specified by 
cvs.texi(,3019) the @samp{-T} global option (@pxref{Global options}), 
cvs.texi(,3020) the @code{TMPDIR} environment variable (@pxref{Environment variables}), 
cvs.texi(,3021) or, failing that, @file{/tmp}.
cvs.texi(,3022) 
cvs.texi(,3023) In most cases the server will remove the temporary
cvs.texi(,3024) directory when it is done, whether it finishes normally
cvs.texi(,3025) or abnormally.  However, there are a few cases in which
cvs.texi(,3026) the server does not or cannot remove the temporary
cvs.texi(,3027) directory, for example:
cvs.texi(,3028) 
cvs.texi(,3029) @itemize @bullet
cvs.texi(,3030) @item
cvs.texi(,3031) If the server aborts due to an internal server error,
cvs.texi(,3032) it may preserve the directory to aid in debugging
cvs.texi(,3033) 
cvs.texi(,3034) @item
cvs.texi(,3035) If the server is killed in a way that it has no way of
cvs.texi(,3036) cleaning up (most notably, @samp{kill -KILL} on unix).
cvs.texi(,3037) 
cvs.texi(,3038) @item
cvs.texi(,3039) If the system shuts down without an orderly shutdown,
cvs.texi(,3040) which tells the server to clean up.
cvs.texi(,3041) @end itemize
cvs.texi(,3042) 
cvs.texi(,3043) In cases such as this, you will need to manually remove
cvs.texi(,3044) the @file{cvs-serv@var{pid}} directories.  As long as
cvs.texi(,3045) there is no server running with process identification
cvs.texi(,3046) number @var{pid}, it is safe to do so.
cvs.texi(,3047) 
cvs.texi(,3048) @c ---------------------------------------------------------------------
cvs.texi(,3049) @node Starting a new project
cvs.texi(,3050) @chapter Starting a project with CVS
cvs.texi(,3051) @cindex Starting a project with CVS
cvs.texi(,3052) @cindex Creating a project
cvs.texi(,3053) 
cvs.texi(,3054) @comment --moduledb--
cvs.texi(,3055) Because renaming files and moving them between
cvs.texi(,3056) directories is somewhat inconvenient, the first thing
cvs.texi(,3057) you do when you start a new project should be to think
cvs.texi(,3058) through your file organization.  It is not impossible
cvs.texi(,3059) to rename or move files, but it does increase the
cvs.texi(,3060) potential for confusion and @sc{cvs} does have some
cvs.texi(,3061) quirks particularly in the area of renaming
cvs.texi(,3062) directories.  @xref{Moving files}.
cvs.texi(,3063) 
cvs.texi(,3064) What to do next depends on the situation at hand.
cvs.texi(,3065) 
cvs.texi(,3066) @menu
cvs.texi(,3067) * Setting up the files::        Getting the files into the repository
cvs.texi(,3068) * Defining the module::         How to make a module of the files
cvs.texi(,3069) @end menu
cvs.texi(,3070) @c -- File permissions!
cvs.texi(,3071) 
cvs.texi(,3072) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3073) @node Setting up the files
cvs.texi(,3074) @section Setting up the files
cvs.texi(,3075) 
cvs.texi(,3076) The first step is to create the files inside the repository.  This can
cvs.texi(,3077) be done in a couple of different ways.
cvs.texi(,3078) 
cvs.texi(,3079) @c -- The contributed scripts
cvs.texi(,3080) @menu
cvs.texi(,3081) * From files::                  This method is useful with old projects
cvs.texi(,3082)                                 where files already exists.
cvs.texi(,3083) * From other version control systems::  Old projects where you want to
cvs.texi(,3084)                                         preserve history from another system.
cvs.texi(,3085) * From scratch::                Creating a directory tree from scratch.
cvs.texi(,3086) @end menu
cvs.texi(,3087) 
cvs.texi(,3088) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,3089) @node From files
cvs.texi(,3090) @subsection Creating a directory tree from a number of files
cvs.texi(,3091) @cindex Importing files
cvs.texi(,3092) 
cvs.texi(,3093) When you begin using @sc{cvs}, you will probably already have several
cvs.texi(,3094) projects that can be
cvs.texi(,3095) put under @sc{cvs} control.  In these cases the easiest way is to use the
cvs.texi(,3096) @code{import} command.  An example is probably the easiest way to
cvs.texi(,3097) explain how to use it.  If the files you want to install in
cvs.texi(,3098) @sc{cvs} reside in @file{@var{wdir}}, and you want them to appear in the
cvs.texi(,3099) repository as @file{$CVSROOT/yoyodyne/@var{rdir}}, you can do this:
cvs.texi(,3100) 
cvs.texi(,3101) @example
cvs.texi(,3102) $ cd @var{wdir}
cvs.texi(,3103) $ cvs import -m "Imported sources" yoyodyne/@var{rdir} yoyo start
cvs.texi(,3104) @end example
cvs.texi(,3105) 
cvs.texi(,3106) Unless you supply a log message with the @samp{-m}
cvs.texi(,3107) flag, @sc{cvs} starts an editor and prompts for a
cvs.texi(,3108) message.  The string @samp{yoyo} is a @dfn{vendor tag},
cvs.texi(,3109) and @samp{start} is a @dfn{release tag}.  They may fill
cvs.texi(,3110) no purpose in this context, but since @sc{cvs} requires
cvs.texi(,3111) them they must be present.  @xref{Tracking sources}, for
cvs.texi(,3112) more information about them.
cvs.texi(,3113) 
cvs.texi(,3114) You can now verify that it worked, and remove your
cvs.texi(,3115) original source directory.
cvs.texi(,3116) @c FIXME: Need to say more about "verify that it
cvs.texi(,3117) @c worked".  What should the user look for in the output
cvs.texi(,3118) @c from "diff -r"?
cvs.texi(,3119) 
cvs.texi(,3120) @example
cvs.texi(,3121) $ cd ..
cvs.texi(,3122) $ cvs checkout yoyodyne/@var{rdir}       # @r{Explanation below}
cvs.texi(,3123) $ diff -r @var{wdir} yoyodyne/@var{rdir}
cvs.texi(,3124) $ rm -r @var{wdir}
cvs.texi(,3125) @end example
cvs.texi(,3126) 
cvs.texi(,3127) @noindent
cvs.texi(,3128) Erasing the original sources is a good idea, to make sure that you do
cvs.texi(,3129) not accidentally edit them in @var{wdir}, bypassing @sc{cvs}.
cvs.texi(,3130) Of course, it would be wise to make sure that you have
cvs.texi(,3131) a backup of the sources before you remove them.
cvs.texi(,3132) 
cvs.texi(,3133) The @code{checkout} command can either take a module
cvs.texi(,3134) name as argument (as it has done in all previous
cvs.texi(,3135) examples) or a path name relative to @code{$CVSROOT},
cvs.texi(,3136) as it did in the example above.
cvs.texi(,3137) 
cvs.texi(,3138) It is a good idea to check that the permissions
cvs.texi(,3139) @sc{cvs} sets on the directories inside @code{$CVSROOT}
cvs.texi(,3140) are reasonable, and that they belong to the proper
cvs.texi(,3141) groups.  @xref{File permissions}.
cvs.texi(,3142) 
cvs.texi(,3143) If some of the files you want to import are binary, you
cvs.texi(,3144) may want to use the wrappers features to specify which
cvs.texi(,3145) files are binary and which are not.  @xref{Wrappers}.
cvs.texi(,3146) 
cvs.texi(,3147) @c The node name is too long, but I am having trouble
cvs.texi(,3148) @c thinking of something more concise.
cvs.texi(,3149) @node From other version control systems
cvs.texi(,3150) @subsection Creating Files From Other Version Control Systems
cvs.texi(,3151) @cindex Importing files, from other version control systems
cvs.texi(,3152) 
cvs.texi(,3153) If you have a project which you are maintaining with
cvs.texi(,3154) another version control system, such as @sc{rcs}, you
cvs.texi(,3155) may wish to put the files from that project into
cvs.texi(,3156) @sc{cvs}, and preserve the revision history of the
cvs.texi(,3157) files.
cvs.texi(,3158) 
cvs.texi(,3159) @table @asis
cvs.texi(,3160) @cindex RCS, importing files from
cvs.texi(,3161) @item From RCS
cvs.texi(,3162) If you have been using @sc{rcs}, find the @sc{rcs}
cvs.texi(,3163) files---usually a file named @file{foo.c} will have its
cvs.texi(,3164) @sc{rcs} file in @file{RCS/foo.c,v} (but it could be
cvs.texi(,3165) other places; consult the @sc{rcs} documentation for
cvs.texi(,3166) details).  Then create the appropriate directories in
cvs.texi(,3167) @sc{cvs} if they do not already exist.  Then copy the
cvs.texi(,3168) files into the appropriate directories in the @sc{cvs}
cvs.texi(,3169) repository (the name in the repository must be the name
cvs.texi(,3170) of the source file with @samp{,v} added; the files go
cvs.texi(,3171) directly in the appropriate directory of the repository,
cvs.texi(,3172) not in an @file{RCS} subdirectory).  This is one of the
cvs.texi(,3173) few times when it is a good idea to access the @sc{cvs}
cvs.texi(,3174) repository directly, rather than using @sc{cvs}
cvs.texi(,3175) commands.  Then you are ready to check out a new
cvs.texi(,3176) working directory.
cvs.texi(,3177) @c Someday there probably should be a "cvs import -t
cvs.texi(,3178) @c rcs" or some such.  It could even create magic
cvs.texi(,3179) @c branches.  It could also do something about the case
cvs.texi(,3180) @c where the RCS file had a (non-magic) "0" branch.
cvs.texi(,3181) 
cvs.texi(,3182) The @sc{rcs} file should not be locked when you move it
cvs.texi(,3183) into @sc{cvs}; if it is, @sc{cvs} will have trouble
cvs.texi(,3184) letting you operate on it.
cvs.texi(,3185) @c What is the easiest way to unlock your files if you
cvs.texi(,3186) @c have them locked?  Especially if you have a lot of them?
cvs.texi(,3187) @c This is a CVS bug/misfeature; importing RCS files
cvs.texi(,3188) @c should ignore whether they are locked and leave them in
cvs.texi(,3189) @c an unlocked state.  Yet another reason for a separate
cvs.texi(,3190) @c "import RCS file" command.
cvs.texi(,3191) 
cvs.texi(,3192) @c How many is "many"? Or do they just import RCS files?
cvs.texi(,3193) @item From another version control system
cvs.texi(,3194) Many version control systems have the ability to export
cvs.texi(,3195) @sc{rcs} files in the standard format.  If yours does,
cvs.texi(,3196) export the @sc{rcs} files and then follow the above
cvs.texi(,3197) instructions.
cvs.texi(,3198) 
cvs.texi(,3199) Failing that, probably your best bet is to write a
cvs.texi(,3200) script that will check out the files one revision at a
cvs.texi(,3201) time using the command line interface to the other
cvs.texi(,3202) system, and then check the revisions into @sc{cvs}.
cvs.texi(,3203) The @file{sccs2rcs} script mentioned below may be a
cvs.texi(,3204) useful example to follow.
cvs.texi(,3205) 
cvs.texi(,3206) @cindex SCCS, importing files from
cvs.texi(,3207) @item From SCCS
cvs.texi(,3208) There is a script in the @file{contrib} directory of
cvs.texi(,3209) the @sc{cvs} source distribution called @file{sccs2rcs}
cvs.texi(,3210) which converts @sc{sccs} files to @sc{rcs} files.
cvs.texi(,3211) Note: you must run it on a machine which has both
cvs.texi(,3212) @sc{sccs} and @sc{rcs} installed, and like everything
cvs.texi(,3213) else in contrib it is unsupported (your mileage may
cvs.texi(,3214) vary).
cvs.texi(,3215) 
cvs.texi(,3216) @cindex PVCS, importing files from
cvs.texi(,3217) @item From PVCS
cvs.texi(,3218) There is a script in the @file{contrib} directory of
cvs.texi(,3219) the @sc{cvs} source distribution called @file{pvcs_to_rcs}
cvs.texi(,3220) which converts @sc{pvcs} archives to @sc{rcs} files.
cvs.texi(,3221) You must run it on a machine which has both
cvs.texi(,3222) @sc{pvcs} and @sc{rcs} installed, and like everything
cvs.texi(,3223) else in contrib it is unsupported (your mileage may
cvs.texi(,3224) vary).  See the comments in the script for details.
cvs.texi(,3225) @end table
cvs.texi(,3226) @c CMZ and/or PATCHY were systems that were used in the
cvs.texi(,3227) @c high energy physics community (especially for
cvs.texi(,3228) @c CERNLIB).  CERN has replaced them with CVS, but the
cvs.texi(,3229) @c CAR format seems to live on as a way to submit
cvs.texi(,3230) @c changes.  There is a program car2cvs which converts
cvs.texi(,3231) @c but I'm not sure where one gets a copy.
cvs.texi(,3232) @c Not sure it is worth mentioning here, since it would
cvs.texi(,3233) @c appear to affect only one particular community.
cvs.texi(,3234) @c Best page for more information is:
cvs.texi(,3235) @c http://wwwcn1.cern.ch/asd/cvs/index.html
cvs.texi(,3236) @c See also:
cvs.texi(,3237) @c http://ecponion.cern.ch/ecpsa/cernlib.html
cvs.texi(,3238) 
cvs.texi(,3239) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,3240) @node From scratch
cvs.texi(,3241) @subsection Creating a directory tree from scratch
cvs.texi(,3242) 
cvs.texi(,3243) @c Also/instead should be documenting
cvs.texi(,3244) @c $ cvs co -l .
cvs.texi(,3245) @c $ mkdir tc
cvs.texi(,3246) @c $ cvs add tc
cvs.texi(,3247) @c $ cd tc
cvs.texi(,3248) @c $ mkdir man
cvs.texi(,3249) @c $ cvs add man
cvs.texi(,3250) @c etc.
cvs.texi(,3251) @c Using import to create the directories only is
cvs.texi(,3252) @c probably a somewhat confusing concept.
cvs.texi(,3253) For a new project, the easiest thing to do is probably
cvs.texi(,3254) to create an empty directory structure, like this:
cvs.texi(,3255) 
cvs.texi(,3256) @example
cvs.texi(,3257) $ mkdir tc
cvs.texi(,3258) $ mkdir tc/man
cvs.texi(,3259) $ mkdir tc/testing
cvs.texi(,3260) @end example
cvs.texi(,3261) 
cvs.texi(,3262) After that, you use the @code{import} command to create
cvs.texi(,3263) the corresponding (empty) directory structure inside
cvs.texi(,3264) the repository:
cvs.texi(,3265) 
cvs.texi(,3266) @example
cvs.texi(,3267) $ cd tc
cvs.texi(,3268) $ cvs import -m "Created directory structure" yoyodyne/@var{dir} yoyo start
cvs.texi(,3269) @end example
cvs.texi(,3270) 
cvs.texi(,3271) Then, use @code{add} to add files (and new directories)
cvs.texi(,3272) as they appear.
cvs.texi(,3273) 
cvs.texi(,3274) Check that the permissions @sc{cvs} sets on the
cvs.texi(,3275) directories inside @code{$CVSROOT} are reasonable.
cvs.texi(,3276) 
cvs.texi(,3277) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3278) @node Defining the module
cvs.texi(,3279) @section Defining the module
cvs.texi(,3280) @cindex Defining a module
cvs.texi(,3281) @cindex Editing the modules file
cvs.texi(,3282) @cindex Module, defining
cvs.texi(,3283) @cindex Modules file, changing
cvs.texi(,3284) 
cvs.texi(,3285) The next step is to define the module in the
cvs.texi(,3286) @file{modules} file.  This is not strictly necessary,
cvs.texi(,3287) but modules can be convenient in grouping together
cvs.texi(,3288) related files and directories.
cvs.texi(,3289) 
cvs.texi(,3290) In simple cases these steps are sufficient to define a module.
cvs.texi(,3291) 
cvs.texi(,3292) @enumerate
cvs.texi(,3293) @item
cvs.texi(,3294) Get a working copy of the modules file.
cvs.texi(,3295) 
cvs.texi(,3296) @example
cvs.texi(,3297) $ cvs checkout CVSROOT/modules
cvs.texi(,3298) $ cd CVSROOT
cvs.texi(,3299) @end example
cvs.texi(,3300) 
cvs.texi(,3301) @item
cvs.texi(,3302) Edit the file and insert a line that defines the module.  @xref{Intro
cvs.texi(,3303) administrative files}, for an introduction.  @xref{modules}, for a full
cvs.texi(,3304) description of the modules file.  You can use the
cvs.texi(,3305) following line to define the module @samp{tc}:
cvs.texi(,3306) 
cvs.texi(,3307) @example
cvs.texi(,3308) tc   yoyodyne/tc
cvs.texi(,3309) @end example
cvs.texi(,3310) 
cvs.texi(,3311) @item
cvs.texi(,3312) Commit your changes to the modules file.
cvs.texi(,3313) 
cvs.texi(,3314) @example
cvs.texi(,3315) $ cvs commit -m "Added the tc module." modules
cvs.texi(,3316) @end example
cvs.texi(,3317) 
cvs.texi(,3318) @item
cvs.texi(,3319) Release the modules module.
cvs.texi(,3320) 
cvs.texi(,3321) @example
cvs.texi(,3322) $ cd ..
cvs.texi(,3323) $ cvs release -d CVSROOT
cvs.texi(,3324) @end example
cvs.texi(,3325) @end enumerate
cvs.texi(,3326) 
cvs.texi(,3327) @c ---------------------------------------------------------------------
cvs.texi(,3328) @node Revisions
cvs.texi(,3329) @chapter Revisions
cvs.texi(,3330) 
cvs.texi(,3331) For many uses of @sc{cvs}, one doesn't need to worry
cvs.texi(,3332) too much about revision numbers; @sc{cvs} assigns
cvs.texi(,3333) numbers such as @code{1.1}, @code{1.2}, and so on, and
cvs.texi(,3334) that is all one needs to know.  However, some people
cvs.texi(,3335) prefer to have more knowledge and control concerning
cvs.texi(,3336) how @sc{cvs} assigns revision numbers.
cvs.texi(,3337) 
cvs.texi(,3338) If one wants to keep track of a set of revisions
cvs.texi(,3339) involving more than one file, such as which revisions
cvs.texi(,3340) went into a particular release, one uses a @dfn{tag},
cvs.texi(,3341) which is a symbolic revision which can be assigned to a
cvs.texi(,3342) numeric revision in each file.
cvs.texi(,3343) 
cvs.texi(,3344) @menu
cvs.texi(,3345) * Revision numbers::            The meaning of a revision number
cvs.texi(,3346) * Versions revisions releases::  Terminology used in this manual
cvs.texi(,3347) * Assigning revisions::         Assigning revisions
cvs.texi(,3348) * Tags::                        Tags--Symbolic revisions
cvs.texi(,3349) * Tagging the working directory::  The cvs tag command
cvs.texi(,3350) * Tagging by date/tag::         The cvs rtag command
cvs.texi(,3351) * Modifying tags::              Adding, renaming, and deleting tags
cvs.texi(,3352) * Tagging add/remove::          Tags with adding and removing files
cvs.texi(,3353) * Sticky tags::                 Certain tags are persistent
cvs.texi(,3354) @end menu
cvs.texi(,3355) 
cvs.texi(,3356) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3357) @node Revision numbers
cvs.texi(,3358) @section Revision numbers
cvs.texi(,3359) @cindex Revision numbers
cvs.texi(,3360) @cindex Revision tree
cvs.texi(,3361) @cindex Linear development
cvs.texi(,3362) @cindex Number, revision-
cvs.texi(,3363) @cindex Decimal revision number
cvs.texi(,3364) @cindex Branch number
cvs.texi(,3365) @cindex Number, branch
cvs.texi(,3366) 
cvs.texi(,3367) Each version of a file has a unique @dfn{revision
cvs.texi(,3368) number}.  Revision numbers look like @samp{1.1},
cvs.texi(,3369) @samp{1.2}, @samp{1.3.2.2} or even @samp{1.3.2.2.4.5}.
cvs.texi(,3370) A revision number always has an even number of
cvs.texi(,3371) period-separated decimal integers.  By default revision
cvs.texi(,3372) 1.1 is the first revision of a file.  Each successive
cvs.texi(,3373) revision is given a new number by increasing the
cvs.texi(,3374) rightmost number by one.  The following figure displays
cvs.texi(,3375) a few revisions, with newer revisions to the right.
cvs.texi(,3376) 
cvs.texi(,3377) @example
cvs.texi(,3378)        +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,3379)        ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
cvs.texi(,3380)        +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,3381) @end example
cvs.texi(,3382) 
cvs.texi(,3383) It is also possible to end up with numbers containing
cvs.texi(,3384) more than one period, for example @samp{1.3.2.2}.  Such
cvs.texi(,3385) revisions represent revisions on branches
cvs.texi(,3386) (@pxref{Branching and merging}); such revision numbers
cvs.texi(,3387) are explained in detail in @ref{Branches and
cvs.texi(,3388) revisions}.
cvs.texi(,3389) 
cvs.texi(,3390) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3391) @node Versions revisions releases
cvs.texi(,3392) @section Versions, revisions and releases
cvs.texi(,3393) @cindex Revisions, versions and releases
cvs.texi(,3394) @cindex Versions, revisions and releases
cvs.texi(,3395) @cindex Releases, revisions and versions
cvs.texi(,3396) 
cvs.texi(,3397) A file can have several versions, as described above.
cvs.texi(,3398) Likewise, a software product can have several versions.
cvs.texi(,3399) A software product is often given a version number such
cvs.texi(,3400) as @samp{4.1.1}.
cvs.texi(,3401) 
cvs.texi(,3402) Versions in the first sense are called @dfn{revisions}
cvs.texi(,3403) in this document, and versions in the second sense are
cvs.texi(,3404) called @dfn{releases}.  To avoid confusion, the word
cvs.texi(,3405) @dfn{version} is almost never used in this document.
cvs.texi(,3406) 
cvs.texi(,3407) @node Assigning revisions
cvs.texi(,3408) @section Assigning revisions
cvs.texi(,3409) 
cvs.texi(,3410) @c We avoid the "major revision" terminology.  It seems
cvs.texi(,3411) @c like jargon.  Hopefully "first number" is clear enough.
cvs.texi(,3412) @c
cvs.texi(,3413) @c Well, in the context of software release numbers,
cvs.texi(,3414) @c "major" and "minor" release or version numbers are
cvs.texi(,3415) @c documented in at least the GNU Coding Standards, but I'm
cvs.texi(,3416) @c still not sure I find that a valid reason to apply the
cvs.texi(,3417) @c terminology to RCS revision numbers.  "First", "Second",
cvs.texi(,3418) @c "subsequent", and so on is almost surely clearer,
cvs.texi(,3419) @c especially to a novice reader. -DRP
cvs.texi(,3420) By default, @sc{cvs} will assign numeric revisions by
cvs.texi(,3421) leaving the first number the same and incrementing the
cvs.texi(,3422) second number.  For example, @code{1.1}, @code{1.2},
cvs.texi(,3423) @code{1.3}, etc.
cvs.texi(,3424) 
cvs.texi(,3425) When adding a new file, the second number will always
cvs.texi(,3426) be one and the first number will equal the highest
cvs.texi(,3427) first number of any file in that directory.  For
cvs.texi(,3428) example, the current directory contains files whose
cvs.texi(,3429) highest numbered revisions are @code{1.7}, @code{3.1},
cvs.texi(,3430) and @code{4.12}, then an added file will be given the
cvs.texi(,3431) numeric revision @code{4.1}.
cvs.texi(,3432) 
cvs.texi(,3433) @c This is sort of redundant with something we said a
cvs.texi(,3434) @c while ago.  Somewhere we need a better way of
cvs.texi(,3435) @c introducing how the first number can be anything
cvs.texi(,3436) @c except "1", perhaps.  Also I don't think this
cvs.texi(,3437) @c presentation is clear on why we are discussing releases
cvs.texi(,3438) @c and first numbers of numeric revisions in the same
cvs.texi(,3439) @c breath.
cvs.texi(,3440) Normally there is no reason to care
cvs.texi(,3441) about the revision numbers---it is easier to treat them
cvs.texi(,3442) as internal numbers that @sc{cvs} maintains, and tags
cvs.texi(,3443) provide a better way to distinguish between things like
cvs.texi(,3444) release 1 versus release 2 of your product
cvs.texi(,3445) (@pxref{Tags}).  However, if you want to set the
cvs.texi(,3446) numeric revisions, the @samp{-r} option to @code{cvs
cvs.texi(,3447) commit} can do that.  The @samp{-r} option implies the
cvs.texi(,3448) @samp{-f} option, in the sense that it causes the
cvs.texi(,3449) files to be committed even if they are not modified.
cvs.texi(,3450) 
cvs.texi(,3451) For example, to bring all your files up to
cvs.texi(,3452) revision 3.0 (including those that haven't changed),
cvs.texi(,3453) you might invoke:
cvs.texi(,3454) 
cvs.texi(,3455) @example
cvs.texi(,3456) $ cvs commit -r 3.0
cvs.texi(,3457) @end example
cvs.texi(,3458) 
cvs.texi(,3459) Note that the number you specify with @samp{-r} must be
cvs.texi(,3460) larger than any existing revision number.  That is, if
cvs.texi(,3461) revision 3.0 exists, you cannot @samp{cvs commit
cvs.texi(,3462) -r 1.3}.  If you want to maintain several releases in
cvs.texi(,3463) parallel, you need to use a branch (@pxref{Branching and merging}).
cvs.texi(,3464) 
cvs.texi(,3465) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3466) @node Tags
cvs.texi(,3467) @section Tags--Symbolic revisions
cvs.texi(,3468) @cindex Tags
cvs.texi(,3469) 
cvs.texi(,3470) The revision numbers live a life of their own.  They
cvs.texi(,3471) need not have anything at all to do with the release
cvs.texi(,3472) numbers of your software product.  Depending
cvs.texi(,3473) on how you use @sc{cvs} the revision numbers might change several times
cvs.texi(,3474) between two releases.  As an example, some of the
cvs.texi(,3475) source files that make up @sc{rcs} 5.6 have the following
cvs.texi(,3476) revision numbers:
cvs.texi(,3477) @cindex RCS revision numbers
cvs.texi(,3478) 
cvs.texi(,3479) @example
cvs.texi(,3480) ci.c            5.21
cvs.texi(,3481) co.c            5.9
cvs.texi(,3482) ident.c         5.3
cvs.texi(,3483) rcs.c           5.12
cvs.texi(,3484) rcsbase.h       5.11
cvs.texi(,3485) rcsdiff.c       5.10
cvs.texi(,3486) rcsedit.c       5.11
cvs.texi(,3487) rcsfcmp.c       5.9
cvs.texi(,3488) rcsgen.c        5.10
cvs.texi(,3489) rcslex.c        5.11
cvs.texi(,3490) rcsmap.c        5.2
cvs.texi(,3491) rcsutil.c       5.10
cvs.texi(,3492) @end example
cvs.texi(,3493) 
cvs.texi(,3494) @cindex tag (subcommand), introduction
cvs.texi(,3495) @cindex Tags, symbolic name
cvs.texi(,3496) @cindex Symbolic name (tag)
cvs.texi(,3497) @cindex Name, symbolic (tag)
cvs.texi(,3498) @cindex HEAD, as reserved tag name
cvs.texi(,3499) @cindex BASE, as reserved tag name
cvs.texi(,3500) You can use the @code{tag} command to give a symbolic name to a
cvs.texi(,3501) certain revision of a file.  You can use the @samp{-v} flag to the
cvs.texi(,3502) @code{status} command to see all tags that a file has, and
cvs.texi(,3503) which revision numbers they represent.  Tag names must
cvs.texi(,3504) start with an uppercase or lowercase letter and can
cvs.texi(,3505) contain uppercase and lowercase letters, digits,
cvs.texi(,3506) @samp{-}, and @samp{_}.  The two tag names @code{BASE}
cvs.texi(,3507) and @code{HEAD} are reserved for use by @sc{cvs}.  It
cvs.texi(,3508) is expected that future names which are special to
cvs.texi(,3509) @sc{cvs} will be specially named, for example by
cvs.texi(,3510) starting with @samp{.}, rather than being named analogously to
cvs.texi(,3511) @code{BASE} and @code{HEAD}, to avoid conflicts with
cvs.texi(,3512) actual tag names.
cvs.texi(,3513) @c Including a character such as % or = has also been
cvs.texi(,3514) @c suggested as the naming convention for future
cvs.texi(,3515) @c special tag names.  Starting with . is nice because
cvs.texi(,3516) @c that is not a legal tag name as far as RCS is concerned.
cvs.texi(,3517) @c FIXME: CVS actually accepts quite a few characters
cvs.texi(,3518) @c in tag names, not just the ones documented above
cvs.texi(,3519) @c (see RCS_check_tag).  RCS
cvs.texi(,3520) @c defines legitimate tag names by listing illegal
cvs.texi(,3521) @c characters rather than legal ones.  CVS is said to lose its
cvs.texi(,3522) @c mind if you try to use "/" (try making such a tag sticky
cvs.texi(,3523) @c and using "cvs status" client/server--see remote
cvs.texi(,3524) @c protocol format for entries line for probable cause).
cvs.texi(,3525) @c TODO: The testsuite
cvs.texi(,3526) @c should test for whatever are documented above as
cvs.texi(,3527) @c officially-OK tag names, and CVS should at least reject
cvs.texi(,3528) @c characters that won't work, like "/".
cvs.texi(,3529) 
cvs.texi(,3530) You'll want to choose some convention for naming tags,
cvs.texi(,3531) based on information such as the name of the program
cvs.texi(,3532) and the version number of the release.  For example,
cvs.texi(,3533) one might take the name of the program, immediately
cvs.texi(,3534) followed by the version number with @samp{.} changed to
cvs.texi(,3535) @samp{-}, so that @sc{cvs} 1.9 would be tagged with the name
cvs.texi(,3536) @code{cvs1-9}.  If you choose a consistent convention,
cvs.texi(,3537) then you won't constantly be guessing whether a tag is
cvs.texi(,3538) @code{cvs-1-9} or @code{cvs1_9} or what.  You might
cvs.texi(,3539) even want to consider enforcing your convention in the
cvs.texi(,3540) taginfo file (@pxref{user-defined logging}).
cvs.texi(,3541) @c Might be nice to say more about using taginfo this
cvs.texi(,3542) @c way, like giving an example, or pointing out any particular
cvs.texi(,3543) @c issues which arise.
cvs.texi(,3544) 
cvs.texi(,3545) @cindex Adding a tag
cvs.texi(,3546) @cindex Tags, example
cvs.texi(,3547) The following example shows how you can add a tag to a
cvs.texi(,3548) file.  The commands must be issued inside your working
cvs.texi(,3549) directory.  That is, you should issue the
cvs.texi(,3550) command in the directory where @file{backend.c}
cvs.texi(,3551) resides.
cvs.texi(,3552) 
cvs.texi(,3553) @example
cvs.texi(,3554) $ cvs tag rel-0-4 backend.c
cvs.texi(,3555) T backend.c
cvs.texi(,3556) $ cvs status -v backend.c
cvs.texi(,3557) ===================================================================
cvs.texi(,3558) File: backend.c         Status: Up-to-date
cvs.texi(,3559) 
cvs.texi(,3560)     Version:            1.4     Tue Dec  1 14:39:01 1992
cvs.texi(,3561)     RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
cvs.texi(,3562)     Sticky Tag:         (none)
cvs.texi(,3563)     Sticky Date:        (none)
cvs.texi(,3564)     Sticky Options:     (none)
cvs.texi(,3565) 
cvs.texi(,3566)     Existing Tags:
cvs.texi(,3567)         rel-0-4                     (revision: 1.4)
cvs.texi(,3568) 
cvs.texi(,3569) @end example
cvs.texi(,3570) 
cvs.texi(,3571) For a complete summary of the syntax of @code{cvs tag},
cvs.texi(,3572) including the various options, see @ref{Invoking CVS}.
cvs.texi(,3573) 
cvs.texi(,3574) There is seldom reason to tag a file in isolation.  A more common use is
cvs.texi(,3575) to tag all the files that constitute a module with the same tag at
cvs.texi(,3576) strategic points in the development life-cycle, such as when a release
cvs.texi(,3577) is made.
cvs.texi(,3578) 
cvs.texi(,3579) @example
cvs.texi(,3580) $ cvs tag rel-1-0 .
cvs.texi(,3581) cvs tag: Tagging .
cvs.texi(,3582) T Makefile
cvs.texi(,3583) T backend.c
cvs.texi(,3584) T driver.c
cvs.texi(,3585) T frontend.c
cvs.texi(,3586) T parser.c
cvs.texi(,3587) @end example
cvs.texi(,3588) 
cvs.texi(,3589) @noindent
cvs.texi(,3590) (When you give @sc{cvs} a directory as argument, it generally applies the
cvs.texi(,3591) operation to all the files in that directory, and (recursively), to any
cvs.texi(,3592) subdirectories that it may contain.  @xref{Recursive behavior}.)
cvs.texi(,3593) 
cvs.texi(,3594) @cindex Retrieving an old revision using tags
cvs.texi(,3595) @cindex Tags, retrieving old revisions
cvs.texi(,3596) The @code{checkout} command has a flag, @samp{-r}, that lets you check out
cvs.texi(,3597) a certain revision of a module.  This flag makes it easy to
cvs.texi(,3598) retrieve the sources that make up release 1.0 of the module @samp{tc} at
cvs.texi(,3599) any time in the future:
cvs.texi(,3600) 
cvs.texi(,3601) @example
cvs.texi(,3602) $ cvs checkout -r rel-1-0 tc
cvs.texi(,3603) @end example
cvs.texi(,3604) 
cvs.texi(,3605) @noindent
cvs.texi(,3606) This is useful, for instance, if someone claims that there is a bug in
cvs.texi(,3607) that release, but you cannot find the bug in the current working copy.
cvs.texi(,3608) 
cvs.texi(,3609) You can also check out a module as it was at any given date.
cvs.texi(,3610) @xref{checkout options}.  When specifying @samp{-r} to
cvs.texi(,3611) any of these commands, you will need beware of sticky
cvs.texi(,3612) tags; see @ref{Sticky tags}.
cvs.texi(,3613) 
cvs.texi(,3614) When you tag more than one file with the same tag you
cvs.texi(,3615) can think about the tag as "a curve drawn through a
cvs.texi(,3616) matrix of filename vs. revision number."  Say we have 5
cvs.texi(,3617) files with the following revisions:
cvs.texi(,3618) 
cvs.texi(,3619) @example
cvs.texi(,3620) @group
cvs.texi(,3621)         file1   file2   file3   file4   file5
cvs.texi(,3622) 
cvs.texi(,3623)         1.1     1.1     1.1     1.1  /--1.1*      <-*-  TAG
cvs.texi(,3624)         1.2*-   1.2     1.2    -1.2*-
cvs.texi(,3625)         1.3  \- 1.3*-   1.3   / 1.3
cvs.texi(,3626)         1.4          \  1.4  /  1.4
cvs.texi(,3627)                       \-1.5*-   1.5
cvs.texi(,3628)                         1.6
cvs.texi(,3629) @end group
cvs.texi(,3630) @end example
cvs.texi(,3631) 
cvs.texi(,3632) At some time in the past, the @code{*} versions were tagged.
cvs.texi(,3633) You can think of the tag as a handle attached to the curve
cvs.texi(,3634) drawn through the tagged revisions.  When you pull on
cvs.texi(,3635) the handle, you get all the tagged revisions.  Another
cvs.texi(,3636) way to look at it is that you "sight" through a set of
cvs.texi(,3637) revisions that is "flat" along the tagged revisions,
cvs.texi(,3638) like this:
cvs.texi(,3639) 
cvs.texi(,3640) @example
cvs.texi(,3641) @group
cvs.texi(,3642)         file1   file2   file3   file4   file5
cvs.texi(,3643) 
cvs.texi(,3644)                         1.1
cvs.texi(,3645)                         1.2
cvs.texi(,3646)                 1.1     1.3                       _
cvs.texi(,3647)         1.1     1.2     1.4     1.1              /
cvs.texi(,3648)         1.2*----1.3*----1.5*----1.2*----1.1     (--- <--- Look here
cvs.texi(,3649)         1.3             1.6     1.3              \_
cvs.texi(,3650)         1.4                     1.4
cvs.texi(,3651)                                 1.5
cvs.texi(,3652) @end group
cvs.texi(,3653) @end example
cvs.texi(,3654) 
cvs.texi(,3655) @node Tagging the working directory
cvs.texi(,3656) @section Specifying what to tag from the working directory
cvs.texi(,3657) 
cvs.texi(,3658) @cindex tag (subcommand)
cvs.texi(,3659) The example in the previous section demonstrates one of
cvs.texi(,3660) the most common ways to choose which revisions to tag.
cvs.texi(,3661) Namely, running the @code{cvs tag} command without
cvs.texi(,3662) arguments causes @sc{cvs} to select the revisions which
cvs.texi(,3663) are checked out in the current working directory.  For
cvs.texi(,3664) example, if the copy of @file{backend.c} in working
cvs.texi(,3665) directory was checked out from revision 1.4, then
cvs.texi(,3666) @sc{cvs} will tag revision 1.4.  Note that the tag is
cvs.texi(,3667) applied immediately to revision 1.4 in the repository;
cvs.texi(,3668) tagging is not like modifying a file, or other
cvs.texi(,3669) operations in which one first modifies the working
cvs.texi(,3670) directory and then runs @code{cvs commit} to transfer
cvs.texi(,3671) that modification to the repository.
cvs.texi(,3672) 
cvs.texi(,3673) One potentially surprising aspect of the fact that
cvs.texi(,3674) @code{cvs tag} operates on the repository is that you
cvs.texi(,3675) are tagging the checked-in revisions, which may differ
cvs.texi(,3676) from locally modified files in your working directory.
cvs.texi(,3677) If you want to avoid doing this by mistake, specify the
cvs.texi(,3678) @samp{-c} option to @code{cvs tag}.  If there are any
cvs.texi(,3679) locally modified files, @sc{cvs} will abort with an
cvs.texi(,3680) error before it tags any files:
cvs.texi(,3681) 
cvs.texi(,3682) @example
cvs.texi(,3683) $ cvs tag -c rel-0-4
cvs.texi(,3684) cvs tag: backend.c is locally modified
cvs.texi(,3685) cvs [tag aborted]: correct the above errors first!
cvs.texi(,3686) @end example
cvs.texi(,3687) 
cvs.texi(,3688) @node Tagging by date/tag
cvs.texi(,3689) @section Specifying what to tag by date or revision
cvs.texi(,3690) @cindex rtag (subcommand)
cvs.texi(,3691) 
cvs.texi(,3692) The @code{cvs rtag} command tags the repository as of a
cvs.texi(,3693) certain date or time (or can be used to tag the latest
cvs.texi(,3694) revision).  @code{rtag} works directly on the
cvs.texi(,3695) repository contents (it requires no prior checkout and
cvs.texi(,3696) does not look for a working directory).
cvs.texi(,3697) 
cvs.texi(,3698) The following options specify which date or revision to
cvs.texi(,3699) tag.  See @ref{Common options}, for a complete
cvs.texi(,3700) description of them.
cvs.texi(,3701) 
cvs.texi(,3702) @table @code
cvs.texi(,3703) @item -D @var{date}
cvs.texi(,3704) Tag the most recent revision no later than @var{date}.
cvs.texi(,3705) 
cvs.texi(,3706) @item -f
cvs.texi(,3707) Only useful with the @samp{-D @var{date}} or @samp{-r @var{tag}}
cvs.texi(,3708) flags.  If no matching revision is found, use the most
cvs.texi(,3709) recent revision (instead of ignoring the file).
cvs.texi(,3710) 
cvs.texi(,3711) @item -r @var{tag}
cvs.texi(,3712) Only tag those files that contain existing tag @var{tag}.
cvs.texi(,3713) @end table
cvs.texi(,3714) 
cvs.texi(,3715) The @code{cvs tag} command also allows one to specify
cvs.texi(,3716) files by revision or date, using the same @samp{-r},
cvs.texi(,3717) @samp{-D}, and @samp{-f} options.  However, this
cvs.texi(,3718) feature is probably not what you want.  The reason is
cvs.texi(,3719) that @code{cvs tag} chooses which files to tag based on
cvs.texi(,3720) the files that exist in the working directory, rather
cvs.texi(,3721) than the files which existed as of the given tag/date.
cvs.texi(,3722) Therefore, you are generally better off using @code{cvs
cvs.texi(,3723) rtag}.  The exceptions might be cases like:
cvs.texi(,3724) 
cvs.texi(,3725) @example
cvs.texi(,3726) cvs tag -r 1.4 stable backend.c
cvs.texi(,3727) @end example
cvs.texi(,3728) 
cvs.texi(,3729) @node Modifying tags
cvs.texi(,3730) @section Deleting, moving, and renaming tags
cvs.texi(,3731) 
cvs.texi(,3732) @c Also see:
cvs.texi(,3733) @c  "How do I move or rename a magic branch tag?"
cvs.texi(,3734) @c in the FAQ (I think the issues it talks about still
cvs.texi(,3735) @c apply, but this could use some sanity.sh work).
cvs.texi(,3736) 
cvs.texi(,3737) Normally one does not modify tags.  They exist in order
cvs.texi(,3738) to record the history of the repository and so deleting
cvs.texi(,3739) them or changing their meaning would, generally, not be
cvs.texi(,3740) what you want.
cvs.texi(,3741) 
cvs.texi(,3742) However, there might be cases in which one uses a tag
cvs.texi(,3743) temporarily or accidentally puts one in the wrong
cvs.texi(,3744) place.  Therefore, one might delete, move, or rename a
cvs.texi(,3745) tag.
cvs.texi(,3746) 
cvs.texi(,3747) @noindent
cvs.texi(,3748) @strong{WARNING: the commands in this section are
cvs.texi(,3749) dangerous; they permanently discard historical
cvs.texi(,3750) information and it can be difficult or impossible to
cvs.texi(,3751) recover from errors.  If you are a @sc{cvs}
cvs.texi(,3752) administrator, you may consider restricting these
cvs.texi(,3753) commands with taginfo (@pxref{user-defined logging}).}
cvs.texi(,3754) 
cvs.texi(,3755) @cindex Deleting tags
cvs.texi(,3756) @cindex Deleting branch tags
cvs.texi(,3757) @cindex Removing tags
cvs.texi(,3758) @cindex Removing branch tags
cvs.texi(,3759) @cindex Tags, deleting
cvs.texi(,3760) @cindex Branch tags, deleting
cvs.texi(,3761) To delete a tag, specify the @samp{-d} option to either
cvs.texi(,3762) @code{cvs tag} or @code{cvs rtag}.  For example:
cvs.texi(,3763) 
cvs.texi(,3764) @example
cvs.texi(,3765) cvs rtag -d rel-0-4 tc
cvs.texi(,3766) @end example
cvs.texi(,3767) 
cvs.texi(,3768) @noindent
cvs.texi(,3769) deletes the non-branch tag @code{rel-0-4} from the module @code{tc}.
cvs.texi(,3770) In the event that branch tags are encountered within the repository
cvs.texi(,3771) with the given name, a warning message will be issued and the branch 
cvs.texi(,3772) tag will not be deleted.  If you are absolutely certain you know what
cvs.texi(,3773) you are doing, the @code{-B} option may be specified to allow deletion
cvs.texi(,3774) of branch tags.  In that case, any non-branch tags encountered will
cvs.texi(,3775) trigger warnings and will not be deleted.
cvs.texi(,3776) 
cvs.texi(,3777) @noindent
cvs.texi(,3778) @strong{WARNING: Moving branch tags is very dangerous!  If you think
cvs.texi(,3779) you need the @code{-B} option, think again and ask your @sc{cvs}
cvs.texi(,3780) administrator about it (if that isn't you).  There is almost certainly
cvs.texi(,3781) another way to accomplish what you want to accomplish.}
cvs.texi(,3782) 
cvs.texi(,3783) @cindex Moving tags
cvs.texi(,3784) @cindex Moving branch tags
cvs.texi(,3785) @cindex Tags, moving
cvs.texi(,3786) @cindex Branch tags, moving
cvs.texi(,3787) When we say @dfn{move} a tag, we mean to make the same
cvs.texi(,3788) name point to different revisions.  For example, the
cvs.texi(,3789) @code{stable} tag may currently point to revision 1.4
cvs.texi(,3790) of @file{backend.c} and perhaps we want to make it
cvs.texi(,3791) point to revision 1.6.  To move a non-branch tag, specify the
cvs.texi(,3792) @samp{-F} option to either @code{cvs tag} or @code{cvs
cvs.texi(,3793) rtag}.  For example, the task just mentioned might be
cvs.texi(,3794) accomplished as:
cvs.texi(,3795) 
cvs.texi(,3796) @example
cvs.texi(,3797) cvs tag -r 1.6 -F stable backend.c
cvs.texi(,3798) @end example
cvs.texi(,3799) 
cvs.texi(,3800) @noindent
cvs.texi(,3801) If any branch tags are encountered in the repository 
cvs.texi(,3802) with the given name, a warning is issued and the branch
cvs.texi(,3803) tag is not disturbed.  If you are absolutely certain you
cvs.texi(,3804) wish to move the branch tag, the @code{-B} option may be specified.
cvs.texi(,3805) In that case, non-branch tags encountered with the given
cvs.texi(,3806) name are ignored with a warning message.
cvs.texi(,3807) 
cvs.texi(,3808) @noindent
cvs.texi(,3809) @strong{WARNING: Moving branch tags is very dangerous!  If you think you
cvs.texi(,3810) need the @code{-B} option, think again and ask your @sc{cvs}
cvs.texi(,3811) administrator about it (if that isn't you).  There is almost certainly
cvs.texi(,3812) another way to accomplish what you want to accomplish.}
cvs.texi(,3813) 
cvs.texi(,3814) @cindex Renaming tags
cvs.texi(,3815) @cindex Tags, renaming
cvs.texi(,3816) When we say @dfn{rename} a tag, we mean to make a
cvs.texi(,3817) different name point to the same revisions as the old
cvs.texi(,3818) tag.  For example, one may have misspelled the tag name
cvs.texi(,3819) and want to correct it (hopefully before others are
cvs.texi(,3820) relying on the old spelling).  To rename a tag, first
cvs.texi(,3821) create a new tag using the @samp{-r} option to
cvs.texi(,3822) @code{cvs rtag}, and then delete the old name.  (Caution:
cvs.texi(,3823) this method will not work with branch tags.) 
cvs.texi(,3824) This leaves the new tag on exactly the 
cvs.texi(,3825) same files as the old tag.  For example:
cvs.texi(,3826) 
cvs.texi(,3827) @example
cvs.texi(,3828) cvs rtag -r old-name-0-4 rel-0-4 tc
cvs.texi(,3829) cvs rtag -d old-name-0-4 tc
cvs.texi(,3830) @end example
cvs.texi(,3831) 
cvs.texi(,3832) @node Tagging add/remove
cvs.texi(,3833) @section Tagging and adding and removing files
cvs.texi(,3834) 
cvs.texi(,3835) The subject of exactly how tagging interacts with
cvs.texi(,3836) adding and removing files is somewhat obscure; for the
cvs.texi(,3837) most part @sc{cvs} will keep track of whether files
cvs.texi(,3838) exist or not without too much fussing.  By default,
cvs.texi(,3839) tags are applied to only files which have a revision
cvs.texi(,3840) corresponding to what is being tagged.  Files which did
cvs.texi(,3841) not exist yet, or which were already removed, simply
cvs.texi(,3842) omit the tag, and @sc{cvs} knows to treat the absence
cvs.texi(,3843) of a tag as meaning that the file didn't exist as of
cvs.texi(,3844) that tag.
cvs.texi(,3845) 
cvs.texi(,3846) However, this can lose a small amount of information.
cvs.texi(,3847) For example, suppose a file was added and then removed.
cvs.texi(,3848) Then, if the tag is missing for that file, there is no
cvs.texi(,3849) way to know whether the tag refers to the time before
cvs.texi(,3850) the file was added, or the time after it was removed.
cvs.texi(,3851) If you specify the @samp{-r} option to @code{cvs rtag},
cvs.texi(,3852) then @sc{cvs} tags the files which have been removed,
cvs.texi(,3853) and thereby avoids this problem.  For example, one
cvs.texi(,3854) might specify @code{-r HEAD} to tag the head.
cvs.texi(,3855) 
cvs.texi(,3856) On the subject of adding and removing files, the
cvs.texi(,3857) @code{cvs rtag} command has a @samp{-a} option which
cvs.texi(,3858) means to clear the tag from removed files that would
cvs.texi(,3859) not otherwise be tagged.  For example, one might
cvs.texi(,3860) specify this option in conjunction with @samp{-F} when
cvs.texi(,3861) moving a tag.  If one moved a tag without @samp{-a},
cvs.texi(,3862) then the tag in the removed files might still refer to
cvs.texi(,3863) the old revision, rather than reflecting the fact that
cvs.texi(,3864) the file had been removed.  I don't think this is
cvs.texi(,3865) necessary if @samp{-r} is specified, as noted above.
cvs.texi(,3866) 
cvs.texi(,3867) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3868) @node Sticky tags
cvs.texi(,3869) @section Sticky tags
cvs.texi(,3870) @cindex Sticky tags
cvs.texi(,3871) @cindex Tags, sticky
cvs.texi(,3872) 
cvs.texi(,3873) @c A somewhat related issue is per-directory sticky
cvs.texi(,3874) @c tags (see comment at CVS/Tag in node Working
cvs.texi(,3875) @c directory storage); we probably want to say
cvs.texi(,3876) @c something like "you can set a sticky tag for only
cvs.texi(,3877) @c some files, but you don't want to" or some such.
cvs.texi(,3878) 
cvs.texi(,3879) Sometimes a working copy's revision has extra data
cvs.texi(,3880) associated with it, for example it might be on a branch
cvs.texi(,3881) (@pxref{Branching and merging}), or restricted to
cvs.texi(,3882) versions prior to a certain date by @samp{checkout -D}
cvs.texi(,3883) or @samp{update -D}.  Because this data persists --
cvs.texi(,3884) that is, it applies to subsequent commands in the
cvs.texi(,3885) working copy -- we refer to it as @dfn{sticky}.
cvs.texi(,3886) 
cvs.texi(,3887) Most of the time, stickiness is an obscure aspect of
cvs.texi(,3888) @sc{cvs} that you don't need to think about.  However,
cvs.texi(,3889) even if you don't want to use the feature, you may need
cvs.texi(,3890) to know @emph{something} about sticky tags (for
cvs.texi(,3891) example, how to avoid them!).
cvs.texi(,3892) 
cvs.texi(,3893) You can use the @code{status} command to see if any
cvs.texi(,3894) sticky tags or dates are set:
cvs.texi(,3895) 
cvs.texi(,3896) @example
cvs.texi(,3897) $ cvs status driver.c
cvs.texi(,3898) ===================================================================
cvs.texi(,3899) File: driver.c          Status: Up-to-date
cvs.texi(,3900) 
cvs.texi(,3901)     Version:            1.7.2.1 Sat Dec  5 19:35:03 1992
cvs.texi(,3902)     RCS Version:        1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
cvs.texi(,3903)     Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
cvs.texi(,3904)     Sticky Date:        (none)
cvs.texi(,3905)     Sticky Options:     (none)
cvs.texi(,3906) 
cvs.texi(,3907) @end example
cvs.texi(,3908) 
cvs.texi(,3909) @cindex Resetting sticky tags
cvs.texi(,3910) @cindex Sticky tags, resetting
cvs.texi(,3911) @cindex Deleting sticky tags
cvs.texi(,3912) The sticky tags will remain on your working files until
cvs.texi(,3913) you delete them with @samp{cvs update -A}.  The
cvs.texi(,3914) @samp{-A} option merges local changes into the version of the
cvs.texi(,3915) file from the head of the trunk, removing any sticky tags,
cvs.texi(,3916) dates, or options.  See @ref{update} for more on the operation
cvs.texi(,3917) of @code{cvs update}.
cvs.texi(,3918) 
cvs.texi(,3919) @cindex Sticky date
cvs.texi(,3920) The most common use of sticky tags is to identify which
cvs.texi(,3921) branch one is working on, as described in
cvs.texi(,3922) @ref{Accessing branches}.  However, non-branch
cvs.texi(,3923) sticky tags have uses as well.  For example,
cvs.texi(,3924) suppose that you want to avoid updating your working
cvs.texi(,3925) directory, to isolate yourself from possibly
cvs.texi(,3926) destabilizing changes other people are making.  You
cvs.texi(,3927) can, of course, just refrain from running @code{cvs
cvs.texi(,3928) update}.  But if you want to avoid updating only a
cvs.texi(,3929) portion of a larger tree, then sticky tags can help.
cvs.texi(,3930) If you check out a certain revision (such as 1.4) it
cvs.texi(,3931) will become sticky.  Subsequent @code{cvs update}
cvs.texi(,3932) commands will
cvs.texi(,3933) not retrieve the latest revision until you reset the
cvs.texi(,3934) tag with @code{cvs update -A}.  Likewise, use of the
cvs.texi(,3935) @samp{-D} option to @code{update} or @code{checkout}
cvs.texi(,3936) sets a @dfn{sticky date}, which, similarly, causes that
cvs.texi(,3937) date to be used for future retrievals.
cvs.texi(,3938) 
cvs.texi(,3939) People often want to retrieve an old version of
cvs.texi(,3940) a file without setting a sticky tag.  This can
cvs.texi(,3941) be done with the @samp{-p} option to @code{checkout} or
cvs.texi(,3942) @code{update}, which sends the contents of the file to
cvs.texi(,3943) standard output.  For example:
cvs.texi(,3944) @example
cvs.texi(,3945) $ cvs update -p -r 1.1 file1 >file1
cvs.texi(,3946) ===================================================================
cvs.texi(,3947) Checking out file1
cvs.texi(,3948) RCS:  /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
cvs.texi(,3949) VERS: 1.1
cvs.texi(,3950) ***************
cvs.texi(,3951) $
cvs.texi(,3952) @end example
cvs.texi(,3953) 
cvs.texi(,3954) However, this isn't the easiest way, if you are asking
cvs.texi(,3955) how to undo a previous checkin (in this example, put
cvs.texi(,3956) @file{file1} back to the way it was as of revision
cvs.texi(,3957) 1.1).  In that case you are better off using the
cvs.texi(,3958) @samp{-j} option to @code{update}; for further
cvs.texi(,3959) discussion see @ref{Merging two revisions}.
cvs.texi(,3960) 
cvs.texi(,3961) @c ---------------------------------------------------------------------
cvs.texi(,3962) @node Branching and merging
cvs.texi(,3963) @chapter Branching and merging
cvs.texi(,3964) @cindex Branching
cvs.texi(,3965) @cindex Merging
cvs.texi(,3966) @cindex Copying changes
cvs.texi(,3967) @cindex Main trunk and branches
cvs.texi(,3968) @cindex Revision tree, making branches
cvs.texi(,3969) @cindex Branches, copying changes between
cvs.texi(,3970) @cindex Changes, copying between branches
cvs.texi(,3971) @cindex Modifications, copying between branches
cvs.texi(,3972) 
cvs.texi(,3973) @sc{cvs} allows you to isolate changes onto a separate
cvs.texi(,3974) line of development, known as a @dfn{branch}.  When you
cvs.texi(,3975) change files on a branch, those changes do not appear
cvs.texi(,3976) on the main trunk or other branches.
cvs.texi(,3977) 
cvs.texi(,3978) Later you can move changes from one branch to another
cvs.texi(,3979) branch (or the main trunk) by @dfn{merging}.  Merging
cvs.texi(,3980) involves first running @code{cvs update -j}, to merge
cvs.texi(,3981) the changes into the working directory.
cvs.texi(,3982) You can then commit that revision, and thus effectively
cvs.texi(,3983) copy the changes onto another branch.
cvs.texi(,3984) 
cvs.texi(,3985) @menu
cvs.texi(,3986) * Branches motivation::         What branches are good for
cvs.texi(,3987) * Creating a branch::           Creating a branch
cvs.texi(,3988) * Accessing branches::          Checking out and updating branches
cvs.texi(,3989) * Branches and revisions::      Branches are reflected in revision numbers
cvs.texi(,3990) * Magic branch numbers::        Magic branch numbers
cvs.texi(,3991) * Merging a branch::            Merging an entire branch
cvs.texi(,3992) * Merging more than once::      Merging from a branch several times
cvs.texi(,3993) * Merging two revisions::       Merging differences between two revisions
cvs.texi(,3994) * Merging adds and removals::   What if files are added or removed?
cvs.texi(,3995) * Merging and keywords::        Avoiding conflicts due to keyword substitution
cvs.texi(,3996) @end menu
cvs.texi(,3997) 
cvs.texi(,3998) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,3999) @node Branches motivation
cvs.texi(,4000) @section What branches are good for
cvs.texi(,4001) @cindex Branches motivation
cvs.texi(,4002) @cindex What branches are good for
cvs.texi(,4003) @cindex Motivation for branches
cvs.texi(,4004) 
cvs.texi(,4005) @c FIXME: this node mentions one way to use branches,
cvs.texi(,4006) @c but it is by no means the only way.  For example,
cvs.texi(,4007) @c the technique of committing a new feature on a branch,
cvs.texi(,4008) @c until it is ready for the main trunk.  The whole
cvs.texi(,4009) @c thing is generally speaking more akin to the
cvs.texi(,4010) @c "Revision management" node although it isn't clear to
cvs.texi(,4011) @c me whether policy matters should be centralized or
cvs.texi(,4012) @c distributed throughout the relevant sections.
cvs.texi(,4013) Suppose that release 1.0 of tc has been made.  You are continuing to
cvs.texi(,4014) develop tc, planning to create release 1.1 in a couple of months.  After a
cvs.texi(,4015) while your customers start to complain about a fatal bug.  You check
cvs.texi(,4016) out release 1.0 (@pxref{Tags}) and find the bug
cvs.texi(,4017) (which turns out to have a trivial fix).  However, the current revision
cvs.texi(,4018) of the sources are in a state of flux and are not expected to be stable
cvs.texi(,4019) for at least another month.  There is no way to make a
cvs.texi(,4020) bugfix release based on the newest sources.
cvs.texi(,4021) 
cvs.texi(,4022) The thing to do in a situation like this is to create a @dfn{branch} on
cvs.texi(,4023) the revision trees for all the files that make up
cvs.texi(,4024) release 1.0 of tc.  You can then make
cvs.texi(,4025) modifications to the branch without disturbing the main trunk.  When the
cvs.texi(,4026) modifications are finished you can elect to either incorporate them on
cvs.texi(,4027) the main trunk, or leave them on the branch.
cvs.texi(,4028) 
cvs.texi(,4029) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4030) @node Creating a branch
cvs.texi(,4031) @section Creating a branch
cvs.texi(,4032) @cindex Creating a branch
cvs.texi(,4033) @cindex Branch, creating a
cvs.texi(,4034) @cindex tag (subcommand), creating a branch using
cvs.texi(,4035) @cindex rtag (subcommand), creating a branch using
cvs.texi(,4036) 
cvs.texi(,4037) You can create a branch with @code{tag -b}; for
cvs.texi(,4038) example, assuming you're in a working copy:
cvs.texi(,4039) 
cvs.texi(,4040) @example
cvs.texi(,4041) $ cvs tag -b rel-1-0-patches
cvs.texi(,4042) @end example
cvs.texi(,4043) 
cvs.texi(,4044) @c FIXME: we should be more explicit about the value of
cvs.texi(,4045) @c having a tag on the branchpoint.  For example
cvs.texi(,4046) @c "cvs tag rel-1-0-patches-branchpoint" before
cvs.texi(,4047) @c the "cvs tag -b".  This points out that
cvs.texi(,4048) @c rel-1-0-patches is a pretty awkward name for
cvs.texi(,4049) @c this example (more so than for the rtag example
cvs.texi(,4050) @c below).
cvs.texi(,4051) 
cvs.texi(,4052) This splits off a branch based on the current revisions
cvs.texi(,4053) in the working copy, assigning that branch the name
cvs.texi(,4054) @samp{rel-1-0-patches}.
cvs.texi(,4055) 
cvs.texi(,4056) It is important to understand that branches get created
cvs.texi(,4057) in the repository, not in the working copy.  Creating a
cvs.texi(,4058) branch based on current revisions, as the above example
cvs.texi(,4059) does, will @emph{not} automatically switch the working
cvs.texi(,4060) copy to be on the new branch.  For information on how
cvs.texi(,4061) to do that, see @ref{Accessing branches}.
cvs.texi(,4062) 
cvs.texi(,4063) You can also create a branch without reference to any
cvs.texi(,4064) working copy, by using @code{rtag}:
cvs.texi(,4065) 
cvs.texi(,4066) @example
cvs.texi(,4067) $ cvs rtag -b -r rel-1-0 rel-1-0-patches tc
cvs.texi(,4068) @end example
cvs.texi(,4069) 
cvs.texi(,4070) @samp{-r rel-1-0} says that this branch should be
cvs.texi(,4071) rooted at the revision that
cvs.texi(,4072) corresponds to the tag @samp{rel-1-0}.  It need not
cvs.texi(,4073) be the most recent revision -- it's often useful to
cvs.texi(,4074) split a branch off an old revision (for example, when
cvs.texi(,4075) fixing a bug in a past release otherwise known to be
cvs.texi(,4076) stable).
cvs.texi(,4077) 
cvs.texi(,4078) As with @samp{tag}, the @samp{-b} flag tells
cvs.texi(,4079) @code{rtag} to create a branch (rather than just a
cvs.texi(,4080) symbolic revision name).  Note that the numeric
cvs.texi(,4081) revision number that matches @samp{rel-1-0} will
cvs.texi(,4082) probably be different from file to file.
cvs.texi(,4083) 
cvs.texi(,4084) So, the full effect of the command is to create a new
cvs.texi(,4085) branch -- named @samp{rel-1-0-patches} -- in module
cvs.texi(,4086) @samp{tc}, rooted in the revision tree at the point tagged
cvs.texi(,4087) by @samp{rel-1-0}.
cvs.texi(,4088) 
cvs.texi(,4089) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4090) @node Accessing branches
cvs.texi(,4091) @section Accessing branches
cvs.texi(,4092) @cindex Check out a branch
cvs.texi(,4093) @cindex Retrieve a branch
cvs.texi(,4094) @cindex Access a branch
cvs.texi(,4095) @cindex Identifying a branch
cvs.texi(,4096) @cindex Branch, check out
cvs.texi(,4097) @cindex Branch, retrieving
cvs.texi(,4098) @cindex Branch, accessing
cvs.texi(,4099) @cindex Branch, identifying
cvs.texi(,4100) 
cvs.texi(,4101) You can retrieve a branch in one of two ways: by
cvs.texi(,4102) checking it out fresh from the repository, or by
cvs.texi(,4103) switching an existing working copy over to the branch.
cvs.texi(,4104) 
cvs.texi(,4105) To check out a branch from the repository, invoke
cvs.texi(,4106) @samp{checkout} with the @samp{-r} flag, followed by
cvs.texi(,4107) the tag name of the branch (@pxref{Creating a branch}):
cvs.texi(,4108) 
cvs.texi(,4109) @example
cvs.texi(,4110) $ cvs checkout -r rel-1-0-patches tc
cvs.texi(,4111) @end example
cvs.texi(,4112) 
cvs.texi(,4113) Or, if you already have a working copy, you can switch
cvs.texi(,4114) it to a given branch with @samp{update -r}:
cvs.texi(,4115) 
cvs.texi(,4116) @example
cvs.texi(,4117) $ cvs update -r rel-1-0-patches tc
cvs.texi(,4118) @end example
cvs.texi(,4119) 
cvs.texi(,4120) @noindent
cvs.texi(,4121) or equivalently:
cvs.texi(,4122) 
cvs.texi(,4123) @example
cvs.texi(,4124) $ cd tc
cvs.texi(,4125) $ cvs update -r rel-1-0-patches
cvs.texi(,4126) @end example
cvs.texi(,4127) 
cvs.texi(,4128) It does not matter if the working copy was originally
cvs.texi(,4129) on the main trunk or on some other branch -- the above
cvs.texi(,4130) command will switch it to the named branch.  And
cvs.texi(,4131) similarly to a regular @samp{update} command,
cvs.texi(,4132) @samp{update -r} merges any changes you have made,
cvs.texi(,4133) notifying you of conflicts where they occur.
cvs.texi(,4134) 
cvs.texi(,4135) Once you have a working copy tied to a particular
cvs.texi(,4136) branch, it remains there until you tell it otherwise.
cvs.texi(,4137) This means that changes checked in from the working
cvs.texi(,4138) copy will add new revisions on that branch, while
cvs.texi(,4139) leaving the main trunk and other branches unaffected.
cvs.texi(,4140) 
cvs.texi(,4141) @cindex Branches, sticky
cvs.texi(,4142) To find out what branch a working copy is on, you can
cvs.texi(,4143) use the @samp{status} command.  In its output, look for
cvs.texi(,4144) the field named @samp{Sticky tag} (@pxref{Sticky tags})
cvs.texi(,4145) -- that's @sc{cvs}'s way of telling you the branch, if
cvs.texi(,4146) any, of the current working files:
cvs.texi(,4147) 
cvs.texi(,4148) @example
cvs.texi(,4149) $ cvs status -v driver.c backend.c
cvs.texi(,4150) ===================================================================
cvs.texi(,4151) File: driver.c          Status: Up-to-date
cvs.texi(,4152) 
cvs.texi(,4153)     Version:            1.7     Sat Dec  5 18:25:54 1992
cvs.texi(,4154)     RCS Version:        1.7     /u/cvsroot/yoyodyne/tc/driver.c,v
cvs.texi(,4155)     Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
cvs.texi(,4156)     Sticky Date:        (none)
cvs.texi(,4157)     Sticky Options:     (none)
cvs.texi(,4158) 
cvs.texi(,4159)     Existing Tags:
cvs.texi(,4160)         rel-1-0-patches             (branch: 1.7.2)
cvs.texi(,4161)         rel-1-0                     (revision: 1.7)
cvs.texi(,4162) 
cvs.texi(,4163) ===================================================================
cvs.texi(,4164) File: backend.c         Status: Up-to-date
cvs.texi(,4165) 
cvs.texi(,4166)     Version:            1.4     Tue Dec  1 14:39:01 1992
cvs.texi(,4167)     RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
cvs.texi(,4168)     Sticky Tag:         rel-1-0-patches (branch: 1.4.2)
cvs.texi(,4169)     Sticky Date:        (none)
cvs.texi(,4170)     Sticky Options:     (none)
cvs.texi(,4171) 
cvs.texi(,4172)     Existing Tags:
cvs.texi(,4173)         rel-1-0-patches             (branch: 1.4.2)
cvs.texi(,4174)         rel-1-0                     (revision: 1.4)
cvs.texi(,4175)         rel-0-4                     (revision: 1.4)
cvs.texi(,4176) 
cvs.texi(,4177) @end example
cvs.texi(,4178) 
cvs.texi(,4179) Don't be confused by the fact that the branch numbers
cvs.texi(,4180) for each file are different (@samp{1.7.2} and
cvs.texi(,4181) @samp{1.4.2} respectively).  The branch tag is the
cvs.texi(,4182) same, @samp{rel-1-0-patches}, and the files are
cvs.texi(,4183) indeed on the same branch.  The numbers simply reflect
cvs.texi(,4184) the point in each file's revision history at which the
cvs.texi(,4185) branch was made.  In the above example, one can deduce
cvs.texi(,4186) that @samp{driver.c} had been through more changes than
cvs.texi(,4187) @samp{backend.c} before this branch was created.
cvs.texi(,4188) 
cvs.texi(,4189) See @ref{Branches and revisions} for details about how
cvs.texi(,4190) branch numbers are constructed.
cvs.texi(,4191) 
cvs.texi(,4192) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4193) @node Branches and revisions
cvs.texi(,4194) @section Branches and revisions
cvs.texi(,4195) @cindex Branch number
cvs.texi(,4196) @cindex Number, branch
cvs.texi(,4197) @cindex Revision numbers (branches)
cvs.texi(,4198) 
cvs.texi(,4199) Ordinarily, a file's revision history is a linear
cvs.texi(,4200) series of increments (@pxref{Revision numbers}):
cvs.texi(,4201) 
cvs.texi(,4202) @example
cvs.texi(,4203)        +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4204)        ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
cvs.texi(,4205)        +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4206) @end example
cvs.texi(,4207) 
cvs.texi(,4208) However, @sc{cvs} is not limited to linear development.  The
cvs.texi(,4209) @dfn{revision tree} can be split into @dfn{branches},
cvs.texi(,4210) where each branch is a self-maintained line of
cvs.texi(,4211) development.  Changes made on one branch can easily be
cvs.texi(,4212) moved back to the main trunk.
cvs.texi(,4213) 
cvs.texi(,4214) Each branch has a @dfn{branch number}, consisting of an
cvs.texi(,4215) odd number of period-separated decimal integers.  The
cvs.texi(,4216) branch number is created by appending an integer to the
cvs.texi(,4217) revision number where the corresponding branch forked
cvs.texi(,4218) off.  Having branch numbers allows more than one branch
cvs.texi(,4219) to be forked off from a certain revision.
cvs.texi(,4220) 
cvs.texi(,4221) @need 3500
cvs.texi(,4222) All revisions on a branch have revision numbers formed
cvs.texi(,4223) by appending an ordinal number to the branch number.
cvs.texi(,4224) The following figure illustrates branching with an
cvs.texi(,4225) example.
cvs.texi(,4226) 
cvs.texi(,4227) @example
cvs.texi(,4228) @c This example used to have a 1.2.2.4 revision, which
cvs.texi(,4229) @c might help clarify that development can continue on
cvs.texi(,4230) @c 1.2.2.  Might be worth reinstating if it can be done
cvs.texi(,4231) @c without overfull hboxes.
cvs.texi(,4232) @group
cvs.texi(,4233)                                                       +-------------+
cvs.texi(,4234)                            Branch 1.2.2.3.2 ->        ! 1.2.2.3.2.1 !
cvs.texi(,4235)                                                     / +-------------+
cvs.texi(,4236)                                                    /
cvs.texi(,4237)                                                   /
cvs.texi(,4238)                  +---------+    +---------+    +---------+
cvs.texi(,4239) Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
cvs.texi(,4240)                / +---------+    +---------+    +---------+
cvs.texi(,4241)               /
cvs.texi(,4242)              /
cvs.texi(,4243) +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4244) ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !  <- The main trunk
cvs.texi(,4245) +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4246)                 !
cvs.texi(,4247)                 !
cvs.texi(,4248)                 !   +---------+    +---------+    +---------+
cvs.texi(,4249) Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
cvs.texi(,4250)                     +---------+    +---------+    +---------+
cvs.texi(,4251) 
cvs.texi(,4252) @end group
cvs.texi(,4253) @end example
cvs.texi(,4254) 
cvs.texi(,4255) @c --   However, at least for me the figure is not enough.  I suggest more
cvs.texi(,4256) @c --   text to accompany it.  "A picture is worth a thousand words", so you
cvs.texi(,4257) @c --   have to make sure the reader notices the couple of hundred words
cvs.texi(,4258) @c --   *you* had in mind more than the others!
cvs.texi(,4259) 
cvs.texi(,4260) @c --   Why an even number of segments?  This section implies that this is
cvs.texi(,4261) @c --   how the main trunk is distinguished from branch roots, but you never
cvs.texi(,4262) @c --   explicitly say that this is the purpose of the [by itself rather
cvs.texi(,4263) @c --   surprising] restriction to an even number of segments.
cvs.texi(,4264) 
cvs.texi(,4265) The exact details of how the branch number is
cvs.texi(,4266) constructed is not something you normally need to be
cvs.texi(,4267) concerned about, but here is how it works: When
cvs.texi(,4268) @sc{cvs} creates a branch number it picks the first
cvs.texi(,4269) unused even integer, starting with 2.  So when you want
cvs.texi(,4270) to create a branch from revision 6.4 it will be
cvs.texi(,4271) numbered 6.4.2.  All branch numbers ending in a zero
cvs.texi(,4272) (such as 6.4.0) are used internally by @sc{cvs}
cvs.texi(,4273) (@pxref{Magic branch numbers}).  The branch 1.1.1 has a
cvs.texi(,4274) special meaning.  @xref{Tracking sources}.
cvs.texi(,4275) 
cvs.texi(,4276) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4277) @node Magic branch numbers
cvs.texi(,4278) @section Magic branch numbers
cvs.texi(,4279) 
cvs.texi(,4280) @c Want xref to here from "log"?
cvs.texi(,4281) 
cvs.texi(,4282) This section describes a @sc{cvs} feature called
cvs.texi(,4283) @dfn{magic branches}.  For most purposes, you need not
cvs.texi(,4284) worry about magic branches; @sc{cvs} handles them for
cvs.texi(,4285) you.  However, they are visible to you in certain
cvs.texi(,4286) circumstances, so it may be useful to have some idea of
cvs.texi(,4287) how it works.
cvs.texi(,4288) 
cvs.texi(,4289) Externally, branch numbers consist of an odd number of
cvs.texi(,4290) dot-separated decimal integers.  @xref{Revision
cvs.texi(,4291) numbers}.  That is not the whole truth, however.  For
cvs.texi(,4292) efficiency reasons @sc{cvs} sometimes inserts an extra 0
cvs.texi(,4293) in the second rightmost position (1.2.4 becomes
cvs.texi(,4294) 1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
cvs.texi(,4295) on).
cvs.texi(,4296) 
cvs.texi(,4297) @sc{cvs} does a pretty good job at hiding these so
cvs.texi(,4298) called magic branches, but in a few places the hiding
cvs.texi(,4299) is incomplete:
cvs.texi(,4300) 
cvs.texi(,4301) @itemize @bullet
cvs.texi(,4314) @item
cvs.texi(,4315) The magic branch number appears in the output from
cvs.texi(,4316) @code{cvs log}.
cvs.texi(,4317) @c What output should appear instead?
cvs.texi(,4318) 
cvs.texi(,4319) @item
cvs.texi(,4320) You cannot specify a symbolic branch name to @code{cvs
cvs.texi(,4321) admin}.
cvs.texi(,4322) 
cvs.texi(,4323) @end itemize
cvs.texi(,4324) 
cvs.texi(,4325) @c Can CVS do this automatically the first time
cvs.texi(,4326) @c you check something in to that branch?  Should
cvs.texi(,4327) @c it?
cvs.texi(,4328) You can use the @code{admin} command to reassign a
cvs.texi(,4329) symbolic name to a branch the way @sc{rcs} expects it
cvs.texi(,4330) to be.  If @code{R4patches} is assigned to the branch
cvs.texi(,4331) 1.4.2 (magic branch number 1.4.0.2) in file
cvs.texi(,4332) @file{numbers.c} you can do this:
cvs.texi(,4333) 
cvs.texi(,4334) @example
cvs.texi(,4335) $ cvs admin -NR4patches:1.4.2 numbers.c
cvs.texi(,4336) @end example
cvs.texi(,4337) 
cvs.texi(,4338) It only works if at least one revision is already
cvs.texi(,4339) committed on the branch.  Be very careful so that you
cvs.texi(,4340) do not assign the tag to the wrong number.  (There is
cvs.texi(,4341) no way to see how the tag was assigned yesterday).
cvs.texi(,4342) 
cvs.texi(,4343) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4344) @node Merging a branch
cvs.texi(,4345) @section Merging an entire branch
cvs.texi(,4346) @cindex Merging a branch
cvs.texi(,4347) @cindex -j (merging branches)
cvs.texi(,4348) 
cvs.texi(,4349) You can merge changes made on a branch into your working copy by giving
cvs.texi(,4350) the @samp{-j @var{branchname}} flag to the @code{update} subcommand.  With one
cvs.texi(,4351) @samp{-j @var{branchname}} option it merges the changes made between the
cvs.texi(,4352) greatest common ancestor (GCA) of the branch and the destination revision (in
cvs.texi(,4353) the simple case below the GCA is the point where the branch forked) and the
cvs.texi(,4354) newest revision on that branch into your working copy.
cvs.texi(,4355) 
cvs.texi(,4356) @cindex Join
cvs.texi(,4357) The @samp{-j} stands for ``join''.
cvs.texi(,4358) 
cvs.texi(,4359) @cindex Branch merge example
cvs.texi(,4360) @cindex Example, branch merge
cvs.texi(,4361) @cindex Merge, branch example
cvs.texi(,4362) Consider this revision tree:
cvs.texi(,4363) 
cvs.texi(,4364) @example
cvs.texi(,4365) +-----+    +-----+    +-----+    +-----+
cvs.texi(,4366) ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !      <- The main trunk
cvs.texi(,4367) +-----+    +-----+    +-----+    +-----+
cvs.texi(,4368)                 !
cvs.texi(,4369)                 !
cvs.texi(,4370)                 !   +---------+    +---------+
cvs.texi(,4371) Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
cvs.texi(,4372)                     +---------+    +---------+
cvs.texi(,4373) @end example
cvs.texi(,4374) 
cvs.texi(,4375) @noindent
cvs.texi(,4376) The branch 1.2.2 has been given the tag (symbolic name) @samp{R1fix}.  The
cvs.texi(,4377) following example assumes that the module @samp{mod} contains only one
cvs.texi(,4378) file, @file{m.c}.
cvs.texi(,4379) 
cvs.texi(,4380) @example
cvs.texi(,4381) $ cvs checkout mod               # @r{Retrieve the latest revision, 1.4}
cvs.texi(,4382) 
cvs.texi(,4383) $ cvs update -j R1fix m.c        # @r{Merge all changes made on the branch,}
cvs.texi(,4384)                                  # @r{i.e. the changes between revision 1.2}
cvs.texi(,4385)                                  # @r{and 1.2.2.2, into your working copy}
cvs.texi(,4386)                                  # @r{of the file.}
cvs.texi(,4387) 
cvs.texi(,4388) $ cvs commit -m "Included R1fix" # @r{Create revision 1.5.}
cvs.texi(,4389) @end example
cvs.texi(,4390) 
cvs.texi(,4391) A conflict can result from a merge operation.  If that
cvs.texi(,4392) happens, you should resolve it before committing the
cvs.texi(,4393) new revision.  @xref{Conflicts example}.
cvs.texi(,4394) 
cvs.texi(,4395) If your source files contain keywords (@pxref{Keyword substitution}),
cvs.texi(,4396) you might be getting more conflicts than strictly necessary.  See
cvs.texi(,4397) @ref{Merging and keywords}, for information on how to avoid this.
cvs.texi(,4398) 
cvs.texi(,4399) The @code{checkout} command also supports the @samp{-j @var{branchname}} flag.  The
cvs.texi(,4400) same effect as above could be achieved with this:
cvs.texi(,4401) 
cvs.texi(,4402) @example
cvs.texi(,4403) $ cvs checkout -j R1fix mod
cvs.texi(,4404) $ cvs commit -m "Included R1fix"
cvs.texi(,4405) @end example
cvs.texi(,4406) 
cvs.texi(,4407) It should be noted that @code{update -j @var{tagname}} will also work but may
cvs.texi(,4408) not produce the desired result.  @xref{Merging adds and removals}, for more.
cvs.texi(,4409) 
cvs.texi(,4410) @node Merging more than once
cvs.texi(,4411) @section Merging from a branch several times
cvs.texi(,4412) 
cvs.texi(,4413) Continuing our example, the revision tree now looks
cvs.texi(,4414) like this:
cvs.texi(,4415) 
cvs.texi(,4416) @example
cvs.texi(,4417) +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4418) ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   <- The main trunk
cvs.texi(,4419) +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4420)                 !                           *
cvs.texi(,4421)                 !                          *
cvs.texi(,4422)                 !   +---------+    +---------+
cvs.texi(,4423) Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
cvs.texi(,4424)                     +---------+    +---------+
cvs.texi(,4425) @end example
cvs.texi(,4426) 
cvs.texi(,4427) @noindent
cvs.texi(,4428) where the starred line represents the merge from the
cvs.texi(,4429) @samp{R1fix} branch to the main trunk, as just
cvs.texi(,4430) discussed.
cvs.texi(,4431) 
cvs.texi(,4432) Now suppose that development continues on the
cvs.texi(,4433) @samp{R1fix} branch:
cvs.texi(,4434) 
cvs.texi(,4435) @example
cvs.texi(,4436) +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4437) ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   <- The main trunk
cvs.texi(,4438) +-----+    +-----+    +-----+    +-----+    +-----+
cvs.texi(,4439)                 !                           *
cvs.texi(,4440)                 !                          *
cvs.texi(,4441)                 !   +---------+    +---------+    +---------+
cvs.texi(,4442) Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
cvs.texi(,4443)                     +---------+    +---------+    +---------+
cvs.texi(,4444) @end example
cvs.texi(,4445) 
cvs.texi(,4446) @noindent
cvs.texi(,4447) and then you want to merge those new changes onto the
cvs.texi(,4448) main trunk.  If you just use the @code{cvs update -j
cvs.texi(,4449) R1fix m.c} command again, @sc{cvs} will attempt to
cvs.texi(,4450) merge again the changes which you have already merged,
cvs.texi(,4451) which can have undesirable side effects.
cvs.texi(,4452) 
cvs.texi(,4453) So instead you need to specify that you only want to
cvs.texi(,4454) merge the changes on the branch which have not yet been
cvs.texi(,4455) merged into the trunk.  To do that you specify two
cvs.texi(,4456) @samp{-j} options, and @sc{cvs} merges the changes from
cvs.texi(,4457) the first revision to the second revision.  For
cvs.texi(,4458) example, in this case the simplest way would be
cvs.texi(,4459) 
cvs.texi(,4460) @example
cvs.texi(,4461) cvs update -j 1.2.2.2 -j R1fix m.c    # @r{Merge changes from 1.2.2.2 to the}
cvs.texi(,4462)                                       # @r{head of the R1fix branch}
cvs.texi(,4463) @end example
cvs.texi(,4464) 
cvs.texi(,4465) The problem with this is that you need to specify the
cvs.texi(,4466) 1.2.2.2 revision manually.  A slightly better approach
cvs.texi(,4467) might be to use the date the last merge was done:
cvs.texi(,4468) 
cvs.texi(,4469) @example
cvs.texi(,4470) cvs update -j R1fix:yesterday -j R1fix m.c
cvs.texi(,4471) @end example
cvs.texi(,4472) 
cvs.texi(,4473) Better yet, tag the R1fix branch after every merge into
cvs.texi(,4474) the trunk, and then use that tag for subsequent merges:
cvs.texi(,4475) 
cvs.texi(,4476) @example
cvs.texi(,4477) cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c
cvs.texi(,4478) @end example
cvs.texi(,4479) 
cvs.texi(,4480) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4481) @node Merging two revisions
cvs.texi(,4482) @section Merging differences between any two revisions
cvs.texi(,4483) @cindex Merging two revisions
cvs.texi(,4484) @cindex Revisions, merging differences between
cvs.texi(,4485) @cindex Differences, merging
cvs.texi(,4486) 
cvs.texi(,4487) With two @samp{-j @var{revision}} flags, the @code{update}
cvs.texi(,4488) (and @code{checkout}) command can merge the differences
cvs.texi(,4489) between any two revisions into your working file.
cvs.texi(,4490) 
cvs.texi(,4491) @cindex Undoing a change
cvs.texi(,4492) @cindex Removing a change
cvs.texi(,4493) @example
cvs.texi(,4494) $ cvs update -j 1.5 -j 1.3 backend.c
cvs.texi(,4495) @end example
cvs.texi(,4496) 
cvs.texi(,4497) @noindent
cvs.texi(,4498) will undo all changes made between revision
cvs.texi(,4499) 1.3 and 1.5.  Note the order of the revisions!
cvs.texi(,4500) 
cvs.texi(,4501) If you try to use this option when operating on
cvs.texi(,4502) multiple files, remember that the numeric revisions will
cvs.texi(,4503) probably be very different between the various files.
cvs.texi(,4504) You almost always use symbolic
cvs.texi(,4505) tags rather than revision numbers when operating on
cvs.texi(,4506) multiple files.
cvs.texi(,4507) 
cvs.texi(,4508) @cindex Restoring old version of removed file
cvs.texi(,4509) @cindex Resurrecting old version of dead file
cvs.texi(,4510) Specifying two @samp{-j} options can also undo file
cvs.texi(,4511) removals or additions.  For example, suppose you have
cvs.texi(,4512) a file
cvs.texi(,4513) named @file{file1} which existed as revision 1.1, and
cvs.texi(,4514) you then removed it (thus adding a dead revision 1.2).
cvs.texi(,4515) Now suppose you want to add it again, with the same
cvs.texi(,4516) contents it had previously.  Here is how to do it:
cvs.texi(,4517) 
cvs.texi(,4518) @example
cvs.texi(,4519) $ cvs update -j 1.2 -j 1.1 file1
cvs.texi(,4520) U file1
cvs.texi(,4521) $ cvs commit -m test
cvs.texi(,4522) Checking in file1;
cvs.texi(,4523) /tmp/cvs-sanity/cvsroot/first-dir/file1,v  <--  file1
cvs.texi(,4524) new revision: 1.3; previous revision: 1.2
cvs.texi(,4525) done
cvs.texi(,4526) $
cvs.texi(,4527) @end example
cvs.texi(,4528) 
cvs.texi(,4529) @node Merging adds and removals
cvs.texi(,4530) @section Merging can add or remove files
cvs.texi(,4531) 
cvs.texi(,4532) If the changes which you are merging involve removing
cvs.texi(,4533) or adding some files, @code{update -j} will reflect
cvs.texi(,4534) such additions or removals.
cvs.texi(,4535) 
cvs.texi(,4536) @c FIXME: This example needs a lot more explanation.
cvs.texi(,4537) @c We also need other examples for some of the other
cvs.texi(,4538) @c cases (not all--there are too many--as long as we present a
cvs.texi(,4539) @c coherent general principle).
cvs.texi(,4540) For example:
cvs.texi(,4541) @example
cvs.texi(,4542) cvs update -A
cvs.texi(,4543) touch a b c
cvs.texi(,4544) cvs add a b c ; cvs ci -m "added" a b c
cvs.texi(,4545) cvs tag -b branchtag
cvs.texi(,4546) cvs update -r branchtag
cvs.texi(,4547) touch d ; cvs add d
cvs.texi(,4548) rm a ; cvs rm a
cvs.texi(,4549) cvs ci -m "added d, removed a"
cvs.texi(,4550) cvs update -A
cvs.texi(,4551) cvs update -jbranchtag
cvs.texi(,4552) @end example
cvs.texi(,4553) 
cvs.texi(,4554) After these commands are executed and a @samp{cvs commit} is done,
cvs.texi(,4555) file @file{a} will be removed and file @file{d} added in the main branch.
cvs.texi(,4556) @c (which was determined by trying it)
cvs.texi(,4557) 
cvs.texi(,4558) Note that using a single static tag (@samp{-j @var{tagname}})
cvs.texi(,4559) rather than a dynamic tag (@samp{-j @var{branchname}}) to merge
cvs.texi(,4560) changes from a branch will usually not remove files which were removed on the
cvs.texi(,4561) branch since @sc{cvs} does not automatically add static tags to dead revisions.
cvs.texi(,4562) The exception to this rule occurs when
cvs.texi(,4563) a static tag has been attached to a dead revision manually.  Use the branch tag
cvs.texi(,4564) to merge all changes from the branch or use two static tags as merge endpoints
cvs.texi(,4565) to be sure that all intended changes are propagated in the merge.
cvs.texi(,4566) 
cvs.texi(,4567) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,4568) @node Merging and keywords
cvs.texi(,4569) @section Merging and keywords
cvs.texi(,4570) @cindex Merging, and keyword substitution
cvs.texi(,4571) @cindex Keyword substitution, and merging
cvs.texi(,4572) @cindex -j (merging branches), and keyword substitution
cvs.texi(,4573) @cindex -kk, to avoid conflicts during a merge
cvs.texi(,4574) 
cvs.texi(,4575) If you merge files containing keywords (@pxref{Keyword
cvs.texi(,4576) substitution}), you will normally get numerous
cvs.texi(,4577) conflicts during the merge, because the keywords are
cvs.texi(,4578) expanded differently in the revisions which you are
cvs.texi(,4579) merging.
cvs.texi(,4580) 
cvs.texi(,4581) Therefore, you will often want to specify the
cvs.texi(,4582) @samp{-kk} (@pxref{Substitution modes}) switch to the
cvs.texi(,4583) merge command line.  By substituting just the name of
cvs.texi(,4584) the keyword, not the expanded value of that keyword,
cvs.texi(,4585) this option ensures that the revisions which you are
cvs.texi(,4586) merging will be the same as each other, and avoid
cvs.texi(,4587) spurious conflicts.
cvs.texi(,4588) 
cvs.texi(,4589) For example, suppose you have a file like this:
cvs.texi(,4590) 
cvs.texi(,4591) @example
cvs.texi(,4592)        +---------+
cvs.texi(,4593)       _! 1.1.2.1 !   <-  br1
cvs.texi(,4594)      / +---------+
cvs.texi(,4595)     /
cvs.texi(,4596)    /
cvs.texi(,4597) +-----+    +-----+
cvs.texi(,4598) ! 1.1 !----! 1.2 !
cvs.texi(,4599) +-----+    +-----+
cvs.texi(,4600) @end example
cvs.texi(,4601) 
cvs.texi(,4602) @noindent
cvs.texi(,4603) and your working directory is currently on the trunk
cvs.texi(,4604) (revision 1.2).  Then you might get the following
cvs.texi(,4605) results from a merge:
cvs.texi(,4606) 
cvs.texi(,4607) @example
cvs.texi(,4608) $ cat file1
cvs.texi(splitrcskeyword,4609) key $ Revision: 1.2 $
cvs.texi(,4610) . . .
cvs.texi(,4611) $ cvs update -j br1
cvs.texi(,4612) U file1
cvs.texi(,4613) RCS file: /cvsroot/first-dir/file1,v
cvs.texi(,4614) retrieving revision 1.1
cvs.texi(,4615) retrieving revision 1.1.2.1
cvs.texi(,4616) Merging differences between 1.1 and 1.1.2.1 into file1
cvs.texi(,4617) rcsmerge: warning: conflicts during merge
cvs.texi(,4618) $ cat file1
cvs.texi(,4619) @asis{}<<<<<<< file1
cvs.texi(splitrcskeyword,4620) key $ Revision: 1.2 $
cvs.texi(,4621) @asis{}=======
cvs.texi(splitrcskeyword,4622) key $ Revision: 1.1.2.1 $
cvs.texi(,4623) @asis{}>>>>>>> 1.1.2.1
cvs.texi(,4624) . . .
cvs.texi(,4625) @end example
cvs.texi(,4626) 
cvs.texi(,4627) What happened was that the merge tried to merge the
cvs.texi(,4628) differences between 1.1 and 1.1.2.1 into your working
cvs.texi(,4629) directory.  So, since the keyword changed from
cvs.texi(,4630) @code{Revision: 1.1} to @code{Revision: 1.1.2.1},
cvs.texi(,4631) @sc{cvs} tried to merge that change into your working
cvs.texi(,4632) directory, which conflicted with the fact that your
cvs.texi(,4633) working directory had contained @code{Revision: 1.2}.
cvs.texi(,4634) 
cvs.texi(,4635) Here is what happens if you had used @samp{-kk}:
cvs.texi(,4636) 
cvs.texi(,4637) @example
cvs.texi(,4638) $ cat file1
cvs.texi(splitrcskeyword,4639) key $ Revision: 1.2 $
cvs.texi(,4640) . . .
cvs.texi(,4641) $ cvs update -kk -j br1
cvs.texi(,4642) U file1
cvs.texi(,4643) RCS file: /cvsroot/first-dir/file1,v
cvs.texi(,4644) retrieving revision 1.1
cvs.texi(,4645) retrieving revision 1.1.2.1
cvs.texi(,4646) Merging differences between 1.1 and 1.1.2.1 into file1
cvs.texi(,4647) $ cat file1
cvs.texi(splitrcskeyword,4648) key $ Revision$
cvs.texi(,4649) . . .
cvs.texi(,4650) @end example
cvs.texi(,4651) 
cvs.texi(,4652) What is going on here is that revision 1.1 and 1.1.2.1
cvs.texi(,4653) both expand as plain @code{Revision}, and therefore
cvs.texi(,4654) merging the changes between them into the working
cvs.texi(,4655) directory need not change anything.  Therefore, there
cvs.texi(,4656) is no conflict.
cvs.texi(,4657) 
cvs.texi(,4658) @strong{WARNING: In versions of @sc{cvs} prior to 1.12.2, there was a
cvs.texi(,4659) major problem with using @samp{-kk} on merges.  Namely, @samp{-kk}
cvs.texi(,4660) overrode any default keyword expansion mode set in the archive file in
cvs.texi(,4661) the repository.  This could, unfortunately for some users, cause data
cvs.texi(,4662) corruption in binary files (with a default keyword expansion mode set
cvs.texi(,4663) to @samp{-kb}).  Therefore, when a repository contained binary files,
cvs.texi(,4664) conflicts had to be dealt with manually rather than using @samp{-kk} in
cvs.texi(,4665) a merge command.}
cvs.texi(,4666) 
cvs.texi(,4667) In @sc{cvs} version 1.12.2 and later, the keyword expansion mode
cvs.texi(,4668) provided on the command line to any @sc{cvs} command no longer
cvs.texi(,4669) overrides the @samp{-kb} keyword expansion mode setting for binary
cvs.texi(,4670) files, though it will still override other default keyword expansion
cvs.texi(,4671) modes.  You can now safely merge using @samp{-kk} to avoid spurious conflicts
cvs.texi(,4672) on lines containing RCS keywords, even when your repository contains
cvs.texi(,4673) binary files.
cvs.texi(,4674) 
cvs.texi(,4675) @c ---------------------------------------------------------------------
cvs.texi(,4676) @node Recursive behavior
cvs.texi(,4677) @chapter Recursive behavior
cvs.texi(,4678) @cindex Recursive (directory descending)
cvs.texi(,4679) @cindex Directory, descending
cvs.texi(,4680) @cindex Descending directories
cvs.texi(,4681) @cindex Subdirectories
cvs.texi(,4682) 
cvs.texi(,4683) Almost all of the subcommands of @sc{cvs} work
cvs.texi(,4684) recursively when you specify a directory as an
cvs.texi(,4685) argument.  For instance, consider this directory
cvs.texi(,4686) structure:
cvs.texi(,4687) 
cvs.texi(,4688) @example
cvs.texi(,4689)       @code{$HOME}
cvs.texi(,4690)         |
cvs.texi(,4691)         +--@t{tc}
cvs.texi(,4692)         |   |
cvs.texi(,4693)             +--@t{CVS}
cvs.texi(,4694)             |      (internal @sc{cvs} files)
cvs.texi(,4695)             +--@t{Makefile}
cvs.texi(,4696)             +--@t{backend.c}
cvs.texi(,4697)             +--@t{driver.c}
cvs.texi(,4698)             +--@t{frontend.c}
cvs.texi(,4699)             +--@t{parser.c}
cvs.texi(,4700)             +--@t{man}
cvs.texi(,4701)             |    |
cvs.texi(,4702)             |    +--@t{CVS}
cvs.texi(,4703)             |    |  (internal @sc{cvs} files)
cvs.texi(,4704)             |    +--@t{tc.1}
cvs.texi(,4705)             |
cvs.texi(,4706)             +--@t{testing}
cvs.texi(,4707)                  |
cvs.texi(,4708)                  +--@t{CVS}
cvs.texi(,4709)                  |  (internal @sc{cvs} files)
cvs.texi(,4710)                  +--@t{testpgm.t}
cvs.texi(,4711)                  +--@t{test2.t}
cvs.texi(,4712) @end example
cvs.texi(,4713) 
cvs.texi(,4714) @noindent
cvs.texi(,4715) If @file{tc} is the current working directory, the
cvs.texi(,4716) following is true:
cvs.texi(,4717) 
cvs.texi(,4718) @itemize @bullet
cvs.texi(,4719) @item
cvs.texi(,4720) @samp{cvs update testing} is equivalent to
cvs.texi(,4721) 
cvs.texi(,4722) @example
cvs.texi(,4723) cvs update testing/testpgm.t testing/test2.t
cvs.texi(,4724) @end example
cvs.texi(,4725) 
cvs.texi(,4726) @item
cvs.texi(,4727) @samp{cvs update testing man} updates all files in the
cvs.texi(,4728) subdirectories
cvs.texi(,4729) 
cvs.texi(,4730) @item
cvs.texi(,4731) @samp{cvs update .} or just @samp{cvs update} updates
cvs.texi(,4732) all files in the @code{tc} directory
cvs.texi(,4733) @end itemize
cvs.texi(,4734) 
cvs.texi(,4735) If no arguments are given to @code{update} it will
cvs.texi(,4736) update all files in the current working directory and
cvs.texi(,4737) all its subdirectories.  In other words, @file{.} is a
cvs.texi(,4738) default argument to @code{update}.  This is also true
cvs.texi(,4739) for most of the @sc{cvs} subcommands, not only the
cvs.texi(,4740) @code{update} command.
cvs.texi(,4741) 
cvs.texi(,4742) The recursive behavior of the @sc{cvs} subcommands can be
cvs.texi(,4743) turned off with the @samp{-l} option.
cvs.texi(,4744) Conversely, the @samp{-R} option can be used to force recursion if
cvs.texi(,4745) @samp{-l} is specified in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
cvs.texi(,4746) 
cvs.texi(,4747) @example
cvs.texi(,4748) $ cvs update -l         # @r{Don't update files in subdirectories}
cvs.texi(,4749) @end example
cvs.texi(,4750) 
cvs.texi(,4751) @c ---------------------------------------------------------------------
cvs.texi(,4752) @node Adding and removing
cvs.texi(,4753) @chapter Adding, removing, and renaming files and directories
cvs.texi(,4754) 
cvs.texi(,4755) In the course of a project, one will often add new
cvs.texi(,4756) files.  Likewise with removing or renaming, or with
cvs.texi(,4757) directories.  The general concept to keep in mind in
cvs.texi(,4758) all these cases is that instead of making an
cvs.texi(,4759) irreversible change you want @sc{cvs} to record the
cvs.texi(,4760) fact that a change has taken place, just as with
cvs.texi(,4761) modifying an existing file.  The exact mechanisms to do
cvs.texi(,4762) this in @sc{cvs} vary depending on the situation.
cvs.texi(,4763) 
cvs.texi(,4764) @menu
cvs.texi(,4765) * Adding files::                Adding files
cvs.texi(,4766) * Removing files::              Removing files
cvs.texi(,4767) * Removing directories::        Removing directories
cvs.texi(,4768) * Moving files::                Moving and renaming files
cvs.texi(,4769) * Moving directories::          Moving and renaming directories
cvs.texi(,4770) @end menu
cvs.texi(,4771) 
cvs.texi(,4772) @node Adding files
cvs.texi(,4773) @section Adding files to a directory
cvs.texi(,4774) @cindex Adding files
cvs.texi(,4775) 
cvs.texi(,4776) To add a new file to a directory, follow these steps.
cvs.texi(,4777) 
cvs.texi(,4778) @itemize @bullet
cvs.texi(,4779) @item
cvs.texi(,4780) You must have a working copy of the directory.
cvs.texi(,4781) @xref{Getting the source}.
cvs.texi(,4782) 
cvs.texi(,4783) @item
cvs.texi(,4784) Create the new file inside your working copy of the directory.
cvs.texi(,4785) 
cvs.texi(,4786) @item
cvs.texi(,4787) Use @samp{cvs add @var{filename}} to tell @sc{cvs} that you
cvs.texi(,4788) want to version control the file.  If the file contains
cvs.texi(,4789) binary data, specify @samp{-kb} (@pxref{Binary files}).
cvs.texi(,4790) 
cvs.texi(,4791) @item
cvs.texi(,4792) Use @samp{cvs commit @var{filename}} to actually check
cvs.texi(,4793) in the file into the repository.  Other developers
cvs.texi(,4794) cannot see the file until you perform this step.
cvs.texi(,4795) @end itemize
cvs.texi(,4796) 
cvs.texi(,4797) You can also use the @code{add} command to add a new
cvs.texi(,4798) directory.
cvs.texi(,4799) @c FIXCVS and/or FIXME: Adding a directory doesn't
cvs.texi(,4800) @c require the commit step.  This probably can be
cvs.texi(,4801) @c considered a CVS bug, but it is possible we should
cvs.texi(,4802) @c warn people since this behavior probably won't be
cvs.texi(,4803) @c changing right away.
cvs.texi(,4804) 
cvs.texi(,4805) Unlike most other commands, the @code{add} command is
cvs.texi(,4806) not recursive.  You cannot even type @samp{cvs add
cvs.texi(,4807) foo/bar}!  Instead, you have to
cvs.texi(,4808) @c FIXCVS: This is, of course, not a feature.  It is
cvs.texi(,4809) @c just that no one has gotten around to fixing "cvs add
cvs.texi(,4810) @c foo/bar".
cvs.texi(,4811) 
cvs.texi(,4812) @example
cvs.texi(,4813) $ cd foo
cvs.texi(,4814) $ cvs add bar
cvs.texi(,4815) @end example
cvs.texi(,4816) 
cvs.texi(,4817) @cindex add (subcommand)
cvs.texi(,4818) @deffn Command {cvs add} [@code{-k} kflag] [@code{-m} message] files @dots{}
cvs.texi(,4819) 
cvs.texi(,4820) Schedule @var{files} to be added to the repository.
cvs.texi(,4821) The files or directories specified with @code{add} must
cvs.texi(,4822) already exist in the current directory.  To add a whole
cvs.texi(,4823) new directory hierarchy to the source repository (for
cvs.texi(,4824) example, files received from a third-party vendor), use
cvs.texi(,4825) the @code{import} command instead.  @xref{import}.
cvs.texi(,4826) 
cvs.texi(,4827) The added files are not placed in the source repository
cvs.texi(,4828) until you use @code{commit} to make the change
cvs.texi(,4829) permanent.  Doing an @code{add} on a file that was
cvs.texi(,4830) removed with the @code{remove} command will undo the
cvs.texi(,4831) effect of the @code{remove}, unless a @code{commit}
cvs.texi(,4832) command intervened.  @xref{Removing files}, for an
cvs.texi(,4833) example.
cvs.texi(,4834) 
cvs.texi(,4835) The @samp{-k} option specifies the default way that
cvs.texi(,4836) this file will be checked out; for more information see
cvs.texi(,4837) @ref{Substitution modes}.
cvs.texi(,4838) 
cvs.texi(,4839) @c As noted in BUGS, -m is broken client/server (Nov
cvs.texi(,4840) @c 96).  Also see testsuite log2-* tests.
cvs.texi(,4841) The @samp{-m} option specifies a description for the
cvs.texi(,4842) file.  This description appears in the history log (if
cvs.texi(,4843) it is enabled, @pxref{history file}).  It will also be
cvs.texi(,4844) saved in the version history inside the repository when
cvs.texi(,4845) the file is committed.  The @code{log} command displays
cvs.texi(,4846) this description.  The description can be changed using
cvs.texi(,4847) @samp{admin -t}.  @xref{admin}.  If you omit the
cvs.texi(,4848) @samp{-m @var{description}} flag, an empty string will
cvs.texi(,4849) be used.  You will not be prompted for a description.
cvs.texi(,4850) @end deffn
cvs.texi(,4851) 
cvs.texi(,4852) For example, the following commands add the file
cvs.texi(,4853) @file{backend.c} to the repository:
cvs.texi(,4854) 
cvs.texi(,4855) @c This example used to specify
cvs.texi(,4856) @c     -m "Optimizer and code generation passes."
cvs.texi(,4857) @c to the cvs add command, but that doesn't work
cvs.texi(,4858) @c client/server (see log2 in sanity.sh).  Should fix CVS,
cvs.texi(,4859) @c but also seems strange to document things which
cvs.texi(,4860) @c don't work...
cvs.texi(,4861) @example
cvs.texi(,4862) $ cvs add backend.c
cvs.texi(,4863) $ cvs commit -m "Early version. Not yet compilable." backend.c
cvs.texi(,4864) @end example
cvs.texi(,4865) 
cvs.texi(,4866) When you add a file it is added only on the branch
cvs.texi(,4867) which you are working on (@pxref{Branching and merging}).  You can
cvs.texi(,4868) later merge the additions to another branch if you want
cvs.texi(,4869) (@pxref{Merging adds and removals}).
cvs.texi(,4870) @c Should we mention that earlier versions of CVS
cvs.texi(,4871) @c lacked this feature (1.3) or implemented it in a buggy
cvs.texi(,4872) @c way (well, 1.8 had many bugs in cvs update -j)?
cvs.texi(,4873) @c Should we mention the bug/limitation regarding a
cvs.texi(,4874) @c file being a regular file on one branch and a directory
cvs.texi(,4875) @c on another?
cvs.texi(,4876) @c FIXME: This needs an example, or several, here or
cvs.texi(,4877) @c elsewhere, for it to make much sense.
cvs.texi(,4878) @c Somewhere we need to discuss the aspects of death
cvs.texi(,4879) @c support which don't involve branching, I guess.
cvs.texi(,4880) @c Like the ability to re-create a release from a tag.
cvs.texi(,4881) 
cvs.texi(,4882) @c ---------------------------------------------------------------------
cvs.texi(,4883) @node Removing files
cvs.texi(,4884) @section Removing files
cvs.texi(,4885) @cindex Removing files
cvs.texi(,4886) @cindex Deleting files
cvs.texi(,4887) 
cvs.texi(,4888) @c FIXME: this node wants to be split into several
cvs.texi(,4889) @c smaller nodes.  Could make these children of
cvs.texi(,4890) @c "Adding and removing", probably (death support could
cvs.texi(,4891) @c be its own section, for example, as could the
cvs.texi(,4892) @c various bits about undoing mistakes in adding and
cvs.texi(,4893) @c removing).
cvs.texi(,4894) Directories change.  New files are added, and old files
cvs.texi(,4895) disappear.  Still, you want to be able to retrieve an
cvs.texi(,4896) exact copy of old releases.
cvs.texi(,4897) 
cvs.texi(,4898) Here is what you can do to remove a file,
cvs.texi(,4899) but remain able to retrieve old revisions:
cvs.texi(,4900) 
cvs.texi(,4901) @itemize @bullet
cvs.texi(,4902) @c FIXME: should probably be saying something about
cvs.texi(,4903) @c having a working directory in the first place.
cvs.texi(,4904) @item
cvs.texi(,4905) Make sure that you have not made any uncommitted
cvs.texi(,4906) modifications to the file.  @xref{Viewing differences},
cvs.texi(,4907) for one way to do that.  You can also use the
cvs.texi(,4908) @code{status} or @code{update} command.  If you remove
cvs.texi(,4909) the file without committing your changes, you will of
cvs.texi(,4910) course not be able to retrieve the file as it was
cvs.texi(,4911) immediately before you deleted it.
cvs.texi(,4912) 
cvs.texi(,4913) @item
cvs.texi(,4914) Remove the file from your working copy of the directory.
cvs.texi(,4915) You can for instance use @code{rm}.
cvs.texi(,4916) 
cvs.texi(,4917) @item
cvs.texi(,4918) Use @samp{cvs remove @var{filename}} to tell @sc{cvs} that
cvs.texi(,4919) you really want to delete the file.
cvs.texi(,4920) 
cvs.texi(,4921) @item
cvs.texi(,4922) Use @samp{cvs commit @var{filename}} to actually
cvs.texi(,4923) perform the removal of the file from the repository.
cvs.texi(,4924) @end itemize
cvs.texi(,4925) 
cvs.texi(,4926) @c FIXME: Somehow this should be linked in with a more
cvs.texi(,4927) @c general discussion of death support.  I don't know
cvs.texi(,4928) @c whether we want to use the term "death support" or
cvs.texi(,4929) @c not (we can perhaps get by without it), but we do
cvs.texi(,4930) @c need to discuss the "dead" state in "cvs log" and
cvs.texi(,4931) @c related subjects.  The current discussion is
cvs.texi(,4932) @c scattered around, and not xref'd to each other.
cvs.texi(,4933) @c FIXME: I think this paragraph wants to be moved
cvs.texi(,4934) @c later down, at least after the first example.
cvs.texi(,4935) When you commit the removal of the file, @sc{cvs}
cvs.texi(,4936) records the fact that the file no longer exists.  It is
cvs.texi(,4937) possible for a file to exist on only some branches and
cvs.texi(,4938) not on others, or to re-add another file with the same
cvs.texi(,4939) name later.  @sc{cvs} will correctly create or not create
cvs.texi(,4940) the file, based on the @samp{-r} and @samp{-D} options
cvs.texi(,4941) specified to @code{checkout} or @code{update}.
cvs.texi(,4942) 
cvs.texi(,4943) @c FIXME: This style seems to clash with how we
cvs.texi(,4944) @c document things in general.
cvs.texi(,4945) @cindex Remove (subcommand)
cvs.texi(,4946) @deffn Command {cvs remove} [options] files @dots{}
cvs.texi(,4947) 
cvs.texi(,4948) Schedule file(s) to be removed from the repository
cvs.texi(,4949) (files which have not already been removed from the
cvs.texi(,4950) working directory are not processed).  This command
cvs.texi(,4951) does not actually remove the file from the repository
cvs.texi(,4952) until you commit the removal.  For a full list of
cvs.texi(,4953) options, see @ref{Invoking CVS}.
cvs.texi(,4954) @end deffn
cvs.texi(,4955) 
cvs.texi(,4956) Here is an example of removing several files:
cvs.texi(,4957) 
cvs.texi(,4958) @example
cvs.texi(,4959) $ cd test
cvs.texi(,4960) $ rm *.c
cvs.texi(,4961) $ cvs remove
cvs.texi(,4962) cvs remove: Removing .
cvs.texi(,4963) cvs remove: scheduling a.c for removal
cvs.texi(,4964) cvs remove: scheduling b.c for removal
cvs.texi(,4965) cvs remove: use 'cvs commit' to remove these files permanently
cvs.texi(,4966) $ cvs ci -m "Removed unneeded files"
cvs.texi(,4967) cvs commit: Examining .
cvs.texi(,4968) cvs commit: Committing .
cvs.texi(,4969) @end example
cvs.texi(,4970) 
cvs.texi(,4971) As a convenience you can remove the file and @code{cvs
cvs.texi(,4972) remove} it in one step, by specifying the @samp{-f}
cvs.texi(,4973) option.  For example, the above example could also be
cvs.texi(,4974) done like this:
cvs.texi(,4975) 
cvs.texi(,4976) @example
cvs.texi(,4977) $ cd test
cvs.texi(,4978) $ cvs remove -f *.c
cvs.texi(,4979) cvs remove: scheduling a.c for removal
cvs.texi(,4980) cvs remove: scheduling b.c for removal
cvs.texi(,4981) cvs remove: use 'cvs commit' to remove these files permanently
cvs.texi(,4982) $ cvs ci -m "Removed unneeded files"
cvs.texi(,4983) cvs commit: Examining .
cvs.texi(,4984) cvs commit: Committing .
cvs.texi(,4985) @end example
cvs.texi(,4986) 
cvs.texi(,4987) If you execute @code{remove} for a file, and then
cvs.texi(,4988) change your mind before you commit, you can undo the
cvs.texi(,4989) @code{remove} with an @code{add} command.
cvs.texi(,5000) 
cvs.texi(,5001) @c FIXME: what if you change your mind after you commit
cvs.texi(,5002) @c it?  (answer is also "cvs add" but we don't say that...).
cvs.texi(,5003) @c We need some index entries for thinks like "undoing
cvs.texi(,5004) @c removal" too.
cvs.texi(,5005) 
cvs.texi(,5006) @example
cvs.texi(,5007) $ ls
cvs.texi(,5008) CVS   ja.h  oj.c
cvs.texi(,5009) $ rm oj.c
cvs.texi(,5010) $ cvs remove oj.c
cvs.texi(,5011) cvs remove: scheduling oj.c for removal
cvs.texi(,5012) cvs remove: use 'cvs commit' to remove this file permanently
cvs.texi(,5013) $ cvs add oj.c
cvs.texi(,5014) U oj.c
cvs.texi(,5015) cvs add: oj.c, version 1.1.1.1, resurrected
cvs.texi(,5016) @end example
cvs.texi(,5017) 
cvs.texi(,5018) If you realize your mistake before you run the
cvs.texi(,5019) @code{remove} command you can use @code{update} to
cvs.texi(,5020) resurrect the file:
cvs.texi(,5021) 
cvs.texi(,5022) @example
cvs.texi(,5023) $ rm oj.c
cvs.texi(,5024) $ cvs update oj.c
cvs.texi(,5025) cvs update: warning: oj.c was lost
cvs.texi(,5026) U oj.c
cvs.texi(,5027) @end example
cvs.texi(,5028) 
cvs.texi(,5029) When you remove a file it is removed only on the branch
cvs.texi(,5030) which you are working on (@pxref{Branching and merging}).  You can
cvs.texi(,5031) later merge the removals to another branch if you want
cvs.texi(,5032) (@pxref{Merging adds and removals}).
cvs.texi(,5033) 
cvs.texi(,5034) @node Removing directories
cvs.texi(,5035) @section Removing directories
cvs.texi(,5036) @cindex Removing directories
cvs.texi(,5037) @cindex Directories, removing
cvs.texi(,5038) 
cvs.texi(,5039) In concept removing directories is somewhat similar to
cvs.texi(,5040) removing files---you want the directory to not exist in
cvs.texi(,5041) your current working directories, but you also want to
cvs.texi(,5042) be able to retrieve old releases in which the directory
cvs.texi(,5043) existed.
cvs.texi(,5044) 
cvs.texi(,5045) The way that you remove a directory is to remove all
cvs.texi(,5046) the files in it.  You don't remove the directory
cvs.texi(,5047) itself; there is no way to do that.
cvs.texi(,5048) Instead you specify the @samp{-P} option to
cvs.texi(,5049) @code{cvs update} or @code{cvs checkout},
cvs.texi(,5050) which will cause @sc{cvs} to remove empty
cvs.texi(,5051) directories from working directories.
cvs.texi(,5052) (Note that @code{cvs export} always removes empty directories.)
cvs.texi(,5053) Probably the
cvs.texi(,5054) best way to do this is to always specify @samp{-P}; if
cvs.texi(,5055) you want an empty directory then put a dummy file (for
cvs.texi(,5056) example @file{.keepme}) in it to prevent @samp{-P} from
cvs.texi(,5057) removing it.
cvs.texi(,5058) 
cvs.texi(,5059) @c I'd try to give a rationale for this, but I'm not
cvs.texi(,5060) @c sure there is a particularly convincing one.  What
cvs.texi(,5061) @c we would _like_ is for CVS to do a better job of version
cvs.texi(,5062) @c controlling whether directories exist, to eliminate the
cvs.texi(,5063) @c need for -P and so that a file can be a directory in
cvs.texi(,5064) @c one revision and a regular file in another.
cvs.texi(,5065) Note that @samp{-P} is implied by the @samp{-r} or @samp{-D}
cvs.texi(,5066) options of @code{checkout}.  This way
cvs.texi(,5067) @sc{cvs} will be able to correctly create the directory
cvs.texi(,5068) or not depending on whether the particular version you
cvs.texi(,5069) are checking out contains any files in that directory.
cvs.texi(,5070) 
cvs.texi(,5071) @c ---------------------------------------------------------------------
cvs.texi(,5072) @node Moving files
cvs.texi(,5073) @section Moving and renaming files
cvs.texi(,5074) @cindex Moving files
cvs.texi(,5075) @cindex Renaming files
cvs.texi(,5076) @cindex Files, moving
cvs.texi(,5077) 
cvs.texi(,5078) Moving files to a different directory or renaming them
cvs.texi(,5079) is not difficult, but some of the ways in which this
cvs.texi(,5080) works may be non-obvious.  (Moving or renaming a
cvs.texi(,5081) directory is even harder.  @xref{Moving directories}.).
cvs.texi(,5082) 
cvs.texi(,5083) The examples below assume that the file @var{old} is renamed to
cvs.texi(,5084) @var{new}.
cvs.texi(,5085) 
cvs.texi(,5086) @menu
cvs.texi(,5087) * Outside::                     The normal way to Rename
cvs.texi(,5088) * Inside::                      A tricky, alternative way
cvs.texi(,5089) * Rename by copying::           Another tricky, alternative way
cvs.texi(,5090) @end menu
cvs.texi(,5091) 
cvs.texi(,5092) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5093) @node Outside
cvs.texi(,5094) @subsection The Normal way to Rename
cvs.texi(,5095) 
cvs.texi(,5096) @c More rename issues.  Not sure whether these are
cvs.texi(,5097) @c worth documenting; I'm putting them here because
cvs.texi(,5098) @c it seems to be as good a place as any to try to
cvs.texi(,5099) @c set down the issues.
cvs.texi(,5100) @c * "cvs annotate" will annotate either the new
cvs.texi(,5101) @c file or the old file; it cannot annotate _each
cvs.texi(,5102) @c line_ based on whether it was last changed in the
cvs.texi(,5103) @c new or old file.  Unlike "cvs log", where the
cvs.texi(,5104) @c consequences of having to select either the new
cvs.texi(,5105) @c or old name seem fairly benign, this may be a
cvs.texi(,5106) @c real advantage to having CVS know about renames
cvs.texi(,5107) @c other than as a deletion and an addition.
cvs.texi(,5108) 
cvs.texi(,5109) The normal way to move a file is to copy @var{old} to
cvs.texi(,5110) @var{new}, and then issue the normal @sc{cvs} commands
cvs.texi(,5111) to remove @var{old} from the repository, and add
cvs.texi(,5112) @var{new} to it.
cvs.texi(,5113) @c The following sentence is not true: one must cd into
cvs.texi(,5114) @c the directory to run "cvs add".
cvs.texi(,5115) @c  (Both @var{old} and @var{new} could
cvs.texi(,5116) @c contain relative paths, for example @file{foo/bar.c}).
cvs.texi(,5117) 
cvs.texi(,5118) @example
cvs.texi(,5119) $ mv @var{old} @var{new}
cvs.texi(,5120) $ cvs remove @var{old}
cvs.texi(,5121) $ cvs add @var{new}
cvs.texi(,5122) $ cvs commit -m "Renamed @var{old} to @var{new}" @var{old} @var{new}
cvs.texi(,5123) @end example
cvs.texi(,5124) 
cvs.texi(,5125) This is the simplest way to move a file, it is not
cvs.texi(,5126) error-prone, and it preserves the history of what was
cvs.texi(,5127) done.  Note that to access the history of the file you
cvs.texi(,5128) must specify the old or the new name, depending on what
cvs.texi(,5129) portion of the history you are accessing.  For example,
cvs.texi(,5130) @code{cvs log @var{old}} will give the log up until the
cvs.texi(,5131) time of the rename.
cvs.texi(,5132) 
cvs.texi(,5133) When @var{new} is committed its revision numbers will
cvs.texi(,5134) start again, usually at 1.1, so if that bothers you,
cvs.texi(,5135) use the @samp{-r rev} option to commit.  For more
cvs.texi(,5136) information see @ref{Assigning revisions}.
cvs.texi(,5137) 
cvs.texi(,5138) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5139) @node Inside
cvs.texi(,5140) @subsection Moving the history file
cvs.texi(,5141) 
cvs.texi(,5142) This method is more dangerous, since it involves moving
cvs.texi(,5143) files inside the repository.  Read this entire section
cvs.texi(,5144) before trying it out!
cvs.texi(,5145) 
cvs.texi(,5146) @example
cvs.texi(,5147) $ cd $CVSROOT/@var{dir}
cvs.texi(,5148) $ mv @var{old},v @var{new},v
cvs.texi(,5149) @end example
cvs.texi(,5150) 
cvs.texi(,5151) @noindent
cvs.texi(,5152) Advantages:
cvs.texi(,5153) 
cvs.texi(,5154) @itemize @bullet
cvs.texi(,5155) @item
cvs.texi(,5156) The log of changes is maintained intact.
cvs.texi(,5157) 
cvs.texi(,5158) @item
cvs.texi(,5159) The revision numbers are not affected.
cvs.texi(,5160) @end itemize
cvs.texi(,5161) 
cvs.texi(,5162) @noindent
cvs.texi(,5163) Disadvantages:
cvs.texi(,5164) 
cvs.texi(,5165) @itemize @bullet
cvs.texi(,5166) @item
cvs.texi(,5167) Old releases cannot easily be fetched from the
cvs.texi(,5168) repository.  (The file will show up as @var{new} even
cvs.texi(,5169) in revisions from the time before it was renamed).
cvs.texi(,5170) 
cvs.texi(,5171) @item
cvs.texi(,5172) There is no log information of when the file was renamed.
cvs.texi(,5173) 
cvs.texi(,5174) @item
cvs.texi(,5175) Nasty things might happen if someone accesses the history file
cvs.texi(,5176) while you are moving it.  Make sure no one else runs any of the @sc{cvs}
cvs.texi(,5177) commands while you move it.
cvs.texi(,5178) @end itemize
cvs.texi(,5179) 
cvs.texi(,5180) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5181) @node Rename by copying
cvs.texi(,5182) @subsection Copying the history file
cvs.texi(,5183) 
cvs.texi(,5184) This way also involves direct modifications to the
cvs.texi(,5185) repository.  It is safe, but not without drawbacks.
cvs.texi(,5186) 
cvs.texi(,5187) @example
cvs.texi(,5188) # @r{Copy the @sc{rcs} file inside the repository}
cvs.texi(,5189) $ cd $CVSROOT/@var{dir}
cvs.texi(,5190) $ cp @var{old},v @var{new},v
cvs.texi(,5191) # @r{Remove the old file}
cvs.texi(,5192) $ cd ~/@var{dir}
cvs.texi(,5193) $ rm @var{old}
cvs.texi(,5194) $ cvs remove @var{old}
cvs.texi(,5195) $ cvs commit @var{old}
cvs.texi(,5196) # @r{Remove all tags from @var{new}}
cvs.texi(,5197) $ cvs update @var{new}
cvs.texi(,5198) $ cvs log @var{new}             # @r{Remember the non-branch tag names}
cvs.texi(,5199) $ cvs tag -d @var{tag1} @var{new}
cvs.texi(,5200) $ cvs tag -d @var{tag2} @var{new}
cvs.texi(,5201) @dots{}
cvs.texi(,5202) @end example
cvs.texi(,5203) 
cvs.texi(,5204) By removing the tags you will be able to check out old
cvs.texi(,5205) revisions.
cvs.texi(,5206) 
cvs.texi(,5207) @noindent
cvs.texi(,5208) Advantages:
cvs.texi(,5209) 
cvs.texi(,5210) @itemize @bullet
cvs.texi(,5211) @item
cvs.texi(,5212) @c FIXME: Is this true about -D now that we have death
cvs.texi(,5213) @c support?  See 5B.3 in the FAQ.
cvs.texi(,5214) Checking out old revisions works correctly, as long as
cvs.texi(,5215) you use @samp{-r@var{tag}} and not @samp{-D@var{date}}
cvs.texi(,5216) to retrieve the revisions.
cvs.texi(,5217) 
cvs.texi(,5218) @item
cvs.texi(,5219) The log of changes is maintained intact.
cvs.texi(,5220) 
cvs.texi(,5221) @item
cvs.texi(,5222) The revision numbers are not affected.
cvs.texi(,5223) @end itemize
cvs.texi(,5224) 
cvs.texi(,5225) @noindent
cvs.texi(,5226) Disadvantages:
cvs.texi(,5227) 
cvs.texi(,5228) @itemize @bullet
cvs.texi(,5229) @item
cvs.texi(,5230) You cannot easily see the history of the file across the rename.
cvs.texi(,5231) 
cvs.texi(,5244) @end itemize
cvs.texi(,5245) 
cvs.texi(,5246) @c ---------------------------------------------------------------------
cvs.texi(,5247) @node Moving directories
cvs.texi(,5248) @section Moving and renaming directories
cvs.texi(,5249) @cindex Moving directories
cvs.texi(,5250) @cindex Renaming directories
cvs.texi(,5251) @cindex Directories, moving
cvs.texi(,5252) 
cvs.texi(,5253) The normal way to rename or move a directory is to
cvs.texi(,5254) rename or move each file within it as described in
cvs.texi(,5255) @ref{Outside}.  Then check out with the @samp{-P}
cvs.texi(,5256) option, as described in @ref{Removing directories}.
cvs.texi(,5257) 
cvs.texi(,5258) If you really want to hack the repository to rename or
cvs.texi(,5259) delete a directory in the repository, you can do it
cvs.texi(,5260) like this:
cvs.texi(,5261) 
cvs.texi(,5262) @enumerate
cvs.texi(,5263) @item
cvs.texi(,5264) Inform everyone who has a checked out copy of the directory that the
cvs.texi(,5265) directory will be renamed.  They should commit all
cvs.texi(,5266) their changes, and remove their working copies,
cvs.texi(,5267) before you take the steps below.
cvs.texi(,5268) 
cvs.texi(,5269) @item
cvs.texi(,5270) Rename the directory inside the repository.
cvs.texi(,5271) 
cvs.texi(,5272) @example
cvs.texi(,5273) $ cd $CVSROOT/@var{parent-dir}
cvs.texi(,5274) $ mv @var{old-dir} @var{new-dir}
cvs.texi(,5275) @end example
cvs.texi(,5276) 
cvs.texi(,5277) @item
cvs.texi(,5278) Fix the @sc{cvs} administrative files, if necessary (for
cvs.texi(,5279) instance if you renamed an entire module).
cvs.texi(,5280) 
cvs.texi(,5281) @item
cvs.texi(,5282) Tell everyone that they can check out again and continue
cvs.texi(,5283) working.
cvs.texi(,5284) 
cvs.texi(,5285) @end enumerate
cvs.texi(,5286) 
cvs.texi(,5287) If someone had a working copy the @sc{cvs} commands will
cvs.texi(,5288) cease to work for him, until he removes the directory
cvs.texi(,5289) that disappeared inside the repository.
cvs.texi(,5290) 
cvs.texi(,5291) It is almost always better to move the files in the
cvs.texi(,5292) directory instead of moving the directory.  If you move the
cvs.texi(,5293) directory you are unlikely to be able to retrieve old
cvs.texi(,5294) releases correctly, since they probably depend on the
cvs.texi(,5295) name of the directories.
cvs.texi(,5296) 
cvs.texi(,5297) @c ---------------------------------------------------------------------
cvs.texi(,5298) @node History browsing
cvs.texi(,5299) @chapter History browsing
cvs.texi(,5300) @cindex History browsing
cvs.texi(,5301) @cindex Traceability
cvs.texi(,5302) @cindex Isolation
cvs.texi(,5303) 
cvs.texi(,5355) 
cvs.texi(,5356) @c kind of lame, in a lot of ways the above text inside
cvs.texi(,5357) @c the @ignore motivates this chapter better
cvs.texi(,5358) Once you have used @sc{cvs} to store a version control
cvs.texi(,5359) history---what files have changed when, how, and by
cvs.texi(,5360) whom, there are a variety of mechanisms for looking
cvs.texi(,5361) through the history.
cvs.texi(,5362) 
cvs.texi(,5363) @c FIXME: should also be talking about how you look at
cvs.texi(,5364) @c old revisions (e.g. "cvs update -p -r 1.2 foo.c").
cvs.texi(,5365) @menu
cvs.texi(,5366) * log messages::                Log messages
cvs.texi(,5367) * history database::            The history database
cvs.texi(,5368) * user-defined logging::        User-defined logging
cvs.texi(,5369) * annotate::                    What revision modified each line of a file?
cvs.texi(,5370) @end menu
cvs.texi(,5371) 
cvs.texi(,5372) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5373) @node log messages
cvs.texi(,5374) @section Log messages
cvs.texi(,5375) 
cvs.texi(,5376) @c FIXME: @xref to place where we talk about how to
cvs.texi(,5377) @c specify message to commit.
cvs.texi(,5378) Whenever you commit a file you specify a log message.
cvs.texi(,5379) 
cvs.texi(,5380) @c FIXME: bring the information here, and get rid of or
cvs.texi(,5381) @c greatly shrink the "log" node.
cvs.texi(,5382) To look through the log messages which have been
cvs.texi(,5383) specified for every revision which has been committed,
cvs.texi(,5384) use the @code{cvs log} command (@pxref{log}).
cvs.texi(,5385) 
cvs.texi(,5386) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5387) @node history database
cvs.texi(,5388) @section The history database
cvs.texi(,5389) 
cvs.texi(,5390) @c FIXME: bring the information from the history file
cvs.texi(,5391) @c and history nodes here.  Rewrite it to be motivated
cvs.texi(,5392) @c better (start out by clearly explaining what gets
cvs.texi(,5393) @c logged in history, for example).
cvs.texi(,5394) You can use the history file (@pxref{history file}) to
cvs.texi(,5395) log various @sc{cvs} actions.  To retrieve the
cvs.texi(,5396) information from the history file, use the @code{cvs
cvs.texi(,5397) history} command (@pxref{history}).
cvs.texi(,5398) 
cvs.texi(,5399) Note: you can control what is logged to this file by using the
cvs.texi(,5400) @samp{LogHistory} keyword in the @file{CVSROOT/config} file
cvs.texi(,5401) (@pxref{config}).
cvs.texi(,5402) 
cvs.texi(,5403) @c
cvs.texi(,5404) @c The history database has many problems:
cvs.texi(,5405) @c * It is very unclear what field means what.  This
cvs.texi(,5406) @c could be improved greatly by better documentation,
cvs.texi(,5407) @c but there are still non-orthogonalities (for
cvs.texi(,5408) @c example, tag does not record the "repository"
cvs.texi(,5409) @c field but most records do).
cvs.texi(,5410) @c * Confusion about files, directories, and modules.
cvs.texi(,5411) @c Some commands record one, some record others.
cvs.texi(,5412) @c * File removal is not logged.  There is an 'R'
cvs.texi(,5413) @c record type documented, but CVS never uses it.
cvs.texi(,5414) @c * Tags are only logged for the "cvs rtag" command,
cvs.texi(,5415) @c not "cvs tag".  The fix for this is not completely
cvs.texi(,5416) @c clear (see above about modules vs. files).
cvs.texi(,5417) @c * Are there other cases of operations that are not
cvs.texi(,5418) @c logged?  One would hope for all changes to the
cvs.texi(,5419) @c repository to be logged somehow (particularly
cvs.texi(,5420) @c operations like tagging, "cvs admin -k", and other
cvs.texi(,5421) @c operations which do not record a history that one
cvs.texi(,5422) @c can get with "cvs log").  Operations on the working
cvs.texi(,5423) @c directory, like export, get, and release, are a
cvs.texi(,5424) @c second category also covered by the current "cvs
cvs.texi(,5425) @c history".
cvs.texi(,5426) @c * The history file does not record the options given
cvs.texi(,5427) @c to a command.  The most serious manifestation of
cvs.texi(,5428) @c this is perhaps that it doesn't record whether a command
cvs.texi(,5429) @c was recursive.  It is not clear to me whether one
cvs.texi(,5430) @c wants to log at a level very close to the command
cvs.texi(,5431) @c line, as a sort of way of logging each command
cvs.texi(,5432) @c (more or less), or whether one wants
cvs.texi(,5433) @c to log more at the level of what was changed (or
cvs.texi(,5434) @c something in between), but either way the current
cvs.texi(,5435) @c information has pretty big gaps.
cvs.texi(,5436) @c * Further details about a tag--like whether it is a
cvs.texi(,5437) @c branch tag or, if a non-branch tag, which branch it
cvs.texi(,5438) @c is on.  One can find out this information about the
cvs.texi(,5439) @c tag as it exists _now_, but if the tag has been
cvs.texi(,5440) @c moved, one doesn't know what it was like at the time
cvs.texi(,5441) @c the history record was written.
cvs.texi(,5442) @c * Whether operating on a particular tag, date, or
cvs.texi(,5443) @c options was implicit (sticky) or explicit.
cvs.texi(,5444) @c
cvs.texi(,5445) @c Another item, only somewhat related to the above, is a
cvs.texi(,5446) @c way to control what is logged in the history file.
cvs.texi(,5447) @c This is probably the only good way to handle
cvs.texi(,5448) @c different people having different ideas about
cvs.texi(,5449) @c information/space tradeoffs.
cvs.texi(,5450) @c
cvs.texi(,5451) @c It isn't really clear that it makes sense to try to
cvs.texi(,5452) @c patch up the history file format as it exists now to
cvs.texi(,5453) @c include all that stuff.  It might be better to
cvs.texi(,5454) @c design a whole new CVSROOT/nhistory file and "cvs
cvs.texi(,5455) @c nhistory" command, or some such, or in some other
cvs.texi(,5456) @c way trying to come up with a clean break from the
cvs.texi(,5457) @c past, which can address the above concerns.  Another
cvs.texi(,5458) @c open question is how/whether this relates to
cvs.texi(,5459) @c taginfo/loginfo/etc.
cvs.texi(,5460) 
cvs.texi(,5461) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5462) @node user-defined logging
cvs.texi(,5463) @section User-defined logging
cvs.texi(,5464) 
cvs.texi(,5465) @c FIXME: should probably also mention the fact the -l
cvs.texi(,5466) @c global option can disable most of the mechanisms
cvs.texi(,5467) @c discussed here (why?  What is the -l global option for?).
cvs.texi(,5468) @c
cvs.texi(,5469) @c FIXME: probably should centralize this information
cvs.texi(,5470) @c here, at least to some extent.  Maybe by moving the
cvs.texi(,5471) @c loginfo, etc., nodes here and replacing
cvs.texi(,5472) @c the "user-defined logging" node with one node for
cvs.texi(,5473) @c each method.
cvs.texi(,5474) You can customize @sc{cvs} to log various kinds of
cvs.texi(,5475) actions, in whatever manner you choose.  These
cvs.texi(,5476) mechanisms operate by executing a script at various
cvs.texi(,5477) times.  The script might append a message to a file
cvs.texi(,5478) listing the information and the programmer who created
cvs.texi(,5479) it, or send mail to a group of developers, or, perhaps,
cvs.texi(,5480) post a message to a particular newsgroup.  To log
cvs.texi(,5481) commits, use the @file{loginfo} file (@pxref{loginfo}).
cvs.texi(,5482) @c FIXME: What is difference between doing it in the
cvs.texi(,5483) @c modules file and using loginfo/taginfo?  Why should
cvs.texi(,5484) @c user use one or the other?
cvs.texi(,5485) To log commits, checkouts, exports, and tags,
cvs.texi(,5486) respectively, you can also use the @samp{-i},
cvs.texi(,5487) @samp{-o}, @samp{-e}, and @samp{-t} options in the
cvs.texi(,5488) modules file.  For a more flexible way of giving
cvs.texi(,5489) notifications to various users, which requires less in
cvs.texi(,5490) the way of keeping centralized scripts up to date, use
cvs.texi(,5491) the @code{cvs watch add} command (@pxref{Getting
cvs.texi(,5492) Notified}); this command is useful even if you are not
cvs.texi(,5493) using @code{cvs watch on}.
cvs.texi(,5494) 
cvs.texi(,5495) @cindex taginfo
cvs.texi(,5496) @cindex Exit status, of taginfo
cvs.texi(,5497) The @file{taginfo} file defines programs to execute
cvs.texi(,5498) when someone executes a @code{tag} or @code{rtag}
cvs.texi(,5499) command.  The @file{taginfo} file has the standard form
cvs.texi(,5500) for administrative files (@pxref{Administrative
cvs.texi(,5501) files}), where each line is a regular expression
cvs.texi(,5502) followed by a command to execute.  The arguments passed
cvs.texi(,5503) to the command are, in order, the @var{tagname},
cvs.texi(,5504) @var{operation} (@code{add} for @code{tag},
cvs.texi(,5505) @code{mov} for @code{tag -F}, and @code{del} for
cvs.texi(,5506) @code{tag -d}), @var{repository}, and any remaining are
cvs.texi(,5507) pairs of @var{filename} @var{revision}.  A non-zero
cvs.texi(,5508) exit of the filter program will cause the tag to be
cvs.texi(,5509) aborted.
cvs.texi(,5510) 
cvs.texi(,5511) Here is an example of using taginfo to log tag and rtag
cvs.texi(,5512) commands.  In the taginfo file put:
cvs.texi(,5513) 
cvs.texi(,5514) @example
cvs.texi(,5515) ALL /usr/local/cvsroot/CVSROOT/loggit
cvs.texi(,5516) @end example
cvs.texi(,5517) 
cvs.texi(,5518) @noindent
cvs.texi(,5519) Where @file{/usr/local/cvsroot/CVSROOT/loggit} contains the
cvs.texi(,5520) following script:
cvs.texi(,5521) 
cvs.texi(,5522) @example
cvs.texi(,5523) #!/bin/sh
cvs.texi(,5524) echo "$@@" >>/home/kingdon/cvsroot/CVSROOT/taglog
cvs.texi(,5525) @end example
cvs.texi(,5526) 
cvs.texi(,5527) @node annotate
cvs.texi(,5528) @section Annotate command
cvs.texi(,5529) @cindex annotate (subcommand)
cvs.texi(,5530) 
cvs.texi(,5531) @deffn Command {cvs annotate} [@code{-FflR}] [@code{-r rev}|@code{-D date}] files @dots{}
cvs.texi(,5532) 
cvs.texi(,5533) For each file in @var{files}, print the head revision
cvs.texi(,5534) of the trunk, together with information on the last
cvs.texi(,5535) modification for each line.  For example:
cvs.texi(,5536) 
cvs.texi(,5537) @example
cvs.texi(,5538) $ cvs annotate ssfile
cvs.texi(,5539) Annotations for ssfile
cvs.texi(,5540) ***************
cvs.texi(,5541) 1.1          (mary     27-Mar-96): ssfile line 1
cvs.texi(,5542) 1.2          (joe      28-Mar-96): ssfile line 2
cvs.texi(,5543) @end example
cvs.texi(,5544) 
cvs.texi(,5545) The file @file{ssfile} currently contains two lines.
cvs.texi(,5546) The @code{ssfile line 1} line was checked in by
cvs.texi(,5547) @code{mary} on March 27.  Then, on March 28, @code{joe}
cvs.texi(,5548) added a line @code{ssfile line 2}, without modifying
cvs.texi(,5549) the @code{ssfile line 1} line.  This report doesn't
cvs.texi(,5550) tell you anything about lines which have been deleted
cvs.texi(,5551) or replaced; you need to use @code{cvs diff} for that
cvs.texi(,5552) (@pxref{diff}).
cvs.texi(,5553) 
cvs.texi(,5554) @end deffn
cvs.texi(,5555) 
cvs.texi(,5556) The options to @code{cvs annotate} are listed in
cvs.texi(,5557) @ref{Invoking CVS}, and can be used to select the files
cvs.texi(,5558) and revisions to annotate.  The options are described
cvs.texi(,5559) in more detail there and in @ref{Common options}.
cvs.texi(,5560) 
cvs.texi(,5561) @c FIXME: maybe an example using the options?  Just
cvs.texi(,5562) @c what it means to select a revision might be worth a
cvs.texi(,5563) @c few words of explanation ("you want to see who
cvs.texi(,5564) @c changed this line *before* 1.4"...).
cvs.texi(,5565) 
cvs.texi(,5566) @c ---------------------------------------------------------------------
cvs.texi(,5567) @node Binary files
cvs.texi(,5568) @chapter Handling binary files
cvs.texi(,5569) @cindex Binary files
cvs.texi(,5570) 
cvs.texi(,5571) The most common use for @sc{cvs} is to store text
cvs.texi(,5572) files.  With text files, @sc{cvs} can merge revisions,
cvs.texi(,5573) display the differences between revisions in a
cvs.texi(,5574) human-visible fashion, and other such operations.
cvs.texi(,5575) However, if you are willing to give up a few of these
cvs.texi(,5576) abilities, @sc{cvs} can store binary files.  For
cvs.texi(,5577) example, one might store a web site in @sc{cvs}
cvs.texi(,5578) including both text files and binary images.
cvs.texi(,5579) 
cvs.texi(,5580) @menu
cvs.texi(,5581) * Binary why::     More details on issues with binary files
cvs.texi(,5582) * Binary howto::   How to store them
cvs.texi(,5583) @end menu
cvs.texi(,5584) 
cvs.texi(,5585) @node Binary why
cvs.texi(,5586) @section The issues with binary files
cvs.texi(,5587) 
cvs.texi(,5588) While the need to manage binary files may seem obvious
cvs.texi(,5589) if the files that you customarily work with are binary,
cvs.texi(,5590) putting them into version control does present some
cvs.texi(,5591) additional issues.
cvs.texi(,5592) 
cvs.texi(,5593) One basic function of version control is to show the
cvs.texi(,5594) differences between two revisions.  For example, if
cvs.texi(,5595) someone else checked in a new version of a file, you
cvs.texi(,5596) may wish to look at what they changed and determine
cvs.texi(,5597) whether their changes are good.  For text files,
cvs.texi(,5598) @sc{cvs} provides this functionality via the @code{cvs
cvs.texi(,5599) diff} command.  For binary files, it may be possible to
cvs.texi(,5600) extract the two revisions and then compare them with a
cvs.texi(,5601) tool external to @sc{cvs} (for example, word processing
cvs.texi(,5602) software often has such a feature).  If there is no
cvs.texi(,5603) such tool, one must track changes via other mechanisms,
cvs.texi(,5604) such as urging people to write good log messages, and
cvs.texi(,5605) hoping that the changes they actually made were the
cvs.texi(,5606) changes that they intended to make.
cvs.texi(,5607) 
cvs.texi(,5608) Another ability of a version control system is the
cvs.texi(,5609) ability to merge two revisions.  For @sc{cvs} this
cvs.texi(,5610) happens in two contexts.  The first is when users make
cvs.texi(,5611) changes in separate working directories
cvs.texi(,5612) (@pxref{Multiple developers}).  The second is when one
cvs.texi(,5613) merges explicitly with the @samp{update -j} command
cvs.texi(,5614) (@pxref{Branching and merging}).
cvs.texi(,5615) 
cvs.texi(,5616) In the case of text
cvs.texi(,5617) files, @sc{cvs} can merge changes made independently,
cvs.texi(,5618) and signal a conflict if the changes conflict.  With
cvs.texi(,5619) binary files, the best that @sc{cvs} can do is present
cvs.texi(,5620) the two different copies of the file, and leave it to
cvs.texi(,5621) the user to resolve the conflict.  The user may choose
cvs.texi(,5622) one copy or the other, or may run an external merge
cvs.texi(,5623) tool which knows about that particular file format, if
cvs.texi(,5624) one exists.
cvs.texi(,5625) Note that having the user merge relies primarily on the
cvs.texi(,5626) user to not accidentally omit some changes, and thus is
cvs.texi(,5627) potentially error prone.
cvs.texi(,5628) 
cvs.texi(,5629) If this process is thought to be undesirable, the best
cvs.texi(,5630) choice may be to avoid merging.  To avoid the merges
cvs.texi(,5631) that result from separate working directories, see the
cvs.texi(,5632) discussion of reserved checkouts (file locking) in
cvs.texi(,5633) @ref{Multiple developers}.  To avoid the merges
cvs.texi(,5634) resulting from branches, restrict use of branches.
cvs.texi(,5635) 
cvs.texi(,5636) @node Binary howto
cvs.texi(,5637) @section How to store binary files
cvs.texi(,5638) 
cvs.texi(,5639) There are two issues with using @sc{cvs} to store
cvs.texi(,5640) binary files.  The first is that @sc{cvs} by default
cvs.texi(,5641) converts line endings between the canonical form in
cvs.texi(,5642) which they are stored in the repository (linefeed
cvs.texi(,5643) only), and the form appropriate to the operating system
cvs.texi(,5644) in use on the client (for example, carriage return
cvs.texi(,5645) followed by line feed for Windows NT).
cvs.texi(,5646) 
cvs.texi(,5647) The second is that a binary file might happen to
cvs.texi(,5648) contain data which looks like a keyword (@pxref{Keyword
cvs.texi(,5649) substitution}), so keyword expansion must be turned
cvs.texi(,5650) off.
cvs.texi(,5651) 
cvs.texi(,5652) @c FIXME: the third is that one can't do merges with
cvs.texi(,5653) @c binary files.  xref to Multiple Developers and the
cvs.texi(,5654) @c reserved checkout issues.
cvs.texi(,5655) 
cvs.texi(,5656) The @samp{-kb} option available with some @sc{cvs}
cvs.texi(,5657) commands insures that neither line ending conversion
cvs.texi(,5658) nor keyword expansion will be done.
cvs.texi(,5659) 
cvs.texi(,5660) Here is an example of how you can create a new file
cvs.texi(,5661) using the @samp{-kb} flag:
cvs.texi(,5662) 
cvs.texi(,5663) @example
cvs.texi(splitrcskeyword,5664) $ echo '$ Id$' > kotest
cvs.texi(,5665) $ cvs add -kb -m"A test file" kotest
cvs.texi(,5666) $ cvs ci -m"First checkin; contains a keyword" kotest
cvs.texi(,5667) @end example
cvs.texi(,5668) 
cvs.texi(,5669) If a file accidentally gets added without @samp{-kb},
cvs.texi(,5670) one can use the @code{cvs admin} command to recover.
cvs.texi(,5671) For example:
cvs.texi(,5672) 
cvs.texi(,5673) @example
cvs.texi(splitrcskeyword,5674) $ echo '$ Id$' > kotest
cvs.texi(,5675) $ cvs add -m"A test file" kotest
cvs.texi(,5676) $ cvs ci -m"First checkin; contains a keyword" kotest
cvs.texi(,5677) $ cvs admin -kb kotest
cvs.texi(,5678) $ cvs update -A kotest
cvs.texi(,5679) # @r{For non-unix systems:}
cvs.texi(,5680) # @r{Copy in a good copy of the file from outside CVS}
cvs.texi(,5681) $ cvs commit -m "make it binary" kotest
cvs.texi(,5682) @end example
cvs.texi(,5683) 
cvs.texi(,5684) @c Trying to describe this for both unix and non-unix
cvs.texi(,5685) @c in the same description is very confusing.  Might
cvs.texi(,5686) @c want to split the two, or just ditch the unix "shortcut"
cvs.texi(,5687) @c (unixheads don't do much with binary files, anyway).
cvs.texi(,5688) @c This used to say "(Try the above example, and do a
cvs.texi(,5689) @c @code{cat kotest} after every command)".  But that
cvs.texi(,5690) @c only really makes sense for the unix case.
cvs.texi(,5691) When you check in the file @file{kotest} the file is
cvs.texi(,5692) not preserved as a binary file, because you did not
cvs.texi(,5693) check it in as a binary file.  The @code{cvs
cvs.texi(,5694) admin -kb} command sets the default keyword
cvs.texi(,5695) substitution method for this file, but it does not
cvs.texi(,5696) alter the working copy of the file that you have.  If you need to
cvs.texi(,5697) cope with line endings (that is, you are using
cvs.texi(,5698) @sc{cvs} on a non-unix system), then you need to
cvs.texi(,5699) check in a new copy of the file, as shown by the
cvs.texi(,5700) @code{cvs commit} command above.
cvs.texi(,5701) On unix, the @code{cvs update -A} command suffices.
cvs.texi(,5702) @c FIXME: should also describe what the *other users*
cvs.texi(,5703) @c need to do, if they have checked out copies which
cvs.texi(,5704) @c have been corrupted by lack of -kb.  I think maybe
cvs.texi(,5705) @c "cvs update -kb" or "cvs
cvs.texi(,5706) @c update -A" would suffice, although the user who
cvs.texi(,5707) @c reported this suggested removing the file, manually
cvs.texi(,5708) @c removing it from CVS/Entries, and then "cvs update"
cvs.texi(,5709) (Note that you can use @code{cvs log} to determine the default keyword
cvs.texi(,5710) substitution method for a file and @code{cvs status} to determine
cvs.texi(,5711) the keyword substitution method for a working copy.)
cvs.texi(,5712) 
cvs.texi(,5713) However, in using @code{cvs admin -k} to change the
cvs.texi(,5714) keyword expansion, be aware that the keyword expansion
cvs.texi(,5715) mode is not version controlled.  This means that, for
cvs.texi(,5716) example, that if you have a text file in old releases,
cvs.texi(,5717) and a binary file with the same name in new releases,
cvs.texi(,5718) @sc{cvs} provides no way to check out the file in text
cvs.texi(,5719) or binary mode depending on what version you are
cvs.texi(,5720) checking out.  There is no good workaround for this
cvs.texi(,5721) problem.
cvs.texi(,5722) 
cvs.texi(,5723) You can also set a default for whether @code{cvs add}
cvs.texi(,5724) and @code{cvs import} treat a file as binary based on
cvs.texi(,5725) its name; for example you could say that files who
cvs.texi(,5726) names end in @samp{.exe} are binary.  @xref{Wrappers}.
cvs.texi(,5727) There is currently no way to have @sc{cvs} detect
cvs.texi(,5728) whether a file is binary based on its contents.  The
cvs.texi(,5729) main difficulty with designing such a feature is that
cvs.texi(,5730) it is not clear how to distinguish between binary and
cvs.texi(,5731) non-binary files, and the rules to apply would vary
cvs.texi(,5732) considerably with the operating system.
cvs.texi(,5733) @c For example, it would be good on MS-DOS-family OSes
cvs.texi(,5734) @c for anything containing ^Z to be binary.  Having
cvs.texi(,5735) @c characters with the 8th bit set imply binary is almost
cvs.texi(,5736) @c surely a bad idea in the context of ISO-8859-* and
cvs.texi(,5737) @c other such character sets.  On VMS or the Mac, we
cvs.texi(,5738) @c could use the OS's file typing.  This is a
cvs.texi(,5739) @c commonly-desired feature, and something of this sort
cvs.texi(,5740) @c may make sense.  But there are a lot of pitfalls here.
cvs.texi(,5741) @c
cvs.texi(,5742) @c Another, probably better, way to tell is to read the
cvs.texi(,5743) @c file in text mode, write it to a temp file in text
cvs.texi(,5744) @c mode, and then do a binary mode compare of the two
cvs.texi(,5745) @c files.  If they differ, it is a binary file.  This
cvs.texi(,5746) @c might have problems on VMS (or some other system
cvs.texi(,5747) @c with several different text modes), but in general
cvs.texi(,5748) @c should be relatively portable.  The only other
cvs.texi(,5749) @c downside I can think of is that it would be fairly
cvs.texi(,5750) @c slow, but that is perhaps a small price to pay for
cvs.texi(,5751) @c not having your files corrupted.  Another issue is
cvs.texi(,5752) @c what happens if you import a text file with bare
cvs.texi(,5753) @c linefeeds on Windows.  Such files will show up on
cvs.texi(,5754) @c Windows sometimes (I think some native windows
cvs.texi(,5755) @c programs even write them, on occasion).  Perhaps it
cvs.texi(,5756) @c is reasonable to treat such files as binary; after
cvs.texi(,5757) @c all it is something of a presumption to assume that
cvs.texi(,5758) @c the user would want the linefeeds converted to CRLF.
cvs.texi(,5759) 
cvs.texi(,5760) @c ---------------------------------------------------------------------
cvs.texi(,5761) @node Multiple developers
cvs.texi(,5762) @chapter Multiple developers
cvs.texi(,5763) @cindex Multiple developers
cvs.texi(,5764) @cindex Team of developers
cvs.texi(,5765) @cindex File locking
cvs.texi(,5766) @cindex Locking files
cvs.texi(,5767) @cindex Working copy
cvs.texi(,5768) @cindex Reserved checkouts
cvs.texi(,5769) @cindex Unreserved checkouts
cvs.texi(,5770) @cindex RCS-style locking
cvs.texi(,5771) 
cvs.texi(,5772) When more than one person works on a software project
cvs.texi(,5773) things often get complicated.  Often, two people try to
cvs.texi(,5774) edit the same file simultaneously.  One solution, known
cvs.texi(,5775) as @dfn{file locking} or @dfn{reserved checkouts}, is
cvs.texi(,5776) to allow only one person to edit each file at a time.
cvs.texi(,5777) This is the only solution with some version control
cvs.texi(,5778) systems, including @sc{rcs} and @sc{sccs}.  Currently
cvs.texi(,5779) the usual way to get reserved checkouts with @sc{cvs}
cvs.texi(,5780) is the @code{cvs admin -l} command (@pxref{admin
cvs.texi(,5781) options}).  This is not as nicely integrated into
cvs.texi(,5782) @sc{cvs} as the watch features, described below, but it
cvs.texi(,5783) seems that most people with a need for reserved
cvs.texi(,5784) checkouts find it adequate.
cvs.texi(,5785) @c Or "find it better than worrying about implementing
cvs.texi(,5786) @c nicely integrated reserved checkouts" or ...?
cvs.texi(,5787) It also may be possible to use the watches
cvs.texi(,5788) features described below, together with suitable
cvs.texi(,5789) procedures (not enforced by software), to avoid having
cvs.texi(,5790) two people edit at the same time.
cvs.texi(,5791) 
cvs.texi(,5792) @c Our unreserved checkout model might not
cvs.texi(,5793) @c be quite the same as others.  For example, I
cvs.texi(,5794) @c think that some systems will tend to create a branch
cvs.texi(,5795) @c in the case where CVS prints "up-to-date check failed".
cvs.texi(,5796) @c It isn't clear to me whether we should try to
cvs.texi(,5797) @c explore these subtleties; it could easily just
cvs.texi(,5798) @c confuse people.
cvs.texi(,5799) The default model with @sc{cvs} is known as
cvs.texi(,5800) @dfn{unreserved checkouts}.  In this model, developers
cvs.texi(,5801) can edit their own @dfn{working copy} of a file
cvs.texi(,5802) simultaneously.  The first person that commits his
cvs.texi(,5803) changes has no automatic way of knowing that another
cvs.texi(,5804) has started to edit it.  Others will get an error
cvs.texi(,5805) message when they try to commit the file.  They must
cvs.texi(,5806) then use @sc{cvs} commands to bring their working copy
cvs.texi(,5807) up to date with the repository revision.  This process
cvs.texi(,5808) is almost automatic.
cvs.texi(,5809) 
cvs.texi(,5810) @c FIXME? should probably use the word "watch" here, to
cvs.texi(,5811) @c tie this into the text below and above.
cvs.texi(,5812) @sc{cvs} also supports mechanisms which facilitate
cvs.texi(,5813) various kinds of communication, without actually
cvs.texi(,5814) enforcing rules like reserved checkouts do.
cvs.texi(,5815) 
cvs.texi(,5816) The rest of this chapter describes how these various
cvs.texi(,5817) models work, and some of the issues involved in
cvs.texi(,5818) choosing between them.
cvs.texi(,5819) 
cvs.texi(,5897) 
cvs.texi(,5898) @menu
cvs.texi(,5899) * File status::                 A file can be in several states
cvs.texi(,5900) * Updating a file::             Bringing a file up-to-date
cvs.texi(,5901) * Conflicts example::           An informative example
cvs.texi(,5902) * Informing others::            To cooperate you must inform
cvs.texi(,5903) * Concurrency::                 Simultaneous repository access
cvs.texi(,5904) * Watches::                     Mechanisms to track who is editing files
cvs.texi(,5905) * Choosing a model::            Reserved or unreserved checkouts?
cvs.texi(,5906) @end menu
cvs.texi(,5907) 
cvs.texi(,5908) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,5909) @node File status
cvs.texi(,5910) @section File status
cvs.texi(,5911) @cindex File status
cvs.texi(,5912) @cindex Status of a file
cvs.texi(,5913) 
cvs.texi(,5914) @c Shouldn't this start with an example or something,
cvs.texi(,5915) @c introducing the unreserved checkout model?  Before we
cvs.texi(,5916) @c dive into listing states?
cvs.texi(,5917) Based on what operations you have performed on a
cvs.texi(,5918) checked out file, and what operations others have
cvs.texi(,5919) performed to that file in the repository, one can
cvs.texi(,5920) classify a file in a number of states.  The states, as
cvs.texi(,5921) reported by the @code{status} command, are:
cvs.texi(,5922) 
cvs.texi(,5923) @c The order of items is chosen to group logically
cvs.texi(,5924) @c similar outputs together.
cvs.texi(,5925) @c People who want alphabetical can use the index...
cvs.texi(,5926) @table @asis
cvs.texi(,5927) @cindex Up-to-date
cvs.texi(,5928) @item Up-to-date
cvs.texi(,5929) The file is identical with the latest revision in the
cvs.texi(,5930) repository for the branch in use.
cvs.texi(,5931) @c FIXME: should we clarify "in use"?  The answer is
cvs.texi(,5932) @c sticky tags, and trying to distinguish branch sticky
cvs.texi(,5933) @c tags from non-branch sticky tags seems rather awkward
cvs.texi(,5934) @c here.
cvs.texi(,5935) @c FIXME: What happens with non-branch sticky tags?  Is
cvs.texi(,5936) @c a stuck file "Up-to-date" or "Needs checkout" or what?
cvs.texi(,5937) 
cvs.texi(,5938) @item Locally Modified
cvs.texi(,5939) @cindex Locally Modified
cvs.texi(,5940) You have edited the file, and not yet committed your changes.
cvs.texi(,5941) 
cvs.texi(,5942) @item Locally Added
cvs.texi(,5943) @cindex Locally Added
cvs.texi(,5944) You have added the file with @code{add}, and not yet
cvs.texi(,5945) committed your changes.
cvs.texi(,5946) @c There are many cases involving the file being
cvs.texi(,5947) @c added/removed/modified in the working directory, and
cvs.texi(,5948) @c added/removed/modified in the repository, which we
cvs.texi(,5949) @c don't try to describe here.  I'm not sure that "cvs
cvs.texi(,5950) @c status" produces a non-confusing output in most of
cvs.texi(,5951) @c those cases.
cvs.texi(,5952) 
cvs.texi(,5953) @item Locally Removed
cvs.texi(,5954) @cindex Locally Removed
cvs.texi(,5955) You have removed the file with @code{remove}, and not yet
cvs.texi(,5956) committed your changes.
cvs.texi(,5957) 
cvs.texi(,5958) @item Needs Checkout
cvs.texi(,5959) @cindex Needs Checkout
cvs.texi(,5960) Someone else has committed a newer revision to the
cvs.texi(,5961) repository.  The name is slightly misleading; you will
cvs.texi(,5962) ordinarily use @code{update} rather than
cvs.texi(,5963) @code{checkout} to get that newer revision.
cvs.texi(,5964) 
cvs.texi(,5965) @item Needs Patch
cvs.texi(,5966) @cindex Needs Patch
cvs.texi(,5967) @c See also newb-123j0 in sanity.sh (although that case
cvs.texi(,5968) @c should probably be changed rather than documented).
cvs.texi(,5969) Like Needs Checkout, but the @sc{cvs} server will send
cvs.texi(,5970) a patch rather than the entire file.  Sending a patch or
cvs.texi(,5971) sending an entire file accomplishes the same thing.
cvs.texi(,5972) 
cvs.texi(,5973) @item Needs Merge
cvs.texi(,5974) @cindex Needs Merge
cvs.texi(,5975) Someone else has committed a newer revision to the repository, and you
cvs.texi(,5976) have also made modifications to the file.
cvs.texi(,5977) 
cvs.texi(,5978) @item Unresolved Conflict
cvs.texi(,5979) @cindex Unresolved Conflict
cvs.texi(,5980) @c FIXCVS - This file status needs to be changed to some more informative
cvs.texi(,5981) @c text that distinguishes it more clearly from each of the Locally Added,
cvs.texi(,5982) @c File had conflicts on merge, and Unknown status types, but an exact and
cvs.texi(,5983) @c succinct wording escapes me at the moment.
cvs.texi(,5984) A file with the same name as this new file has been added to the repository
cvs.texi(,5985) from a second workspace.  This file will need to be moved out of the way
cvs.texi(,5986) to allow an @code{update} to complete.
cvs.texi(,5987) 
cvs.texi(,5988) @item File had conflicts on merge
cvs.texi(,5989) @cindex File had conflicts on merge
cvs.texi(,5990) @c is it worth saying that this message was "Unresolved
cvs.texi(,5991) @c Conflict" in CVS 1.9 and earlier?  I'm inclined to
cvs.texi(,5992) @c think that is unnecessarily confusing to new users.
cvs.texi(,5993) This is like Locally Modified, except that a previous
cvs.texi(,5994) @code{update} command gave a conflict.  If you have not
cvs.texi(,5995) already done so, you need to
cvs.texi(,5996) resolve the conflict as described in @ref{Conflicts example}.
cvs.texi(,5997) 
cvs.texi(,5998) @item Unknown
cvs.texi(,5999) @cindex Unknown
cvs.texi(,6000) @sc{cvs} doesn't know anything about this file.  For
cvs.texi(,6001) example, you have created a new file and have not run
cvs.texi(,6002) @code{add}.
cvs.texi(,6003) @c
cvs.texi(,6004) @c "Entry Invalid" and "Classify Error" are also in the
cvs.texi(,6005) @c status.c.  The latter definitely indicates a CVS bug
cvs.texi(,6006) @c (should it be worded more like "internal error" so
cvs.texi(,6007) @c people submit bug reports if they see it?).  The former
cvs.texi(,6008) @c I'm not as sure; I haven't tracked down whether/when it
cvs.texi(,6009) @c appears in "cvs status" output.
cvs.texi(,6010) 
cvs.texi(,6011) @end table
cvs.texi(,6012) 
cvs.texi(,6013) To help clarify the file status, @code{status} also
cvs.texi(,6014) reports the @code{Working revision} which is the
cvs.texi(,6015) revision that the file in the working directory derives
cvs.texi(,6016) from, and the @code{Repository revision} which is the
cvs.texi(,6017) latest revision in the repository for the branch in
cvs.texi(,6018) use.
cvs.texi(,6019) @c FIXME: should we clarify "in use"?  The answer is
cvs.texi(,6020) @c sticky tags, and trying to distinguish branch sticky
cvs.texi(,6021) @c tags from non-branch sticky tags seems rather awkward
cvs.texi(,6022) @c here.
cvs.texi(,6023) @c FIXME: What happens with non-branch sticky tags?
cvs.texi(,6024) @c What is the Repository Revision there?  See the
cvs.texi(,6025) @c comment at vn_rcs in cvs.h, which is kind of
cvs.texi(,6026) @c confused--we really need to document better what this
cvs.texi(,6027) @c field contains.
cvs.texi(,6028) @c Q: Should we document "New file!" and other such
cvs.texi(,6029) @c outputs or are they self-explanatory?
cvs.texi(,6030) @c FIXME: what about the date to the right of "Working
cvs.texi(,6031) @c revision"?  It doesn't appear with client/server and
cvs.texi(,6032) @c seems unnecessary (redundant with "ls -l") so
cvs.texi(,6033) @c perhaps it should be removed for non-client/server too?
cvs.texi(,6034) @c FIXME: Need some examples.
cvs.texi(,6035) @c FIXME: Working revision can also be something like
cvs.texi(,6036) @c "-1.3" for a locally removed file.  Not at all
cvs.texi(,6037) @c self-explanatory (and it is possible that CVS should
cvs.texi(,6038) @c be changed rather than documenting this).
cvs.texi(,6039) 
cvs.texi(,6040) @c Would be nice to have an @example showing output
cvs.texi(,6041) @c from cvs status, with comments showing the xref
cvs.texi(,6042) @c where each part of the output is described.  This
cvs.texi(,6043) @c might fit in nicely if it is desirable to split this
cvs.texi(,6044) @c node in two; one to introduce "cvs status" and one
cvs.texi(,6045) @c to list each of the states.
cvs.texi(,6046) The options to @code{status} are listed in
cvs.texi(,6047) @ref{Invoking CVS}.  For information on its @code{Sticky tag}
cvs.texi(,6048) and @code{Sticky date} output, see @ref{Sticky tags}.
cvs.texi(,6049) For information on its @code{Sticky options} output,
cvs.texi(,6050) see the @samp{-k} option in @ref{update options}.
cvs.texi(,6051) 
cvs.texi(,6052) You can think of the @code{status} and @code{update}
cvs.texi(,6053) commands as somewhat complementary.  You use
cvs.texi(,6054) @code{update} to bring your files up to date, and you
cvs.texi(,6055) can use @code{status} to give you some idea of what an
cvs.texi(,6056) @code{update} would do (of course, the state of the
cvs.texi(,6057) repository might change before you actually run
cvs.texi(,6058) @code{update}).  In fact, if you want a command to
cvs.texi(,6059) display file status in a more brief format than is
cvs.texi(,6060) displayed by the @code{status} command, you can invoke
cvs.texi(,6061) 
cvs.texi(,6062) @cindex update, to display file status
cvs.texi(,6063) @example
cvs.texi(,6064) $ cvs -n -q update
cvs.texi(,6065) @end example
cvs.texi(,6066) 
cvs.texi(,6067) The @samp{-n} option means to not actually do the
cvs.texi(,6068) update, but merely to display statuses; the @samp{-q}
cvs.texi(,6069) option avoids printing the name of each directory.  For
cvs.texi(,6070) more information on the @code{update} command, and
cvs.texi(,6071) these options, see @ref{Invoking CVS}.
cvs.texi(,6072) 
cvs.texi(,6073) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,6074) @node Updating a file
cvs.texi(,6075) @section Bringing a file up to date
cvs.texi(,6076) @cindex Bringing a file up to date
cvs.texi(,6077) @cindex Updating a file
cvs.texi(,6078) @cindex Merging a file
cvs.texi(,6079) @cindex Update, introduction
cvs.texi(,6080) 
cvs.texi(,6081) When you want to update or merge a file, use the @code{update}
cvs.texi(,6082) command.  For files that are not up to date this is roughly equivalent
cvs.texi(,6083) to a @code{checkout} command: the newest revision of the file is
cvs.texi(,6084) extracted from the repository and put in your working directory.
cvs.texi(,6085) 
cvs.texi(,6086) Your modifications to a file are never lost when you
cvs.texi(,6087) use @code{update}.  If no newer revision exists,
cvs.texi(,6088) running @code{update} has no effect.  If you have
cvs.texi(,6089) edited the file, and a newer revision is available,
cvs.texi(,6090) @sc{cvs} will merge all changes into your working copy.
cvs.texi(,6091) 
cvs.texi(,6092) For instance, imagine that you checked out revision 1.4 and started
cvs.texi(,6093) editing it.  In the meantime someone else committed revision 1.5, and
cvs.texi(,6094) shortly after that revision 1.6.  If you run @code{update} on the file
cvs.texi(,6095) now, @sc{cvs} will incorporate all changes between revision 1.4 and 1.6 into
cvs.texi(,6096) your file.
cvs.texi(,6097) 
cvs.texi(,6098) @cindex Overlap
cvs.texi(,6099) If any of the changes between 1.4 and 1.6 were made too
cvs.texi(,6100) close to any of the changes you have made, an
cvs.texi(,6101) @dfn{overlap} occurs.  In such cases a warning is
cvs.texi(,6102) printed, and the resulting file includes both
cvs.texi(,6103) versions of the lines that overlap, delimited by
cvs.texi(,6104) special markers.
cvs.texi(,6105) @xref{update}, for a complete description of the
cvs.texi(,6106) @code{update} command.
cvs.texi(,6107) 
cvs.texi(,6108) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,6109) @node Conflicts example
cvs.texi(,6110) @section Conflicts example
cvs.texi(,6111) @cindex Merge, an example
cvs.texi(,6112) @cindex Example of merge
cvs.texi(,6113) @cindex driver.c (merge example)
cvs.texi(,6114) 
cvs.texi(,6115) Suppose revision 1.4 of @file{driver.c} contains this:
cvs.texi(,6116) 
cvs.texi(,6117) @example
cvs.texi(,6118) #include <stdio.h>
cvs.texi(,6119) 
cvs.texi(,6120) void main()
cvs.texi(,6121) @{
cvs.texi(,6122)     parse();
cvs.texi(,6123)     if (nerr == 0)
cvs.texi(,6124)         gencode();
cvs.texi(,6125)     else
cvs.texi(,6126)         fprintf(stderr, "No code generated.\n");
cvs.texi(,6127)     exit(nerr == 0 ? 0 : 1);
cvs.texi(,6128) @}
cvs.texi(,6129) @end example
cvs.texi(,6130) 
cvs.texi(,6131) @noindent
cvs.texi(,6132) Revision 1.6 of @file{driver.c} contains this:
cvs.texi(,6133) 
cvs.texi(,6134) @example
cvs.texi(,6135) #include <stdio.h>
cvs.texi(,6136) 
cvs.texi(,6137) int main(int argc,
cvs.texi(,6138)          char **argv)
cvs.texi(,6139) @{
cvs.texi(,6140)     parse();
cvs.texi(,6141)     if (argc != 1)
cvs.texi(,6142)     @{
cvs.texi(,6143)         fprintf(stderr, "tc: No args expected.\n");
cvs.texi(,6144)         exit(1);
cvs.texi(,6145)     @}
cvs.texi(,6146)     if (nerr == 0)
cvs.texi(,6147)         gencode();
cvs.texi(,6148)     else
cvs.texi(,6149)         fprintf(stderr, "No code generated.\n");
cvs.texi(,6150)     exit(!!nerr);
cvs.texi(,6151) @}
cvs.texi(,6152) @end example
cvs.texi(,6153) 
cvs.texi(,6154) @noindent
cvs.texi(,6155) Your working copy of @file{driver.c}, based on revision
cvs.texi(,6156) 1.4, contains this before you run @samp{cvs update}:
cvs.texi(,6157) @c -- Really include "cvs"?
cvs.texi(,6158) 
cvs.texi(,6159) @example
cvs.texi(,6160) #include <stdlib.h>
cvs.texi(,6161) #include <stdio.h>
cvs.texi(,6162) 
cvs.texi(,6163) void main()
cvs.texi(,6164) @{
cvs.texi(,6165)     init_scanner();
cvs.texi(,6166)     parse();
cvs.texi(,6167)     if (nerr == 0)
cvs.texi(,6168)         gencode();
cvs.texi(,6169)     else
cvs.texi(,6170)         fprintf(stderr, "No code generated.\n");
cvs.texi(,6171)     exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
cvs.texi(,6172) @}
cvs.texi(,6173) @end example
cvs.texi(,6174) 
cvs.texi(,6175) @noindent
cvs.texi(,6176) You run @samp{cvs update}:
cvs.texi(,6177) @c -- Really include "cvs"?
cvs.texi(,6178) 
cvs.texi(,6179) @example
cvs.texi(,6180) $ cvs update driver.c
cvs.texi(,6181) RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
cvs.texi(,6182) retrieving revision 1.4
cvs.texi(,6183) retrieving revision 1.6
cvs.texi(,6184) Merging differences between 1.4 and 1.6 into driver.c
cvs.texi(,6185) rcsmerge warning: overlaps during merge
cvs.texi(,6186) cvs update: conflicts found in driver.c
cvs.texi(,6187) C driver.c
cvs.texi(,6188) @end example
cvs.texi(,6189) 
cvs.texi(,6190) @noindent
cvs.texi(,6191) @cindex Conflicts (merge example)
cvs.texi(,6192) @sc{cvs} tells you that there were some conflicts.
cvs.texi(,6193) Your original working file is saved unmodified in
cvs.texi(,6194) @file{.#driver.c.1.4}.  The new version of
cvs.texi(,6195) @file{driver.c} contains this:
cvs.texi(,6196) 
cvs.texi(,6197) @example
cvs.texi(,6198) #include <stdlib.h>
cvs.texi(,6199) #include <stdio.h>
cvs.texi(,6200) 
cvs.texi(,6201) int main(int argc,
cvs.texi(,6202)          char **argv)
cvs.texi(,6203) @{
cvs.texi(,6204)     init_scanner();
cvs.texi(,6205)     parse();
cvs.texi(,6206)     if (argc != 1)
cvs.texi(,6207)     @{
cvs.texi(,6208)         fprintf(stderr, "tc: No args expected.\n");
cvs.texi(,6209)         exit(1);
cvs.texi(,6210)     @}
cvs.texi(,6211)     if (nerr == 0)
cvs.texi(,6212)         gencode();
cvs.texi(,6213)     else
cvs.texi(,6214)         fprintf(stderr, "No code generated.\n");
cvs.texi(,6215) @asis{}<<<<<<< driver.c
cvs.texi(,6216)     exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
cvs.texi(,6217) @asis{}=======
cvs.texi(,6218)     exit(!!nerr);
cvs.texi(,6219) @asis{}>>>>>>> 1.6
cvs.texi(,6220) @}
cvs.texi(,6221) @end example
cvs.texi(,6222) 
cvs.texi(,6223) @noindent
cvs.texi(,6224) @cindex Markers, conflict
cvs.texi(,6225) @cindex Conflict markers
cvs.texi(,6226) @cindex <<<<<<<
cvs.texi(,6227) @cindex >>>>>>>
cvs.texi(,6228) @cindex =======
cvs.texi(,6229) 
cvs.texi(,6230) Note how all non-overlapping modifications are incorporated in your working
cvs.texi(,6231) copy, and that the overlapping section is clearly marked with
cvs.texi(,6232) @samp{<<<<<<<}, @samp{=======} and @samp{>>>>>>>}.
cvs.texi(,6233) 
cvs.texi(,6234) @cindex Resolving a conflict
cvs.texi(,6235) @cindex Conflict resolution
cvs.texi(,6236) You resolve the conflict by editing the file, removing the markers and
cvs.texi(,6237) the erroneous line.  Suppose you end up with this file:
cvs.texi(,6238) @c -- Add xref to the pcl-cvs manual when it talks
cvs.texi(,6239) @c -- about this.
cvs.texi(,6240) @example
cvs.texi(,6241) #include <stdlib.h>
cvs.texi(,6242) #include <stdio.h>
cvs.texi(,6243) 
cvs.texi(,6244) int main(int argc,
cvs.texi(,6245)          char **argv)
cvs.texi(,6246) @{
cvs.texi(,6247)     init_scanner();
cvs.texi(,6248)     parse();
cvs.texi(,6249)     if (argc != 1)
cvs.texi(,6250)     @{
cvs.texi(,6251)         fprintf(stderr, "tc: No args expected.\n");
cvs.texi(,6252)         exit(1);
cvs.texi(,6253)     @}
cvs.texi(,6254)     if (nerr == 0)
cvs.texi(,6255)         gencode();
cvs.texi(,6256)     else
cvs.texi(,6257)         fprintf(stderr, "No code generated.\n");
cvs.texi(,6258)     exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
cvs.texi(,6259) @}
cvs.texi(,6260) @end example
cvs.texi(,6261) 
cvs.texi(,6262) @noindent
cvs.texi(,6263) You can now go ahead and commit this as revision 1.7.
cvs.texi(,6264) 
cvs.texi(,6265) @example
cvs.texi(,6266) $ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c
cvs.texi(,6267) Checking in driver.c;
cvs.texi(,6268) /usr/local/cvsroot/yoyodyne/tc/driver.c,v  <--  driver.c
cvs.texi(,6269) new revision: 1.7; previous revision: 1.6
cvs.texi(,6270) done
cvs.texi(,6271) @end example
cvs.texi(,6272) 
cvs.texi(,6273) For your protection, @sc{cvs} will refuse to check in a
cvs.texi(,6274) file if a conflict occurred and you have not resolved
cvs.texi(,6275) the conflict.  Currently to resolve a conflict, you
cvs.texi(,6276) must change the timestamp on the file.  In previous
cvs.texi(,6277) versions of @sc{cvs}, you also needed to
cvs.texi(,6278) insure that the file contains no conflict markers.
cvs.texi(,6279) Because
cvs.texi(,6280) your file may legitimately contain conflict markers (that
cvs.texi(,6281) is, occurrences of @samp{>>>>>>> } at the start of a
cvs.texi(,6282) line that don't mark a conflict), the current
cvs.texi(,6283) version of @sc{cvs} will print a warning and proceed to
cvs.texi(,6284) check in the file.
cvs.texi(,6285) @c The old behavior was really icky; the only way out
cvs.texi(,6286) @c was to start hacking on
cvs.texi(,6287) @c the @code{CVS/Entries} file or other such workarounds.
cvs.texi(,6288) @c
cvs.texi(,6289) @c If the timestamp thing isn't considered nice enough,
cvs.texi(,6290) @c maybe there should be a "cvs resolved" command
cvs.texi(,6291) @c which clears the conflict indication.  For a nice user
cvs.texi(,6292) @c interface, this should be invoked by an interactive
cvs.texi(,6293) @c merge tool like emerge rather than by the user
cvs.texi(,6294) @c directly--such a tool can verify that the user has
cvs.texi(,6295) @c really dealt with each conflict.
cvs.texi(,6296) 
cvs.texi(,6297) @cindex emerge
cvs.texi(,6298) If you use release 1.04 or later of pcl-cvs (a @sc{gnu}
cvs.texi(,6299) Emacs front-end for @sc{cvs}) you can use an Emacs
cvs.texi(,6300) package called emerge to help you resolve conflicts.
cvs.texi(,6301) See the documentation for pcl-cvs.
cvs.texi(,6302) 
cvs.texi(,6303) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,6304) @node Informing others
cvs.texi(,6305) @section Informing others about commits
cvs.texi(,6306) @cindex Informing others
cvs.texi(,6307) @cindex Spreading information
cvs.texi(,6308) @cindex Mail, automatic mail on commit
cvs.texi(,6309) 
cvs.texi(,6310) It is often useful to inform others when you commit a
cvs.texi(,6311) new revision of a file.  The @samp{-i} option of the
cvs.texi(,6312) @file{modules} file, or the @file{loginfo} file, can be
cvs.texi(,6313) used to automate this process.  @xref{modules}.
cvs.texi(,6314) @xref{loginfo}.  You can use these features of @sc{cvs}
cvs.texi(,6315) to, for instance, instruct @sc{cvs} to mail a
cvs.texi(,6316) message to all developers, or post a message to a local
cvs.texi(,6317) newsgroup.
cvs.texi(,6318) @c -- More text would be nice here.
cvs.texi(,6319) 
cvs.texi(,6320) @node Concurrency
cvs.texi(,6321) @section Several developers simultaneously attempting to run CVS
cvs.texi(,6322) 
cvs.texi(,6323) @cindex Locks, cvs, introduction
cvs.texi(,6324) @c For a discussion of *why* CVS creates locks, see
cvs.texi(,6325) @c the comment at the start of src/lock.c
cvs.texi(,6326) If several developers try to run @sc{cvs} at the same
cvs.texi(,6327) time, one may get the following message:
cvs.texi(,6328) 
cvs.texi(,6329) @example
cvs.texi(,6330) [11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo
cvs.texi(,6331) @end example
cvs.texi(,6332) 
cvs.texi(,6333) @cindex #cvs.rfl, removing
cvs.texi(,6334) @cindex #cvs.wfl, removing
cvs.texi(,6335) @cindex #cvs.lock, removing
cvs.texi(,6336) @sc{cvs} will try again every 30 seconds, and either
cvs.texi(,6337) continue with the operation or print the message again,
cvs.texi(,6338) if it still needs to wait.  If a lock seems to stick
cvs.texi(,6339) around for an undue amount of time, find the person
cvs.texi(,6340) holding the lock and ask them about the cvs command
cvs.texi(,6341) they are running.  If they aren't running a cvs
cvs.texi(,6342) command, look in the repository directory mentioned in
cvs.texi(,6343) the message and remove files which they own whose names
cvs.texi(,6344) start with @file{#cvs.rfl},
cvs.texi(,6345) @file{#cvs.wfl}, or @file{#cvs.lock}.
cvs.texi(,6346) 
cvs.texi(,6347) Note that these locks are to protect @sc{cvs}'s
cvs.texi(,6348) internal data structures and have no relationship to
cvs.texi(,6349) the word @dfn{lock} in the sense used by
cvs.texi(,6350) @sc{rcs}---which refers to reserved checkouts
cvs.texi(,6351) (@pxref{Multiple developers}).
cvs.texi(,6352) 
cvs.texi(,6353) Any number of people can be reading from a given
cvs.texi(,6354) repository at a time; only when someone is writing do
cvs.texi(,6355) the locks prevent other people from reading or writing.
cvs.texi(,6356) 
cvs.texi(,6357) @cindex Atomic transactions, lack of
cvs.texi(,6358) @cindex Transactions, atomic, lack of
cvs.texi(,6359) @c the following talks about what one might call commit/update
cvs.texi(,6360) @c atomicity.
cvs.texi(,6361) @c Probably also should say something about
cvs.texi(,6362) @c commit/commit atomicity, that is, "An update will
cvs.texi(,6363) @c not get partial versions of more than one commit".
cvs.texi(,6364) @c CVS currently has this property and I guess we can
cvs.texi(,6365) @c make it a documented feature.
cvs.texi(,6366) @c For example one person commits
cvs.texi(,6367) @c a/one.c and b/four.c and another commits a/two.c and
cvs.texi(,6368) @c b/three.c.  Then an update cannot get the new a/one.c
cvs.texi(,6369) @c and a/two.c and the old b/four.c and b/three.c.
cvs.texi(,6370) One might hope for the following property:
cvs.texi(,6371) 
cvs.texi(,6372) @quotation
cvs.texi(,6373) If someone commits some changes in one cvs command,
cvs.texi(,6374) then an update by someone else will either get all the
cvs.texi(,6375) changes, or none of them.
cvs.texi(,6376) @end quotation
cvs.texi(,6377) 
cvs.texi(,6378) @noindent
cvs.texi(,6379) but @sc{cvs} does @emph{not} have this property.  For
cvs.texi(,6380) example, given the files
cvs.texi(,6381) 
cvs.texi(,6382) @example
cvs.texi(,6383) a/one.c
cvs.texi(,6384) a/two.c
cvs.texi(,6385) b/three.c
cvs.texi(,6386) b/four.c
cvs.texi(,6387) @end example
cvs.texi(,6388) 
cvs.texi(,6389) @noindent
cvs.texi(,6390) if someone runs
cvs.texi(,6391) 
cvs.texi(,6392) @example
cvs.texi(,6393) cvs ci a/two.c b/three.c
cvs.texi(,6394) @end example
cvs.texi(,6395) 
cvs.texi(,6396) @noindent
cvs.texi(,6397) and someone else runs @code{cvs update} at the same
cvs.texi(,6398) time, the person running @code{update} might get only
cvs.texi(,6399) the change to @file{b/three.c} and not the change to
cvs.texi(,6400) @file{a/two.c}.
cvs.texi(,6401) 
cvs.texi(,6402) @node Watches
cvs.texi(,6403) @section Mechanisms to track who is editing files
cvs.texi(,6404) @cindex Watches
cvs.texi(,6405) 
cvs.texi(,6406) For many groups, use of @sc{cvs} in its default mode is
cvs.texi(,6407) perfectly satisfactory.  Users may sometimes go to
cvs.texi(,6408) check in a modification only to find that another
cvs.texi(,6409) modification has intervened, but they deal with it and
cvs.texi(,6410) proceed with their check in.  Other groups prefer to be
cvs.texi(,6411) able to know who is editing what files, so that if two
cvs.texi(,6412) people try to edit the same file they can choose to
cvs.texi(,6413) talk about who is doing what when rather than be
cvs.texi(,6414) surprised at check in time.  The features in this
cvs.texi(,6415) section allow such coordination, while retaining the
cvs.texi(,6416) ability of two developers to edit the same file at the
cvs.texi(,6417) same time.
cvs.texi(,6418) 
cvs.texi(,6419) @c Some people might ask why CVS does not enforce the
cvs.texi(,6420) @c rule on chmod, by requiring a cvs edit before a cvs
cvs.texi(,6421) @c commit.  The main reason is that it could always be
cvs.texi(,6422) @c circumvented--one could edit the file, and
cvs.texi(,6423) @c then when ready to check it in, do the cvs edit and put
cvs.texi(,6424) @c in the new contents and do the cvs commit.  One
cvs.texi(,6425) @c implementation note: if we _do_ want to have cvs commit
cvs.texi(,6426) @c require a cvs edit, we should store the state on
cvs.texi(,6427) @c whether the cvs edit has occurred in the working
cvs.texi(,6428) @c directory, rather than having the server try to keep
cvs.texi(,6429) @c track of what working directories exist.
cvs.texi(,6430) @c FIXME: should the above discussion be part of the
cvs.texi(,6431) @c manual proper, somewhere, not just in a comment?
cvs.texi(,6432) For maximum benefit developers should use @code{cvs
cvs.texi(,6433) edit} (not @code{chmod}) to make files read-write to
cvs.texi(,6434) edit them, and @code{cvs release} (not @code{rm}) to
cvs.texi(,6435) discard a working directory which is no longer in use,
cvs.texi(,6436) but @sc{cvs} is not able to enforce this behavior.
cvs.texi(,6437) 
cvs.texi(,6438) @c I'm a little dissatisfied with this presentation,
cvs.texi(,6439) @c because "watch on"/"edit"/"editors" are one set of
cvs.texi(,6440) @c functionality, and "watch add"/"watchers" is another
cvs.texi(,6441) @c which is somewhat orthogonal even though they interact in
cvs.texi(,6442) @c various ways.  But I think it might be
cvs.texi(,6443) @c confusing to describe them separately (e.g. "watch
cvs.texi(,6444) @c add" with loginfo).  I don't know.
cvs.texi(,6445) 
cvs.texi(,6446) @menu
cvs.texi(,6447) * Setting a watch::             Telling CVS to watch certain files
cvs.texi(,6448) * Getting Notified::            Telling CVS to notify you
cvs.texi(,6449) * Editing files::               How to edit a file which is being watched
cvs.texi(,6450) * Watch information::           Information about who is watching and editing
cvs.texi(,6451) * Watches Compatibility::       Watches interact poorly with CVS 1.6 or earlier
cvs.texi(,6452) @end menu
cvs.texi(,6453) 
cvs.texi(,6454) @node Setting a watch
cvs.texi(,6455) @subsection Telling CVS to watch certain files
cvs.texi(,6456) 
cvs.texi(,6457) To enable the watch features, you first specify that
cvs.texi(,6458) certain files are to be watched.
cvs.texi(,6459) 
cvs.texi(,6460) @cindex watch on (subcommand)
cvs.texi(,6461) @deffn Command {cvs watch on} [@code{-lR}] [@var{files}]@dots{}
cvs.texi(,6462) 
cvs.texi(,6463) @cindex Read-only files, and watches
cvs.texi(,6464) Specify that developers should run @code{cvs edit}
cvs.texi(,6465) before editing @var{files}.  @sc{cvs} will create working
cvs.texi(,6466) copies of @var{files} read-only, to remind developers
cvs.texi(,6467) to run the @code{cvs edit} command before working on
cvs.texi(,6468) them.
cvs.texi(,6469) 
cvs.texi(,6470) If @var{files} includes the name of a directory, @sc{cvs}
cvs.texi(,6471) arranges to watch all files added to the corresponding
cvs.texi(,6472) repository directory, and sets a default for files
cvs.texi(,6473) added in the future; this allows the user to set
cvs.texi(,6474) notification policies on a per-directory basis.  The
cvs.texi(,6475) contents of the directory are processed recursively,
cvs.texi(,6476) unless the @code{-l} option is given.
cvs.texi(,6477) The @code{-R} option can be used to force recursion if the @code{-l}
cvs.texi(,6478) option is set in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
cvs.texi(,6479) 
cvs.texi(,6480) If @var{files} is omitted, it defaults to the current directory.
cvs.texi(,6481) 
cvs.texi(,6482) @cindex watch off (subcommand)
cvs.texi(,6483) @end deffn
cvs.texi(,6484) 
cvs.texi(,6485) @deffn Command {cvs watch off} [@code{-lR}] [@var{files}]@dots{}
cvs.texi(,6486) 
cvs.texi(,6487) Do not create @var{files} read-only on checkout; thus,
cvs.texi(,6488) developers will not be reminded to use @code{cvs edit}
cvs.texi(,6489) and @code{cvs unedit}.
cvs.texi(,6497) 
cvs.texi(,6498) The @var{files} and options are processed as for @code{cvs
cvs.texi(,6499) watch on}.
cvs.texi(,6500) 
cvs.texi(,6501) @end deffn
cvs.texi(,6502) 
cvs.texi(,6503) @node Getting Notified
cvs.texi(,6504) @subsection Telling CVS to notify you
cvs.texi(,6505) 
cvs.texi(,6506) You can tell @sc{cvs} that you want to receive
cvs.texi(,6507) notifications about various actions taken on a file.
cvs.texi(,6508) You can do this without using @code{cvs watch on} for
cvs.texi(,6509) the file, but generally you will want to use @code{cvs
cvs.texi(,6510) watch on}, to remind developers to use the @code{cvs edit}
cvs.texi(,6511) command.
cvs.texi(,6512) 
cvs.texi(,6513) @cindex watch add (subcommand)
cvs.texi(,6514) @deffn Command {cvs watch add} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{}
cvs.texi(,6515) 
cvs.texi(,6516) Add the current user to the list of people to receive notification of
cvs.texi(,6517) work done on @var{files}.
cvs.texi(,6518) 
cvs.texi(,6519) The @code{-a} option specifies what kinds of events @sc{cvs} should notify
cvs.texi(,6520) the user about.  @var{action} is one of the following:
cvs.texi(,6521) 
cvs.texi(,6522) @table @code
cvs.texi(,6523) 
cvs.texi(,6524) @item edit
cvs.texi(,6525) Another user has applied the @code{cvs edit} command (described
cvs.texi(,6526) below) to a watched file.
cvs.texi(,6527) 
cvs.texi(,6528) @item commit
cvs.texi(,6529) Another user has committed changes to one of the named @var{files}.
cvs.texi(,6530) 
cvs.texi(,6531) @item unedit
cvs.texi(,6532) Another user has abandoned editing a file (other than by committing changes).
cvs.texi(,6533) They can do this in several ways, by:
cvs.texi(,6534) 
cvs.texi(,6535) @itemize @bullet
cvs.texi(,6536) 
cvs.texi(,6537) @item
cvs.texi(,6538) applying the @code{cvs unedit} command (described below) to the file
cvs.texi(,6539) 
cvs.texi(,6540) @item
cvs.texi(,6541) applying the @code{cvs release} command (@pxref{release}) to the file's parent directory
cvs.texi(,6542) (or recursively to a directory more than one level up)
cvs.texi(,6543) 
cvs.texi(,6544) @item
cvs.texi(,6545) deleting the file and allowing @code{cvs update} to recreate it
cvs.texi(,6546) 
cvs.texi(,6547) @end itemize
cvs.texi(,6548) 
cvs.texi(,6549) @item all
cvs.texi(,6550) All of the above.
cvs.texi(,6551) 
cvs.texi(,6552) @item none
cvs.texi(,6553) None of the above.  (This is useful with @code{cvs edit},
cvs.texi(,6554) described below.)
cvs.texi(,6555) 
cvs.texi(,6556) @end table
cvs.texi(,6557) 
cvs.texi(,6558) The @code{-a} option may appear more than once, or not at all.  If
cvs.texi(,6559) omitted, the action defaults to @code{all}.
cvs.texi(,6560) 
cvs.texi(,6561) The @var{files} and options are processed as for
cvs.texi(,6562) @code{cvs watch on}.
cvs.texi(,6563) 
cvs.texi(,6564) @end deffn
cvs.texi(,6565) 
cvs.texi(,6566) 
cvs.texi(,6567) @cindex watch remove (subcommand)
cvs.texi(,6568) @deffn Command {cvs watch remove} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{}
cvs.texi(,6569) 
cvs.texi(,6570) Remove a notification request established using @code{cvs watch add};
cvs.texi(,6571) the arguments are the same.  If the @code{-a} option is present, only
cvs.texi(,6572) watches for the specified actions are removed.
cvs.texi(,6573) 
cvs.texi(,6574) @end deffn
cvs.texi(,6575) 
cvs.texi(,6576) @cindex notify (admin file)
cvs.texi(,6577) When the conditions exist for notification, @sc{cvs}
cvs.texi(,6578) calls the @file{notify} administrative file.  Edit
cvs.texi(,6579) @file{notify} as one edits the other administrative
cvs.texi(,6580) files (@pxref{Intro administrative files}).  This
cvs.texi(,6581) file follows the usual conventions for administrative
cvs.texi(,6582) files (@pxref{syntax}), where each line is a regular
cvs.texi(,6583) expression followed by a command to execute.  The
cvs.texi(,6584) command should contain a single occurrence of @samp{%s}
cvs.texi(,6585) which will be replaced by the user to notify; the rest
cvs.texi(,6586) of the information regarding the notification will be
cvs.texi(,6587) supplied to the command on standard input.  The
cvs.texi(,6588) standard thing to put in the @code{notify} file is the
cvs.texi(,6589) single line:
cvs.texi(,6590) 
cvs.texi(,6591) @example
cvs.texi(,6592) ALL mail %s -s "CVS notification"
cvs.texi(,6593) @end example
cvs.texi(,6594) 
cvs.texi(,6595) @noindent
cvs.texi(,6596) This causes users to be notified by electronic mail.
cvs.texi(,6597) @c FIXME: should it be this hard to set up this
cvs.texi(,6598) @c behavior (and the result when one fails to do so,
cvs.texi(,6599) @c silent failure to notify, so non-obvious)?  Should
cvs.texi(,6600) @c CVS give a warning if no line in notify matches (and
cvs.texi(,6601) @c document the use of "DEFAULT :" for the case where
cvs.texi(,6602) @c skipping the notification is indeed desired)?
cvs.texi(,6603) 
cvs.texi(,6604) @cindex users (admin file)
cvs.texi(,6605) Note that if you set this up in the straightforward
cvs.texi(,6606) way, users receive notifications on the server machine.
cvs.texi(,6607) One could of course write a @file{notify} script which
cvs.texi(,6608) directed notifications elsewhere, but to make this
cvs.texi(,6609) easy, @sc{cvs} allows you to associate a notification
cvs.texi(,6610) address for each user.  To do so create a file
cvs.texi(,6611) @file{users} in @file{CVSROOT} with a line for each
cvs.texi(,6612) user in the format @var{user}:@var{value}.  Then
cvs.texi(,6613) instead of passing the name of the user to be notified
cvs.texi(,6614) to @file{notify}, @sc{cvs} will pass the @var{value}
cvs.texi(,6615) (normally an email address on some other machine).
cvs.texi(,6616) 
cvs.texi(,6617) @sc{cvs} does not notify you for your own changes.
cvs.texi(,6618) Currently this check is done based on whether the user
cvs.texi(,6619) name of the person taking the action which triggers
cvs.texi(,6620) notification matches the user name of the person
cvs.texi(,6621) getting notification.  In fact, in general, the watches
cvs.texi(,6622) features only track one edit by each user.  It probably
cvs.texi(,6623) would be more useful if watches tracked each working
cvs.texi(,6624) directory separately, so this behavior might be worth
cvs.texi(,6625) changing.
cvs.texi(,6626) @c "behavior might be worth changing" is an effort to
cvs.texi(,6627) @c point to future directions while also not promising
cvs.texi(,6628) @c that "they" (as in "why don't they fix CVS to....")
cvs.texi(,6629) @c will do this.
cvs.texi(,6630) @c one implementation issue is identifying whether a
cvs.texi(,6631) @c working directory is same or different.  Comparing
cvs.texi(,6632) @c pathnames/hostnames is hopeless, but having the server
cvs.texi(,6633) @c supply a serial number which the client stores in the
cvs.texi(,6634) @c CVS directory as a magic cookie should work.
cvs.texi(,6635) 
cvs.texi(,6636) @node Editing files
cvs.texi(,6637) @subsection How to edit a file which is being watched
cvs.texi(,6638) 
cvs.texi(,6639) @cindex Checkout, as term for getting ready to edit
cvs.texi(,6640) Since a file which is being watched is checked out
cvs.texi(,6641) read-only, you cannot simply edit it.  To make it
cvs.texi(,6642) read-write, and inform others that you are planning to
cvs.texi(,6643) edit it, use the @code{cvs edit} command.  Some systems
cvs.texi(,6644) call this a @dfn{checkout}, but @sc{cvs} uses that term
cvs.texi(,6645) for obtaining a copy of the sources (@pxref{Getting the
cvs.texi(,6646) source}), an operation which those systems call a
cvs.texi(,6647) @dfn{get} or a @dfn{fetch}.
cvs.texi(,6648) @c Issue to think about: should we transition CVS
cvs.texi(,6649) @c towards the "get" terminology?  "cvs get" is already a
cvs.texi(,6650) @c synonym for "cvs checkout" and that section of the
cvs.texi(,6651) @c manual refers to "Getting the source".  If this is
cvs.texi(,6652) @c done, needs to be done gingerly (for example, we should
cvs.texi(,6653) @c still accept "checkout" in .cvsrc files indefinitely
cvs.texi(,6654) @c even if the CVS's messages are changed from "cvs checkout: "
cvs.texi(,6655) @c to "cvs get: ").
cvs.texi(,6656) @c There is a concern about whether "get" is not as
cvs.texi(,6657) @c good for novices because it is a more general term
cvs.texi(,6658) @c than "checkout" (and thus arguably harder to assign
cvs.texi(,6659) @c a technical meaning for).
cvs.texi(,6660) 
cvs.texi(,6661) @cindex edit (subcommand)
cvs.texi(,6662) @deffn Command {cvs edit} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{}
cvs.texi(,6663) 
cvs.texi(,6664) Prepare to edit the working files @var{files}.  @sc{cvs} makes the
cvs.texi(,6665) @var{files} read-write, and notifies users who have requested
cvs.texi(,6666) @code{edit} notification for any of @var{files}.
cvs.texi(,6667) 
cvs.texi(,6668) The @code{cvs edit} command accepts the same options as the
cvs.texi(,6669) @code{cvs watch add} command, and establishes a temporary watch for the
cvs.texi(,6670) user on @var{files}; @sc{cvs} will remove the watch when @var{files} are
cvs.texi(,6671) @code{unedit}ed or @code{commit}ted.  If the user does not wish to
cvs.texi(,6672) receive notifications, she should specify @code{-a none}.
cvs.texi(,6673) 
cvs.texi(,6674) The @var{files} and the options are processed as for the @code{cvs
cvs.texi(,6675) watch} commands.
cvs.texi(,6676) 
cvs.texi(,6686) 
cvs.texi(,6687) @end deffn
cvs.texi(,6688) 
cvs.texi(,6689) Normally when you are done with a set of changes, you
cvs.texi(,6690) use the @code{cvs commit} command, which checks in your
cvs.texi(,6691) changes and returns the watched files to their usual
cvs.texi(,6692) read-only state.  But if you instead decide to abandon
cvs.texi(,6693) your changes, or not to make any changes, you can use
cvs.texi(,6694) the @code{cvs unedit} command.
cvs.texi(,6695) 
cvs.texi(,6696) @cindex unedit (subcommand)
cvs.texi(,6697) @cindex Abandoning work
cvs.texi(,6698) @cindex Reverting to repository version
cvs.texi(,6699) @deffn Command {cvs unedit} [@code{-lR}] [@var{files}]@dots{}
cvs.texi(,6700) 
cvs.texi(,6701) Abandon work on the working files @var{files}, and revert them to the
cvs.texi(,6702) repository versions on which they are based.  @sc{cvs} makes those
cvs.texi(,6703) @var{files} read-only for which users have requested notification using
cvs.texi(,6704) @code{cvs watch on}.  @sc{cvs} notifies users who have requested @code{unedit}
cvs.texi(,6705) notification for any of @var{files}.
cvs.texi(,6706) 
cvs.texi(,6707) The @var{files} and options are processed as for the
cvs.texi(,6708) @code{cvs watch} commands.
cvs.texi(,6709) 
cvs.texi(,6710) If watches are not in use, the @code{unedit} command
cvs.texi(,6711) probably does not work, and the way to revert to the
cvs.texi(,6712) repository version is with the command @code{cvs update -C file}
cvs.texi(,6713) (@pxref{update}).
cvs.texi(,6714) The meaning is
cvs.texi(,6715) not precisely the same; the latter may also
cvs.texi(,6716) bring in some changes which have been made in the
cvs.texi(,6717) repository since the last time you updated.
cvs.texi(,6718) @c It would be a useful enhancement to CVS to make
cvs.texi(,6719) @c unedit work in the non-watch case as well.
cvs.texi(,6720) @end deffn
cvs.texi(,6721) 
cvs.texi(,6722) When using client/server @sc{cvs}, you can use the
cvs.texi(,6723) @code{cvs edit} and @code{cvs unedit} commands even if
cvs.texi(,6724) @sc{cvs} is unable to successfully communicate with the
cvs.texi(,6725) server; the notifications will be sent upon the next
cvs.texi(,6726) successful @sc{cvs} command.
cvs.texi(,6727) 
cvs.texi(,6728) @node Watch information
cvs.texi(,6729) @subsection Information about who is watching and editing
cvs.texi(,6730) 
cvs.texi(,6731) @cindex watchers (subcommand)
cvs.texi(,6732) @deffn Command {cvs watchers} [@code{-lR}] [@var{files}]@dots{}
cvs.texi(,6733) 
cvs.texi(,6734) List the users currently watching changes to @var{files}.  The report
cvs.texi(,6735) includes the files being watched, and the mail address of each watcher.
cvs.texi(,6736) 
cvs.texi(,6737) The @var{files} and options are processed as for the
cvs.texi(,6738) @code{cvs watch} commands.
cvs.texi(,6739) 
cvs.texi(,6740) @end deffn
cvs.texi(,6741) 
cvs.texi(,6742) 
cvs.texi(,6743) @cindex editors (subcommand)
cvs.texi(,6744) @deffn Command {cvs editors} [@code{-lR}] [@var{files}]@dots{}
cvs.texi(,6745) 
cvs.texi(,6746) List the users currently working on @var{files}.  The report
cvs.texi(,6747) includes the mail address of each user, the time when the user began
cvs.texi(,6748) working with the file, and the host and path of the working directory
cvs.texi(,6749) containing the file.
cvs.texi(,6750) 
cvs.texi(,6751) The @var{files} and options are processed as for the
cvs.texi(,6752) @code{cvs watch} commands.
cvs.texi(,6753) 
cvs.texi(,6754) @end deffn
cvs.texi(,6755) 
cvs.texi(,6756) @node Watches Compatibility
cvs.texi(,6757) @subsection Using watches with old versions of CVS
cvs.texi(,6758) 
cvs.texi(,6759) @cindex CVS 1.6, and watches
cvs.texi(,6760) If you use the watch features on a repository, it
cvs.texi(,6761) creates @file{CVS} directories in the repository and
cvs.texi(,6762) stores the information about watches in that directory.
cvs.texi(,6763) If you attempt to use @sc{cvs} 1.6 or earlier with the
cvs.texi(,6764) repository, you get an error message such as the
cvs.texi(,6765) following (all on one line):
cvs.texi(,6766) 
cvs.texi(,6767) @example
cvs.texi(,6768) cvs update: cannot open CVS/Entries for reading:
cvs.texi(,6769) No such file or directory
cvs.texi(,6770) @end example
cvs.texi(,6771) 
cvs.texi(,6772) @noindent
cvs.texi(,6773) and your operation will likely be aborted.  To use the
cvs.texi(,6774) watch features, you must upgrade all copies of @sc{cvs}
cvs.texi(,6775) which use that repository in local or server mode.  If
cvs.texi(,6776) you cannot upgrade, use the @code{watch off} and
cvs.texi(,6777) @code{watch remove} commands to remove all watches, and
cvs.texi(,6778) that will restore the repository to a state which
cvs.texi(,6779) @sc{cvs} 1.6 can cope with.
cvs.texi(,6780) 
cvs.texi(,6781) @node Choosing a model
cvs.texi(,6782) @section Choosing between reserved or unreserved checkouts
cvs.texi(,6783) @cindex Choosing, reserved or unreserved checkouts
cvs.texi(,6784) 
cvs.texi(,6785) Reserved and unreserved checkouts each have pros and
cvs.texi(,6786) cons.  Let it be said that a lot of this is a matter of
cvs.texi(,6787) opinion or what works given different groups' working
cvs.texi(,6788) styles, but here is a brief description of some of the
cvs.texi(,6789) issues.  There are many ways to organize a team of
cvs.texi(,6790) developers.  @sc{cvs} does not try to enforce a certain
cvs.texi(,6791) organization.  It is a tool that can be used in several
cvs.texi(,6792) ways.
cvs.texi(,6793) 
cvs.texi(,6794) Reserved checkouts can be very counter-productive.  If
cvs.texi(,6795) two persons want to edit different parts of a file,
cvs.texi(,6796) there may be no reason to prevent either of them from
cvs.texi(,6797) doing so.  Also, it is common for someone to take out a
cvs.texi(,6798) lock on a file, because they are planning to edit it,
cvs.texi(,6799) but then forget to release the lock.
cvs.texi(,6800) 
cvs.texi(,6801) @c "many groups"?  specifics?  cites to papers on this?
cvs.texi(,6802) @c some way to weasel-word it a bit more so we don't
cvs.texi(,6803) @c need facts :-)?
cvs.texi(,6804) People, especially people who are familiar with
cvs.texi(,6805) reserved checkouts, often wonder how often conflicts
cvs.texi(,6806) occur if unreserved checkouts are used, and how
cvs.texi(,6807) difficult they are to resolve.  The experience with
cvs.texi(,6808) many groups is that they occur rarely and usually are
cvs.texi(,6809) relatively straightforward to resolve.
cvs.texi(,6810) 
cvs.texi(,6811) The rarity of serious conflicts may be surprising, until one realizes
cvs.texi(,6812) that they occur only when two developers disagree on the proper design
cvs.texi(,6813) for a given section of code; such a disagreement suggests that the
cvs.texi(,6814) team has not been communicating properly in the first place.  In order
cvs.texi(,6815) to collaborate under @emph{any} source management regimen, developers
cvs.texi(,6816) must agree on the general design of the system; given this agreement,
cvs.texi(,6817) overlapping changes are usually straightforward to merge.
cvs.texi(,6818) 
cvs.texi(,6819) In some cases unreserved checkouts are clearly
cvs.texi(,6820) inappropriate.  If no merge tool exists for the kind of
cvs.texi(,6821) file you are managing (for example word processor files
cvs.texi(,6822) or files edited by Computer Aided Design programs), and
cvs.texi(,6823) it is not desirable to change to a program which uses a
cvs.texi(,6824) mergeable data format, then resolving conflicts is
cvs.texi(,6825) going to be unpleasant enough that you generally will
cvs.texi(,6826) be better off to simply avoid the conflicts instead, by
cvs.texi(,6827) using reserved checkouts.
cvs.texi(,6828) 
cvs.texi(,6829) The watches features described above in @ref{Watches}
cvs.texi(,6830) can be considered to be an intermediate model between
cvs.texi(,6831) reserved checkouts and unreserved checkouts.  When you
cvs.texi(,6832) go to edit a file, it is possible to find out who else
cvs.texi(,6833) is editing it.  And rather than having the system
cvs.texi(,6834) simply forbid both people editing the file, it can tell
cvs.texi(,6835) you what the situation is and let you figure out
cvs.texi(,6836) whether it is a problem in that particular case or not.
cvs.texi(,6837) Therefore, for some groups it can be considered the
cvs.texi(,6838) best of both the reserved checkout and unreserved
cvs.texi(,6839) checkout worlds.
cvs.texi(,6840) 
cvs.texi(,6841) @c ---------------------------------------------------------------------
cvs.texi(,6842) @node Revision management
cvs.texi(,6843) @chapter Revision management
cvs.texi(,6844) @cindex Revision management
cvs.texi(,6845) 
cvs.texi(,6846) @c -- This chapter could be expanded a lot.
cvs.texi(,6847) @c -- Experiences are very welcome!
cvs.texi(,6848) 
cvs.texi(,6849) If you have read this far, you probably have a pretty
cvs.texi(,6850) good grasp on what @sc{cvs} can do for you.  This
cvs.texi(,6851) chapter talks a little about things that you still have
cvs.texi(,6852) to decide.
cvs.texi(,6853) 
cvs.texi(,6854) If you are doing development on your own using @sc{cvs}
cvs.texi(,6855) you could probably skip this chapter.  The questions
cvs.texi(,6856) this chapter takes up become more important when more
cvs.texi(,6857) than one person is working in a repository.
cvs.texi(,6858) 
cvs.texi(,6859) @menu
cvs.texi(,6860) * When to commit::              Some discussion on the subject
cvs.texi(,6861) @end menu
cvs.texi(,6862) 
cvs.texi(,6863) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,6864) @node When to commit
cvs.texi(,6865) @section When to commit?
cvs.texi(,6866) @cindex When to commit
cvs.texi(,6867) @cindex Committing, when to
cvs.texi(,6868) @cindex Policy
cvs.texi(,6869) 
cvs.texi(,6870) Your group should decide which policy to use regarding
cvs.texi(,6871) commits.  Several policies are possible, and as your
cvs.texi(,6872) experience with @sc{cvs} grows you will probably find
cvs.texi(,6873) out what works for you.
cvs.texi(,6874) 
cvs.texi(,6875) If you commit files too quickly you might commit files
cvs.texi(,6876) that do not even compile.  If your partner updates his
cvs.texi(,6877) working sources to include your buggy file, he will be
cvs.texi(,6878) unable to compile the code.  On the other hand, other
cvs.texi(,6879) persons will not be able to benefit from the
cvs.texi(,6880) improvements you make to the code if you commit very
cvs.texi(,6881) seldom, and conflicts will probably be more common.
cvs.texi(,6882) 
cvs.texi(,6883) It is common to only commit files after making sure
cvs.texi(,6884) that they can be compiled.  Some sites require that the
cvs.texi(,6885) files pass a test suite.  Policies like this can be
cvs.texi(,6886) enforced using the commitinfo file
cvs.texi(,6887) (@pxref{commitinfo}), but you should think twice before
cvs.texi(,6888) you enforce such a convention.  By making the
cvs.texi(,6889) development environment too controlled it might become
cvs.texi(,6890) too regimented and thus counter-productive to the real
cvs.texi(,6891) goal, which is to get software written.
cvs.texi(,6892) 
cvs.texi(,6893) @c ---------------------------------------------------------------------
cvs.texi(,6894) @node Keyword substitution
cvs.texi(,6895) @chapter Keyword substitution
cvs.texi(,6896) @cindex Keyword substitution
cvs.texi(,6897) @cindex Keyword expansion
cvs.texi(,6898) @cindex Identifying files
cvs.texi(,6899) 
cvs.texi(,6900) @comment   Be careful when editing this chapter.
cvs.texi(,6901) @comment   Remember that this file is kept under
cvs.texi(,6902) @comment   version control, so we must not accidentally
cvs.texi(,6903) @comment   include a valid keyword in the running text.
cvs.texi(,6904) 
cvs.texi(,6905) As long as you edit source files inside a working
cvs.texi(,6906) directory you can always find out the state of
cvs.texi(,6907) your files via @samp{cvs status} and @samp{cvs log}.
cvs.texi(,6908) But as soon as you export the files from your
cvs.texi(,6909) development environment it becomes harder to identify
cvs.texi(,6910) which revisions they are.
cvs.texi(,6911) 
cvs.texi(,6912) @sc{cvs} can use a mechanism known as @dfn{keyword
cvs.texi(,6913) substitution} (or @dfn{keyword expansion}) to help
cvs.texi(,6914) identifying the files.  Embedded strings of the form
cvs.texi(,6915) @code{$@var{keyword}$} and
cvs.texi(,6916) @code{$@var{keyword}:@dots{}$} in a file are replaced
cvs.texi(,6917) with strings of the form
cvs.texi(,6918) @code{$@var{keyword}:@var{value}$} whenever you obtain
cvs.texi(,6919) a new revision of the file.
cvs.texi(,6920) 
cvs.texi(,6921) @menu
cvs.texi(,6922) * Keyword list::                   Keywords
cvs.texi(,6923) * Using keywords::                 Using keywords
cvs.texi(,6924) * Avoiding substitution::          Avoiding substitution
cvs.texi(,6925) * Substitution modes::             Substitution modes
cvs.texi(,6926) * Configuring keyword expansion::  Configuring keyword expansion
cvs.texi(splitrcskeyword,6927) * Log keyword::                    Problems with the $ Log$ keyword.
cvs.texi(,6928) @end menu
cvs.texi(,6929) 
cvs.texi(,6930) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,6931) @node Keyword list
cvs.texi(,6932) @section Keyword List
cvs.texi(,6933) @cindex Keyword List
cvs.texi(,6934) 
cvs.texi(,6935) @c FIXME: need some kind of example here I think,
cvs.texi(,6936) @c perhaps in a
cvs.texi(,6937) @c "Keyword intro" node.  The intro in the "Keyword
cvs.texi(,6938) @c substitution" node itself seems OK, but to launch
cvs.texi(,6939) @c into a list of the keywords somehow seems too abrupt.
cvs.texi(,6940) 
cvs.texi(,6941) This is a list of the keywords:
cvs.texi(,6942) 
cvs.texi(,6943) @table @code
cvs.texi(,6944) @cindex Author keyword
cvs.texi(splitrcskeyword,6945) @item $ Author$
cvs.texi(,6946) The login name of the user who checked in the revision.
cvs.texi(,6947) 
cvs.texi(,6948) @cindex CVSHeader keyword
cvs.texi(splitrcskeyword,6949) @item $ CVSHeader
cvs.texi(splitrcskeyword,6950) A standard header (similar to $ Header$, but with
cvs.texi(,6951) the CVS root stripped off). It contains the relative
cvs.texi(,6952) pathname of the @sc{rcs} file to the CVS root, the
cvs.texi(,6953) revision number, the date (UTC), the author, the state,
cvs.texi(,6954) and the locker (if locked). Files will normally never
cvs.texi(,6955) be locked when you use @sc{cvs}.
cvs.texi(,6956) 
cvs.texi(,6957) Note that this keyword has only been recently
cvs.texi(,6958) introduced to @sc{cvs} and may cause problems with
cvs.texi(splitrcskeyword,6959) existing installations if $ CVSHeader$ is already
cvs.texi(,6960) in the files for a different purpose. This keyword may
cvs.texi(,6961) be excluded using the @code{KeywordExpansion=eCVSHeader}
cvs.texi(,6962) in the @file{CVSROOT/config} file. 
cvs.texi(,6963) See @ref{Configuring keyword expansion} for more details.
cvs.texi(,6964) 
cvs.texi(,6965) @cindex Date keyword
cvs.texi(splitrcskeyword,6966) @item $ Date$
cvs.texi(,6967) The date and time (UTC) the revision was checked in.
cvs.texi(,6968) 
cvs.texi(,6969) @cindex Header keyword
cvs.texi(splitrcskeyword,6970) @item $ Header$
cvs.texi(,6971) A standard header containing the full pathname of the
cvs.texi(,6972) @sc{rcs} file, the revision number, the date (UTC), the
cvs.texi(,6973) author, the state, and the locker (if locked).  Files
cvs.texi(,6974) will normally never be locked when you use @sc{cvs}.
cvs.texi(,6975) 
cvs.texi(,6976) @cindex Id keyword
cvs.texi(splitrcskeyword,6977) @item $ Id$
cvs.texi(splitrcskeyword,6978) Same as @code{$ Header$}, except that the @sc{rcs}
cvs.texi(,6979) filename is without a path.
cvs.texi(,6980) 
cvs.texi(,6981) @cindex Name keyword
cvs.texi(splitrcskeyword,6982) @item $ Name$
cvs.texi(,6983) Tag name used to check out this file.  The keyword is
cvs.texi(,6984) expanded only if one checks out with an explicit tag
cvs.texi(,6985) name.  For example, when running the command @code{cvs
cvs.texi(,6986) co -r first}, the keyword expands to @samp{Name: first}.
cvs.texi(,6987) 
cvs.texi(,6988) @cindex Locker keyword
cvs.texi(splitrcskeyword,6989) @item $ Locker$
cvs.texi(,6990) The login name of the user who locked the revision
cvs.texi(,6991) (empty if not locked, which is the normal case unless
cvs.texi(,6992) @code{cvs admin -l} is in use).
cvs.texi(,6993) 
cvs.texi(,6994) @cindex Log keyword
cvs.texi(splitrcskeyword,6995) @item $ Log$
cvs.texi(,6996) The log message supplied during commit, preceded by a
cvs.texi(,6997) header containing the @sc{rcs} filename, the revision
cvs.texi(,6998) number, the author, and the date (UTC).  Existing log
cvs.texi(,6999) messages are @emph{not} replaced.  Instead, the new log
cvs.texi(splitrcskeyword,7000) message is inserted after @code{$ Log:@dots{}$}.
cvs.texi(,7001) Each new line is prefixed with the same string which
cvs.texi(,7002) precedes the @code{$Log} keyword.  For example, if the
cvs.texi(,7003) file contains:
cvs.texi(,7004) 
cvs.texi(,7005) @example
cvs.texi(,7006)   /* Here is what people have been up to:
cvs.texi(,7007)    *
cvs.texi(splitrcskeyword,7008)    * $ Log: frob.c,v $
cvs.texi(,7009)    * Revision 1.1  1997/01/03 14:23:51  joe
cvs.texi(,7010)    * Add the superfrobnicate option
cvs.texi(,7011)    *
cvs.texi(,7012)    */
cvs.texi(,7013) @end example
cvs.texi(,7014) 
cvs.texi(,7015) @noindent
cvs.texi(,7016) then additional lines which are added when expanding
cvs.texi(,7017) the @code{$Log} keyword will be preceded by @samp{   * }.
cvs.texi(,7018) Unlike previous versions of @sc{cvs} and @sc{rcs}, the
cvs.texi(,7019) @dfn{comment leader} from the @sc{rcs} file is not used.
cvs.texi(,7020) The @code{$Log} keyword is useful for
cvs.texi(,7021) accumulating a complete change log in a source file,
cvs.texi(,7022) but for several reasons it can be problematic.
cvs.texi(,7023) @xref{Log keyword}.
cvs.texi(,7024) 
cvs.texi(,7025) @cindex RCSfile keyword
cvs.texi(splitrcskeyword,7026) @item $ RCSfile$
cvs.texi(,7027) The name of the RCS file without a path.
cvs.texi(,7028) 
cvs.texi(,7029) @cindex Revision keyword
cvs.texi(splitrcskeyword,7030) @item $ Revision$
cvs.texi(,7031) The revision number assigned to the revision.
cvs.texi(,7032) 
cvs.texi(,7033) @cindex Source keyword
cvs.texi(splitrcskeyword,7034) @item $ Source$
cvs.texi(,7035) The full pathname of the RCS file.
cvs.texi(,7036) 
cvs.texi(,7037) @cindex State keyword
cvs.texi(splitrcskeyword,7038) @item $ State$
cvs.texi(,7039) The state assigned to the revision.  States can be
cvs.texi(,7040) assigned with @code{cvs admin -s}---see @ref{admin options}.
cvs.texi(,7041) 
cvs.texi(,7042) @cindex Local keyword
cvs.texi(,7043) @item Local keyword
cvs.texi(,7044) The @code{LocalKeyword} option in the @file{CVSROOT/config} file
cvs.texi(,7045) may be used to specify a local keyword which is to be
cvs.texi(,7046) used as an alias for one of the other keywords. For
cvs.texi(,7047) example, if the @file{CVSROOT/config} file contains
cvs.texi(,7048) a line with @code{LocalKeyword=MYBSD=CVSHeader}, then a
cvs.texi(splitrcskeyword,7049) file with the local keyword $ MYBSD$ will be
cvs.texi(splitrcskeyword,7050) expanded as if it were a $ CVSHeader$ keyword. If
cvs.texi(,7051) the src/frob.c file contained this keyword, it might
cvs.texi(,7052) look something like this:
cvs.texi(,7053) 
cvs.texi(,7054) @example
cvs.texi(,7055)   /*
cvs.texi(splitrcskeyword,7056)    * $ MYBSD: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 
cvs.texi(,7057)    */
cvs.texi(,7058) @end example
cvs.texi(,7059) 
cvs.texi(,7060) Many repositories make use of a such a ``local
cvs.texi(,7061) keyword'' feature. An old patch to @sc{cvs} provided
cvs.texi(,7062) the @code{LocalKeyword} feature using a @code{tag=}
cvs.texi(,7063) option and called this the ``custom tag'' or ``local
cvs.texi(,7064) tag'' feature. It was used in conjunction with the
cvs.texi(,7065) what they called the @code{tagexpand=} option. In
cvs.texi(,7066) @sc{cvs} this other option is known as the
cvs.texi(,7067) @code{KeywordExpand} option. 
cvs.texi(,7068) See @ref{Configuring keyword expansion} for more
cvs.texi(,7069) details.
cvs.texi(,7070) 
cvs.texi(,7071) Examples from popular projects include:
cvs.texi(splitrcskeyword,7072) $ FreeBSD$, $ NetBSD$,
cvs.texi(splitrcskeyword,7073) $ OpenBSD$, $ XFree86$,
cvs.texi(splitrcskeyword,7074) $ Xorg$.
cvs.texi(,7075) 
cvs.texi(,7076) The advantage of this is that you can include your
cvs.texi(,7077) local version information in a file using this local
cvs.texi(,7078) keyword without disrupting the upstream version
cvs.texi(,7079) information (which may be a different local keyword or
cvs.texi(,7080) a standard keyword). Allowing bug reports and the like
cvs.texi(,7081) to more properly identify the source of the original
cvs.texi(,7082) bug to the third-party and reducing the number of
cvs.texi(,7083) conflicts that arise during an import of a new version.
cvs.texi(,7084) 
cvs.texi(,7085) All keyword expansion except the local keyword may be
cvs.texi(,7086) disabled using the @code{KeywordExpansion} option in
cvs.texi(,7087) the @file{CVSROOT/config} file---see 
cvs.texi(,7088) @ref{Configuring keyword expansion} for more details.
cvs.texi(,7089) 
cvs.texi(,7090) @end table
cvs.texi(,7091) 
cvs.texi(,7092) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7093) @node Using keywords
cvs.texi(,7094) @section Using keywords
cvs.texi(,7095) 
cvs.texi(,7096) To include a keyword string you simply include the
cvs.texi(splitrcskeyword,7097) relevant text string, such as @code{$ Id$}, inside the
cvs.texi(,7098) file, and commit the file.  @sc{cvs} will automatically
cvs.texi(,7099) expand the string as part of the commit operation.
cvs.texi(,7100) 
cvs.texi(splitrcskeyword,7101) It is common to embed the @code{$ Id$} string in
cvs.texi(,7102) the source files so that it gets passed through to
cvs.texi(,7103) generated files.  For example, if you are managing
cvs.texi(,7104) computer program source code, you might include a
cvs.texi(,7105) variable which is initialized to contain that string.
cvs.texi(,7106) Or some C compilers may provide a @code{#pragma ident}
cvs.texi(,7107) directive.  Or a document management system might
cvs.texi(,7108) provide a way to pass a string through to generated
cvs.texi(,7109) files.
cvs.texi(,7110) 
cvs.texi(,7111) @c Would be nice to give an example, but doing this in
cvs.texi(,7112) @c portable C is not possible and the problem with
cvs.texi(,7113) @c picking any one language (VMS HELP files, Ada,
cvs.texi(,7114) @c troff, whatever) is that people use CVS for all
cvs.texi(,7115) @c kinds of files.
cvs.texi(,7116) 
cvs.texi(,7117) @cindex Ident (shell command)
cvs.texi(,7118) The @code{ident} command (which is part of the @sc{rcs}
cvs.texi(,7119) package) can be used to extract keywords and their
cvs.texi(,7120) values from a file.  This can be handy for text files,
cvs.texi(,7121) but it is even more useful for extracting keywords from
cvs.texi(,7122) binary files.
cvs.texi(,7123) 
cvs.texi(,7124) @example
cvs.texi(,7125) $ ident samp.c
cvs.texi(,7126) samp.c:
cvs.texi(splitrcskeyword,7127)      $ Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
cvs.texi(,7128) $ gcc samp.c
cvs.texi(,7129) $ ident a.out
cvs.texi(,7130) a.out:
cvs.texi(splitrcskeyword,7131)      $ Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
cvs.texi(,7132) @end example
cvs.texi(,7133) 
cvs.texi(,7134) @cindex What (shell command)
cvs.texi(,7135) S@sc{ccs} is another popular revision control system.
cvs.texi(,7136) It has a command, @code{what}, which is very similar to
cvs.texi(,7137) @code{ident} and used for the same purpose.  Many sites
cvs.texi(,7138) without @sc{rcs} have @sc{sccs}.  Since @code{what}
cvs.texi(,7139) looks for the character sequence @code{@@(#)} it is
cvs.texi(,7140) easy to include keywords that are detected by either
cvs.texi(,7141) command.  Simply prefix the keyword with the
cvs.texi(,7142) magic @sc{sccs} phrase, like this:
cvs.texi(,7143) 
cvs.texi(,7144) @example
cvs.texi(splitrcskeyword,7145) static char *id="@@(#) $ Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
cvs.texi(,7146) @end example
cvs.texi(,7147) 
cvs.texi(,7148) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7149) @node Avoiding substitution
cvs.texi(,7150) @section Avoiding substitution
cvs.texi(,7151) 
cvs.texi(,7152) Keyword substitution has its disadvantages.  Sometimes
cvs.texi(,7153) you might want the literal text string
cvs.texi(splitrcskeyword,7154) @samp{$ Author$} to appear inside a file without
cvs.texi(,7155) @sc{cvs} interpreting it as a keyword and expanding it
cvs.texi(splitrcskeyword,7156) into something like @samp{$ Author: ceder $}.
cvs.texi(,7157) 
cvs.texi(,7158) There is unfortunately no way to selectively turn off
cvs.texi(,7159) keyword substitution.  You can use @samp{-ko}
cvs.texi(,7160) (@pxref{Substitution modes}) to turn off keyword
cvs.texi(,7161) substitution entirely.
cvs.texi(,7162) 
cvs.texi(,7163) In many cases you can avoid using keywords in
cvs.texi(,7164) the source, even though they appear in the final
cvs.texi(,7165) product.  For example, the source for this manual
cvs.texi(,7166) contains @samp{$@@asis@{@}Author$} whenever the text
cvs.texi(splitrcskeyword,7167) @samp{$ Author$} should appear.  In @code{nroff}
cvs.texi(,7168) and @code{troff} you can embed the null-character
cvs.texi(,7169) @code{\&} inside the keyword for a similar effect.
cvs.texi(,7170) 
cvs.texi(,7171) It is also possible to specify an explicit list of
cvs.texi(,7172) keywords to include or exclude using the
cvs.texi(,7173) @code{KeywordExpand} option in the
cvs.texi(,7174) @file{CVSROOT/config} file--see @ref{Configuring keyword expansion}
cvs.texi(,7175) for more details. This feature is intended primarily
cvs.texi(,7176) for use with the @code{LocalKeyword} option--see
cvs.texi(,7177) @ref{Keyword list}.
cvs.texi(,7178) 
cvs.texi(,7179) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7180) @node Substitution modes
cvs.texi(,7181) @section Substitution modes
cvs.texi(,7182) @cindex Keyword substitution, changing modes
cvs.texi(,7183) @cindex -k (keyword substitution)
cvs.texi(,7184) @cindex Kflag
cvs.texi(,7185) 
cvs.texi(,7186) @c FIXME: This could be made more coherent, by expanding it
cvs.texi(,7187) @c with more examples or something.
cvs.texi(,7188) Each file has a stored default substitution mode, and
cvs.texi(,7189) each working directory copy of a file also has a
cvs.texi(,7190) substitution mode.  The former is set by the @samp{-k}
cvs.texi(,7191) option to @code{cvs add} and @code{cvs admin}; the
cvs.texi(,7192) latter is set by the @samp{-k} or @samp{-A} options to @code{cvs
cvs.texi(,7193) checkout} or @code{cvs update}.  @code{cvs diff} also
cvs.texi(,7194) has a @samp{-k} option.  For some examples,
cvs.texi(,7195) see @ref{Binary files}, and @ref{Merging and keywords}.
cvs.texi(,7196) @c The fact that -A is overloaded to mean both reset
cvs.texi(,7197) @c sticky options and reset sticky tags/dates is
cvs.texi(,7198) @c somewhat questionable.  Perhaps there should be
cvs.texi(,7199) @c separate options to reset sticky options (e.g. -k
cvs.texi(,7200) @c A") and tags/dates (someone suggested -r HEAD could
cvs.texi(,7201) @c do this instead of setting a sticky tag of "HEAD"
cvs.texi(,7202) @c as in the status quo but I haven't thought much
cvs.texi(,7203) @c about that idea.  Of course -r .reset or something
cvs.texi(,7204) @c could be coined if this needs to be a new option).
cvs.texi(,7205) @c On the other hand, having -A mean "get things back
cvs.texi(,7206) @c into the state after a fresh checkout" has a certain
cvs.texi(,7207) @c appeal, and maybe there is no sufficient reason for
cvs.texi(,7208) @c creeping featurism in this area.
cvs.texi(,7209) 
cvs.texi(,7210) The modes available are:
cvs.texi(,7211) 
cvs.texi(,7212) @table @samp
cvs.texi(,7213) @item -kkv
cvs.texi(,7214) Generate keyword strings using the default form, e.g.
cvs.texi(splitrcskeyword,7215) @code{$ Revision: 5.7 $} for the @code{Revision}
cvs.texi(,7216) keyword.
cvs.texi(,7217) 
cvs.texi(,7218) @item -kkvl
cvs.texi(,7219) Like @samp{-kkv}, except that a locker's name is always
cvs.texi(,7220) inserted if the given revision is currently locked.
cvs.texi(,7221) The locker's name is only relevant if @code{cvs admin
cvs.texi(,7222) -l} is in use.
cvs.texi(,7223) 
cvs.texi(,7224) @item -kk
cvs.texi(,7225) Generate only keyword names in keyword strings; omit
cvs.texi(,7226) their values.  For example, for the @code{Revision}
cvs.texi(splitrcskeyword,7227) keyword, generate the string @code{$ Revision$}
cvs.texi(splitrcskeyword,7228) instead of @code{$ Revision: 5.7 $}.  This option
cvs.texi(,7229) is useful to ignore differences due to keyword
cvs.texi(,7230) substitution when comparing different revisions of a
cvs.texi(,7231) file (@pxref{Merging and keywords}).
cvs.texi(,7232) 
cvs.texi(,7233) @item -ko
cvs.texi(,7234) Generate the old keyword string, present in the working
cvs.texi(,7235) file just before it was checked in.  For example, for
cvs.texi(,7236) the @code{Revision} keyword, generate the string
cvs.texi(splitrcskeyword,7237) @code{$ Revision: 1.1 $} instead of
cvs.texi(splitrcskeyword,7238) @code{$ Revision: 5.7 $} if that is how the
cvs.texi(,7239) string appeared when the file was checked in.
cvs.texi(,7240) 
cvs.texi(,7241) @item -kb
cvs.texi(,7242) Like @samp{-ko}, but also inhibit conversion of line
cvs.texi(,7243) endings between the canonical form in which they are
cvs.texi(,7244) stored in the repository (linefeed only), and the form
cvs.texi(,7245) appropriate to the operating system in use on the
cvs.texi(,7246) client.  For systems, like unix, which use linefeed
cvs.texi(,7247) only to terminate lines, this is very similar to
cvs.texi(,7248) @samp{-ko}.  For more information on binary files, see
cvs.texi(,7249) @ref{Binary files}.  In @sc{cvs} version 1.12.2 and later
cvs.texi(,7250) @samp{-kb}, as set by @code{cvs add}, @code{cvs admin}, or
cvs.texi(,7251) @code{cvs import} may not be overridden by a @samp{-k} option
cvs.texi(,7252) specified on the command line.
cvs.texi(,7253) 
cvs.texi(,7254) @item -kv
cvs.texi(,7255) Generate only keyword values for keyword strings.  For
cvs.texi(,7256) example, for the @code{Revision} keyword, generate the string
cvs.texi(splitrcskeyword,7257) @code{5.7} instead of @code{$ Revision: 5.7 $}.
cvs.texi(,7258) This can help generate files in programming languages
cvs.texi(,7259) where it is hard to strip keyword delimiters like
cvs.texi(splitrcskeyword,7260) @code{$ Revision: $} from a string.  However,
cvs.texi(,7261) further keyword substitution cannot be performed once
cvs.texi(,7262) the keyword names are removed, so this option should be
cvs.texi(,7263) used with care.
cvs.texi(,7264) 
cvs.texi(,7265) One often would like to use @samp{-kv} with @code{cvs
cvs.texi(,7266) export}---@pxref{export}.  But be aware that doesn't
cvs.texi(,7267) handle an export containing binary files correctly.
cvs.texi(,7268) 
cvs.texi(,7269) @end table
cvs.texi(,7270) 
cvs.texi(,7271) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7272) @node Configuring keyword expansion
cvs.texi(,7273) @section Configuring Keyord Expansion
cvs.texi(,7274) @cindex Configuring keyword expansion
cvs.texi(,7275) 
cvs.texi(,7276) In a repository that includes third-party software on
cvs.texi(,7277) vendor branches, it is sometimes helpful to configure
cvs.texi(,7278) CVS to use a local keyword instead of the standard
cvs.texi(splitrcskeyword,7279) $ Id$ or $ Header$ keywords. Examples from
cvs.texi(splitrcskeyword,7280) real projects includ, $ Xorg$, $ XFree86$,
cvs.texi(splitrcskeyword,7281) $ FreeBSD$, $ NetBSD$,
cvs.texi(splitrcskeyword,7282) $ OpenBSD$, and even $ dotat$.
cvs.texi(,7283) The advantage of this is that
cvs.texi(,7284) you can include your local version information in a
cvs.texi(,7285) file using this local keyword (sometimes called a
cvs.texi(,7286) ``custom tag'' or a ``local tag'') without disrupting
cvs.texi(,7287) the upstream version information (which may be a
cvs.texi(,7288) different local keyword or a standard keyword). In
cvs.texi(,7289) these cases, it is typically desirable to disable the
cvs.texi(,7290) expansion of all keywords except the configured local
cvs.texi(,7291) keyword.
cvs.texi(,7292) 
cvs.texi(,7293) The @code{KeywordExpansion} option in the
cvs.texi(,7294) @file{CVSROOT/config} file is intended to allow for the
cvs.texi(,7295) either the explicit exclusion of a keyword or list of
cvs.texi(,7296) keywords, or for the explicit inclusion of a keyword or
cvs.texi(,7297) a list of keywords. This list may include the
cvs.texi(,7298) @code{LocalKeyword} that has been configured.
cvs.texi(,7299) 
cvs.texi(,7300) The @code{KeywordExpansion} option is followed by
cvs.texi(,7301) @code{=} and the next character may either be @code{i}
cvs.texi(,7302) to start an inclusion list or @code{e} to start an
cvs.texi(,7303) exclusion list. If the following lines were added to
cvs.texi(,7304) the @file{CVSROOT/config} file:
cvs.texi(,7305) 
cvs.texi(,7306) @example
cvs.texi(,7307)         # Add a "MyBSD" keyword and restrict keyword
cvs.texi(,7308)         # expansion
cvs.texi(,7309)         LocalKeyword=MyBSD=CVSHeader
cvs.texi(,7310)         KeywordExpand=iMyBSD
cvs.texi(,7311) @end example
cvs.texi(,7312) 
cvs.texi(splitrcskeyword,7313) then only the $ MyBSD$ keyword would be expanded.
cvs.texi(,7314) A list may be used. The this example:
cvs.texi(,7315) 
cvs.texi(,7316) @example
cvs.texi(,7317)         # Add a "MyBSD" keyword and restrict keyword
cvs.texi(,7318)         # expansion to the MyBSD, Name and Date keywords.
cvs.texi(,7319)         LocalKeyword=MyBSD=CVSHeader
cvs.texi(,7320)         KeywordExpand=iMyBSD,Name,Date
cvs.texi(,7321) @end example
cvs.texi(,7322) 
cvs.texi(splitrcskeyword,7323) would allow $ MyBSD$, $ Name$, and
cvs.texi(splitrcskeyword,7324) $ Date$ to be expanded.
cvs.texi(,7325) 
cvs.texi(,7326) It is also possible to configure an exclusion list
cvs.texi(,7327) using the following:
cvs.texi(,7328) 
cvs.texi(,7329) @example
cvs.texi(,7330)         # Do not expand the non-RCS keyword CVSHeader
cvs.texi(,7331)         KeywordExpand=eCVSHeader
cvs.texi(,7332) @end example
cvs.texi(,7333) 
cvs.texi(,7334) This allows @sc{cvs} to ignore the recently introduced
cvs.texi(splitrcskeyword,7335) $ CVSHeader$ keyword and retain all of the
cvs.texi(,7336) others. The exclusion entry could also contain the
cvs.texi(,7337) standard RCS keyword list, but this could be confusing
cvs.texi(,7338) to users that expect RCS keywords to be expanded, so
cvs.texi(,7339) ycare should be taken to properly set user expectations
cvs.texi(,7340) for a repository that is configured in that manner.
cvs.texi(,7341) 
cvs.texi(,7342) If there is a desire to not have any RCS keywords
cvs.texi(,7343) expanded and not use the @code{-ko} flags everywhere,
cvs.texi(,7344) an administrator may disable all keyword expansion
cvs.texi(,7345) using the @file{CVSROOT/config} line:
cvs.texi(,7346) 
cvs.texi(,7347) @example
cvs.texi(,7348) 	# Do not expand any RCS keywords
cvs.texi(,7349) 	KeywordExpand=i
cvs.texi(,7350) @end example
cvs.texi(,7351) 
cvs.texi(,7352) this could be confusing to users that expect RCS
cvs.texi(splitrcskeyword,7353) keywords like $ Id$ to be expanded properly,
cvs.texi(,7354) so care should be taken to properly set user
cvs.texi(,7355) expectations for a repository so configured.
cvs.texi(,7356) 
cvs.texi(,7357) It should be noted that a patch to provide both the
cvs.texi(,7358) @code{KeywordExpand} and @code{LocalKeyword} features
cvs.texi(,7359) has been around a long time. However, that patch
cvs.texi(,7360) implemented these features using @code{tag=} and
cvs.texi(,7361) @code{tagexpand=} keywords and those keywords are NOT
cvs.texi(,7362) recognized.
cvs.texi(,7363) 
cvs.texi(,7364) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7365) @node Log keyword
cvs.texi(splitrcskeyword,7366) @section Problems with the $  Log$ keyword.
cvs.texi(,7367) 
cvs.texi(splitrcskeyword,7368) The @code{$ Log$} keyword is somewhat
cvs.texi(,7369) controversial.  As long as you are working on your
cvs.texi(,7370) development system the information is easily accessible
cvs.texi(splitrcskeyword,7371) even if you do not use the @code{$ Log$}
cvs.texi(,7372) keyword---just do a @code{cvs log}.  Once you export
cvs.texi(,7373) the file the history information might be useless
cvs.texi(,7374) anyhow.
cvs.texi(,7375) 
cvs.texi(,7376) A more serious concern is that @sc{cvs} is not good at
cvs.texi(splitrcskeyword,7377) handling @code{$ Log$} entries when a branch is
cvs.texi(,7378) merged onto the main trunk.  Conflicts often result
cvs.texi(,7379) from the merging operation.
cvs.texi(,7380) @c Might want to check whether the CVS implementation
cvs.texi(,7381) @c of RCS_merge has this problem the same way rcsmerge
cvs.texi(,7382) @c does.  I would assume so....
cvs.texi(,7383) 
cvs.texi(,7384) People also tend to "fix" the log entries in the file
cvs.texi(,7385) (correcting spelling mistakes and maybe even factual
cvs.texi(,7386) errors).  If that is done the information from
cvs.texi(,7387) @code{cvs log} will not be consistent with the
cvs.texi(,7388) information inside the file.  This may or may not be a
cvs.texi(,7389) problem in real life.
cvs.texi(,7390) 
cvs.texi(splitrcskeyword,7391) It has been suggested that the @code{$ Log$}
cvs.texi(,7392) keyword should be inserted @emph{last} in the file, and
cvs.texi(,7393) not in the files header, if it is to be used at all.
cvs.texi(,7394) That way the long list of change messages will not
cvs.texi(,7395) interfere with everyday source file browsing.
cvs.texi(,7396) 
cvs.texi(,7397) @c ---------------------------------------------------------------------
cvs.texi(,7398) @node Tracking sources
cvs.texi(,7399) @chapter Tracking third-party sources
cvs.texi(,7400) @cindex Third-party sources
cvs.texi(,7401) @cindex Tracking sources
cvs.texi(,7402) 
cvs.texi(,7403) @c FIXME: Need discussion of added and removed files.
cvs.texi(,7404) @c FIXME: This doesn't really adequately introduce the
cvs.texi(,7405) @c concepts of "vendor" and "you".  They don't *have*
cvs.texi(,7406) @c to be separate organizations or separate people.
cvs.texi(,7407) @c We want a description which is somewhat more based on
cvs.texi(,7408) @c the technical issues of which sources go where, but
cvs.texi(,7409) @c also with enough examples of how this relates to
cvs.texi(,7410) @c relationships like customer-supplier, developer-QA,
cvs.texi(,7411) @c maintainer-contributor, or whatever, to make it
cvs.texi(,7412) @c seem concrete.
cvs.texi(,7413) If you modify a program to better fit your site, you
cvs.texi(,7414) probably want to include your modifications when the next
cvs.texi(,7415) release of the program arrives.  @sc{cvs} can help you with
cvs.texi(,7416) this task.
cvs.texi(,7417) 
cvs.texi(,7418) @cindex Vendor
cvs.texi(,7419) @cindex Vendor branch
cvs.texi(,7420) @cindex Branch, vendor-
cvs.texi(,7421) In the terminology used in @sc{cvs}, the supplier of the
cvs.texi(,7422) program is called a @dfn{vendor}.  The unmodified
cvs.texi(,7423) distribution from the vendor is checked in on its own
cvs.texi(,7424) branch, the @dfn{vendor branch}.  @sc{cvs} reserves branch
cvs.texi(,7425) 1.1.1 for this use.
cvs.texi(,7426) 
cvs.texi(,7427) When you modify the source and commit it, your revision
cvs.texi(,7428) will end up on the main trunk.  When a new release is
cvs.texi(,7429) made by the vendor, you commit it on the vendor branch
cvs.texi(,7430) and copy the modifications onto the main trunk.
cvs.texi(,7431) 
cvs.texi(,7432) Use the @code{import} command to create and update
cvs.texi(,7433) the vendor branch.  When you import a new file,
cvs.texi(,7434) the vendor branch is made the `head' revision, so
cvs.texi(,7435) anyone that checks out a copy of the file gets that
cvs.texi(,7436) revision.  When a local modification is committed it is
cvs.texi(,7437) placed on the main trunk, and made the `head'
cvs.texi(,7438) revision.
cvs.texi(,7439) 
cvs.texi(,7440) @menu
cvs.texi(,7441) * First import::                Importing for the first time
cvs.texi(,7442) * Update imports::              Updating with the import command
cvs.texi(,7443) * Reverting local changes::     Reverting to the latest vendor release
cvs.texi(,7444) * Binary files in imports::     Binary files require special handling
cvs.texi(,7445) * Keywords in imports::         Keyword substitution might be undesirable
cvs.texi(,7446) * Multiple vendor branches::    What if you get sources from several places?
cvs.texi(,7447) @end menu
cvs.texi(,7448) 
cvs.texi(,7449) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7450) @node First import
cvs.texi(,7451) @section Importing for the first time
cvs.texi(,7452) @cindex Importing modules
cvs.texi(,7453) 
cvs.texi(,7454) @c Should mention naming conventions for vendor tags,
cvs.texi(,7455) @c release tags, and perhaps directory names.
cvs.texi(,7456) Use the @code{import} command to check in the sources
cvs.texi(,7457) for the first time.  When you use the @code{import}
cvs.texi(,7458) command to track third-party sources, the @dfn{vendor
cvs.texi(,7459) tag} and @dfn{release tags} are useful.  The
cvs.texi(,7460) @dfn{vendor tag} is a symbolic name for the branch
cvs.texi(,7461) (which is always 1.1.1, unless you use the @samp{-b
cvs.texi(,7462) @var{branch}} flag---see @ref{Multiple vendor branches}.).  The
cvs.texi(,7463) @dfn{release tags} are symbolic names for a particular
cvs.texi(,7464) release, such as @samp{FSF_0_04}.
cvs.texi(,7465) 
cvs.texi(,7466) @c I'm not completely sure this belongs here.  But
cvs.texi(,7467) @c we need to say it _somewhere_ reasonably obvious; it
cvs.texi(,7468) @c is a common misconception among people first learning CVS
cvs.texi(,7469) Note that @code{import} does @emph{not} change the
cvs.texi(,7470) directory in which you invoke it.  In particular, it
cvs.texi(,7471) does not set up that directory as a @sc{cvs} working
cvs.texi(,7472) directory; if you want to work with the sources import
cvs.texi(,7473) them first and then check them out into a different
cvs.texi(,7474) directory (@pxref{Getting the source}).
cvs.texi(,7475) 
cvs.texi(,7476) @cindex wdiff (import example)
cvs.texi(,7477) Suppose you have the sources to a program called
cvs.texi(,7478) @code{wdiff} in a directory @file{wdiff-0.04},
cvs.texi(,7479) and are going to make private modifications that you
cvs.texi(,7480) want to be able to use even when new releases are made
cvs.texi(,7481) in the future.  You start by importing the source to
cvs.texi(,7482) your repository:
cvs.texi(,7483) 
cvs.texi(,7484) @example
cvs.texi(,7485) $ cd wdiff-0.04
cvs.texi(,7486) $ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04
cvs.texi(,7487) @end example
cvs.texi(,7488) 
cvs.texi(,7489) The vendor tag is named @samp{FSF_DIST} in the above
cvs.texi(,7490) example, and the only release tag assigned is
cvs.texi(,7491) @samp{WDIFF_0_04}.
cvs.texi(,7492) @c FIXME: Need to say where fsf/wdiff comes from.
cvs.texi(,7493) 
cvs.texi(,7494) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7495) @node Update imports
cvs.texi(,7496) @section Updating with the import command
cvs.texi(,7497) 
cvs.texi(,7498) When a new release of the source arrives, you import it into the
cvs.texi(,7499) repository with the same @code{import} command that you used to set up
cvs.texi(,7500) the repository in the first place.  The only difference is that you
cvs.texi(,7501) specify a different release tag this time:
cvs.texi(,7502) 
cvs.texi(,7503) @example
cvs.texi(,7504) $ tar xfz wdiff-0.05.tar.gz
cvs.texi(,7505) $ cd wdiff-0.05
cvs.texi(,7506) $ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05
cvs.texi(,7507) @end example
cvs.texi(,7508) 
cvs.texi(,7509) For files that have not been modified locally, the newly created
cvs.texi(,7510) revision becomes the head revision.  If you have made local
cvs.texi(,7511) changes, @code{import} will warn you that you must merge the changes
cvs.texi(,7512) into the main trunk, and tell you to use @samp{checkout -j} to do so:
cvs.texi(,7513) 
cvs.texi(,7514) @c FIXME: why "wdiff" here and "fsf/wdiff" in the
cvs.texi(,7515) @c "import"?  I think the assumption is that one has
cvs.texi(,7516) @c "wdiff fsf/wdiff" or some such in modules, but it
cvs.texi(,7517) @c would be better to not use modules in this example.
cvs.texi(,7518) @example
cvs.texi(,7519) $ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
cvs.texi(,7520) @end example
cvs.texi(,7521) 
cvs.texi(,7522) @noindent
cvs.texi(,7523) The above command will check out the latest revision of
cvs.texi(,7524) @samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST}
cvs.texi(,7525) since yesterday into the working copy.  If any conflicts arise during
cvs.texi(,7526) the merge they should be resolved in the normal way (@pxref{Conflicts
cvs.texi(,7527) example}).  Then, the modified files may be committed.
cvs.texi(,7528) 
cvs.texi(,7529) However, it is much better to use the two release tags rather than using
cvs.texi(,7530) a date on the branch as suggested above:
cvs.texi(,7531) 
cvs.texi(,7532) @example
cvs.texi(,7533) $ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
cvs.texi(,7534) @end example
cvs.texi(,7535) 
cvs.texi(,7536) @noindent
cvs.texi(,7537) The reason this is better is that
cvs.texi(,7538) using a date, as suggested above, assumes that you do
cvs.texi(,7539) not import more than one release of a product per day.
cvs.texi(,7540) More importantly, using the release tags allows @sc{cvs} to detect files
cvs.texi(,7541) that were removed between the two vendor releases and mark them for
cvs.texi(,7542) removal.  Since @code{import} has no way to detect removed files, you
cvs.texi(,7543) should do a merge like this even if @code{import} doesn't tell you to.
cvs.texi(,7544) 
cvs.texi(,7545) @node Reverting local changes
cvs.texi(,7546) @section Reverting to the latest vendor release
cvs.texi(,7547) 
cvs.texi(,7548) You can also revert local changes completely and return
cvs.texi(,7549) to the latest vendor release by changing the `head'
cvs.texi(,7550) revision back to the vendor branch on all files.  For
cvs.texi(,7551) example, if you have a checked-out copy of the sources
cvs.texi(,7552) in @file{~/work.d/wdiff}, and you want to revert to the
cvs.texi(,7553) vendor's version for all the files in that directory,
cvs.texi(,7554) you would type:
cvs.texi(,7555) 
cvs.texi(,7556) @example
cvs.texi(,7557) $ cd ~/work.d/wdiff
cvs.texi(,7558) $ cvs admin -bWDIFF .
cvs.texi(,7559) @end example
cvs.texi(,7560) 
cvs.texi(,7561) @noindent
cvs.texi(,7562) You must specify the @samp{-bWDIFF} without any space
cvs.texi(,7563) after the @samp{-b}.  @xref{admin options}.
cvs.texi(,7564) 
cvs.texi(,7565) @node Binary files in imports
cvs.texi(,7566) @section How to handle binary files with cvs import
cvs.texi(,7567) 
cvs.texi(,7568) Use the @samp{-k} wrapper option to tell import which
cvs.texi(,7569) files are binary.  @xref{Wrappers}.
cvs.texi(,7570) 
cvs.texi(,7571) @node Keywords in imports
cvs.texi(,7572) @section How to handle keyword substitution with cvs import
cvs.texi(,7573) 
cvs.texi(,7574) The sources which you are importing may contain
cvs.texi(,7575) keywords (@pxref{Keyword substitution}).  For example,
cvs.texi(,7576) the vendor may use @sc{cvs} or some other system
cvs.texi(,7577) which uses similar keyword expansion syntax.  If you
cvs.texi(,7578) just import the files in the default fashion, then
cvs.texi(,7579) the keyword expansions supplied by the vendor will
cvs.texi(,7580) be replaced by keyword expansions supplied by your
cvs.texi(,7581) own copy of @sc{cvs}.  It may be more convenient to
cvs.texi(,7582) maintain the expansions supplied by the vendor, so
cvs.texi(,7583) that this information can supply information about
cvs.texi(,7584) the sources that you imported from the vendor.
cvs.texi(,7585) 
cvs.texi(,7586) To maintain the keyword expansions supplied by the
cvs.texi(,7587) vendor, supply the @samp{-ko} option to @code{cvs
cvs.texi(,7588) import} the first time you import the file.
cvs.texi(,7589) This will turn off keyword expansion
cvs.texi(,7590) for that file entirely, so if you want to be more
cvs.texi(,7591) selective you'll have to think about what you want
cvs.texi(,7592) and use the @samp{-k} option to @code{cvs update} or
cvs.texi(,7593) @code{cvs admin} as appropriate.
cvs.texi(,7594) @c Supplying -ko to import if the file already existed
cvs.texi(,7595) @c has no effect.  Not clear to me whether it should
cvs.texi(,7596) @c or not.
cvs.texi(,7597) 
cvs.texi(,7598) @node Multiple vendor branches
cvs.texi(,7599) @section Multiple vendor branches
cvs.texi(,7600) 
cvs.texi(,7601) All the examples so far assume that there is only one
cvs.texi(,7602) vendor from which you are getting sources.  In some
cvs.texi(,7603) situations you might get sources from a variety of
cvs.texi(,7604) places.  For example, suppose that you are dealing with
cvs.texi(,7605) a project where many different people and teams are
cvs.texi(,7606) modifying the software.  There are a variety of ways to
cvs.texi(,7607) handle this, but in some cases you have a bunch of
cvs.texi(,7608) source trees lying around and what you want to do more
cvs.texi(,7609) than anything else is just to all put them in @sc{cvs} so
cvs.texi(,7610) that you at least have them in one place.
cvs.texi(,7611) 
cvs.texi(,7612) For handling situations in which there may be more than
cvs.texi(,7613) one vendor, you may specify the @samp{-b} option to
cvs.texi(,7614) @code{cvs import}.  It takes as an argument the vendor
cvs.texi(,7615) branch to import to.  The default is @samp{-b 1.1.1}.
cvs.texi(,7616) 
cvs.texi(,7617) For example, suppose that there are two teams, the red
cvs.texi(,7618) team and the blue team, that are sending you sources.
cvs.texi(,7619) You want to import the red team's efforts to branch
cvs.texi(,7620) 1.1.1 and use the vendor tag RED.  You want to import
cvs.texi(,7621) the blue team's efforts to branch 1.1.3 and use the
cvs.texi(,7622) vendor tag BLUE.  So the commands you might use are:
cvs.texi(,7623) 
cvs.texi(,7624) @example
cvs.texi(,7625) $ cvs import dir RED RED_1-0
cvs.texi(,7626) $ cvs import -b 1.1.3 dir BLUE BLUE_1-5
cvs.texi(,7627) @end example
cvs.texi(,7628) 
cvs.texi(,7629) Note that if your vendor tag does not match your
cvs.texi(,7630) @samp{-b} option, @sc{cvs} will not detect this case!  For
cvs.texi(,7631) example,
cvs.texi(,7632) 
cvs.texi(,7633) @example
cvs.texi(,7634) $ cvs import -b 1.1.3 dir RED RED_1-0
cvs.texi(,7635) @end example
cvs.texi(,7636) 
cvs.texi(,7637) @noindent
cvs.texi(,7638) Be careful; this kind of mismatch is sure to sow
cvs.texi(,7639) confusion or worse.  I can't think of a useful purpose
cvs.texi(,7640) for the ability to specify a mismatch here, but if you
cvs.texi(,7641) discover such a use, don't.  @sc{cvs} is likely to make this
cvs.texi(,7642) an error in some future release.
cvs.texi(,7643) 
cvs.texi(,7644) @c Probably should say more about the semantics of
cvs.texi(,7645) @c multiple branches.  What about the default branch?
cvs.texi(,7646) @c What about joining (perhaps not as useful with
cvs.texi(,7647) @c multiple branches, or perhaps it is.  Either way
cvs.texi(,7648) @c should be mentioned).
cvs.texi(,7649) 
cvs.texi(,7650) @c I'm not sure about the best location for this.  In
cvs.texi(,7651) @c one sense, it might belong right after we've introduced
cvs.texi(,7652) @c CVS's basic version control model, because people need
cvs.texi(,7653) @c to figure out builds right away.  The current location
cvs.texi(,7654) @c is based on the theory that it kind of akin to the
cvs.texi(,7655) @c "Revision management" section.
cvs.texi(,7656) @node Builds
cvs.texi(,7657) @chapter How your build system interacts with CVS
cvs.texi(,7658) @cindex Builds
cvs.texi(,7659) @cindex make
cvs.texi(,7660) 
cvs.texi(,7661) As mentioned in the introduction, @sc{cvs} does not
cvs.texi(,7662) contain software for building your software from source
cvs.texi(,7663) code.  This section describes how various aspects of
cvs.texi(,7664) your build system might interact with @sc{cvs}.
cvs.texi(,7665) 
cvs.texi(,7666) @c Is there a way to discuss this without reference to
cvs.texi(,7667) @c tools other than CVS?  I'm not sure there is; I
cvs.texi(,7668) @c wouldn't think that people who learn CVS first would
cvs.texi(,7669) @c even have this concern.
cvs.texi(,7670) One common question, especially from people who are
cvs.texi(,7671) accustomed to @sc{rcs}, is how to make their build get
cvs.texi(,7672) an up to date copy of the sources.  The answer to this
cvs.texi(,7673) with @sc{cvs} is two-fold.  First of all, since
cvs.texi(,7674) @sc{cvs} itself can recurse through directories, there
cvs.texi(,7675) is no need to modify your @file{Makefile} (or whatever
cvs.texi(,7676) configuration file your build tool uses) to make sure
cvs.texi(,7677) each file is up to date.  Instead, just use two
cvs.texi(,7678) commands, first @code{cvs -q update} and then
cvs.texi(,7679) @code{make} or whatever the command is to invoke your
cvs.texi(,7680) build tool.  Secondly, you do not necessarily
cvs.texi(,7681) @emph{want} to get a copy of a change someone else made
cvs.texi(,7682) until you have finished your own work.  One suggested
cvs.texi(,7683) approach is to first update your sources, then
cvs.texi(,7684) implement, build and
cvs.texi(,7685) test the change you were thinking of, and then commit
cvs.texi(,7686) your sources (updating first if necessary).  By
cvs.texi(,7687) periodically (in between changes, using the approach
cvs.texi(,7688) just described) updating your entire tree, you ensure
cvs.texi(,7689) that your sources are sufficiently up to date.
cvs.texi(,7690) 
cvs.texi(,7691) @cindex Bill of materials
cvs.texi(,7692) One common need is to record which versions of which
cvs.texi(,7693) source files went into a particular build.  This kind
cvs.texi(,7694) of functionality is sometimes called @dfn{bill of
cvs.texi(,7695) materials} or something similar.  The best way to do
cvs.texi(,7696) this with @sc{cvs} is to use the @code{tag} command to
cvs.texi(,7697) record which versions went into a given build
cvs.texi(,7698) (@pxref{Tags}).
cvs.texi(,7699) 
cvs.texi(,7700) Using @sc{cvs} in the most straightforward manner
cvs.texi(,7701) possible, each developer will have a copy of the entire
cvs.texi(,7702) source tree which is used in a particular build.  If
cvs.texi(,7703) the source tree is small, or if developers are
cvs.texi(,7704) geographically dispersed, this is the preferred
cvs.texi(,7705) solution.  In fact one approach for larger projects is
cvs.texi(,7706) to break a project down into smaller
cvs.texi(,7707) @c I say subsystem instead of module because they may or
cvs.texi(,7708) @c may not use the modules file.
cvs.texi(,7709) separately-compiled subsystems, and arrange a way of
cvs.texi(,7710) releasing them internally so that each developer need
cvs.texi(,7711) check out only those subsystems which they are
cvs.texi(,7712) actively working on.
cvs.texi(,7713) 
cvs.texi(,7714) Another approach is to set up a structure which allows
cvs.texi(,7715) developers to have their own copies of some files, and
cvs.texi(,7716) for other files to access source files from a central
cvs.texi(,7717) location.  Many people have come up with some such a
cvs.texi(,7718) @c two such people are paul@sander.cupertino.ca.us (for
cvs.texi(,7719) @c a previous employer)
cvs.texi(,7720) @c and gtornblo@senet.abb.se (spicm and related tools),
cvs.texi(,7721) @c but as far as I know
cvs.texi(,7722) @c no one has nicely packaged or released such a system (or
cvs.texi(,7723) @c instructions for constructing one).
cvs.texi(,7724) system using features such as the symbolic link feature
cvs.texi(,7725) found in many operating systems, or the @code{VPATH}
cvs.texi(,7726) feature found in many versions of @code{make}.  One build
cvs.texi(,7727) tool which is designed to help with this kind of thing
cvs.texi(,7728) is Odin (see
cvs.texi(,7729) @code{ftp://ftp.cs.colorado.edu/pub/distribs/odin}).
cvs.texi(,7730) @c Should we be saying more about Odin?  Or how you use
cvs.texi(,7731) @c it with CVS?  Also, the Prime Time Freeware for Unix
cvs.texi(,7732) @c disk (see http://www.ptf.com/) has Odin (with a nice
cvs.texi(,7733) @c paragraph summarizing it on the web), so that might be a
cvs.texi(,7734) @c semi-"official" place to point people.
cvs.texi(,7735) @c
cvs.texi(,7736) @c Of course, many non-CVS systems have this kind of
cvs.texi(,7737) @c functionality, for example OSF's ODE
cvs.texi(,7738) @c (http://www.osf.org/ode/) or mk
cvs.texi(,7739) @c (http://www.grin.net/~pzi/mk-3.18.4.docs/mk_toc.html
cvs.texi(,7740) @c He has changed providers in the past; a search engine search
cvs.texi(,7741) @c for "Peter Ziobrzynski" probably won't get too many
cvs.texi(,7742) @c spurious hits :-).  A more stable URL might be
cvs.texi(,7743) @c ftp://ftp.uu.net/pub/cmvc/mk).  But I'm not sure
cvs.texi(,7744) @c there is any point in mentioning them here unless they
cvs.texi(,7745) @c can work with CVS.
cvs.texi(,7746) 
cvs.texi(,7747) @c ---------------------------------------------------------------------
cvs.texi(,7748) @node Special Files
cvs.texi(,7749) @chapter Special Files
cvs.texi(,7750) 
cvs.texi(,7751) @cindex Special files
cvs.texi(,7752) @cindex Device nodes
cvs.texi(,7753) @cindex Ownership, saving in CVS
cvs.texi(,7754) @cindex Permissions, saving in CVS
cvs.texi(,7755) @cindex Hard links
cvs.texi(,7756) @cindex Symbolic links
cvs.texi(,7757) 
cvs.texi(,7758) In normal circumstances, @sc{cvs} works only with regular
cvs.texi(,7759) files.  Every file in a project is assumed to be
cvs.texi(,7760) persistent; it must be possible to open, read and close
cvs.texi(,7761) them; and so on.  @sc{cvs} also ignores file permissions and
cvs.texi(,7762) ownerships, leaving such issues to be resolved by the
cvs.texi(,7763) developer at installation time.  In other words, it is
cvs.texi(,7764) not possible to "check in" a device into a repository;
cvs.texi(,7765) if the device file cannot be opened, @sc{cvs} will refuse to
cvs.texi(,7766) handle it.  Files also lose their ownerships and
cvs.texi(,7767) permissions during repository transactions.
cvs.texi(,7768) 
cvs.texi(,7849) 
cvs.texi(,7850) @c ---------------------------------------------------------------------
cvs.texi(,7851) @node CVS commands
cvs.texi(,7852) @appendix Guide to CVS commands
cvs.texi(,7853) 
cvs.texi(,7854) This appendix describes the overall structure of
cvs.texi(,7855) @sc{cvs} commands, and describes some commands in
cvs.texi(,7856) detail (others are described elsewhere; for a quick
cvs.texi(,7857) reference to @sc{cvs} commands, @pxref{Invoking CVS}).
cvs.texi(,7858) @c The idea is that we want to move the commands which
cvs.texi(,7859) @c are described here into the main body of the manual,
cvs.texi(,7860) @c in the process reorganizing the manual to be
cvs.texi(,7861) @c organized around what the user wants to do, not
cvs.texi(,7862) @c organized around CVS commands.
cvs.texi(,7863) @c
cvs.texi(,7864) @c Note that many users do expect a manual which is
cvs.texi(,7865) @c organized by command.  At least some users do.
cvs.texi(,7866) @c One good addition to the "organized by command"
cvs.texi(,7867) @c section (if any) would be "see also" links.
cvs.texi(,7868) @c The awk manual might be a good example; it has a
cvs.texi(,7869) @c reference manual which is more verbose than Invoking
cvs.texi(,7870) @c CVS but probably somewhat less verbose than CVS
cvs.texi(,7871) @c Commands.
cvs.texi(,7872) 
cvs.texi(,7873) @menu
cvs.texi(,7874) * Structure::                   Overall structure of CVS commands
cvs.texi(,7875) * Exit status::                 Indicating CVS's success or failure
cvs.texi(,7876) * ~/.cvsrc::                    Default options with the ~/.csvrc file
cvs.texi(,7877) * Global options::              Options you give to the left of cvs_command
cvs.texi(,7878) * Common options::              Options you give to the right of cvs_command
cvs.texi(,7879) * admin::                       Administration
cvs.texi(,7880) * checkout::                    Checkout sources for editing
cvs.texi(,7881) * commit::                      Check files into the repository
cvs.texi(,7882) * diff::                        Show differences between revisions
cvs.texi(,7883) * export::                      Export sources from CVS, similar to checkout
cvs.texi(,7884) * history::                     Show status of files and users
cvs.texi(,7885) * import::                      Import sources into CVS, using vendor branches
cvs.texi(,7886) * log::                         Show log messages for files
cvs.texi(,7887) * rdiff::                       'patch' format diffs between releases
cvs.texi(,7888) * release::                     Indicate that a directory is no longer in use
cvs.texi(,7889) * update::                      Bring work tree in sync with repository
cvs.texi(,7890) @end menu
cvs.texi(,7891) 
cvs.texi(,7892) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7893) @node Structure
cvs.texi(,7894) @appendixsec Overall structure of CVS commands
cvs.texi(,7895) @cindex Structure
cvs.texi(,7896) @cindex CVS command structure
cvs.texi(,7897) @cindex Command structure
cvs.texi(,7898) @cindex Format of CVS commands
cvs.texi(,7899) 
cvs.texi(,7900) The overall format of all @sc{cvs} commands is:
cvs.texi(,7901) 
cvs.texi(,7902) @example
cvs.texi(,7903) cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
cvs.texi(,7904) @end example
cvs.texi(,7905) 
cvs.texi(,7906) @table @code
cvs.texi(,7907) @item cvs
cvs.texi(,7908) The name of the @sc{cvs} program.
cvs.texi(,7909) 
cvs.texi(,7910) @item cvs_options
cvs.texi(,7911) Some options that affect all sub-commands of @sc{cvs}.  These are
cvs.texi(,7912) described below.
cvs.texi(,7913) 
cvs.texi(,7914) @item cvs_command
cvs.texi(,7915) One of several different sub-commands.  Some of the commands have
cvs.texi(,7916) aliases that can be used instead; those aliases are noted in the
cvs.texi(,7917) reference manual for that command.  There are only two situations
cvs.texi(,7918) where you may omit @samp{cvs_command}: @samp{cvs -H} elicits a
cvs.texi(,7919) list of available commands, and @samp{cvs -v} displays version
cvs.texi(,7920) information on @sc{cvs} itself.
cvs.texi(,7921) 
cvs.texi(,7922) @item command_options
cvs.texi(,7923) Options that are specific for the command.
cvs.texi(,7924) 
cvs.texi(,7925) @item command_args
cvs.texi(,7926) Arguments to the commands.
cvs.texi(,7927) @end table
cvs.texi(,7928) 
cvs.texi(,7929) There is unfortunately some confusion between
cvs.texi(,7930) @code{cvs_options} and @code{command_options}.
cvs.texi(,7931) @samp{-l}, when given as a @code{cvs_option}, only
cvs.texi(,7932) affects some of the commands.  When it is given as a
cvs.texi(,7933) @code{command_option} is has a different meaning, and
cvs.texi(,7934) is accepted by more commands.  In other words, do not
cvs.texi(,7935) take the above categorization too seriously.  Look at
cvs.texi(,7936) the documentation instead.
cvs.texi(,7937) 
cvs.texi(,7938) @node Exit status
cvs.texi(,7939) @appendixsec CVS's exit status
cvs.texi(,7940) @cindex Exit status, of CVS
cvs.texi(,7941) 
cvs.texi(,7942) @sc{cvs} can indicate to the calling environment whether it
cvs.texi(,7943) succeeded or failed by setting its @dfn{exit status}.
cvs.texi(,7944) The exact way of testing the exit status will vary from
cvs.texi(,7945) one operating system to another.  For example in a unix
cvs.texi(,7946) shell script the @samp{$?} variable will be 0 if the
cvs.texi(,7947) last command returned a successful exit status, or
cvs.texi(,7948) greater than 0 if the exit status indicated failure.
cvs.texi(,7949) 
cvs.texi(,7950) If @sc{cvs} is successful, it returns a successful status;
cvs.texi(,7951) if there is an error, it prints an error message and
cvs.texi(,7952) returns a failure status.  The one exception to this is
cvs.texi(,7953) the @code{cvs diff} command.  It will return a
cvs.texi(,7954) successful status if it found no differences, or a
cvs.texi(,7955) failure status if there were differences or if there
cvs.texi(,7956) was an error.  Because this behavior provides no good
cvs.texi(,7957) way to detect errors, in the future it is possible that
cvs.texi(,7958) @code{cvs diff} will be changed to behave like the
cvs.texi(,7959) other @sc{cvs} commands.
cvs.texi(,7960) @c It might seem like checking whether cvs -q diff
cvs.texi(,7961) @c produces empty or non-empty output can tell whether
cvs.texi(,7962) @c there were differences or not.  But it seems like
cvs.texi(,7963) @c there are cases with output but no differences
cvs.texi(,7964) @c (testsuite basica-8b).  It is not clear to me how
cvs.texi(,7965) @c useful it is for a script to be able to check
cvs.texi(,7966) @c whether there were differences.
cvs.texi(,7967) @c FIXCVS? In previous versions of CVS, cvs diff
cvs.texi(,7968) @c returned 0 for no differences, 1 for differences, or
cvs.texi(,7969) @c 2 for errors.  Is this behavior worth trying to
cvs.texi(,7970) @c bring back (but what does it mean for VMS?)?
cvs.texi(,7971) 
cvs.texi(,7972) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,7973) @node ~/.cvsrc
cvs.texi(,7974) @appendixsec Default options and the ~/.cvsrc file
cvs.texi(,7975) @cindex .cvsrc file
cvs.texi(,7976) @cindex Option defaults
cvs.texi(,7977) 
cvs.texi(,7978) There are some @code{command_options} that are used so
cvs.texi(,7979) often that you might have set up an alias or some other
cvs.texi(,7980) means to make sure you always specify that option.  One
cvs.texi(,7981) example (the one that drove the implementation of the
cvs.texi(,7982) @file{.cvsrc} support, actually) is that many people find the
cvs.texi(,7983) default output of the @samp{diff} command to be very
cvs.texi(,7984) hard to read, and that either context diffs or unidiffs
cvs.texi(,7985) are much easier to understand.
cvs.texi(,7986) 
cvs.texi(,7987) The @file{~/.cvsrc} file is a way that you can add
cvs.texi(,7988) default options to @code{cvs_commands} within cvs,
cvs.texi(,7989) instead of relying on aliases or other shell scripts.
cvs.texi(,7990) 
cvs.texi(,7991) The format of the @file{~/.cvsrc} file is simple.  The
cvs.texi(,7992) file is searched for a line that begins with the same
cvs.texi(,7993) name as the @code{cvs_command} being executed.  If a
cvs.texi(,7994) match is found, then the remainder of the line is split
cvs.texi(,7995) up (at whitespace characters) into separate options and
cvs.texi(,7996) added to the command arguments @emph{before} any
cvs.texi(,7997) options from the command line.
cvs.texi(,7998) 
cvs.texi(,7999) If a command has two names (e.g., @code{checkout} and
cvs.texi(,8000) @code{co}), the official name, not necessarily the one
cvs.texi(,8001) used on the command line, will be used to match against
cvs.texi(,8002) the file.  So if this is the contents of the user's
cvs.texi(,8003) @file{~/.cvsrc} file:
cvs.texi(,8004) 
cvs.texi(,8005) @example
cvs.texi(,8006) log -N
cvs.texi(,8007) diff -uN
cvs.texi(,8008) rdiff -u
cvs.texi(,8009) update -Pd
cvs.texi(,8010) checkout -P
cvs.texi(,8011) release -d
cvs.texi(,8012) @end example
cvs.texi(,8013) 
cvs.texi(,8014) @noindent
cvs.texi(,8015) the command @samp{cvs checkout foo} would have the
cvs.texi(,8016) @samp{-P} option added to the arguments, as well as
cvs.texi(,8017) @samp{cvs co foo}.
cvs.texi(,8018) 
cvs.texi(,8019) With the example file above, the output from @samp{cvs
cvs.texi(,8020) diff foobar} will be in unidiff format.  @samp{cvs diff
cvs.texi(,8021) -c foobar} will provide context diffs, as usual.
cvs.texi(,8022) Getting "old" format diffs would be slightly more
cvs.texi(,8023) complicated, because @code{diff} doesn't have an option
cvs.texi(,8024) to specify use of the "old" format, so you would need
cvs.texi(,8025) @samp{cvs -f diff foobar}.
cvs.texi(,8026) 
cvs.texi(,8027) In place of the command name you can use @code{cvs} to
cvs.texi(,8028) specify global options (@pxref{Global options}).  For
cvs.texi(,8029) example the following line in @file{.cvsrc}
cvs.texi(,8030) 
cvs.texi(,8031) @example
cvs.texi(,8032) cvs -z6
cvs.texi(,8033) @end example
cvs.texi(,8034) 
cvs.texi(,8035) @noindent
cvs.texi(,8036) causes @sc{cvs} to use compression level 6.
cvs.texi(,8037) 
cvs.texi(,8038) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,8039) @node Global options
cvs.texi(,8040) @appendixsec Global options
cvs.texi(,8041) @cindex Options, global
cvs.texi(,8042) @cindex Global options
cvs.texi(,8043) @cindex Left-hand options
cvs.texi(,8044) 
cvs.texi(,8045) The available @samp{cvs_options} (that are given to the
cvs.texi(,8046) left of @samp{cvs_command}) are:
cvs.texi(,8047) 
cvs.texi(,8048) @table @code
cvs.texi(,8049) @item --allow-root=@var{rootdir}
cvs.texi(,8050) Specify legal @sc{cvsroot} directory.  See
cvs.texi(,8051) @ref{Password authentication server}.
cvs.texi(,8052) 
cvs.texi(,8053) @cindex Authentication, stream
cvs.texi(,8054) @cindex Stream authentication
cvs.texi(,8055) @item -a
cvs.texi(,8056) Authenticate all communication between the client and
cvs.texi(,8057) the server.  Only has an effect on the @sc{cvs} client.
cvs.texi(,8058) As of this writing, this is only implemented when using
cvs.texi(,8059) a GSSAPI connection (@pxref{GSSAPI authenticated}).
cvs.texi(,8060) Authentication prevents certain sorts of attacks
cvs.texi(,8061) involving hijacking the active @sc{tcp} connection.
cvs.texi(,8062) Enabling authentication does not enable encryption.
cvs.texi(,8063) 
cvs.texi(,8064) @cindex RCSBIN, overriding
cvs.texi(,8065) @cindex Overriding RCSBIN
cvs.texi(,8066) @item -b @var{bindir}
cvs.texi(,8067) In @sc{cvs} 1.9.18 and older, this specified that
cvs.texi(,8068) @sc{rcs} programs are in the @var{bindir} directory.
cvs.texi(,8069) Current versions of @sc{cvs} do not run @sc{rcs}
cvs.texi(,8070) programs; for compatibility this option is accepted,
cvs.texi(,8071) but it does nothing.
cvs.texi(,8072) 
cvs.texi(,8073) @cindex TMPDIR, overriding
cvs.texi(,8074) @cindex Overriding TMPDIR
cvs.texi(,8075) @item -T @var{tempdir}
cvs.texi(,8076) Use @var{tempdir} as the directory where temporary files are
cvs.texi(,8077) located.  Overrides the setting of the @code{$TMPDIR} environment
cvs.texi(,8078) variable and any precompiled directory.  This parameter should be
cvs.texi(,8079) specified as an absolute pathname.
cvs.texi(,8080) (When running client/server, @samp{-T} affects only the local process;
cvs.texi(,8081) specifying @samp{-T} for the client has no effect on the server and
cvs.texi(,8082) vice versa.)
cvs.texi(,8083) 
cvs.texi(,8084) @cindex CVSROOT, overriding
cvs.texi(,8085) @cindex Overriding CVSROOT
cvs.texi(,8086) @item -d @var{cvs_root_directory}
cvs.texi(,8087) Use @var{cvs_root_directory} as the root directory
cvs.texi(,8088) pathname of the repository.  Overrides the setting of
cvs.texi(,8089) the @code{$CVSROOT} environment variable.  @xref{Repository}.
cvs.texi(,8090) 
cvs.texi(,8091) @cindex EDITOR, overriding
cvs.texi(,8092) @cindex Overriding EDITOR
cvs.texi(,8093) @item -e @var{editor}
cvs.texi(,8094) Use @var{editor} to enter revision log information.  Overrides the
cvs.texi(,8095) setting of the @code{$CVSEDITOR} and @code{$EDITOR}
cvs.texi(,8096) environment variables.  For more information, see
cvs.texi(,8097) @ref{Committing your changes}.
cvs.texi(,8098) 
cvs.texi(,8099) @item -f
cvs.texi(,8100) Do not read the @file{~/.cvsrc} file.  This
cvs.texi(,8101) option is most often used because of the
cvs.texi(,8102) non-orthogonality of the @sc{cvs} option set.  For
cvs.texi(,8103) example, the @samp{cvs log} option @samp{-N} (turn off
cvs.texi(,8104) display of tag names) does not have a corresponding
cvs.texi(,8105) option to turn the display on.  So if you have
cvs.texi(,8106) @samp{-N} in the @file{~/.cvsrc} entry for @samp{log},
cvs.texi(,8107) you may need to use @samp{-f} to show the tag names.
cvs.texi(,8108) 
cvs.texi(,8109) @item -H
cvs.texi(,8110) @itemx --help
cvs.texi(,8111) Display usage information about the specified @samp{cvs_command}
cvs.texi(,8112) (but do not actually execute the command).  If you don't specify
cvs.texi(,8113) a command name, @samp{cvs -H} displays overall help for
cvs.texi(,8114) @sc{cvs}, including a list of other help options.
cvs.texi(,8115) @c It seems to me it is better to document it this way
cvs.texi(,8116) @c rather than trying to update this documentation
cvs.texi(,8117) @c every time that we add a --help-foo option.  But
cvs.texi(,8118) @c perhaps that is confusing...
cvs.texi(,8119) 
cvs.texi(,8120) @item -l
cvs.texi(,8121) Do not log the @samp{cvs_command} in the command history (but execute it
cvs.texi(,8122) anyway).  @xref{history}, for information on command history.
cvs.texi(,8123) 
cvs.texi(,8124) @cindex Read-only repository mode
cvs.texi(,8125) @item -R
cvs.texi(,8126) Turns on read-only repository mode.  This allows one to check out from a
cvs.texi(,8127) read-only repository, such as within an anoncvs server, or from a CDROM
cvs.texi(,8128) repository.
cvs.texi(,8129) 
cvs.texi(,8130) Same effect as if the @code{CVSREADONLYFS} environment
cvs.texi(,8131) variable is set. Using @samp{-R} can also considerably
cvs.texi(,8132) speed up checkout's over NFS.
cvs.texi(,8133) 
cvs.texi(,8134) @cindex Read-only mode
cvs.texi(,8135) @item -n
cvs.texi(,8136) Do not change any files.  Attempt to execute the
cvs.texi(,8137) @samp{cvs_command}, but only to issue reports; do not remove,
cvs.texi(,8138) update, or merge any existing files, or create any new files.
cvs.texi(,8139) 
cvs.texi(,8140) Note that @sc{cvs} will not necessarily produce exactly
cvs.texi(,8141) the same output as without @samp{-n}.  In some cases
cvs.texi(,8142) the output will be the same, but in other cases
cvs.texi(,8143) @sc{cvs} will skip some of the processing that would
cvs.texi(,8144) have been required to produce the exact same output.
cvs.texi(,8145) 
cvs.texi(,8146) @item -Q
cvs.texi(,8147) Cause the command to be really quiet; the command will only
cvs.texi(,8148) generate output for serious problems.
cvs.texi(,8149) 
cvs.texi(,8150) @item -q
cvs.texi(,8151) Cause the command to be somewhat quiet; informational messages,
cvs.texi(,8152) such as reports of recursion through subdirectories, are
cvs.texi(,8153) suppressed.
cvs.texi(,8154) 
cvs.texi(,8155) @cindex Read-only files, and -r
cvs.texi(,8156) @item -r
cvs.texi(,8157) Make new working files read-only.  Same effect
cvs.texi(,8158) as if the @code{$CVSREAD} environment variable is set
cvs.texi(,8159) (@pxref{Environment variables}).  The default is to
cvs.texi(,8160) make working files writable, unless watches are on
cvs.texi(,8161) (@pxref{Watches}).
cvs.texi(,8162) 
cvs.texi(,8163) @item -s @var{variable}=@var{value}
cvs.texi(,8164) Set a user variable (@pxref{Variables}).
cvs.texi(,8165) 
cvs.texi(,8166) @cindex Trace
cvs.texi(,8167) @item -t
cvs.texi(,8168) Trace program execution; display messages showing the steps of
cvs.texi(,8169) @sc{cvs} activity.  Particularly useful with @samp{-n} to explore the
cvs.texi(,8170) potential impact of an unfamiliar command.
cvs.texi(,8171) 
cvs.texi(,8172) @item -v
cvs.texi(,8173) @item --version
cvs.texi(,8174) Display version and copyright information for @sc{cvs}.
cvs.texi(,8175) 
cvs.texi(,8176) @cindex CVSREAD, overriding
cvs.texi(,8177) @cindex Overriding CVSREAD
cvs.texi(,8178) @item -w
cvs.texi(,8179) Make new working files read-write.  Overrides the
cvs.texi(,8180) setting of the @code{$CVSREAD} environment variable.
cvs.texi(,8181) Files are created read-write by default, unless @code{$CVSREAD} is
cvs.texi(,8182) set or @samp{-r} is given.
cvs.texi(,8183) @c Note that -w only overrides -r and CVSREAD; it has
cvs.texi(,8184) @c no effect on files which are readonly because of
cvs.texi(,8185) @c "cvs watch on".  My guess is that is the way it
cvs.texi(,8186) @c should be (or should "cvs -w get" on a watched file
cvs.texi(,8187) @c be the same as a get and a cvs edit?), but I'm not
cvs.texi(,8188) @c completely sure whether to document it this way.
cvs.texi(,8189) 
cvs.texi(,8190) @item -x
cvs.texi(,8191) @cindex Encryption
cvs.texi(,8192) Encrypt all communication between the client and the
cvs.texi(,8193) server.  Only has an effect on the @sc{cvs} client.  As
cvs.texi(,8194) of this writing, this is only implemented when using a
cvs.texi(,8195) GSSAPI connection (@pxref{GSSAPI authenticated}) or a
cvs.texi(,8196) Kerberos connection (@pxref{Kerberos authenticated}).
cvs.texi(,8197) Enabling encryption implies that message traffic is
cvs.texi(,8198) also authenticated.  Encryption support is not
cvs.texi(,8199) available by default; it must be enabled using a
cvs.texi(,8200) special configure option, @file{--enable-encryption},
cvs.texi(,8201) when you build @sc{cvs}.
cvs.texi(,8202) 
cvs.texi(,8203) @item -z @var{gzip-level}
cvs.texi(,8204) @cindex Compression
cvs.texi(,8205) @cindex Gzip
cvs.texi(,8206) Set the compression level.
cvs.texi(,8207) Valid levels are 1 (high speed, low compression) to
cvs.texi(,8208) 9 (low speed, high compression), or 0 to disable
cvs.texi(,8209) compression (the default).
cvs.texi(,8210) Only has an effect on the @sc{cvs} client.
cvs.texi(,8211) 
cvs.texi(,8212) @end table
cvs.texi(,8213) 
cvs.texi(,8214) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,8215) @node Common options
cvs.texi(,8216) @appendixsec Common command options
cvs.texi(,8217) @cindex Common options
cvs.texi(,8218) @cindex Right-hand options
cvs.texi(,8219) 
cvs.texi(,8220) This section describes the @samp{command_options} that
cvs.texi(,8221) are available across several @sc{cvs} commands.  These
cvs.texi(,8222) options are always given to the right of
cvs.texi(,8223) @samp{cvs_command}. Not all
cvs.texi(,8224) commands support all of these options; each option is
cvs.texi(,8225) only supported for commands where it makes sense.
cvs.texi(,8226) However, when a command has one of these options you
cvs.texi(,8227) can almost always count on the same behavior of the
cvs.texi(,8228) option as in other commands.  (Other command options,
cvs.texi(,8229) which are listed with the individual commands, may have
cvs.texi(,8230) different behavior from one @sc{cvs} command to the other).
cvs.texi(,8231) 
cvs.texi(,8232) @strong{Note: the @samp{history} command is an exception; it supports
cvs.texi(,8233) many options that conflict even with these standard options.}
cvs.texi(,8234) 
cvs.texi(,8235) @table @code
cvs.texi(,8236) @cindex Dates
cvs.texi(,8237) @cindex Time
cvs.texi(,8238) @cindex Specifying dates
cvs.texi(,8239) @item -D @var{date_spec}
cvs.texi(,8240) Use the most recent revision no later than @var{date_spec}.
cvs.texi(,8241) @var{date_spec} is a single argument, a date description
cvs.texi(,8242) specifying a date in the past.
cvs.texi(,8243) 
cvs.texi(,8244) The specification is @dfn{sticky} when you use it to make a
cvs.texi(,8245) private copy of a source file; that is, when you get a working
cvs.texi(,8246) file using @samp{-D}, @sc{cvs} records the date you specified, so that
cvs.texi(,8247) further updates in the same directory will use the same date
cvs.texi(,8248) (for more information on sticky tags/dates, @pxref{Sticky tags}).
cvs.texi(,8249) 
cvs.texi(,8250) @samp{-D} is available with the @code{annotate}, @code{checkout},
cvs.texi(,8251) @code{diff}, @code{export}, @code{history},
cvs.texi(,8252) @code{rdiff}, @code{rtag}, @code{tag}, and @code{update} commands.
cvs.texi(,8253) (The @code{history} command uses this option in a
cvs.texi(,8254) slightly different way; @pxref{history options}).
cvs.texi(,8255) 
cvs.texi(,8256) @c What other formats should we accept?  I don't want
cvs.texi(,8257) @c to start accepting a whole mess of non-standard
cvs.texi(,8258) @c new formats (there are a lot which are in wide use in
cvs.texi(,8259) @c one context or another), but practicality does
cvs.texi(,8260) @c dictate some level of flexibility.
cvs.texi(,8261) @c * POSIX.2 (e.g. touch, ls output, date) and other
cvs.texi(,8262) @c POSIX and/or de facto unix standards (e.g. at).  The
cvs.texi(,8263) @c practice here is too inconsistent to be of any use.
cvs.texi(,8264) @c * VMS dates.  This is not a formal standard, but
cvs.texi(,8265) @c there is a published specification (see SYS$ASCTIM
cvs.texi(,8266) @c and SYS$BINTIM in the _VMS System Services Reference
cvs.texi(,8267) @c Manual_), it is implemented consistently in VMS
cvs.texi(,8268) @c utilities, and VMS users will expect CVS running on
cvs.texi(,8269) @c VMS to support this format (and if we're going to do
cvs.texi(,8270) @c that, better to make CVS support it on all
cvs.texi(,8271) @c platforms.  Maybe).
cvs.texi(,8272) @c
cvs.texi(,8273) @c NOTE: The tar manual has some documentation for
cvs.texi(,8274) @c getdate.y (just for our info; we don't want to
cvs.texi(,8275) @c attempt to document all the formats accepted by
cvs.texi(,8276) @c getdate.y).
cvs.texi(,8277) @c
cvs.texi(,8278) @c One more note: In output, CVS should consistently
cvs.texi(,8279) @c use one date format, and that format should be one that
cvs.texi(,8280) @c it accepts in input as well.  The former isn't
cvs.texi(,8281) @c really true (see survey below), and I'm not
cvs.texi(,8282) @c sure that either of those formats is accepted in
cvs.texi(,8283) @c input.
cvs.texi(,8284) @c
cvs.texi(,8285) @c cvs log
cvs.texi(,8286) @c   current 1996/01/02 13:45:31
cvs.texi(,8287) @c   Internet 02 Jan 1996 13:45:31 UT
cvs.texi(,8288) @c   ISO 1996-01-02 13:45:31
cvs.texi(,8289) @c cvs ann
cvs.texi(,8290) @c   current 02-Jan-96
cvs.texi(,8291) @c   Internet-like 02 Jan 96
cvs.texi(,8292) @c   ISO 96-01-02
cvs.texi(,8293) @c cvs status
cvs.texi(,8294) @c   current Tue Jun 11 02:54:53 1996
cvs.texi(,8295) @c   Internet [Tue,] 11 Jun 1996 02:54:53
cvs.texi(,8296) @c   ISO 1996-06-11 02:54:53
cvs.texi(,8297) @c   note: date possibly should be omitted entirely for
cvs.texi(,8298) @c   other reasons.
cvs.texi(,8299) @c cvs editors
cvs.texi(,8300) @c   current Tue Jun 11 02:54:53 1996 GMT
cvs.texi(,8301) @c cvs history
cvs.texi(,8302) @c   current 06/11 02:54 +0000
cvs.texi(,8303) @c any others?
cvs.texi(,8304) @c There is a good chance the proper solution has to
cvs.texi(,8305) @c involve at least some level of letting the user
cvs.texi(,8306) @c decide which format (with the default being the
cvs.texi(,8307) @c formats CVS has always used; changing these might be
cvs.texi(,8308) @c _very_ disruptive since scripts may very well be
cvs.texi(,8309) @c parsing them).
cvs.texi(,8310) @c
cvs.texi(,8311) @c Another random bit of prior art concerning dates is
cvs.texi(,8312) @c the strptime function which takes templates such as
cvs.texi(,8313) @c "%m/%d/%y", and apparent a variant of getdate()
cvs.texi(,8314) @c which also honors them.  See
cvs.texi(,8315) @c X/Open CAE Specification, System Interfaces and
cvs.texi(,8316) @c Headers Issue 4, Version 2 (September 1994), in the
cvs.texi(,8317) @c entry for getdate() on page 231
cvs.texi(,8318) 
cvs.texi(,8319) @cindex Timezone, in input
cvs.texi(,8320) @cindex Zone, time, in input
cvs.texi(,8321) A wide variety of date formats are supported by
cvs.texi(,8322) @sc{cvs}.  The most standard ones are ISO8601 (from the
cvs.texi(,8323) International Standards Organization) and the Internet
cvs.texi(,8324) e-mail standard (specified in RFC822 as amended by
cvs.texi(,8325) RFC1123).
cvs.texi(,8326) 
cvs.texi(,8327) @c Probably should be doing more to spell out just what
cvs.texi(,8328) @c the rules are, rather than just giving examples.
cvs.texi(,8329) @c But I want to keep this simple too.
cvs.texi(,8330) @c So I don't know....
cvs.texi(,8331) @c A few specific issues: (1) Maybe should reassure
cvs.texi(,8332) @c people that years after 2000
cvs.texi(,8333) @c work (they are in the testsuite, so they do indeed
cvs.texi(,8334) @c work).  (2) What do two digit years
cvs.texi(,8335) @c mean?  Where do we accept them?  (3) Local times can
cvs.texi(,8336) @c be ambiguous or nonexistent if they fall during the
cvs.texi(,8337) @c hour when daylight savings time goes into or out of
cvs.texi(,8338) @c effect.  Pretty obscure, so I'm not at all sure we
cvs.texi(,8339) @c should be documenting the behavior in that case.
cvs.texi(,8340) ISO8601 dates have many variants but a few examples
cvs.texi(,8341) are:
cvs.texi(,8342) 
cvs.texi(,8343) @example
cvs.texi(,8344) 1972-09-24
cvs.texi(,8345) 1972-09-24 20:05
cvs.texi(,8346) @end example
cvs.texi(,8347) @c I doubt we really accept all ISO8601 format dates
cvs.texi(,8348) @c (for example, decimal hours like 1972-09-24 20,2)
cvs.texi(,8349) @c I'm not sure we should, many of them are pretty
cvs.texi(,8350) @c bizarre and it has lots of gratuitous multiple ways
cvs.texi(,8351) @c to specify the same thing.
cvs.texi(,8352) 
cvs.texi(,8353) There are a lot more ISO8601 date formats, and @sc{cvs}
cvs.texi(,8354) accepts many of them, but you probably don't want to
cvs.texi(,8355) hear the @emph{whole} long story :-).
cvs.texi(,8356) 
cvs.texi(,8357) @c Citing a URL here is kind of problematic given how
cvs.texi(,8358) @c much they change and people who have old versions of
cvs.texi(,8359) @c this manual, but in case we want to reinstate an
cvs.texi(,8360) @c ISO8601 URL, a few are:
cvs.texi(,8361) @c http://www.saqqara.demon.co.uk/datefmt.htm
cvs.texi(,8362) @c http://www.cl.cam.ac.uk/~mgk25/iso-time.html
cvs.texi(,8363) @c Citing some other ISO8601 source is probably even
cvs.texi(,8364) @c worse :-).
cvs.texi(,8365) 
cvs.texi(,8366) In addition to the dates allowed in Internet e-mail
cvs.texi(,8367) itself, @sc{cvs} also allows some of the fields to be
cvs.texi(,8368) omitted.  For example:
cvs.texi(,8369) @c FIXME: Need to figure out better, and document,
cvs.texi(,8370) @c what we want to allow the user to omit.
cvs.texi(,8371) @c NOTE: "omit" does not imply "reorder".
cvs.texi(,8372) @c FIXME: Need to cite a web page describing how to get
cvs.texi(,8373) @c RFC's.
cvs.texi(,8374) 
cvs.texi(,8375) @example
cvs.texi(,8376) 24 Sep 1972 20:05
cvs.texi(,8377) 24 Sep
cvs.texi(,8378) @end example
cvs.texi(,8379) 
cvs.texi(,8380) The date is interpreted as being in the
cvs.texi(,8381) local timezone, unless a specific timezone is
cvs.texi(,8382) specified.
cvs.texi(,8383) 
cvs.texi(,8384) These two date formats are preferred.  However,
cvs.texi(,8385) @sc{cvs} currently accepts a wide variety of other date
cvs.texi(,8386) formats.  They are intentionally not documented here in
cvs.texi(,8387) any detail, and future versions of @sc{cvs} might not
cvs.texi(,8388) accept all of them.
cvs.texi(,8389) @c We should document and testsuite "now" and
cvs.texi(,8390) @c "yesterday".  "now" is mentioned in the FAQ and
cvs.texi(,8391) @c "yesterday" is mentioned in this document (and the
cvs.texi(,8392) @c message from "cvs import" suggesting a merge
cvs.texi(,8393) @c command).  What else?  Probably some/all of the "3
cvs.texi(,8394) @c weeks ago" family.
cvs.texi(,8395) @c
cvs.texi(,8396) @c Maybe at
cvs.texi(,8397) @c some point have CVS start give warnings on "unofficial"
cvs.texi(,8398) @c formats (many of which might be typos or user
cvs.texi(,8399) @c misunderstandings, and/or formats people never/rarely
cvs.texi(,8400) @c use to specify dates)?
cvs.texi(,8401) 
cvs.texi(,8402) One such format is
cvs.texi(,8403) @code{@var{month}/@var{day}/@var{year}}.  This may
cvs.texi(,8404) confuse people who are accustomed to having the month
cvs.texi(,8405) and day in the other order; @samp{1/4/96} is January 4,
cvs.texi(,8406) not April 1.
cvs.texi(,8407) 
cvs.texi(,8408) Remember to quote the argument to the @samp{-D}
cvs.texi(,8409) flag so that your shell doesn't interpret spaces as
cvs.texi(,8410) argument separators.  A command using the @samp{-D}
cvs.texi(,8411) flag can look like this:
cvs.texi(,8412) 
cvs.texi(,8413) @example
cvs.texi(,8414) $ cvs diff -D "1 hour ago" cvs.texinfo
cvs.texi(,8415) @end example
cvs.texi(,8416) 
cvs.texi(,8417) @cindex Forcing a tag match
cvs.texi(,8418) @item -f
cvs.texi(,8419) When you specify a particular date or tag to @sc{cvs} commands, they
cvs.texi(,8420) normally ignore files that do not contain the tag (or did not
cvs.texi(,8421) exist prior to the date) that you specified.  Use the @samp{-f} option
cvs.texi(,8422) if you want files retrieved even when there is no match for the
cvs.texi(,8423) tag or date.  (The most recent revision of the file
cvs.texi(,8424) will be used).
cvs.texi(,8425) 
cvs.texi(,8426) Note that even with @samp{-f}, a tag that you specify
cvs.texi(,8427) must exist (that is, in some file, not necessary in
cvs.texi(,8428) every file).  This is so that @sc{cvs} will continue to
cvs.texi(,8429) give an error if you mistype a tag name.
cvs.texi(,8430) 
cvs.texi(,8431) @need 800
cvs.texi(,8432) @samp{-f} is available with these commands:
cvs.texi(,8433) @code{annotate}, @code{checkout}, @code{export},
cvs.texi(,8434) @code{rdiff}, @code{rtag}, and @code{update}.
cvs.texi(,8435) 
cvs.texi(,8436) @strong{WARNING:  The @code{commit} and @code{remove}
cvs.texi(,8437) commands also have a
cvs.texi(,8438) @samp{-f} option, but it has a different behavior for
cvs.texi(,8439) those commands.  See @ref{commit options}, and
cvs.texi(,8440) @ref{Removing files}.}
cvs.texi(,8441) 
cvs.texi(,8442) @item -k @var{kflag}
cvs.texi(,8443) Override the default processing of RCS keywords other than
cvs.texi(,8444) @samp{-kb}.  @xref{Keyword substitution}, for the meaning of
cvs.texi(,8445) @var{kflag}.  Used with the @code{checkout} and @code{update}
cvs.texi(,8446) commands, your @var{kflag} specification is
cvs.texi(,8447) @dfn{sticky}; that is, when you use this option
cvs.texi(,8448) with a @code{checkout} or @code{update} command,
cvs.texi(,8449) @sc{cvs} associates your selected @var{kflag} with any files
cvs.texi(,8450) it operates on, and continues to use that @var{kflag} with future
cvs.texi(,8451) commands on the same files until you specify otherwise.
cvs.texi(,8452) 
cvs.texi(,8453) The @samp{-k} option is available with the @code{add},
cvs.texi(,8454) @code{checkout}, @code{diff}, @code{export}, @code{import} and
cvs.texi(,8455) @code{update} commands.
cvs.texi(,8456) 
cvs.texi(,8457) @strong{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag
cvs.texi(,8458) overrode the @samp{-kb} indication for a binary file.  This could
cvs.texi(,8459) sometimes corrupt binary files.  @xref{Merging and keywords}, for
cvs.texi(,8460) more.}
cvs.texi(,8461) 
cvs.texi(,8462) @item -l
cvs.texi(,8463) Local; run only in current working directory, rather than
cvs.texi(,8464) recursing through subdirectories.
cvs.texi(,8465) 
cvs.texi(,8466) Available with the following commands: @code{annotate}, @code{checkout},
cvs.texi(,8467) @code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export},
cvs.texi(,8468) @code{log}, @code{rdiff}, @code{remove}, @code{rtag},
cvs.texi(,8469) @code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch},
cvs.texi(,8470) and @code{watchers}.
cvs.texi(,8471) 
cvs.texi(,8472) @cindex Editor, avoiding invocation of
cvs.texi(,8473) @cindex Avoiding editor invocation
cvs.texi(,8474) @item -m @var{message}
cvs.texi(,8475) Use @var{message} as log information, instead of
cvs.texi(,8476) invoking an editor.
cvs.texi(,8477) 
cvs.texi(,8478) Available with the following commands: @code{add},
cvs.texi(,8479) @code{commit} and @code{import}.
cvs.texi(,8480) 
cvs.texi(,8481) @item -n
cvs.texi(,8482) Do not run any tag program.  (A program can be
cvs.texi(,8483) specified to run in the modules
cvs.texi(,8484) database (@pxref{modules}); this option bypasses it).
cvs.texi(,8485) 
cvs.texi(,8486) @strong{Note: this is not the same as the @samp{cvs -n}
cvs.texi(,8487) program option, which you can specify to the left of a cvs command!}
cvs.texi(,8488) 
cvs.texi(,8489) Available with the @code{checkout}, @code{commit}, @code{export},
cvs.texi(,8490) and @code{rtag} commands.
cvs.texi(,8491) 
cvs.texi(,8492) @item -P
cvs.texi(,8493) Prune empty directories.  See @ref{Removing directories}.
cvs.texi(,8494) 
cvs.texi(,8495) @item -p
cvs.texi(,8496) Pipe the files retrieved from the repository to standard output,
cvs.texi(,8497) rather than writing them in the current directory.  Available
cvs.texi(,8498) with the @code{checkout} and @code{update} commands.
cvs.texi(,8499) 
cvs.texi(,8500) @item -R
cvs.texi(,8501) Process directories recursively.  This is on by default.
cvs.texi(,8502) 
cvs.texi(,8503) Available with the following commands: @code{annotate}, @code{checkout},
cvs.texi(,8504) @code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export},
cvs.texi(,8505) @code{rdiff}, @code{remove}, @code{rtag},
cvs.texi(,8506) @code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch},
cvs.texi(,8507) and @code{watchers}.
cvs.texi(,8508) 
cvs.texi(,8509) @item -r @var{tag}
cvs.texi(,8510) @cindex HEAD, special tag
cvs.texi(,8511) @cindex BASE, special tag
cvs.texi(,8512) Use the revision specified by the @var{tag} argument instead of the
cvs.texi(,8513) default @dfn{head} revision.  As well as arbitrary tags defined
cvs.texi(,8514) with the @code{tag} or @code{rtag} command, two special tags are
cvs.texi(,8515) always available: @samp{HEAD} refers to the most recent version
cvs.texi(,8516) available in the repository, and @samp{BASE} refers to the
cvs.texi(,8517) revision you last checked out into the current working directory.
cvs.texi(,8518) 
cvs.texi(,8519) @c FIXME: What does HEAD really mean?  I believe that
cvs.texi(,8520) @c the current answer is the head of the default branch
cvs.texi(,8521) @c for all cvs commands except diff.  For diff, it
cvs.texi(,8522) @c seems to be (a) the head of the trunk (or the default
cvs.texi(,8523) @c branch?) if there is no sticky tag, (b) the head of the
cvs.texi(,8524) @c branch for the sticky tag, if there is a sticky tag.
cvs.texi(,8525) @c (b) is ugly as it differs
cvs.texi(,8526) @c from what HEAD means for other commands, but people
cvs.texi(,8527) @c and/or scripts are quite possibly used to it.
cvs.texi(,8528) @c See "head" tests in sanity.sh.
cvs.texi(,8529) @c Probably the best fix is to introduce two new
cvs.texi(,8530) @c special tags, ".thead" for the head of the trunk,
cvs.texi(,8531) @c and ".bhead" for the head of the current branch.
cvs.texi(,8532) @c Then deprecate HEAD.  This has the advantage of
cvs.texi(,8533) @c not surprising people with a change to HEAD, and a
cvs.texi(,8534) @c side benefit of also phasing out the poorly-named
cvs.texi(,8535) @c HEAD (see discussion of reserved tag names in node
cvs.texi(,8536) @c "Tags").  Of course, .thead and .bhead should be
cvs.texi(,8537) @c carefully implemented (with the implementation the
cvs.texi(,8538) @c same for "diff" as for everyone else), test cases
cvs.texi(,8539) @c written (similar to the ones in "head"), new tests
cvs.texi(,8540) @c cases written for things like default branches, &c.
cvs.texi(,8541) 
cvs.texi(,8542) The tag specification is sticky when you use this
cvs.texi(,8543) @c option
cvs.texi(,8544) with @code{checkout} or @code{update} to make your own
cvs.texi(,8545) copy of a file: @sc{cvs} remembers the tag and continues to use it on
cvs.texi(,8546) future update commands, until you specify otherwise (for more information
cvs.texi(,8547) on sticky tags/dates, @pxref{Sticky tags}).
cvs.texi(,8548) 
cvs.texi(,8549) The tag can be either a symbolic or numeric tag, as
cvs.texi(,8550) described in @ref{Tags}, or the name of a branch, as
cvs.texi(,8551) described in @ref{Branching and merging}.
cvs.texi(,8552) 
cvs.texi(,8553) Specifying the @samp{-q} global option along with the
cvs.texi(,8554) @samp{-r} command option is often useful, to suppress
cvs.texi(,8555) the warning messages when the @sc{rcs} file
cvs.texi(,8556) does not contain the specified tag.
cvs.texi(,8557) 
cvs.texi(,8558) @strong{Note: this is not the same as the overall @samp{cvs -r} option,
cvs.texi(,8559) which you can specify to the left of a @sc{cvs} command!}
cvs.texi(,8560) 
cvs.texi(,8561) @samp{-r} is available with the @code{checkout}, @code{commit},
cvs.texi(,8562) @code{diff}, @code{history}, @code{export}, @code{rdiff},
cvs.texi(,8563) @code{rtag}, and @code{update} commands.
cvs.texi(,8564) 
cvs.texi(,8565) @item -W
cvs.texi(,8566) Specify file names that should be filtered.  You can
cvs.texi(,8567) use this option repeatedly.  The spec can be a file
cvs.texi(,8568) name pattern of the same type that you can specify in
cvs.texi(,8569) the @file{.cvswrappers} file.
cvs.texi(,8570) Available with the following commands: @code{import},
cvs.texi(,8571) and @code{update}.
cvs.texi(,8572) 
cvs.texi(,8573) @end table
cvs.texi(,8574) 
cvs.texi(,8575) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,8576) @node admin
cvs.texi(,8577) @appendixsec admin---Administration
cvs.texi(,8578) @cindex Admin (subcommand)
cvs.texi(,8579) 
cvs.texi(,8580) @itemize @bullet
cvs.texi(,8581) @item
cvs.texi(,8582) Requires: repository, working directory.
cvs.texi(,8583) @item
cvs.texi(,8584) Changes: repository.
cvs.texi(,8585) @item
cvs.texi(,8586) Synonym: rcs
cvs.texi(,8587) @end itemize
cvs.texi(,8588) 
cvs.texi(,8589) This is the @sc{cvs} interface to assorted
cvs.texi(,8590) administrative facilities.  Some of them have
cvs.texi(,8591) questionable usefulness for @sc{cvs} but exist for
cvs.texi(,8592) historical purposes.  Some of the questionable options
cvs.texi(,8593) are likely to disappear in the future.  This command
cvs.texi(,8594) @emph{does} work recursively, so extreme care should be
cvs.texi(,8595) used.
cvs.texi(,8596) 
cvs.texi(,8597) @cindex cvsadmin
cvs.texi(,8598) @cindex UserAdminOptions, in CVSROOT/config
cvs.texi(,8599) On unix, if there is a group named @code{cvsadmin},
cvs.texi(,8600) only members of that group can run @code{cvs admin}
cvs.texi(,8601) commands, except for those specified using the
cvs.texi(,8602) @code{UserAdminOptions} configuration option in the
cvs.texi(,8603) @file{CVSROOT/config} file.  Options specified using
cvs.texi(,8604) @code{UserAdminOptions} can be run by any user.  See
cvs.texi(,8605) @ref{config} for more on @code{UserAdminOptions}.
cvs.texi(,8606) 
cvs.texi(,8607) The @code{cvsadmin} group should exist on the server,
cvs.texi(,8608) or any system running the non-client/server @sc{cvs}.
cvs.texi(,8609) To disallow @code{cvs admin} for all users, create a
cvs.texi(,8610) group with no users in it.  On NT, the @code{cvsadmin}
cvs.texi(,8611) feature does not exist and all users
cvs.texi(,8612) can run @code{cvs admin}.
cvs.texi(,8613) 
cvs.texi(,8614) @menu
cvs.texi(,8615) * admin options::               admin options
cvs.texi(,8616) @end menu
cvs.texi(,8617) 
cvs.texi(,8618) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,8619) @node admin options
cvs.texi(,8620) @appendixsubsec admin options
cvs.texi(,8621) 
cvs.texi(,8622) Some of these options have questionable usefulness for
cvs.texi(,8623) @sc{cvs} but exist for historical purposes.  Some even
cvs.texi(,8624) make it impossible to use @sc{cvs} until you undo the
cvs.texi(,8625) effect!
cvs.texi(,8626) 
cvs.texi(,8627) @table @code
cvs.texi(,8628) @item -A@var{oldfile}
cvs.texi(,8629) Might not work together with @sc{cvs}.  Append the
cvs.texi(,8630) access list of @var{oldfile} to the access list of the
cvs.texi(,8631) @sc{rcs} file.
cvs.texi(,8632) 
cvs.texi(,8633) @item -a@var{logins}
cvs.texi(,8634) Might not work together with @sc{cvs}.  Append the
cvs.texi(,8635) login names appearing in the comma-separated list
cvs.texi(,8636) @var{logins} to the access list of the @sc{rcs} file.
cvs.texi(,8637) 
cvs.texi(,8638) @item -b[@var{rev}]
cvs.texi(,8639) Set the default branch to @var{rev}.  In @sc{cvs}, you
cvs.texi(,8640) normally do not manipulate default branches; sticky
cvs.texi(,8641) tags (@pxref{Sticky tags}) are a better way to decide
cvs.texi(,8642) which branch you want to work on.  There is one reason
cvs.texi(,8643) to run @code{cvs admin -b}: to revert to the vendor's
cvs.texi(,8644) version when using vendor branches (@pxref{Reverting
cvs.texi(,8645) local changes}).
cvs.texi(,8646) There can be no space between @samp{-b} and its argument.
cvs.texi(,8647) @c Hmm, we don't document the usage where rev is
cvs.texi(,8648) @c omitted.  Maybe that usage can/should be deprecated
cvs.texi(,8649) @c (and replaced with -bHEAD or something?) (so we can toss
cvs.texi(,8650) @c the optional argument).  Note that -bHEAD does not
cvs.texi(,8651) @c work, as of 17 Sep 1997, but probably will once "cvs
cvs.texi(,8652) @c admin" is internal to CVS.
cvs.texi(,8653) 
cvs.texi(,8654) @cindex Comment leader
cvs.texi(,8655) @item -c@var{string}
cvs.texi(,8656) Sets the comment leader to @var{string}.  The comment
cvs.texi(,8657) leader is not used by current versions of @sc{cvs} or
cvs.texi(,8658) @sc{rcs} 5.7.  Therefore, you can almost surely not
cvs.texi(,8659) worry about it.  @xref{Keyword substitution}.
cvs.texi(,8660) 
cvs.texi(,8661) @item -e[@var{logins}]
cvs.texi(,8662) Might not work together with @sc{cvs}.  Erase the login
cvs.texi(,8663) names appearing in the comma-separated list
cvs.texi(,8664) @var{logins} from the access list of the RCS file.  If
cvs.texi(,8665) @var{logins} is omitted, erase the entire access list.
cvs.texi(,8666) There can be no space between @samp{-e} and its argument.
cvs.texi(,8667) 
cvs.texi(,8668) @item -I
cvs.texi(,8669) Run interactively, even if the standard input is not a
cvs.texi(,8670) terminal.  This option does not work with the
cvs.texi(,8671) client/server @sc{cvs} and is likely to disappear in
cvs.texi(,8672) a future release of @sc{cvs}.
cvs.texi(,8673) 
cvs.texi(,8674) @item -i
cvs.texi(,8675) Useless with @sc{cvs}.  This creates and initializes a
cvs.texi(,8676) new @sc{rcs} file, without depositing a revision.  With
cvs.texi(,8677) @sc{cvs}, add files with the @code{cvs add} command
cvs.texi(,8678) (@pxref{Adding files}).
cvs.texi(,8679) 
cvs.texi(,8680) @item -k@var{subst}
cvs.texi(,8681) Set the default keyword
cvs.texi(,8682) substitution to @var{subst}.  @xref{Keyword
cvs.texi(,8683) substitution}.  Giving an explicit @samp{-k} option to
cvs.texi(,8684) @code{cvs update}, @code{cvs export}, or @code{cvs
cvs.texi(,8685) checkout} overrides this default.
cvs.texi(,8686) 
cvs.texi(,8687) @item -l[@var{rev}]
cvs.texi(,8688) Lock the revision with number @var{rev}.  If a branch
cvs.texi(,8689) is given, lock the latest revision on that branch.  If
cvs.texi(,8690) @var{rev} is omitted, lock the latest revision on the
cvs.texi(,8691) default branch.  There can be no space between
cvs.texi(,8692) @samp{-l} and its argument.
cvs.texi(,8693) 
cvs.texi(,8694) This can be used in conjunction with the
cvs.texi(,8695) @file{rcslock.pl} script in the @file{contrib}
cvs.texi(,8696) directory of the @sc{cvs} source distribution to
cvs.texi(,8697) provide reserved checkouts (where only one user can be
cvs.texi(,8698) editing a given file at a time).  See the comments in
cvs.texi(,8699) that file for details (and see the @file{README} file
cvs.texi(,8700) in that directory for disclaimers about the unsupported
cvs.texi(,8701) nature of contrib).  According to comments in that
cvs.texi(,8702) file, locking must set to strict (which is the default).
cvs.texi(,8703) 
cvs.texi(,8704) @item -L
cvs.texi(,8705) Set locking to strict.  Strict locking means that the
cvs.texi(,8706) owner of an RCS file is not exempt from locking for
cvs.texi(,8707) checkin.  For use with @sc{cvs}, strict locking must be
cvs.texi(,8708) set; see the discussion under the @samp{-l} option above.
cvs.texi(,8709) 
cvs.texi(,8710) @cindex Changing a log message
cvs.texi(,8711) @cindex Replacing a log message
cvs.texi(,8712) @cindex Correcting a log message
cvs.texi(,8713) @cindex Fixing a log message
cvs.texi(,8714) @cindex Log message, correcting
cvs.texi(,8715) @item -m@var{rev}:@var{msg}
cvs.texi(,8716) Replace the log message of revision @var{rev} with
cvs.texi(,8717) @var{msg}.
cvs.texi(,8718) 
cvs.texi(,8719) @c The rcs -M option, to suppress sending mail, has never been
cvs.texi(,8720) @c documented as a cvs admin option.
cvs.texi(,8721) 
cvs.texi(,8722) @item -N@var{name}[:[@var{rev}]]
cvs.texi(,8723) Act like @samp{-n}, except override any previous
cvs.texi(,8724) assignment of @var{name}.  For use with magic branches,
cvs.texi(,8725) see @ref{Magic branch numbers}.
cvs.texi(,8726) 
cvs.texi(,8727) @item -n@var{name}[:[@var{rev}]]
cvs.texi(,8728) Associate the symbolic name @var{name} with the branch
cvs.texi(,8729) or revision @var{rev}.  It is normally better to use
cvs.texi(,8730) @samp{cvs tag} or @samp{cvs rtag} instead.  Delete the
cvs.texi(,8731) symbolic name if both @samp{:} and @var{rev} are
cvs.texi(,8732) omitted; otherwise, print an error message if
cvs.texi(,8733) @var{name} is already associated with another number.
cvs.texi(,8734) If @var{rev} is symbolic, it is expanded before
cvs.texi(,8735) association.  A @var{rev} consisting of a branch number
cvs.texi(,8736) followed by a @samp{.} stands for the current latest
cvs.texi(,8737) revision in the branch.  A @samp{:} with an empty
cvs.texi(,8738) @var{rev} stands for the current latest revision on the
cvs.texi(,8739) default branch, normally the trunk.  For example,
cvs.texi(,8740) @samp{cvs admin -n@var{name}:} associates @var{name} with the
cvs.texi(,8741) current latest revision of all the RCS files;
cvs.texi(,8742) this contrasts with @samp{cvs admin -n@var{name}:$} which
cvs.texi(,8743) associates @var{name} with the revision numbers
cvs.texi(,8744) extracted from keyword strings in the corresponding
cvs.texi(,8745) working files.
cvs.texi(,8746) 
cvs.texi(,8747) @cindex Deleting revisions
cvs.texi(,8748) @cindex Outdating revisions
cvs.texi(,8749) @cindex Saving space
cvs.texi(,8750) @item -o@var{range}
cvs.texi(,8751) Deletes (@dfn{outdates}) the revisions given by
cvs.texi(,8752) @var{range}.
cvs.texi(,8753) 
cvs.texi(,8754) Note that this command can be quite dangerous unless
cvs.texi(,8755) you know @emph{exactly} what you are doing (for example
cvs.texi(,8756) see the warnings below about how the
cvs.texi(,8757) @var{rev1}:@var{rev2} syntax is confusing).
cvs.texi(,8758) 
cvs.texi(,8759) If you are short on disc this option might help you.
cvs.texi(,8760) But think twice before using it---there is no way short
cvs.texi(,8761) of restoring the latest backup to undo this command!
cvs.texi(,8762) If you delete different revisions than you planned,
cvs.texi(,8763) either due to carelessness or (heaven forbid) a @sc{cvs}
cvs.texi(,8764) bug, there is no opportunity to correct the error
cvs.texi(,8765) before the revisions are deleted.  It probably would be
cvs.texi(,8766) a good idea to experiment on a copy of the repository
cvs.texi(,8767) first.
cvs.texi(,8768) 
cvs.texi(,8769) Specify @var{range} in one of the following ways:
cvs.texi(,8770) 
cvs.texi(,8771) @table @code
cvs.texi(,8772) @item @var{rev1}::@var{rev2}
cvs.texi(,8773) Collapse all revisions between rev1 and rev2, so that
cvs.texi(,8774) @sc{cvs} only stores the differences associated with going
cvs.texi(,8775) from rev1 to rev2, not intermediate steps.  For
cvs.texi(,8776) example, after @samp{-o 1.3::1.5} one can retrieve
cvs.texi(,8777) revision 1.3, revision 1.5, or the differences to get
cvs.texi(,8778) from 1.3 to 1.5, but not the revision 1.4, or the
cvs.texi(,8779) differences between 1.3 and 1.4.  Other examples:
cvs.texi(,8780) @samp{-o 1.3::1.4} and @samp{-o 1.3::1.3} have no
cvs.texi(,8781) effect, because there are no intermediate revisions to
cvs.texi(,8782) remove.
cvs.texi(,8783) 
cvs.texi(,8784) @item ::@var{rev}
cvs.texi(,8785) Collapse revisions between the beginning of the branch
cvs.texi(,8786) containing @var{rev} and @var{rev} itself.  The
cvs.texi(,8787) branchpoint and @var{rev} are left intact.  For
cvs.texi(,8788) example, @samp{-o ::1.3.2.6} deletes revision 1.3.2.1,
cvs.texi(,8789) revision 1.3.2.5, and everything in between, but leaves
cvs.texi(,8790) 1.3 and 1.3.2.6 intact.
cvs.texi(,8791) 
cvs.texi(,8792) @item @var{rev}::
cvs.texi(,8793) Collapse revisions between @var{rev} and the end of the
cvs.texi(,8794) branch containing @var{rev}.  Revision @var{rev} is
cvs.texi(,8795) left intact but the head revision is deleted.
cvs.texi(,8796) 
cvs.texi(,8797) @item @var{rev}
cvs.texi(,8798) Delete the revision @var{rev}.  For example, @samp{-o
cvs.texi(,8799) 1.3} is equivalent to @samp{-o 1.2::1.4}.
cvs.texi(,8800) 
cvs.texi(,8801) @item @var{rev1}:@var{rev2}
cvs.texi(,8802) Delete the revisions from @var{rev1} to @var{rev2},
cvs.texi(,8803) inclusive, on the same branch.  One will not be able to
cvs.texi(,8804) retrieve @var{rev1} or @var{rev2} or any of the
cvs.texi(,8805) revisions in between.  For example, the command
cvs.texi(,8806) @samp{cvs admin -oR_1_01:R_1_02 .} is rarely useful.
cvs.texi(,8807) It means to delete revisions up to, and including, the
cvs.texi(,8808) tag R_1_02.  But beware!  If there are files that have not
cvs.texi(,8809) changed between R_1_02 and R_1_03 the file will have
cvs.texi(,8810) @emph{the same} numerical revision number assigned to
cvs.texi(,8811) the tags R_1_02 and R_1_03.  So not only will it be
cvs.texi(,8812) impossible to retrieve R_1_02; R_1_03 will also have to
cvs.texi(,8813) be restored from the tapes!  In most cases you want to
cvs.texi(,8814) specify @var{rev1}::@var{rev2} instead.
cvs.texi(,8815) 
cvs.texi(,8816) @item :@var{rev}
cvs.texi(,8817) Delete revisions from the beginning of the
cvs.texi(,8818) branch containing @var{rev} up to and including
cvs.texi(,8819) @var{rev}.
cvs.texi(,8820) 
cvs.texi(,8821) @item @var{rev}:
cvs.texi(,8822) Delete revisions from revision @var{rev}, including
cvs.texi(,8823) @var{rev} itself, to the end of the branch containing
cvs.texi(,8824) @var{rev}.
cvs.texi(,8825) @end table
cvs.texi(,8826) 
cvs.texi(,8827) None of the revisions to be deleted may have
cvs.texi(,8828) branches or locks.
cvs.texi(,8829) 
cvs.texi(,8830) If any of the revisions to be deleted have symbolic
cvs.texi(,8831) names, and one specifies one of the @samp{::} syntaxes,
cvs.texi(,8832) then @sc{cvs} will give an error and not delete any
cvs.texi(,8833) revisions.  If you really want to delete both the
cvs.texi(,8834) symbolic names and the revisions, first delete the
cvs.texi(,8835) symbolic names with @code{cvs tag -d}, then run
cvs.texi(,8836) @code{cvs admin -o}.  If one specifies the
cvs.texi(,8837) non-@samp{::} syntaxes, then @sc{cvs} will delete the
cvs.texi(,8838) revisions but leave the symbolic names pointing to
cvs.texi(,8839) nonexistent revisions.  This behavior is preserved for
cvs.texi(,8840) compatibility with previous versions of @sc{cvs}, but
cvs.texi(,8841) because it isn't very useful, in the future it may
cvs.texi(,8842) change to be like the @samp{::} case.
cvs.texi(,8843) 
cvs.texi(,8844) Due to the way @sc{cvs} handles branches @var{rev}
cvs.texi(,8845) cannot be specified symbolically if it is a branch.
cvs.texi(,8846) @xref{Magic branch numbers}, for an explanation.
cvs.texi(,8847) @c FIXME: is this still true?  I suspect not.
cvs.texi(,8848) 
cvs.texi(,8849) Make sure that no-one has checked out a copy of the
cvs.texi(,8850) revision you outdate.  Strange things will happen if he
cvs.texi(,8851) starts to edit it and tries to check it back in.  For
cvs.texi(,8852) this reason, this option is not a good way to take back
cvs.texi(,8853) a bogus commit; commit a new revision undoing the bogus
cvs.texi(,8854) change instead (@pxref{Merging two revisions}).
cvs.texi(,8855) 
cvs.texi(,8856) @item -q
cvs.texi(,8857) Run quietly; do not print diagnostics.
cvs.texi(,8858) 
cvs.texi(,8859) @item -s@var{state}[:@var{rev}]
cvs.texi(,8860) Useful with @sc{cvs}.  Set the state attribute of the
cvs.texi(,8861) revision @var{rev} to @var{state}.  If @var{rev} is a
cvs.texi(,8862) branch number, assume the latest revision on that
cvs.texi(,8863) branch.  If @var{rev} is omitted, assume the latest
cvs.texi(,8864) revision on the default branch.  Any identifier is
cvs.texi(,8865) acceptable for @var{state}.  A useful set of states is
cvs.texi(,8866) @samp{Exp} (for experimental), @samp{Stab} (for
cvs.texi(,8867) stable), and @samp{Rel} (for released).  By default,
cvs.texi(,8868) the state of a new revision is set to @samp{Exp} when
cvs.texi(,8869) it is created.  The state is visible in the output from
cvs.texi(,8870) @var{cvs log} (@pxref{log}), and in the
cvs.texi(splitrcskeyword,8871) @samp{$ Log$} and @samp{$ State$} keywords
cvs.texi(,8872) (@pxref{Keyword substitution}).  Note that @sc{cvs}
cvs.texi(,8873) uses the @code{dead} state for its own purposes; to
cvs.texi(,8874) take a file to or from the @code{dead} state use
cvs.texi(,8875) commands like @code{cvs remove} and @code{cvs add}, not
cvs.texi(,8876) @code{cvs admin -s}.
cvs.texi(,8877) 
cvs.texi(,8878) @item -t[@var{file}]
cvs.texi(,8879) Useful with @sc{cvs}.  Write descriptive text from the
cvs.texi(,8880) contents of the named @var{file} into the RCS file,
cvs.texi(,8881) deleting the existing text.  The @var{file} pathname
cvs.texi(,8882) may not begin with @samp{-}.  The descriptive text can be seen in the
cvs.texi(,8883) output from @samp{cvs log} (@pxref{log}).
cvs.texi(,8884) There can be no space between @samp{-t} and its argument.
cvs.texi(,8885) 
cvs.texi(,8886) If @var{file} is omitted,
cvs.texi(,8887) obtain the text from standard input, terminated by
cvs.texi(,8888) end-of-file or by a line containing @samp{.} by itself.
cvs.texi(,8889) Prompt for the text if interaction is possible; see
cvs.texi(,8890) @samp{-I}.
cvs.texi(,8891) 
cvs.texi(,8892) @item -t-@var{string}
cvs.texi(,8893) Similar to @samp{-t@var{file}}. Write descriptive text
cvs.texi(,8894) from the @var{string} into the @sc{rcs} file, deleting
cvs.texi(,8895) the existing text.
cvs.texi(,8896) There can be no space between @samp{-t} and its argument.
cvs.texi(,8897) 
cvs.texi(,8898) @c The rcs -T option, do not update last-mod time for
cvs.texi(,8899) @c minor changes, has never been documented as a
cvs.texi(,8900) @c cvs admin option.
cvs.texi(,8901) 
cvs.texi(,8902) @item -U
cvs.texi(,8903) Set locking to non-strict.  Non-strict locking means
cvs.texi(,8904) that the owner of a file need not lock a revision for
cvs.texi(,8905) checkin.  For use with @sc{cvs}, strict locking must be
cvs.texi(,8906) set; see the discussion under the @samp{-l} option
cvs.texi(,8907) above.
cvs.texi(,8908) 
cvs.texi(,8909) @item -u[@var{rev}]
cvs.texi(,8910) See the option @samp{-l} above, for a discussion of
cvs.texi(,8911) using this option with @sc{cvs}.  Unlock the revision
cvs.texi(,8912) with number @var{rev}.  If a branch is given, unlock
cvs.texi(,8913) the latest revision on that branch.  If @var{rev} is
cvs.texi(,8914) omitted, remove the latest lock held by the caller.
cvs.texi(,8915) Normally, only the locker of a revision may unlock it;
cvs.texi(,8916) somebody else unlocking a revision breaks the lock.
cvs.texi(,8917) This causes the original locker to be sent a @code{commit}
cvs.texi(,8918) notification (@pxref{Getting Notified}).
cvs.texi(,8919) There can be no space between @samp{-u} and its argument.
cvs.texi(,8920) 
cvs.texi(,8921) @item -V@var{n}
cvs.texi(,8922) In previous versions of @sc{cvs}, this option meant to
cvs.texi(,8923) write an @sc{rcs} file which would be acceptable to
cvs.texi(,8924) @sc{rcs} version @var{n}, but it is now obsolete and
cvs.texi(,8925) specifying it will produce an error.
cvs.texi(,8926) @c Note that -V without an argument has never been
cvs.texi(,8927) @c documented as a cvs admin option.
cvs.texi(,8928) 
cvs.texi(,8929) @item -x@var{suffixes}
cvs.texi(,8930) In previous versions of @sc{cvs}, this was documented
cvs.texi(,8931) as a way of specifying the names of the @sc{rcs}
cvs.texi(,8932) files.  However, @sc{cvs} has always required that the
cvs.texi(,8933) @sc{rcs} files used by @sc{cvs} end in @samp{,v}, so
cvs.texi(,8934) this option has never done anything useful.
cvs.texi(,8935) 
cvs.texi(,8936) @c The rcs -z option, to specify the timezone, has
cvs.texi(,8937) @c never been documented as a cvs admin option.
cvs.texi(,8938) @end table
cvs.texi(,8939) 
cvs.texi(,8940) 
cvs.texi(,8941) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,8942) @node checkout
cvs.texi(,8943) @appendixsec checkout---Check out sources for editing
cvs.texi(,8944) @cindex checkout (subcommand)
cvs.texi(,8945) @cindex co (subcommand)
cvs.texi(,8946) 
cvs.texi(,8947) @itemize @bullet
cvs.texi(,8948) @item
cvs.texi(,8949) Synopsis: checkout [options] modules@dots{}
cvs.texi(,8950) @item
cvs.texi(,8951) Requires: repository.
cvs.texi(,8952) @item
cvs.texi(,8953) Changes: working directory.
cvs.texi(,8954) @item
cvs.texi(,8955) Synonyms: co, get
cvs.texi(,8956) @end itemize
cvs.texi(,8957) 
cvs.texi(,8958) Create or update a working directory containing copies of the
cvs.texi(,8959) source files specified by @var{modules}.  You must execute
cvs.texi(,8960) @code{checkout} before using most of the other @sc{cvs}
cvs.texi(,8961) commands, since most of them operate on your working
cvs.texi(,8962) directory.
cvs.texi(,8963) 
cvs.texi(,8964) The @var{modules} are either
cvs.texi(,8965) symbolic names for some
cvs.texi(,8966) collection of source directories and files, or paths to
cvs.texi(,8967) directories or files in the repository.  The symbolic
cvs.texi(,8968) names are defined in the @samp{modules} file.
cvs.texi(,8969) @xref{modules}.
cvs.texi(,8970) @c Needs an example, particularly of the non-"modules"
cvs.texi(,8971) @c case but probably of both.
cvs.texi(,8972) 
cvs.texi(,8973) @c FIXME: this seems like a very odd place to introduce
cvs.texi(,8974) @c people to how CVS works.  The bit about unreserved
cvs.texi(,8975) @c checkouts is also misleading as it depends on how
cvs.texi(,8976) @c things are set up.
cvs.texi(,8977) Depending on the modules you specify, @code{checkout} may
cvs.texi(,8978) recursively create directories and populate them with
cvs.texi(,8979) the appropriate source files.  You can then edit these
cvs.texi(,8980) source files at any time (regardless of whether other
cvs.texi(,8981) software developers are editing their own copies of the
cvs.texi(,8982) sources); update them to include new changes applied by
cvs.texi(,8983) others to the source repository; or commit your work as
cvs.texi(,8984) a permanent change to the source repository.
cvs.texi(,8985) 
cvs.texi(,8986) Note that @code{checkout} is used to create
cvs.texi(,8987) directories.  The top-level directory created is always
cvs.texi(,8988) added to the directory where @code{checkout} is
cvs.texi(,8989) invoked, and usually has the same name as the specified
cvs.texi(,8990) module.  In the case of a module alias, the created
cvs.texi(,8991) sub-directory may have a different name, but you can be
cvs.texi(,8992) sure that it will be a sub-directory, and that
cvs.texi(,8993) @code{checkout} will show the relative path leading to
cvs.texi(,8994) each file as it is extracted into your private work
cvs.texi(,8995) area (unless you specify the @samp{-Q} global option).
cvs.texi(,8996) 
cvs.texi(,8997) The files created by @code{checkout} are created
cvs.texi(,8998) read-write, unless the @samp{-r} option to @sc{cvs}
cvs.texi(,8999) (@pxref{Global options}) is specified, the
cvs.texi(,9000) @code{CVSREAD} environment variable is specified
cvs.texi(,9001) (@pxref{Environment variables}), or a watch is in
cvs.texi(,9002) effect for that file (@pxref{Watches}).
cvs.texi(,9003) 
cvs.texi(,9004) Note that running @code{checkout} on a directory that was already
cvs.texi(,9005) built by a prior @code{checkout} is also permitted.
cvs.texi(,9006) This is similar to specifying the @samp{-d} option
cvs.texi(,9007) to the @code{update} command in the sense that new
cvs.texi(,9008) directories that have been created in the repository
cvs.texi(,9009) will appear in your work area.
cvs.texi(,9010) However, @code{checkout} takes a module name whereas
cvs.texi(,9011) @code{update} takes a directory name.  Also
cvs.texi(,9012) to use @code{checkout} this way it must be run from the
cvs.texi(,9013) top level directory (where you originally ran
cvs.texi(,9014) @code{checkout} from), so before you run
cvs.texi(,9015) @code{checkout} to update an existing directory, don't
cvs.texi(,9016) forget to change your directory to the top level
cvs.texi(,9017) directory.
cvs.texi(,9018) 
cvs.texi(,9019) For the output produced by the @code{checkout} command
cvs.texi(,9020) see @ref{update output}.
cvs.texi(,9021) 
cvs.texi(,9022) @menu
cvs.texi(,9023) * checkout options::            checkout options
cvs.texi(,9024) * checkout examples::           checkout examples
cvs.texi(,9025) @end menu
cvs.texi(,9026) 
cvs.texi(,9027) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9028) @node checkout options
cvs.texi(,9029) @appendixsubsec checkout options
cvs.texi(,9030) 
cvs.texi(,9031) These standard options are supported by @code{checkout}
cvs.texi(,9032) (@pxref{Common options}, for a complete description of
cvs.texi(,9033) them):
cvs.texi(,9034) 
cvs.texi(,9035) @table @code
cvs.texi(,9036) @item -D @var{date}
cvs.texi(,9037) Use the most recent revision no later than @var{date}.
cvs.texi(,9038) This option is sticky, and implies @samp{-P}.  See
cvs.texi(,9039) @ref{Sticky tags}, for more information on sticky tags/dates.
cvs.texi(,9040) 
cvs.texi(,9041) @item -f
cvs.texi(,9042) Only useful with the @samp{-D @var{date}} or @samp{-r
cvs.texi(,9043) @var{tag}} flags.  If no matching revision is found,
cvs.texi(,9044) retrieve the most recent revision (instead of ignoring
cvs.texi(,9045) the file).
cvs.texi(,9046) 
cvs.texi(,9047) @item -k @var{kflag}
cvs.texi(,9048) Process keywords according to @var{kflag}.  See
cvs.texi(,9049) @ref{Keyword substitution}.
cvs.texi(,9050) This option is sticky; future updates of
cvs.texi(,9051) this file in this working directory will use the same
cvs.texi(,9052) @var{kflag}.  The @code{status} command can be viewed
cvs.texi(,9053) to see the sticky options.  See @ref{Invoking CVS}, for
cvs.texi(,9054) more information on the @code{status} command.
cvs.texi(,9055) 
cvs.texi(,9056) @item -l
cvs.texi(,9057) Local; run only in current working directory.
cvs.texi(,9058) 
cvs.texi(,9059) @item -n
cvs.texi(,9060) Do not run any checkout program (as specified
cvs.texi(,9061) with the @samp{-o} option in the modules file;
cvs.texi(,9062) @pxref{modules}).
cvs.texi(,9063) 
cvs.texi(,9064) @item -P
cvs.texi(,9065) Prune empty directories.  See @ref{Moving directories}.
cvs.texi(,9066) 
cvs.texi(,9067) @item -p
cvs.texi(,9068) Pipe files to the standard output.
cvs.texi(,9069) 
cvs.texi(,9070) @item -R
cvs.texi(,9071) Checkout directories recursively.  This option is on by default.
cvs.texi(,9072) 
cvs.texi(,9073) @item -r @var{tag}
cvs.texi(,9074) Use revision @var{tag}.  This option is sticky, and implies @samp{-P}.
cvs.texi(,9075) See @ref{Sticky tags}, for more information on sticky tags/dates.
cvs.texi(,9076) @end table
cvs.texi(,9077) 
cvs.texi(,9078) In addition to those, you can use these special command
cvs.texi(,9079) options with @code{checkout}:
cvs.texi(,9080) 
cvs.texi(,9081) @table @code
cvs.texi(,9082) @item -A
cvs.texi(,9083) Reset any sticky tags, dates, or @samp{-k} options.
cvs.texi(,9084) See @ref{Sticky tags}, for more information on sticky tags/dates.
cvs.texi(,9085) 
cvs.texi(,9086) @item -c
cvs.texi(,9087) Copy the module file, sorted, to the standard output,
cvs.texi(,9088) instead of creating or modifying any files or
cvs.texi(,9089) directories in your working directory.
cvs.texi(,9090) 
cvs.texi(,9091) @item -d @var{dir}
cvs.texi(,9092) Create a directory called @var{dir} for the working
cvs.texi(,9093) files, instead of using the module name.  In general,
cvs.texi(,9094) using this flag is equivalent to using @samp{mkdir
cvs.texi(,9095) @var{dir}; cd @var{dir}} followed by the checkout
cvs.texi(,9096) command without the @samp{-d} flag.
cvs.texi(,9097) 
cvs.texi(,9098) There is an important exception, however.  It is very
cvs.texi(,9099) convenient when checking out a single item to have the
cvs.texi(,9100) output appear in a directory that doesn't contain empty
cvs.texi(,9101) intermediate directories.  In this case @emph{only},
cvs.texi(,9102) @sc{cvs} tries to ``shorten'' pathnames to avoid those empty
cvs.texi(,9103) directories.
cvs.texi(,9104) 
cvs.texi(,9105) For example, given a module @samp{foo} that contains
cvs.texi(,9106) the file @samp{bar.c}, the command @samp{cvs co -d dir
cvs.texi(,9107) foo} will create directory @samp{dir} and place
cvs.texi(,9108) @samp{bar.c} inside.  Similarly, given a module
cvs.texi(,9109) @samp{bar} which has subdirectory @samp{baz} wherein
cvs.texi(,9110) there is a file @samp{quux.c}, the command @samp{cvs co
cvs.texi(,9111) -d dir bar/baz} will create directory @samp{dir} and
cvs.texi(,9112) place @samp{quux.c} inside.
cvs.texi(,9113) 
cvs.texi(,9114) Using the @samp{-N} flag will defeat this behavior.
cvs.texi(,9115) Given the same module definitions above, @samp{cvs co
cvs.texi(,9116) -N -d dir foo} will create directories @samp{dir/foo}
cvs.texi(,9117) and place @samp{bar.c} inside, while @samp{cvs co -N -d
cvs.texi(,9118) dir bar/baz} will create directories @samp{dir/bar/baz}
cvs.texi(,9119) and place @samp{quux.c} inside.
cvs.texi(,9120) 
cvs.texi(,9121) @item -j @var{tag}
cvs.texi(,9122) With two @samp{-j} options, merge changes from the
cvs.texi(,9123) revision specified with the first @samp{-j} option to
cvs.texi(,9124) the revision specified with the second @samp{j} option,
cvs.texi(,9125) into the working directory.
cvs.texi(,9126) 
cvs.texi(,9127) With one @samp{-j} option, merge changes from the
cvs.texi(,9128) ancestor revision to the revision specified with the
cvs.texi(,9129) @samp{-j} option, into the working directory.  The
cvs.texi(,9130) ancestor revision is the common ancestor of the
cvs.texi(,9131) revision which the working directory is based on, and
cvs.texi(,9132) the revision specified in the @samp{-j} option.
cvs.texi(,9133) 
cvs.texi(,9134) In addition, each -j option can contain an optional
cvs.texi(,9135) date specification which, when used with branches, can
cvs.texi(,9136) limit the chosen revision to one within a specific
cvs.texi(,9137) date.  An optional date is specified by adding a colon
cvs.texi(,9138) (:) to the tag:
cvs.texi(,9139) @samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}.
cvs.texi(,9140) 
cvs.texi(,9141) @xref{Branching and merging}.
cvs.texi(,9142) 
cvs.texi(,9143) @item -N
cvs.texi(,9144) Only useful together with @samp{-d @var{dir}}.  With
cvs.texi(,9145) this option, @sc{cvs} will not ``shorten'' module paths
cvs.texi(,9146) in your working directory when you check out a single
cvs.texi(,9147) module.  See the @samp{-d} flag for examples and a
cvs.texi(,9148) discussion.
cvs.texi(,9149) 
cvs.texi(,9150) @item -s
cvs.texi(,9151) Like @samp{-c}, but include the status of all modules,
cvs.texi(,9152) and sort it by the status string.  @xref{modules}, for
cvs.texi(,9153) info about the @samp{-s} option that is used inside the
cvs.texi(,9154) modules file to set the module status.
cvs.texi(,9155) @end table
cvs.texi(,9156) 
cvs.texi(,9157) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9158) @node checkout examples
cvs.texi(,9159) @appendixsubsec checkout examples
cvs.texi(,9160) 
cvs.texi(,9161) Get a copy of the module @samp{tc}:
cvs.texi(,9162) 
cvs.texi(,9163) @example
cvs.texi(,9164) $ cvs checkout tc
cvs.texi(,9165) @end example
cvs.texi(,9166) 
cvs.texi(,9167) Get a copy of the module @samp{tc} as it looked one day
cvs.texi(,9168) ago:
cvs.texi(,9169) 
cvs.texi(,9170) @example
cvs.texi(,9171) $ cvs checkout -D yesterday tc
cvs.texi(,9172) @end example
cvs.texi(,9173) 
cvs.texi(,9174) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,9175) @node commit
cvs.texi(,9176) @appendixsec commit---Check files into the repository
cvs.texi(,9177) @cindex commit (subcommand)
cvs.texi(,9178) 
cvs.texi(,9179) @itemize @bullet
cvs.texi(,9180) @item
cvs.texi(,9181) Synopsis: commit [-lnRf] [-m 'log_message' |
cvs.texi(,9182) -F file] [-r revision] [files@dots{}]
cvs.texi(,9183) @item
cvs.texi(,9184) Requires: working directory, repository.
cvs.texi(,9185) @item
cvs.texi(,9186) Changes: repository.
cvs.texi(,9187) @item
cvs.texi(,9188) Synonym: ci
cvs.texi(,9189) @end itemize
cvs.texi(,9190) 
cvs.texi(,9191) Use @code{commit} when you want to incorporate changes
cvs.texi(,9192) from your working source files into the source
cvs.texi(,9193) repository.
cvs.texi(,9194) 
cvs.texi(,9195) If you don't specify particular files to commit, all of
cvs.texi(,9196) the files in your working current directory are
cvs.texi(,9197) examined.  @code{commit} is careful to change in the
cvs.texi(,9198) repository only those files that you have really
cvs.texi(,9199) changed.  By default (or if you explicitly specify the
cvs.texi(,9200) @samp{-R} option), files in subdirectories are also
cvs.texi(,9201) examined and committed if they have changed; you can
cvs.texi(,9202) use the @samp{-l} option to limit @code{commit} to the
cvs.texi(,9203) current directory only.
cvs.texi(,9204) 
cvs.texi(,9205) @code{commit} verifies that the selected files are up
cvs.texi(,9206) to date with the current revisions in the source
cvs.texi(,9207) repository; it will notify you, and exit without
cvs.texi(,9208) committing, if any of the specified files must be made
cvs.texi(,9209) current first with @code{update} (@pxref{update}).
cvs.texi(,9210) @code{commit} does not call the @code{update} command
cvs.texi(,9211) for you, but rather leaves that for you to do when the
cvs.texi(,9212) time is right.
cvs.texi(,9213) 
cvs.texi(,9214) When all is well, an editor is invoked to allow you to
cvs.texi(,9215) enter a log message that will be written to one or more
cvs.texi(,9216) logging programs (@pxref{modules}, and @pxref{loginfo})
cvs.texi(,9217) and placed in the @sc{rcs} file inside the
cvs.texi(,9218) repository.  This log message can be retrieved with the
cvs.texi(,9219) @code{log} command; see @ref{log}.  You can specify the
cvs.texi(,9220) log message on the command line with the @samp{-m
cvs.texi(,9221) @var{message}} option, and thus avoid the editor invocation,
cvs.texi(,9222) or use the @samp{-F @var{file}} option to specify
cvs.texi(,9223) that the argument file contains the log message.
cvs.texi(,9224) 
cvs.texi(,9225) @menu
cvs.texi(,9226) * commit options::              commit options
cvs.texi(,9227) * commit examples::             commit examples
cvs.texi(,9228) @end menu
cvs.texi(,9229) 
cvs.texi(,9230) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9231) @node commit options
cvs.texi(,9232) @appendixsubsec commit options
cvs.texi(,9233) 
cvs.texi(,9234) These standard options are supported by @code{commit}
cvs.texi(,9235) (@pxref{Common options}, for a complete description of
cvs.texi(,9236) them):
cvs.texi(,9237) 
cvs.texi(,9238) @table @code
cvs.texi(,9239) @item -l
cvs.texi(,9240) Local; run only in current working directory.
cvs.texi(,9241) 
cvs.texi(,9242) @item -R
cvs.texi(,9243) Commit directories recursively.  This is on by default.
cvs.texi(,9244) 
cvs.texi(,9245) @item -r @var{revision}
cvs.texi(,9246) Commit to @var{revision}.  @var{revision} must be
cvs.texi(,9247) either a branch, or a revision on the main trunk that
cvs.texi(,9248) is higher than any existing revision number
cvs.texi(,9249) (@pxref{Assigning revisions}).  You
cvs.texi(,9250) cannot commit to a specific revision on a branch.
cvs.texi(,9251) @c FIXME: Need xref for branch case.
cvs.texi(,9252) @end table
cvs.texi(,9253) 
cvs.texi(,9254) @code{commit} also supports these options:
cvs.texi(,9255) 
cvs.texi(,9256) @table @code
cvs.texi(,9257) @item -F @var{file}
cvs.texi(,9258) Read the log message from @var{file}, instead
cvs.texi(,9259) of invoking an editor.
cvs.texi(,9260) 
cvs.texi(,9261) @item -f
cvs.texi(,9262) Note that this is not the standard behavior of
cvs.texi(,9263) the @samp{-f} option as defined in @ref{Common options}.
cvs.texi(,9264) 
cvs.texi(,9265) Force @sc{cvs} to commit a new revision even if you haven't
cvs.texi(,9266) made any changes to the file.  If the current revision
cvs.texi(,9267) of @var{file} is 1.7, then the following two commands
cvs.texi(,9268) are equivalent:
cvs.texi(,9269) 
cvs.texi(,9270) @example
cvs.texi(,9271) $ cvs commit -f @var{file}
cvs.texi(,9272) $ cvs commit -r 1.8 @var{file}
cvs.texi(,9273) @end example
cvs.texi(,9274) 
cvs.texi(,9275) @c This is odd, but it's how CVS has worked for some
cvs.texi(,9276) @c time.
cvs.texi(,9277) The @samp{-f} option disables recursion (i.e., it
cvs.texi(,9278) implies @samp{-l}).  To force @sc{cvs} to commit a new
cvs.texi(,9279) revision for all files in all subdirectories, you must
cvs.texi(,9280) use @samp{-f -R}.
cvs.texi(,9281) 
cvs.texi(,9282) @item -m @var{message}
cvs.texi(,9283) Use @var{message} as the log message, instead of
cvs.texi(,9284) invoking an editor.
cvs.texi(,9285) @end table
cvs.texi(,9286) 
cvs.texi(,9287) @need 2000
cvs.texi(,9288) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9289) @node commit examples
cvs.texi(,9290) @appendixsubsec commit examples
cvs.texi(,9291) 
cvs.texi(,9292) @c FIXME: this material wants to be somewhere
cvs.texi(,9293) @c in "Branching and merging".
cvs.texi(,9294) 
cvs.texi(,9295) @appendixsubsubsec Committing to a branch
cvs.texi(,9296) 
cvs.texi(,9297) You can commit to a branch revision (one that has an
cvs.texi(,9298) even number of dots) with the @samp{-r} option.  To
cvs.texi(,9299) create a branch revision, use the @samp{-b} option
cvs.texi(,9300) of the @code{rtag} or @code{tag} commands
cvs.texi(,9301) (@pxref{Branching and merging}).  Then, either @code{checkout} or
cvs.texi(,9302) @code{update} can be used to base your sources on the
cvs.texi(,9303) newly created branch.  From that point on, all
cvs.texi(,9304) @code{commit} changes made within these working sources
cvs.texi(,9305) will be automatically added to a branch revision,
cvs.texi(,9306) thereby not disturbing main-line development in any
cvs.texi(,9307) way.  For example, if you had to create a patch to the
cvs.texi(,9308) 1.2 version of the product, even though the 2.0 version
cvs.texi(,9309) is already under development, you might do:
cvs.texi(,9310) 
cvs.texi(,9311) @example
cvs.texi(,9312) $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
cvs.texi(,9313) $ cvs checkout -r FCS1_2_Patch product_module
cvs.texi(,9314) $ cd product_module
cvs.texi(,9315) [[ hack away ]]
cvs.texi(,9316) $ cvs commit
cvs.texi(,9317) @end example
cvs.texi(,9318) 
cvs.texi(,9319) @noindent
cvs.texi(,9320) This works automatically since the @samp{-r} option is
cvs.texi(,9321) sticky.
cvs.texi(,9322) 
cvs.texi(,9323) @appendixsubsubsec Creating the branch after editing
cvs.texi(,9324) 
cvs.texi(,9325) Say you have been working on some extremely
cvs.texi(,9326) experimental software, based on whatever revision you
cvs.texi(,9327) happened to checkout last week.  If others in your
cvs.texi(,9328) group would like to work on this software with you, but
cvs.texi(,9329) without disturbing main-line development, you could
cvs.texi(,9330) commit your change to a new branch.  Others can then
cvs.texi(,9331) checkout your experimental stuff and utilize the full
cvs.texi(,9332) benefit of @sc{cvs} conflict resolution.  The scenario might
cvs.texi(,9333) look like:
cvs.texi(,9334) 
cvs.texi(,9335) @c FIXME: Should we be recommending tagging the branchpoint?
cvs.texi(,9336) @example
cvs.texi(,9337) [[ hacked sources are present ]]
cvs.texi(,9338) $ cvs tag -b EXPR1
cvs.texi(,9339) $ cvs update -r EXPR1
cvs.texi(,9340) $ cvs commit
cvs.texi(,9341) @end example
cvs.texi(,9342) 
cvs.texi(,9343) The @code{update} command will make the @samp{-r
cvs.texi(,9344) EXPR1} option sticky on all files.  Note that your
cvs.texi(,9345) changes to the files will never be removed by the
cvs.texi(,9346) @code{update} command.  The @code{commit} will
cvs.texi(,9347) automatically commit to the correct branch, because the
cvs.texi(,9348) @samp{-r} is sticky.  You could also do like this:
cvs.texi(,9349) 
cvs.texi(,9350) @c FIXME: Should we be recommending tagging the branchpoint?
cvs.texi(,9351) @example
cvs.texi(,9352) [[ hacked sources are present ]]
cvs.texi(,9353) $ cvs tag -b EXPR1
cvs.texi(,9354) $ cvs commit -r EXPR1
cvs.texi(,9355) @end example
cvs.texi(,9356) 
cvs.texi(,9357) @noindent
cvs.texi(,9358) but then, only those files that were changed by you
cvs.texi(,9359) will have the @samp{-r EXPR1} sticky flag.  If you hack
cvs.texi(,9360) away, and commit without specifying the @samp{-r EXPR1}
cvs.texi(,9361) flag, some files may accidentally end up on the main
cvs.texi(,9362) trunk.
cvs.texi(,9363) 
cvs.texi(,9364) To work with you on the experimental change, others
cvs.texi(,9365) would simply do
cvs.texi(,9366) 
cvs.texi(,9367) @example
cvs.texi(,9368) $ cvs checkout -r EXPR1 whatever_module
cvs.texi(,9369) @end example
cvs.texi(,9370) 
cvs.texi(,9371) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,9372) @node diff
cvs.texi(,9373) @appendixsec diff---Show differences between revisions
cvs.texi(,9374) @cindex diff (subcommand)
cvs.texi(,9375) 
cvs.texi(,9376) @itemize @bullet
cvs.texi(,9377) @item
cvs.texi(,9378) Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 |  -D date2]] [files@dots{}]
cvs.texi(,9379) @item
cvs.texi(,9380) Requires: working directory, repository.
cvs.texi(,9381) @item
cvs.texi(,9382) Changes: nothing.
cvs.texi(,9383) @end itemize
cvs.texi(,9384) 
cvs.texi(,9385) The @code{diff} command is used to compare different
cvs.texi(,9386) revisions of files.  The default action is to compare
cvs.texi(,9387) your working files with the revisions they were based
cvs.texi(,9388) on, and report any differences that are found.
cvs.texi(,9389) 
cvs.texi(,9390) If any file names are given, only those files are
cvs.texi(,9391) compared.  If any directories are given, all files
cvs.texi(,9392) under them will be compared.
cvs.texi(,9393) 
cvs.texi(,9394) The exit status for diff is different than for other
cvs.texi(,9395) @sc{cvs} commands; for details @ref{Exit status}.
cvs.texi(,9396) 
cvs.texi(,9397) @menu
cvs.texi(,9398) * diff options::                diff options
cvs.texi(,9399) * diff examples::               diff examples
cvs.texi(,9400) @end menu
cvs.texi(,9401) 
cvs.texi(,9402) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9403) @node diff options
cvs.texi(,9404) @appendixsubsec diff options
cvs.texi(,9405) 
cvs.texi(,9406) These standard options are supported by @code{diff}
cvs.texi(,9407) (@pxref{Common options}, for a complete description of
cvs.texi(,9408) them):
cvs.texi(,9409) 
cvs.texi(,9410) @table @code
cvs.texi(,9411) @item -D @var{date}
cvs.texi(,9412) Use the most recent revision no later than @var{date}.
cvs.texi(,9413) See @samp{-r} for how this affects the comparison.
cvs.texi(,9414) 
cvs.texi(,9415) @item -k @var{kflag}
cvs.texi(,9416) Process keywords according to @var{kflag}.  See
cvs.texi(,9417) @ref{Keyword substitution}.
cvs.texi(,9418) 
cvs.texi(,9419) @item -l
cvs.texi(,9420) Local; run only in current working directory.
cvs.texi(,9421) 
cvs.texi(,9422) @item -R
cvs.texi(,9423) Examine directories recursively.  This option is on by
cvs.texi(,9424) default.
cvs.texi(,9425) 
cvs.texi(,9426) @item -r @var{tag}
cvs.texi(,9427) Compare with revision @var{tag}.  Zero, one or two
cvs.texi(,9428) @samp{-r} options can be present.  With no @samp{-r}
cvs.texi(,9429) option, the working file will be compared with the
cvs.texi(,9430) revision it was based on.  With one @samp{-r}, that
cvs.texi(,9431) revision will be compared to your current working file.
cvs.texi(,9432) With two @samp{-r} options those two revisions will be
cvs.texi(,9433) compared (and your working file will not affect the
cvs.texi(,9434) outcome in any way).
cvs.texi(,9435) @c We should be a lot more explicit, with examples,
cvs.texi(,9436) @c about the difference between "cvs diff" and "cvs
cvs.texi(,9437) @c diff -r HEAD".  This often confuses new users.
cvs.texi(,9438) 
cvs.texi(,9439) One or both @samp{-r} options can be replaced by a
cvs.texi(,9440) @samp{-D @var{date}} option, described above.
cvs.texi(,9441) @end table
cvs.texi(,9442) 
cvs.texi(,9443) @c Conceptually, this is a disaster.  There are 3
cvs.texi(,9444) @c zillion diff formats that we support via the diff
cvs.texi(,9445) @c library.  It is not obvious to me that we should
cvs.texi(,9446) @c document them all.  Maybe just the most common ones
cvs.texi(,9447) @c like -c and -u, and think about phasing out the
cvs.texi(,9448) @c obscure ones.
cvs.texi(,9449) @c FIXCVS: also should be a way to specify an external
cvs.texi(,9450) @c diff program (which can be different for different
cvs.texi(,9451) @c file types) and pass through
cvs.texi(,9452) @c arbitrary options, so that the user can do
cvs.texi(,9453) @c "--pass=-Z --pass=foo" or something even if CVS
cvs.texi(,9454) @c doesn't know about the "-Z foo" option to diff.
cvs.texi(,9455) @c This would fit nicely with deprecating/eliminating
cvs.texi(,9456) @c the obscure options of the diff library, because it
cvs.texi(,9457) @c would let people specify an external GNU diff if
cvs.texi(,9458) @c they are into that sort of thing.
cvs.texi(,9459) The following options specify the format of the
cvs.texi(,9460) output.  They have the same meaning as in GNU diff.
cvs.texi(,9461) Most options have two equivalent names, one of which is a single letter
cvs.texi(,9462) preceded by @samp{-}, and the other of which is a long name preceded by
cvs.texi(,9463) @samp{--}.
cvs.texi(,9464) 
cvs.texi(,9465) @table @samp
cvs.texi(,9466) @item -@var{lines}
cvs.texi(,9467) Show @var{lines} (an integer) lines of context.  This option does not
cvs.texi(,9468) specify an output format by itself; it has no effect unless it is
cvs.texi(,9469) combined with @samp{-c} or @samp{-u}.  This option is obsolete.  For proper
cvs.texi(,9470) operation, @code{patch} typically needs at least two lines of context.
cvs.texi(,9471) 
cvs.texi(,9472) @item -a
cvs.texi(,9473) Treat all files as text and compare them line-by-line, even if they
cvs.texi(,9474) do not seem to be text.
cvs.texi(,9475) 
cvs.texi(,9476) @item -b
cvs.texi(,9477) Ignore trailing white space and consider all other sequences of one or
cvs.texi(,9478) more white space characters to be equivalent.
cvs.texi(,9479) 
cvs.texi(,9480) @item -B
cvs.texi(,9481) Ignore changes that just insert or delete blank lines.
cvs.texi(,9482) 
cvs.texi(,9483) @item --binary
cvs.texi(,9484) Read and write data in binary mode.
cvs.texi(,9485) 
cvs.texi(,9486) @item --brief
cvs.texi(,9487) Report only whether the files differ, not the details of the
cvs.texi(,9488) differences.
cvs.texi(,9489) 
cvs.texi(,9490) @item -c
cvs.texi(,9491) Use the context output format.
cvs.texi(,9492) 
cvs.texi(,9493) @item -C @var{lines}
cvs.texi(,9494) @itemx --context@r{[}=@var{lines}@r{]}
cvs.texi(,9495) Use the context output format, showing @var{lines} (an integer) lines of
cvs.texi(,9496) context, or three if @var{lines} is not given.
cvs.texi(,9497) For proper operation, @code{patch} typically needs at least two lines of
cvs.texi(,9498) context.
cvs.texi(,9499) 
cvs.texi(,9500) @item --changed-group-format=@var{format}
cvs.texi(,9501) Use @var{format} to output a line group containing differing lines from
cvs.texi(,9502) both files in if-then-else format.  @xref{Line group formats}.
cvs.texi(,9503) 
cvs.texi(,9504) @item -d
cvs.texi(,9505) Change the algorithm to perhaps find a smaller set of changes.  This makes
cvs.texi(,9506) @code{diff} slower (sometimes much slower).
cvs.texi(,9507) 
cvs.texi(,9508) @item -e
cvs.texi(,9509) @itemx --ed
cvs.texi(,9510) Make output that is a valid @code{ed} script.
cvs.texi(,9511) 
cvs.texi(,9512) @item --expand-tabs
cvs.texi(,9513) Expand tabs to spaces in the output, to preserve the alignment of tabs
cvs.texi(,9514) in the input files.
cvs.texi(,9515) 
cvs.texi(,9516) @item -f
cvs.texi(,9517) Make output that looks vaguely like an @code{ed} script but has changes
cvs.texi(,9518) in the order they appear in the file.
cvs.texi(,9519) 
cvs.texi(,9520) @item -F @var{regexp}
cvs.texi(,9521) In context and unified format, for each hunk of differences, show some
cvs.texi(,9522) of the last preceding line that matches @var{regexp}.
cvs.texi(,9523) 
cvs.texi(,9524) @item --forward-ed
cvs.texi(,9525) Make output that looks vaguely like an @code{ed} script but has changes
cvs.texi(,9526) in the order they appear in the file.
cvs.texi(,9527) 
cvs.texi(,9528) @item -H
cvs.texi(,9529) Use heuristics to speed handling of large files that have numerous
cvs.texi(,9530) scattered small changes.
cvs.texi(,9531) 
cvs.texi(,9532) @item --horizon-lines=@var{lines}
cvs.texi(,9533) Do not discard the last @var{lines} lines of the common prefix
cvs.texi(,9534) and the first @var{lines} lines of the common suffix.
cvs.texi(,9535) 
cvs.texi(,9536) @item -i
cvs.texi(,9537) Ignore changes in case; consider upper- and lower-case letters
cvs.texi(,9538) equivalent.
cvs.texi(,9539) 
cvs.texi(,9540) @item -I @var{regexp}
cvs.texi(,9541) Ignore changes that just insert or delete lines that match @var{regexp}.
cvs.texi(,9542) 
cvs.texi(,9543) @item --ifdef=@var{name}
cvs.texi(,9544) Make merged if-then-else output using @var{name}.
cvs.texi(,9545) 
cvs.texi(,9546) @item --ignore-all-space
cvs.texi(,9547) Ignore white space when comparing lines.
cvs.texi(,9548) 
cvs.texi(,9549) @item --ignore-blank-lines
cvs.texi(,9550) Ignore changes that just insert or delete blank lines.
cvs.texi(,9551) 
cvs.texi(,9552) @item --ignore-case
cvs.texi(,9553) Ignore changes in case; consider upper- and lower-case to be the same.
cvs.texi(,9554) 
cvs.texi(,9555) @item --ignore-matching-lines=@var{regexp}
cvs.texi(,9556) Ignore changes that just insert or delete lines that match @var{regexp}.
cvs.texi(,9557) 
cvs.texi(,9558) @item --ignore-space-change
cvs.texi(,9559) Ignore trailing white space and consider all other sequences of one or
cvs.texi(,9560) more white space characters to be equivalent.
cvs.texi(,9561) 
cvs.texi(,9562) @item --initial-tab
cvs.texi(,9563) Output a tab rather than a space before the text of a line in normal or
cvs.texi(,9564) context format.  This causes the alignment of tabs in the line to look
cvs.texi(,9565) normal.
cvs.texi(,9566) 
cvs.texi(,9567) @item -L @var{label}
cvs.texi(,9568) Use @var{label} instead of the file name in the context format
cvs.texi(,9569) and unified format headers.
cvs.texi(,9570) 
cvs.texi(,9571) @item --label=@var{label}
cvs.texi(,9572) Use @var{label} instead of the file name in the context format
cvs.texi(,9573) and unified format headers.
cvs.texi(,9574) 
cvs.texi(,9575) @item --left-column
cvs.texi(,9576) Print only the left column of two common lines in side by side format.
cvs.texi(,9577) 
cvs.texi(,9578) @item --line-format=@var{format}
cvs.texi(,9579) Use @var{format} to output all input lines in if-then-else format.
cvs.texi(,9580) @xref{Line formats}.
cvs.texi(,9581) 
cvs.texi(,9582) @item --minimal
cvs.texi(,9583) Change the algorithm to perhaps find a smaller set of changes.  This
cvs.texi(,9584) makes @code{diff} slower (sometimes much slower).
cvs.texi(,9585) 
cvs.texi(,9586) @item -n
cvs.texi(,9587) Output RCS-format diffs; like @samp{-f} except that each command
cvs.texi(,9588) specifies the number of lines affected.
cvs.texi(,9589) 
cvs.texi(,9590) @item -N
cvs.texi(,9591) @itemx --new-file
cvs.texi(,9592) In directory comparison, if a file is found in only one directory,
cvs.texi(,9593) treat it as present but empty in the other directory.
cvs.texi(,9594) 
cvs.texi(,9595) @item --new-group-format=@var{format}
cvs.texi(,9596) Use @var{format} to output a group of lines taken from just the second
cvs.texi(,9597) file in if-then-else format.  @xref{Line group formats}.
cvs.texi(,9598) 
cvs.texi(,9599) @item --new-line-format=@var{format}
cvs.texi(,9600) Use @var{format} to output a line taken from just the second file in
cvs.texi(,9601) if-then-else format.  @xref{Line formats}.
cvs.texi(,9602) 
cvs.texi(,9603) @item --old-group-format=@var{format}
cvs.texi(,9604) Use @var{format} to output a group of lines taken from just the first
cvs.texi(,9605) file in if-then-else format.  @xref{Line group formats}.
cvs.texi(,9606) 
cvs.texi(,9607) @item --old-line-format=@var{format}
cvs.texi(,9608) Use @var{format} to output a line taken from just the first file in
cvs.texi(,9609) if-then-else format.  @xref{Line formats}.
cvs.texi(,9610) 
cvs.texi(,9611) @item -p
cvs.texi(,9612) Show which C function each change is in.
cvs.texi(,9613) 
cvs.texi(,9614) @item --rcs
cvs.texi(,9615) Output RCS-format diffs; like @samp{-f} except that each command
cvs.texi(,9616) specifies the number of lines affected.
cvs.texi(,9617) 
cvs.texi(,9618) @item --report-identical-files
cvs.texi(,9619) @itemx -s
cvs.texi(,9620) Report when two files are the same.
cvs.texi(,9621) 
cvs.texi(,9622) @item --show-c-function
cvs.texi(,9623) Show which C function each change is in.
cvs.texi(,9624) 
cvs.texi(,9625) @item --show-function-line=@var{regexp}
cvs.texi(,9626) In context and unified format, for each hunk of differences, show some
cvs.texi(,9627) of the last preceding line that matches @var{regexp}.
cvs.texi(,9628) 
cvs.texi(,9629) @item --side-by-side
cvs.texi(,9630) Use the side by side output format.
cvs.texi(,9631) 
cvs.texi(,9632) @item --speed-large-files
cvs.texi(,9633) Use heuristics to speed handling of large files that have numerous
cvs.texi(,9634) scattered small changes.
cvs.texi(,9635) 
cvs.texi(,9636) @item --suppress-common-lines
cvs.texi(,9637) Do not print common lines in side by side format.
cvs.texi(,9638) 
cvs.texi(,9639) @item -t
cvs.texi(,9640) Expand tabs to spaces in the output, to preserve the alignment of tabs
cvs.texi(,9641) in the input files.
cvs.texi(,9642) 
cvs.texi(,9643) @item -T
cvs.texi(,9644) Output a tab rather than a space before the text of a line in normal or
cvs.texi(,9645) context format.  This causes the alignment of tabs in the line to look
cvs.texi(,9646) normal.
cvs.texi(,9647) 
cvs.texi(,9648) @item --text
cvs.texi(,9649) Treat all files as text and compare them line-by-line, even if they
cvs.texi(,9650) do not appear to be text.
cvs.texi(,9651) 
cvs.texi(,9652) @item -u
cvs.texi(,9653) Use the unified output format.
cvs.texi(,9654) 
cvs.texi(,9655) @item --unchanged-group-format=@var{format}
cvs.texi(,9656) Use @var{format} to output a group of common lines taken from both files
cvs.texi(,9657) in if-then-else format.  @xref{Line group formats}.
cvs.texi(,9658) 
cvs.texi(,9659) @item --unchanged-line-format=@var{format}
cvs.texi(,9660) Use @var{format} to output a line common to both files in if-then-else
cvs.texi(,9661) format.  @xref{Line formats}.
cvs.texi(,9662) 
cvs.texi(,9663) @item -U @var{lines}
cvs.texi(,9664) @itemx --unified@r{[}=@var{lines}@r{]}
cvs.texi(,9665) Use the unified output format, showing @var{lines} (an integer) lines of
cvs.texi(,9666) context, or three if @var{lines} is not given.
cvs.texi(,9667) For proper operation, @code{patch} typically needs at least two lines of
cvs.texi(,9668) context.
cvs.texi(,9669) 
cvs.texi(,9670) @item -w
cvs.texi(,9671) Ignore white space when comparing lines.
cvs.texi(,9672) 
cvs.texi(,9673) @item -W @var{columns}
cvs.texi(,9674) @itemx --width=@var{columns}
cvs.texi(,9675) Use an output width of @var{columns} in side by side format.
cvs.texi(,9676) 
cvs.texi(,9677) @item -y
cvs.texi(,9678) Use the side by side output format.
cvs.texi(,9679) @end table
cvs.texi(,9680) 
cvs.texi(,9681) @menu
cvs.texi(,9682) * Line group formats::          Line group formats
cvs.texi(,9683) * Line formats::                Line formats
cvs.texi(,9684) @end menu
cvs.texi(,9685) 
cvs.texi(,9686) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9687) @node Line group formats
cvs.texi(,9688) @appendixsubsubsec Line group formats
cvs.texi(,9689) 
cvs.texi(,9690) Line group formats let you specify formats suitable for many
cvs.texi(,9691) applications that allow if-then-else input, including programming
cvs.texi(,9692) languages and text formatting languages.  A line group format specifies
cvs.texi(,9693) the output format for a contiguous group of similar lines.
cvs.texi(,9694) 
cvs.texi(,9695) For example, the following command compares the TeX file @file{myfile}
cvs.texi(,9696) with the original version from the repository,
cvs.texi(,9697) and outputs a merged file in which old regions are
cvs.texi(,9698) surrounded by @samp{\begin@{em@}}-@samp{\end@{em@}} lines, and new
cvs.texi(,9699) regions are surrounded by @samp{\begin@{bf@}}-@samp{\end@{bf@}} lines.
cvs.texi(,9700) 
cvs.texi(,9701) @example
cvs.texi(,9702) cvs diff \
cvs.texi(,9703)    --old-group-format='\begin@{em@}
cvs.texi(,9704) %<\end@{em@}
cvs.texi(,9705) ' \
cvs.texi(,9706)    --new-group-format='\begin@{bf@}
cvs.texi(,9707) %>\end@{bf@}
cvs.texi(,9708) ' \
cvs.texi(,9709)    myfile
cvs.texi(,9710) @end example
cvs.texi(,9711) 
cvs.texi(,9712) The following command is equivalent to the above example, but it is a
cvs.texi(,9713) little more verbose, because it spells out the default line group formats.
cvs.texi(,9714) 
cvs.texi(,9715) @example
cvs.texi(,9716) cvs diff \
cvs.texi(,9717)    --old-group-format='\begin@{em@}
cvs.texi(,9718) %<\end@{em@}
cvs.texi(,9719) ' \
cvs.texi(,9720)    --new-group-format='\begin@{bf@}
cvs.texi(,9721) %>\end@{bf@}
cvs.texi(,9722) ' \
cvs.texi(,9723)    --unchanged-group-format='%=' \
cvs.texi(,9724)    --changed-group-format='\begin@{em@}
cvs.texi(,9725) %<\end@{em@}
cvs.texi(,9726) \begin@{bf@}
cvs.texi(,9727) %>\end@{bf@}
cvs.texi(,9728) ' \
cvs.texi(,9729)    myfile
cvs.texi(,9730) @end example
cvs.texi(,9731) 
cvs.texi(,9732) Here is a more advanced example, which outputs a diff listing with
cvs.texi(,9733) headers containing line numbers in a ``plain English'' style.
cvs.texi(,9734) 
cvs.texi(,9735) @example
cvs.texi(,9736) cvs diff \
cvs.texi(,9737)    --unchanged-group-format='' \
cvs.texi(,9738)    --old-group-format='-------- %dn line%(n=1?:s) deleted at %df:
cvs.texi(,9739) %<' \
cvs.texi(,9740)    --new-group-format='-------- %dN line%(N=1?:s) added after %de:
cvs.texi(,9741) %>' \
cvs.texi(,9742)    --changed-group-format='-------- %dn line%(n=1?:s) changed at %df:
cvs.texi(,9743) %<-------- to:
cvs.texi(,9744) %>' \
cvs.texi(,9745)    myfile
cvs.texi(,9746) @end example
cvs.texi(,9747) 
cvs.texi(,9748) To specify a line group format, use one of the options
cvs.texi(,9749) listed below.  You can specify up to four line group formats, one for
cvs.texi(,9750) each kind of line group.  You should quote @var{format}, because it
cvs.texi(,9751) typically contains shell metacharacters.
cvs.texi(,9752) 
cvs.texi(,9753) @table @samp
cvs.texi(,9754) @item --old-group-format=@var{format}
cvs.texi(,9755) These line groups are hunks containing only lines from the first file.
cvs.texi(,9756) The default old group format is the same as the changed group format if
cvs.texi(,9757) it is specified; otherwise it is a format that outputs the line group as-is.
cvs.texi(,9758) 
cvs.texi(,9759) @item --new-group-format=@var{format}
cvs.texi(,9760) These line groups are hunks containing only lines from the second
cvs.texi(,9761) file.  The default new group format is same as the changed group
cvs.texi(,9762) format if it is specified; otherwise it is a format that outputs the
cvs.texi(,9763) line group as-is.
cvs.texi(,9764) 
cvs.texi(,9765) @item --changed-group-format=@var{format}
cvs.texi(,9766) These line groups are hunks containing lines from both files.  The
cvs.texi(,9767) default changed group format is the concatenation of the old and new
cvs.texi(,9768) group formats.
cvs.texi(,9769) 
cvs.texi(,9770) @item --unchanged-group-format=@var{format}
cvs.texi(,9771) These line groups contain lines common to both files.  The default
cvs.texi(,9772) unchanged group format is a format that outputs the line group as-is.
cvs.texi(,9773) @end table
cvs.texi(,9774) 
cvs.texi(,9775) In a line group format, ordinary characters represent themselves;
cvs.texi(,9776) conversion specifications start with @samp{%} and have one of the
cvs.texi(,9777) following forms.
cvs.texi(,9778) 
cvs.texi(,9779) @table @samp
cvs.texi(,9780) @item %<
cvs.texi(,9781) stands for the lines from the first file, including the trailing newline.
cvs.texi(,9782) Each line is formatted according to the old line format (@pxref{Line formats}).
cvs.texi(,9783) 
cvs.texi(,9784) @item %>
cvs.texi(,9785) stands for the lines from the second file, including the trailing newline.
cvs.texi(,9786) Each line is formatted according to the new line format.
cvs.texi(,9787) 
cvs.texi(,9788) @item %=
cvs.texi(,9789) stands for the lines common to both files, including the trailing newline.
cvs.texi(,9790) Each line is formatted according to the unchanged line format.
cvs.texi(,9791) 
cvs.texi(,9792) @item %%
cvs.texi(,9793) stands for @samp{%}.
cvs.texi(,9794) 
cvs.texi(,9795) @item %c'@var{C}'
cvs.texi(,9796) where @var{C} is a single character, stands for @var{C}.
cvs.texi(,9797) @var{C} may not be a backslash or an apostrophe.
cvs.texi(,9798) For example, @samp{%c':'} stands for a colon, even inside
cvs.texi(,9799) the then-part of an if-then-else format, which a colon would
cvs.texi(,9800) normally terminate.
cvs.texi(,9801) 
cvs.texi(,9802) @item %c'\@var{O}'
cvs.texi(,9803) where @var{O} is a string of 1, 2, or 3 octal digits,
cvs.texi(,9804) stands for the character with octal code @var{O}.
cvs.texi(,9805) For example, @samp{%c'\0'} stands for a null character.
cvs.texi(,9806) 
cvs.texi(,9807) @item @var{F}@var{n}
cvs.texi(,9808) where @var{F} is a @code{printf} conversion specification and @var{n} is one
cvs.texi(,9809) of the following letters, stands for @var{n}'s value formatted with @var{F}.
cvs.texi(,9810) 
cvs.texi(,9811) @table @samp
cvs.texi(,9812) @item e
cvs.texi(,9813) The line number of the line just before the group in the old file.
cvs.texi(,9814) 
cvs.texi(,9815) @item f
cvs.texi(,9816) The line number of the first line in the group in the old file;
cvs.texi(,9817) equals @var{e} + 1.
cvs.texi(,9818) 
cvs.texi(,9819) @item l
cvs.texi(,9820) The line number of the last line in the group in the old file.
cvs.texi(,9821) 
cvs.texi(,9822) @item m
cvs.texi(,9823) The line number of the line just after the group in the old file;
cvs.texi(,9824) equals @var{l} + 1.
cvs.texi(,9825) 
cvs.texi(,9826) @item n
cvs.texi(,9827) The number of lines in the group in the old file; equals @var{l} - @var{f} + 1.
cvs.texi(,9828) 
cvs.texi(,9829) @item E, F, L, M, N
cvs.texi(,9830) Likewise, for lines in the new file.
cvs.texi(,9831) 
cvs.texi(,9832) @end table
cvs.texi(,9833) 
cvs.texi(,9834) The @code{printf} conversion specification can be @samp{%d},
cvs.texi(,9835) @samp{%o}, @samp{%x}, or @samp{%X}, specifying decimal, octal,
cvs.texi(,9836) lower case hexadecimal, or upper case hexadecimal output
cvs.texi(,9837) respectively.  After the @samp{%} the following options can appear in
cvs.texi(,9838) sequence: a @samp{-} specifying left-justification; an integer
cvs.texi(,9839) specifying the minimum field width; and a period followed by an
cvs.texi(,9840) optional integer specifying the minimum number of digits.
cvs.texi(,9841) For example, @samp{%5dN} prints the number of new lines in the group
cvs.texi(,9842) in a field of width 5 characters, using the @code{printf} format @code{"%5d"}.
cvs.texi(,9843) 
cvs.texi(,9844) @item (@var{A}=@var{B}?@var{T}:@var{E})
cvs.texi(,9845) If @var{A} equals @var{B} then @var{T} else @var{E}.
cvs.texi(,9846) @var{A} and @var{B} are each either a decimal constant
cvs.texi(,9847) or a single letter interpreted as above.
cvs.texi(,9848) This format spec is equivalent to @var{T} if
cvs.texi(,9849) @var{A}'s value equals @var{B}'s; otherwise it is equivalent to @var{E}.
cvs.texi(,9850) 
cvs.texi(,9851) For example, @samp{%(N=0?no:%dN) line%(N=1?:s)} is equivalent to
cvs.texi(,9852) @samp{no lines} if @var{N} (the number of lines in the group in the
cvs.texi(,9853) new file) is 0, to @samp{1 line} if @var{N} is 1, and to @samp{%dN lines}
cvs.texi(,9854) otherwise.
cvs.texi(,9855) @end table
cvs.texi(,9856) 
cvs.texi(,9857) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9858) @node Line formats
cvs.texi(,9859) @appendixsubsubsec Line formats
cvs.texi(,9860) 
cvs.texi(,9861) Line formats control how each line taken from an input file is
cvs.texi(,9862) output as part of a line group in if-then-else format.
cvs.texi(,9863) 
cvs.texi(,9864) For example, the following command outputs text with a one-column
cvs.texi(,9865) change indicator to the left of the text.  The first column of output
cvs.texi(,9866) is @samp{-} for deleted lines, @samp{|} for added lines, and a space
cvs.texi(,9867) for unchanged lines.  The formats contain newline characters where
cvs.texi(,9868) newlines are desired on output.
cvs.texi(,9869) 
cvs.texi(,9870) @example
cvs.texi(,9871) cvs diff \
cvs.texi(,9872)    --old-line-format='-%l
cvs.texi(,9873) ' \
cvs.texi(,9874)    --new-line-format='|%l
cvs.texi(,9875) ' \
cvs.texi(,9876)    --unchanged-line-format=' %l
cvs.texi(,9877) ' \
cvs.texi(,9878)    myfile
cvs.texi(,9879) @end example
cvs.texi(,9880) 
cvs.texi(,9881) To specify a line format, use one of the following options.  You should
cvs.texi(,9882) quote @var{format}, since it often contains shell metacharacters.
cvs.texi(,9883) 
cvs.texi(,9884) @table @samp
cvs.texi(,9885) @item --old-line-format=@var{format}
cvs.texi(,9886) formats lines just from the first file.
cvs.texi(,9887) 
cvs.texi(,9888) @item --new-line-format=@var{format}
cvs.texi(,9889) formats lines just from the second file.
cvs.texi(,9890) 
cvs.texi(,9891) @item --unchanged-line-format=@var{format}
cvs.texi(,9892) formats lines common to both files.
cvs.texi(,9893) 
cvs.texi(,9894) @item --line-format=@var{format}
cvs.texi(,9895) formats all lines; in effect, it sets all three above options simultaneously.
cvs.texi(,9896) @end table
cvs.texi(,9897) 
cvs.texi(,9898) In a line format, ordinary characters represent themselves;
cvs.texi(,9899) conversion specifications start with @samp{%} and have one of the
cvs.texi(,9900) following forms.
cvs.texi(,9901) 
cvs.texi(,9902) @table @samp
cvs.texi(,9903) @item %l
cvs.texi(,9904) stands for the contents of the line, not counting its trailing
cvs.texi(,9905) newline (if any).  This format ignores whether the line is incomplete.
cvs.texi(,9906) 
cvs.texi(,9907) @item %L
cvs.texi(,9908) stands for the contents of the line, including its trailing newline
cvs.texi(,9909) (if any).  If a line is incomplete, this format preserves its
cvs.texi(,9910) incompleteness.
cvs.texi(,9911) 
cvs.texi(,9912) @item %%
cvs.texi(,9913) stands for @samp{%}.
cvs.texi(,9914) 
cvs.texi(,9915) @item %c'@var{C}'
cvs.texi(,9916) where @var{C} is a single character, stands for @var{C}.
cvs.texi(,9917) @var{C} may not be a backslash or an apostrophe.
cvs.texi(,9918) For example, @samp{%c':'} stands for a colon.
cvs.texi(,9919) 
cvs.texi(,9920) @item %c'\@var{O}'
cvs.texi(,9921) where @var{O} is a string of 1, 2, or 3 octal digits,
cvs.texi(,9922) stands for the character with octal code @var{O}.
cvs.texi(,9923) For example, @samp{%c'\0'} stands for a null character.
cvs.texi(,9924) 
cvs.texi(,9925) @item @var{F}n
cvs.texi(,9926) where @var{F} is a @code{printf} conversion specification,
cvs.texi(,9927) stands for the line number formatted with @var{F}.
cvs.texi(,9928) For example, @samp{%.5dn} prints the line number using the
cvs.texi(,9929) @code{printf} format @code{"%.5d"}.  @xref{Line group formats}, for
cvs.texi(,9930) more about printf conversion specifications.
cvs.texi(,9931) 
cvs.texi(,9932) @end table
cvs.texi(,9933) 
cvs.texi(,9934) The default line format is @samp{%l} followed by a newline character.
cvs.texi(,9935) 
cvs.texi(,9936) If the input contains tab characters and it is important that they line
cvs.texi(,9937) up on output, you should ensure that @samp{%l} or @samp{%L} in a line
cvs.texi(,9938) format is just after a tab stop (e.g.@: by preceding @samp{%l} or
cvs.texi(,9939) @samp{%L} with a tab character), or you should use the @samp{-t} or
cvs.texi(,9940) @samp{--expand-tabs} option.
cvs.texi(,9941) 
cvs.texi(,9942) Taken together, the line and line group formats let you specify many
cvs.texi(,9943) different formats.  For example, the following command uses a format
cvs.texi(,9944) similar to @code{diff}'s normal format.  You can tailor this command
cvs.texi(,9945) to get fine control over @code{diff}'s output.
cvs.texi(,9946) 
cvs.texi(,9947) @example
cvs.texi(,9948) cvs diff \
cvs.texi(,9949)    --old-line-format='< %l
cvs.texi(,9950) ' \
cvs.texi(,9951)    --new-line-format='> %l
cvs.texi(,9952) ' \
cvs.texi(,9953)    --old-group-format='%df%(f=l?:,%dl)d%dE
cvs.texi(,9954) %<' \
cvs.texi(,9955)    --new-group-format='%dea%dF%(F=L?:,%dL)
cvs.texi(,9956) %>' \
cvs.texi(,9957)    --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
cvs.texi(,9958) %<---
cvs.texi(,9959) %>' \
cvs.texi(,9960)    --unchanged-group-format='' \
cvs.texi(,9961)    myfile
cvs.texi(,9962) @end example
cvs.texi(,9963) 
cvs.texi(,9964) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,9965) @node diff examples
cvs.texi(,9966) @appendixsubsec diff examples
cvs.texi(,9967) 
cvs.texi(,9968) The following line produces a Unidiff (@samp{-u} flag)
cvs.texi(,9969) between revision 1.14 and 1.19 of
cvs.texi(,9970) @file{backend.c}.  Due to the @samp{-kk} flag no
cvs.texi(,9971) keywords are substituted, so differences that only depend
cvs.texi(,9972) on keyword substitution are ignored.
cvs.texi(,9973) 
cvs.texi(,9974) @example
cvs.texi(,9975) $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
cvs.texi(,9976) @end example
cvs.texi(,9977) 
cvs.texi(,9978) Suppose the experimental branch EXPR1 was based on a
cvs.texi(,9979) set of files tagged RELEASE_1_0.  To see what has
cvs.texi(,9980) happened on that branch, the following can be used:
cvs.texi(,9981) 
cvs.texi(,9982) @example
cvs.texi(,9983) $ cvs diff -r RELEASE_1_0 -r EXPR1
cvs.texi(,9984) @end example
cvs.texi(,9985) 
cvs.texi(,9986) A command like this can be used to produce a context
cvs.texi(,9987) diff between two releases:
cvs.texi(,9988) 
cvs.texi(,9989) @example
cvs.texi(,9990) $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
cvs.texi(,9991) @end example
cvs.texi(,9992) 
cvs.texi(,9993) If you are maintaining ChangeLogs, a command like the following
cvs.texi(,9994) just before you commit your changes may help you write
cvs.texi(,9995) the ChangeLog entry.  All local modifications that have
cvs.texi(,9996) not yet been committed will be printed.
cvs.texi(,9997) 
cvs.texi(,9998) @example
cvs.texi(,9999) $ cvs diff -u | less
cvs.texi(,10000) @end example
cvs.texi(,10001) 
cvs.texi(,10002) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10003) @node export
cvs.texi(,10004) @appendixsec export---Export sources from CVS, similar to checkout
cvs.texi(,10005) @cindex export (subcommand)
cvs.texi(,10006) 
cvs.texi(,10007) @itemize @bullet
cvs.texi(,10008) @item
cvs.texi(,10009) Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module@dots{}
cvs.texi(,10010) @item
cvs.texi(,10011) Requires: repository.
cvs.texi(,10012) @item
cvs.texi(,10013) Changes: current directory.
cvs.texi(,10014) @end itemize
cvs.texi(,10015) 
cvs.texi(,10016) This command is a variant of @code{checkout}; use it
cvs.texi(,10017) when you want a copy of the source for module without
cvs.texi(,10018) the @sc{cvs} administrative directories.  For example, you
cvs.texi(,10019) might use @code{export} to prepare source for shipment
cvs.texi(,10020) off-site.  This command requires that you specify a
cvs.texi(,10021) date or tag (with @samp{-D} or @samp{-r}), so that you
cvs.texi(,10022) can count on reproducing the source you ship to others
cvs.texi(,10023) (and thus it always prunes empty directories).
cvs.texi(,10024) 
cvs.texi(,10025) One often would like to use @samp{-kv} with @code{cvs
cvs.texi(,10026) export}.  This causes any keywords to be
cvs.texi(,10027) expanded such that an import done at some other site
cvs.texi(,10028) will not lose the keyword revision information.  But be
cvs.texi(,10029) aware that doesn't handle an export containing binary
cvs.texi(,10030) files correctly.  Also be aware that after having used
cvs.texi(,10031) @samp{-kv}, one can no longer use the @code{ident}
cvs.texi(,10032) command (which is part of the @sc{rcs} suite---see
cvs.texi(,10033) ident(1)) which looks for keyword strings.  If
cvs.texi(,10034) you want to be able to use @code{ident} you must not
cvs.texi(,10035) use @samp{-kv}.
cvs.texi(,10036) 
cvs.texi(,10037) @menu
cvs.texi(,10038) * export options::              export options
cvs.texi(,10039) @end menu
cvs.texi(,10040) 
cvs.texi(,10041) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10042) @node export options
cvs.texi(,10043) @appendixsubsec export options
cvs.texi(,10044) 
cvs.texi(,10045) These standard options are supported by @code{export}
cvs.texi(,10046) (@pxref{Common options}, for a complete description of
cvs.texi(,10047) them):
cvs.texi(,10048) 
cvs.texi(,10049) @table @code
cvs.texi(,10050) @item -D @var{date}
cvs.texi(,10051) Use the most recent revision no later than @var{date}.
cvs.texi(,10052) 
cvs.texi(,10053) @item -f
cvs.texi(,10054) If no matching revision is found, retrieve the most
cvs.texi(,10055) recent revision (instead of ignoring the file).
cvs.texi(,10056) 
cvs.texi(,10057) @item -l
cvs.texi(,10058) Local; run only in current working directory.
cvs.texi(,10059) 
cvs.texi(,10060) @item -n
cvs.texi(,10061) Do not run any checkout program.
cvs.texi(,10062) 
cvs.texi(,10063) @item -R
cvs.texi(,10064) Export directories recursively.  This is on by default.
cvs.texi(,10065) 
cvs.texi(,10066) @item -r @var{tag}
cvs.texi(,10067) Use revision @var{tag}.
cvs.texi(,10068) @end table
cvs.texi(,10069) 
cvs.texi(,10070) In addition, these options (that are common to
cvs.texi(,10071) @code{checkout} and @code{export}) are also supported:
cvs.texi(,10072) 
cvs.texi(,10073) @table @code
cvs.texi(,10074) @item -d @var{dir}
cvs.texi(,10075) Create a directory called @var{dir} for the working
cvs.texi(,10076) files, instead of using the module name.
cvs.texi(,10077) @xref{checkout options}, for complete details on how
cvs.texi(,10078) @sc{cvs} handles this flag.
cvs.texi(,10079) 
cvs.texi(,10080) @item -k @var{subst}
cvs.texi(,10081) Set keyword expansion mode (@pxref{Substitution modes}).
cvs.texi(,10082) 
cvs.texi(,10083) @item -N
cvs.texi(,10084) Only useful together with @samp{-d @var{dir}}.
cvs.texi(,10085) @xref{checkout options}, for complete details on how
cvs.texi(,10086) @sc{cvs} handles this flag.
cvs.texi(,10087) @end table
cvs.texi(,10088) 
cvs.texi(,10097) 
cvs.texi(,10098) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10099) @node history
cvs.texi(,10100) @appendixsec history---Show status of files and users
cvs.texi(,10101) @cindex history (subcommand)
cvs.texi(,10102) 
cvs.texi(,10103) @itemize @bullet
cvs.texi(,10104) @item
cvs.texi(,10105) Synopsis:     history [-report] [-flags] [-options args] [files@dots{}]
cvs.texi(,10106) @item
cvs.texi(,10107) Requires: the file @file{$CVSROOT/CVSROOT/history}
cvs.texi(,10108) @item
cvs.texi(,10109) Changes: nothing.
cvs.texi(,10110) @end itemize
cvs.texi(,10111) 
cvs.texi(,10112) @sc{cvs} can keep a history file that tracks each use of the
cvs.texi(,10113) @code{checkout}, @code{commit}, @code{rtag},
cvs.texi(,10114) @code{update}, and @code{release} commands.  You can
cvs.texi(,10115) use @code{history} to display this information in
cvs.texi(,10116) various formats.
cvs.texi(,10117) 
cvs.texi(,10118) Logging must be enabled by creating the file
cvs.texi(,10119) @file{$CVSROOT/CVSROOT/history}.
cvs.texi(,10120) 
cvs.texi(,10121) @strong{Note: @code{history} uses @samp{-f}, @samp{-l},
cvs.texi(,10122) @samp{-n}, and @samp{-p} in ways that conflict with the
cvs.texi(,10123) normal use inside @sc{cvs} (@pxref{Common options}).}
cvs.texi(,10124) 
cvs.texi(,10125) @menu
cvs.texi(,10126) * history options::             history options
cvs.texi(,10127) @end menu
cvs.texi(,10128) 
cvs.texi(,10129) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10130) @node history options
cvs.texi(,10131) @appendixsubsec history options
cvs.texi(,10132) 
cvs.texi(,10133) Several options (shown above as @samp{-report})  control  what
cvs.texi(,10134) kind of report is generated:
cvs.texi(,10135) 
cvs.texi(,10136) @table @code
cvs.texi(,10137) @item -c
cvs.texi(,10138) Report on each time commit was used (i.e., each time
cvs.texi(,10139) the repository was modified).
cvs.texi(,10140) 
cvs.texi(,10141) @item -e
cvs.texi(,10142) Everything (all record types).  Equivalent to
cvs.texi(,10143) specifying @samp{-x} with all record types.  Of course,
cvs.texi(,10144) @samp{-e} will also include record types which are
cvs.texi(,10145) added in a future version of @sc{cvs}; if you are
cvs.texi(,10146) writing a script which can only handle certain record
cvs.texi(,10147) types, you'll want to specify @samp{-x}.
cvs.texi(,10148) 
cvs.texi(,10149) @item -m @var{module}
cvs.texi(,10150) Report on a particular module.  (You can meaningfully
cvs.texi(,10151) use @samp{-m} more than once on the command line.)
cvs.texi(,10152) 
cvs.texi(,10153) @item -o
cvs.texi(,10154) Report on checked-out modules.  This is the default report type.
cvs.texi(,10155) 
cvs.texi(,10156) @item -T
cvs.texi(,10157) Report on all tags.
cvs.texi(,10158) 
cvs.texi(,10159) @item -x @var{type}
cvs.texi(,10160) Extract a particular set of record types @var{type} from the @sc{cvs}
cvs.texi(,10161) history.  The types are indicated by single letters,
cvs.texi(,10162) which you may specify in combination.
cvs.texi(,10163) 
cvs.texi(,10164) Certain commands have a single record type:
cvs.texi(,10165) 
cvs.texi(,10166) @table @code
cvs.texi(,10167) @item F
cvs.texi(,10168) release
cvs.texi(,10169) @item O
cvs.texi(,10170) checkout
cvs.texi(,10171) @item E
cvs.texi(,10172) export
cvs.texi(,10173) @item T
cvs.texi(,10174) rtag
cvs.texi(,10175) @end table
cvs.texi(,10176) 
cvs.texi(,10177) @noindent
cvs.texi(,10178) One of four record types may result from an update:
cvs.texi(,10179) 
cvs.texi(,10180) @table @code
cvs.texi(,10181) @item C
cvs.texi(,10182) A merge was necessary but collisions were
cvs.texi(,10183) detected (requiring manual merging).
cvs.texi(,10184) @item G
cvs.texi(,10185) A merge was necessary and it succeeded.
cvs.texi(,10186) @item U
cvs.texi(,10187) A working file was copied from the repository.
cvs.texi(,10188) @item W
cvs.texi(,10189) The working copy of a file was deleted during
cvs.texi(,10190) update (because it was gone from the repository).
cvs.texi(,10191) @end table
cvs.texi(,10192) 
cvs.texi(,10193) @noindent
cvs.texi(,10194) One of three record types results from commit:
cvs.texi(,10195) 
cvs.texi(,10196) @table @code
cvs.texi(,10197) @item A
cvs.texi(,10198) A file was added for the first time.
cvs.texi(,10199) @item M
cvs.texi(,10200) A file was modified.
cvs.texi(,10201) @item R
cvs.texi(,10202) A file was removed.
cvs.texi(,10203) @end table
cvs.texi(,10204) @end table
cvs.texi(,10205) 
cvs.texi(,10206) The options shown as @samp{-flags} constrain or expand
cvs.texi(,10207) the report without requiring option arguments:
cvs.texi(,10208) 
cvs.texi(,10209) @table @code
cvs.texi(,10210) @item -a
cvs.texi(,10211) Show data for all users (the default is to show data
cvs.texi(,10212) only for the user executing @code{history}).
cvs.texi(,10213) 
cvs.texi(,10214) @item -l
cvs.texi(,10215) Show last modification only.
cvs.texi(,10216) 
cvs.texi(,10217) @item -w
cvs.texi(,10218) Show only the records for modifications done from the
cvs.texi(,10219) same working directory where @code{history} is
cvs.texi(,10220) executing.
cvs.texi(,10221) @end table
cvs.texi(,10222) 
cvs.texi(,10223) The options shown as @samp{-options @var{args}} constrain the report
cvs.texi(,10224) based on an argument:
cvs.texi(,10225) 
cvs.texi(,10226) @table @code
cvs.texi(,10227) @item -b @var{str}
cvs.texi(,10228) Show data back to a record containing  the  string
cvs.texi(,10229) @var{str}  in  either the module name, the file name, or
cvs.texi(,10230) the repository path.
cvs.texi(,10231) 
cvs.texi(,10232) @item -D @var{date}
cvs.texi(,10233) Show data since @var{date}.  This is slightly different
cvs.texi(,10234) from the normal use of @samp{-D @var{date}}, which
cvs.texi(,10235) selects the newest revision older than @var{date}.
cvs.texi(,10236) 
cvs.texi(,10237) @item -f @var{file}
cvs.texi(,10238) Show data for a particular file
cvs.texi(,10239) (you can specify several @samp{-f} options on the same command line).
cvs.texi(,10240) This is equivalent to specifying the file on the command line.
cvs.texi(,10241) 
cvs.texi(,10242) @item -n @var{module}
cvs.texi(,10243) Show data for a particular module
cvs.texi(,10244) (you can specify several @samp{-n} options on the same command line).
cvs.texi(,10245) 
cvs.texi(,10246) @item -p @var{repository}
cvs.texi(,10247) Show data for a particular source repository  (you
cvs.texi(,10248) can specify several @samp{-p} options on the same command
cvs.texi(,10249) line).
cvs.texi(,10250) 
cvs.texi(,10251) @item -r @var{rev}
cvs.texi(,10252) Show records referring to revisions since the revision
cvs.texi(,10253) or tag named @var{rev} appears in individual @sc{rcs}
cvs.texi(,10254) files.  Each @sc{rcs} file is searched for the revision or
cvs.texi(,10255) tag.
cvs.texi(,10256) 
cvs.texi(,10257) @item -t @var{tag}
cvs.texi(,10258) Show records since tag @var{tag} was last added to the
cvs.texi(,10259) history file.  This differs from the @samp{-r} flag
cvs.texi(,10260) above in that it reads only the history file, not the
cvs.texi(,10261) @sc{rcs} files, and is much faster.
cvs.texi(,10262) 
cvs.texi(,10263) @item -u @var{name}
cvs.texi(,10264) Show records for user @var{name}.
cvs.texi(,10265) 
cvs.texi(,10266) @item -z @var{timezone}
cvs.texi(,10267) Show times in the selected records using the specified
cvs.texi(,10268) time zone instead of UTC.
cvs.texi(,10269) @end table
cvs.texi(,10270) 
cvs.texi(,10279) 
cvs.texi(,10280) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10281) @node import
cvs.texi(,10282) @appendixsec import---Import sources into CVS, using vendor branches
cvs.texi(,10283) @cindex import (subcommand)
cvs.texi(,10284) 
cvs.texi(,10285) @c FIXME: This node is way too long for one which has subnodes.
cvs.texi(,10286) 
cvs.texi(,10287) @itemize @bullet
cvs.texi(,10288) @item
cvs.texi(,10289) Synopsis: import [-options] repository vendortag releasetag@dots{}
cvs.texi(,10290) @item
cvs.texi(,10291) Requires: Repository, source distribution directory.
cvs.texi(,10292) @item
cvs.texi(,10293) Changes: repository.
cvs.texi(,10294) @end itemize
cvs.texi(,10295) 
cvs.texi(,10296) Use @code{import} to incorporate an entire source
cvs.texi(,10297) distribution from an outside source (e.g., a source
cvs.texi(,10298) vendor) into your source repository directory.  You can
cvs.texi(,10299) use this command both for initial creation of a
cvs.texi(,10300) repository, and for wholesale updates to the module
cvs.texi(,10301) from the outside source.  @xref{Tracking sources}, for
cvs.texi(,10302) a discussion on this subject.
cvs.texi(,10303) 
cvs.texi(,10304) The @var{repository} argument gives a directory name
cvs.texi(,10305) (or a path to a directory) under the @sc{cvs} root directory
cvs.texi(,10306) for repositories; if the directory did not exist,
cvs.texi(,10307) import creates it.
cvs.texi(,10308) 
cvs.texi(,10309) When you use import for updates to source that has been
cvs.texi(,10310) modified in your source repository (since a prior
cvs.texi(,10311) import), it will notify you of any files that conflict
cvs.texi(,10312) in the two branches of development; use @samp{checkout
cvs.texi(,10313) -j} to reconcile the differences, as import instructs
cvs.texi(,10314) you to do.
cvs.texi(,10315) 
cvs.texi(,10316) If @sc{cvs} decides a file should be ignored
cvs.texi(,10317) (@pxref{cvsignore}), it does not import it and prints
cvs.texi(,10318) @samp{I } followed by the filename (@pxref{import output}, for a
cvs.texi(,10319) complete description of the output).
cvs.texi(,10320) 
cvs.texi(,10321) If the file @file{$CVSROOT/CVSROOT/cvswrappers} exists,
cvs.texi(,10322) any file whose names match the specifications in that
cvs.texi(,10323) file will be treated as packages and the appropriate
cvs.texi(,10324) filtering will be performed on the file/directory
cvs.texi(,10325) before being imported.  @xref{Wrappers}.
cvs.texi(,10326) 
cvs.texi(,10327) The outside source is saved in a first-level
cvs.texi(,10328) branch, by default 1.1.1.  Updates are leaves of this
cvs.texi(,10329) branch; for example, files from the first imported
cvs.texi(,10330) collection of source will be revision 1.1.1.1, then
cvs.texi(,10331) files from the first imported update will be revision
cvs.texi(,10332) 1.1.1.2, and so on.
cvs.texi(,10333) 
cvs.texi(,10334) At least three arguments are required.
cvs.texi(,10335) @var{repository} is needed to identify the collection
cvs.texi(,10336) of source.  @var{vendortag} is a tag for the entire
cvs.texi(,10337) branch (e.g., for 1.1.1).  You must also specify at
cvs.texi(,10338) least one @var{releasetag} to identify the files at
cvs.texi(,10339) the leaves created each time you execute @code{import}.
cvs.texi(,10340) 
cvs.texi(,10341) @c I'm not completely sure this belongs here.  But
cvs.texi(,10342) @c we need to say it _somewhere_ reasonably obvious; it
cvs.texi(,10343) @c is a common misconception among people first learning CVS
cvs.texi(,10344) Note that @code{import} does @emph{not} change the
cvs.texi(,10345) directory in which you invoke it.  In particular, it
cvs.texi(,10346) does not set up that directory as a @sc{cvs} working
cvs.texi(,10347) directory; if you want to work with the sources import
cvs.texi(,10348) them first and then check them out into a different
cvs.texi(,10349) directory (@pxref{Getting the source}).
cvs.texi(,10350) 
cvs.texi(,10351) @menu
cvs.texi(,10352) * import options::              import options
cvs.texi(,10353) * import output::               import output
cvs.texi(,10354) * import examples::             import examples
cvs.texi(,10355) @end menu
cvs.texi(,10356) 
cvs.texi(,10357) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10358) @node import options
cvs.texi(,10359) @appendixsubsec import options
cvs.texi(,10360) 
cvs.texi(,10361) This standard option is supported by @code{import}
cvs.texi(,10362) (@pxref{Common options}, for a complete description):
cvs.texi(,10363) 
cvs.texi(,10364) @table @code
cvs.texi(,10365) @item -m @var{message}
cvs.texi(,10366) Use @var{message} as log information, instead of
cvs.texi(,10367) invoking an editor.
cvs.texi(,10368) @end table
cvs.texi(,10369) 
cvs.texi(,10370) There are the following additional special options.
cvs.texi(,10371) 
cvs.texi(,10372) @table @code
cvs.texi(,10373) @item -b @var{branch}
cvs.texi(,10374) See @ref{Multiple vendor branches}.
cvs.texi(,10375) 
cvs.texi(,10376) @item -k @var{subst}
cvs.texi(,10377) Indicate the keyword expansion mode desired.  This
cvs.texi(,10378) setting will apply to all files created during the
cvs.texi(,10379) import, but not to any files that previously existed in
cvs.texi(,10380) the repository.  See @ref{Substitution modes}, for a
cvs.texi(,10381) list of valid @samp{-k} settings.
cvs.texi(,10382) 
cvs.texi(,10383) @item -I @var{name}
cvs.texi(,10384) Specify file names that should be ignored during
cvs.texi(,10385) import.  You can use this option repeatedly.  To avoid
cvs.texi(,10386) ignoring any files at all (even those ignored by
cvs.texi(,10387) default), specify `-I !'.
cvs.texi(,10388) 
cvs.texi(,10389) @var{name} can be a file name pattern of the same type
cvs.texi(,10390) that you can specify in the @file{.cvsignore} file.
cvs.texi(,10391) @xref{cvsignore}.
cvs.texi(,10392) @c -- Is this really true?
cvs.texi(,10393) 
cvs.texi(,10394) @item -W @var{spec}
cvs.texi(,10395) Specify file names that should be filtered during
cvs.texi(,10396) import.  You can use this option repeatedly.
cvs.texi(,10397) 
cvs.texi(,10398) @var{spec} can be a file name pattern of the same type
cvs.texi(,10399) that you can specify in the @file{.cvswrappers}
cvs.texi(,10400) file. @xref{Wrappers}.
cvs.texi(,10401) @end table
cvs.texi(,10402) 
cvs.texi(,10403) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10404) @node import output
cvs.texi(,10405) @appendixsubsec import output
cvs.texi(,10406) 
cvs.texi(,10407) @code{import} keeps you informed of its progress by printing a line
cvs.texi(,10408) for each file, preceded by one character indicating the status of the file:
cvs.texi(,10409) 
cvs.texi(,10410) @table @code
cvs.texi(,10411) @item U @var{file}
cvs.texi(,10412) The file already exists in the repository and has not been locally
cvs.texi(,10413) modified; a new revision has been created (if necessary).
cvs.texi(,10414) 
cvs.texi(,10415) @item N @var{file}
cvs.texi(,10416) The file is a new file which has been added to the repository.
cvs.texi(,10417) 
cvs.texi(,10418) @item C @var{file}
cvs.texi(,10419) The file already exists in the repository but has been locally modified;
cvs.texi(,10420) you will have to merge the changes.
cvs.texi(,10421) 
cvs.texi(,10422) @item I @var{file}
cvs.texi(,10423) The file is being ignored (@pxref{cvsignore}).
cvs.texi(,10424) 
cvs.texi(,10425) @cindex Symbolic link, importing
cvs.texi(,10426) @cindex Link, symbolic, importing
cvs.texi(,10427) @c FIXME: also (somewhere else) probably
cvs.texi(,10428) @c should be documenting what happens if you "cvs add"
cvs.texi(,10429) @c a symbolic link.  Also maybe what happens if
cvs.texi(,10430) @c you manually create symbolic links within the
cvs.texi(,10431) @c repository (? - not sure why we'd want to suggest
cvs.texi(,10432) @c doing that).
cvs.texi(,10433) @item L @var{file}
cvs.texi(,10434) The file is a symbolic link; @code{cvs import} ignores symbolic links.
cvs.texi(,10435) People periodically suggest that this behavior should
cvs.texi(,10436) be changed, but if there is a consensus on what it
cvs.texi(,10437) should be changed to, it is not apparent.
cvs.texi(,10438) (Various options in the @file{modules} file can be used
cvs.texi(,10439) to recreate symbolic links on checkout, update, etc.;
cvs.texi(,10440) @pxref{modules}.)
cvs.texi(,10441) @end table
cvs.texi(,10442) 
cvs.texi(,10443) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10444) @node import examples
cvs.texi(,10445) @appendixsubsec import examples
cvs.texi(,10446) 
cvs.texi(,10447) See @ref{Tracking sources}, and @ref{From files}.
cvs.texi(,10448) 
cvs.texi(,10449) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10450) @node log
cvs.texi(,10451) @appendixsec log---Print out log information for files
cvs.texi(,10452) @cindex log (subcommand)
cvs.texi(,10453) 
cvs.texi(,10454) @itemize @bullet
cvs.texi(,10455) @item
cvs.texi(,10456) Synopsis: log [options] [files@dots{}]
cvs.texi(,10457) @item
cvs.texi(,10458) Requires: repository, working directory.
cvs.texi(,10459) @item
cvs.texi(,10460) Changes: nothing.
cvs.texi(,10461) @end itemize
cvs.texi(,10462) 
cvs.texi(,10463) Display log information for files.  @code{log} used to
cvs.texi(,10464) call the @sc{rcs} utility @code{rlog}.  Although this
cvs.texi(,10465) is no longer true in the current sources, this history
cvs.texi(,10466) determines the format of the output and the options,
cvs.texi(,10467) which are not quite in the style of the other @sc{cvs}
cvs.texi(,10468) commands.
cvs.texi(,10469) 
cvs.texi(,10470) @cindex Timezone, in output
cvs.texi(,10471) @cindex Zone, time, in output
cvs.texi(,10472) @c Kind of a funny place to document the timezone used
cvs.texi(,10473) @c in output from commands other than @code{log}.
cvs.texi(,10474) @c There is also more we need to say about this,
cvs.texi(,10475) @c including what happens in a client/server environment.
cvs.texi(,10476) The output includes the location of the @sc{rcs} file,
cvs.texi(,10477) the @dfn{head} revision (the latest revision on the
cvs.texi(,10478) trunk), all symbolic names (tags) and some other
cvs.texi(,10479) things.  For each revision, the revision number, the
cvs.texi(,10480) author, the number of lines added/deleted and the log
cvs.texi(,10481) message are printed.  All times are displayed in
cvs.texi(,10482) Coordinated Universal Time (UTC).  (Other parts of
cvs.texi(,10483) @sc{cvs} print times in the local timezone).
cvs.texi(,10484) @c FIXCVS: need a better way to control the timezone
cvs.texi(,10485) @c used in output.  Previous/current versions of CVS did/do
cvs.texi(,10486) @c sometimes support -z in RCSINIT, and/or an
cvs.texi(,10487) @c undocumented (except by reference to 'rlog') -z option
cvs.texi(,10488) @c to cvs log, but this has not been a consistent,
cvs.texi(,10489) @c documented feature.  Perhaps a new global option,
cvs.texi(,10490) @c where LT means the client's timezone, which the
cvs.texi(,10491) @c client then communicates to the server, is the
cvs.texi(,10492) @c right solution.
cvs.texi(,10493) 
cvs.texi(,10494) @strong{Note: @code{log} uses @samp{-R} in a way that conflicts
cvs.texi(,10495) with the normal use inside @sc{cvs} (@pxref{Common options}).}
cvs.texi(,10496) 
cvs.texi(,10497) @menu
cvs.texi(,10498) * log options::                 log options
cvs.texi(,10499) * log examples::                log examples
cvs.texi(,10500) @end menu
cvs.texi(,10501) 
cvs.texi(,10502) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10503) @node log options
cvs.texi(,10504) @appendixsubsec log options
cvs.texi(,10505) 
cvs.texi(,10506) By default, @code{log} prints all information that is
cvs.texi(,10507) available.  All other options restrict the output.
cvs.texi(,10508) 
cvs.texi(,10509) @table @code
cvs.texi(,10510) @item -b
cvs.texi(,10511) Print information about the revisions on the default
cvs.texi(,10512) branch, normally the highest branch on the trunk.
cvs.texi(,10513) 
cvs.texi(,10514) @item -d @var{dates}
cvs.texi(,10515) Print information about revisions with a checkin
cvs.texi(,10516) date/time in the range given by the
cvs.texi(,10517) semicolon-separated list of dates.  The date formats
cvs.texi(,10518) accepted are those accepted by the @samp{-D} option to
cvs.texi(,10519) many other @sc{cvs} commands (@pxref{Common options}).
cvs.texi(,10520) Dates can be combined into ranges as follows:
cvs.texi(,10521) 
cvs.texi(,10522) @c Should we be thinking about accepting ISO8601
cvs.texi(,10523) @c ranges?  For example "1972-09-10/1972-09-12".
cvs.texi(,10524) @table @code
cvs.texi(,10525) @item @var{d1}<@var{d2}
cvs.texi(,10526) @itemx @var{d2}>@var{d1}
cvs.texi(,10527) Select the revisions that were deposited between
cvs.texi(,10528) @var{d1} and @var{d2}.
cvs.texi(,10529) 
cvs.texi(,10530) @item <@var{d}
cvs.texi(,10531) @itemx @var{d}>
cvs.texi(,10532) Select all revisions dated @var{d} or earlier.
cvs.texi(,10533) 
cvs.texi(,10534) @item @var{d}<
cvs.texi(,10535) @itemx >@var{d}
cvs.texi(,10536) Select all revisions dated @var{d} or later.
cvs.texi(,10537) 
cvs.texi(,10538) @item @var{d}
cvs.texi(,10539) Select the single, latest revision dated @var{d} or
cvs.texi(,10540) earlier.
cvs.texi(,10541) @end table
cvs.texi(,10542) 
cvs.texi(,10543) The @samp{>} or @samp{<} characters may be followed by
cvs.texi(,10544) @samp{=} to indicate an inclusive range rather than an
cvs.texi(,10545) exclusive one.
cvs.texi(,10546) 
cvs.texi(,10547) Note that the separator is a semicolon (;).
cvs.texi(,10548) 
cvs.texi(,10549) @item -h
cvs.texi(,10550) Print only the name of the @sc{rcs} file, name
cvs.texi(,10551) of the file in the working directory, head,
cvs.texi(,10552) default branch, access list, locks, symbolic names, and
cvs.texi(,10553) suffix.
cvs.texi(,10554) 
cvs.texi(,10555) @item -l
cvs.texi(,10556) Local; run only in current working directory.  (Default
cvs.texi(,10557) is to run recursively).
cvs.texi(,10558) 
cvs.texi(,10559) @item -N
cvs.texi(,10560) Do not print the list of tags for this file.  This
cvs.texi(,10561) option can be very useful when your site uses a lot of
cvs.texi(,10562) tags, so rather than "more"'ing over 3 pages of tag
cvs.texi(,10563) information, the log information is presented without
cvs.texi(,10564) tags at all.
cvs.texi(,10565) 
cvs.texi(,10566) @item -R
cvs.texi(,10567) Print only the name of the @sc{rcs} file.
cvs.texi(,10568) 
cvs.texi(,10569) @c Note that using a bare revision (in addition to not
cvs.texi(,10570) @c being explicitly documented here) is potentially
cvs.texi(,10571) @c confusing; it shows the log message to get from the
cvs.texi(,10572) @c previous revision to that revision.  "-r1.3 -r1.6"
cvs.texi(,10573) @c (equivalent to "-r1.3,1.6") is even worse; it
cvs.texi(,10574) @c prints the messages to get from 1.2 to 1.3 and 1.5
cvs.texi(,10575) @c to 1.6.  By analogy with "cvs diff", users might
cvs.texi(,10576) @c expect that it is more like specifying a range.
cvs.texi(,10577) @c It is not 100% clear to me how much of this should
cvs.texi(,10578) @c be documented (for example, multiple -r options
cvs.texi(,10579) @c perhaps could/should be deprecated given the false
cvs.texi(,10580) @c analogy with "cvs diff").
cvs.texi(,10581) @c In general, this section should be rewritten to talk
cvs.texi(,10582) @c about messages to get from revision rev1 to rev2,
cvs.texi(,10583) @c rather than messages for revision rev2 (that is, the
cvs.texi(,10584) @c messages are associated with a change not a static
cvs.texi(,10585) @c revision and failing to make this distinction causes
cvs.texi(,10586) @c much confusion).
cvs.texi(,10587) @item -r@var{revisions}
cvs.texi(,10588) Print information about revisions given in the
cvs.texi(,10589) comma-separated list @var{revisions} of revisions and
cvs.texi(,10590) ranges.  The following table explains the available
cvs.texi(,10591) range formats:
cvs.texi(,10592) 
cvs.texi(,10593) @table @code
cvs.texi(,10594) @item @var{rev1}:@var{rev2}
cvs.texi(,10595) Revisions @var{rev1} to @var{rev2} (which must be on
cvs.texi(,10596) the same branch).
cvs.texi(,10597) 
cvs.texi(,10598) @item @var{rev1}::@var{rev2}
cvs.texi(,10599) The same, but excluding @var{rev1}.
cvs.texi(,10600) 
cvs.texi(,10601) @item :@var{rev}
cvs.texi(,10602) @itemx ::@var{rev}
cvs.texi(,10603) Revisions from the beginning of the branch up to
cvs.texi(,10604) and including @var{rev}.
cvs.texi(,10605) 
cvs.texi(,10606) @item @var{rev}:
cvs.texi(,10607) Revisions starting with @var{rev} to the end of the
cvs.texi(,10608) branch containing @var{rev}.
cvs.texi(,10609) 
cvs.texi(,10610) @item @var{rev}::
cvs.texi(,10611) Revisions starting just after @var{rev} to the end of the
cvs.texi(,10612) branch containing @var{rev}.
cvs.texi(,10613) 
cvs.texi(,10614) @item @var{branch}
cvs.texi(,10615) An argument that is a branch means all revisions on
cvs.texi(,10616) that branch.
cvs.texi(,10617) 
cvs.texi(,10618) @item @var{branch1}:@var{branch2}
cvs.texi(,10619) @itemx @var{branch1}::@var{branch2}
cvs.texi(,10620) A range of branches means all revisions
cvs.texi(,10621) on the branches in that range.
cvs.texi(,10622) 
cvs.texi(,10623) @item @var{branch}.
cvs.texi(,10624) The latest revision in @var{branch}.
cvs.texi(,10625) @end table
cvs.texi(,10626) 
cvs.texi(,10627) A bare @samp{-r} with no revisions means the latest
cvs.texi(,10628) revision on the default branch, normally the trunk.
cvs.texi(,10629) There can be no space between the @samp{-r} option and
cvs.texi(,10630) its argument.
cvs.texi(,10631) 
cvs.texi(,10632) @item -S
cvs.texi(,10633) Suppress the header if no revisions are selected.
cvs.texi(,10634) 
cvs.texi(,10635) @item -s @var{states}
cvs.texi(,10636) Print information about revisions whose state
cvs.texi(,10637) attributes match one of the states given in the
cvs.texi(,10638) comma-separated list @var{states}.
cvs.texi(,10639) 
cvs.texi(,10640) @item -t
cvs.texi(,10641) Print the same as @samp{-h}, plus the descriptive text.
cvs.texi(,10642) 
cvs.texi(,10643) @item -w@var{logins}
cvs.texi(,10644) Print information about revisions checked in by users
cvs.texi(,10645) with login names appearing in the comma-separated list
cvs.texi(,10646) @var{logins}.  If @var{logins} is omitted, the user's
cvs.texi(,10647) login is assumed.  There can be no space between the
cvs.texi(,10648) @samp{-w} option and its argument.
cvs.texi(,10649) @end table
cvs.texi(,10650) 
cvs.texi(,10651) @code{log} prints the intersection of the revisions
cvs.texi(,10652) selected with the options @samp{-d}, @samp{-s}, and
cvs.texi(,10653) @samp{-w}, intersected with the union of the revisions
cvs.texi(,10654) selected by @samp{-b} and @samp{-r}.
cvs.texi(,10655) 
cvs.texi(,10656) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10657) @node log examples
cvs.texi(,10658) @appendixsubsec log examples
cvs.texi(,10659) 
cvs.texi(,10660) Contributed examples are gratefully accepted.
cvs.texi(,10661) 
cvs.texi(,10662) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10663) @node rdiff
cvs.texi(,10664) @appendixsec rdiff---'patch' format diffs between releases
cvs.texi(,10665) @cindex rdiff (subcommand)
cvs.texi(,10666) 
cvs.texi(,10667) @itemize @bullet
cvs.texi(,10668) @item
cvs.texi(,10669) rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules@dots{}
cvs.texi(,10670) @item
cvs.texi(,10671) Requires: repository.
cvs.texi(,10672) @item
cvs.texi(,10673) Changes: nothing.
cvs.texi(,10674) @item
cvs.texi(,10675) Synonym: patch
cvs.texi(,10676) @end itemize
cvs.texi(,10677) 
cvs.texi(,10678) Builds a Larry Wall format patch(1) file between two
cvs.texi(,10679) releases, that can be fed directly into the @code{patch}
cvs.texi(,10680) program to bring an old release up-to-date with the new
cvs.texi(,10681) release.  (This is one of the few @sc{cvs} commands that
cvs.texi(,10682) operates directly from the repository, and doesn't
cvs.texi(,10683) require a prior checkout.) The diff output is sent to
cvs.texi(,10684) the standard output device.
cvs.texi(,10685) 
cvs.texi(,10686) You can specify (using the standard @samp{-r} and
cvs.texi(,10687) @samp{-D} options) any combination of one or two
cvs.texi(,10688) revisions or dates.  If only one revision or date is
cvs.texi(,10689) specified, the patch file reflects differences between
cvs.texi(,10690) that revision or date and the current head revisions in
cvs.texi(,10691) the @sc{rcs} file.
cvs.texi(,10692) 
cvs.texi(,10693) Note that if the software release affected is contained
cvs.texi(,10694) in more than one directory, then it may be necessary to
cvs.texi(,10695) specify the @samp{-p} option to the @code{patch} command when
cvs.texi(,10696) patching the old sources, so that @code{patch} is able to find
cvs.texi(,10697) the files that are located in other directories.
cvs.texi(,10698) 
cvs.texi(,10699) @menu
cvs.texi(,10700) * rdiff options::               rdiff options
cvs.texi(,10701) * rdiff examples::              rdiff examples
cvs.texi(,10702) @end menu
cvs.texi(,10703) 
cvs.texi(,10704) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10705) @node rdiff options
cvs.texi(,10706) @appendixsubsec rdiff options
cvs.texi(,10707) 
cvs.texi(,10708) These standard options are supported by @code{rdiff}
cvs.texi(,10709) (@pxref{Common options}, for a complete description of
cvs.texi(,10710) them):
cvs.texi(,10711) 
cvs.texi(,10712) @table @code
cvs.texi(,10713) @item -D @var{date}
cvs.texi(,10714) Use the most recent revision no later than @var{date}.
cvs.texi(,10715) 
cvs.texi(,10716) @item -f
cvs.texi(,10717) If no matching revision is found, retrieve the most
cvs.texi(,10718) recent revision (instead of ignoring the file).
cvs.texi(,10719) 
cvs.texi(,10720) @item -l
cvs.texi(,10721) Local; don't descend subdirectories.
cvs.texi(,10722) 
cvs.texi(,10723) @item -R
cvs.texi(,10724) Examine directories recursively.  This option is on by default.
cvs.texi(,10725) 
cvs.texi(,10726) @item -r @var{tag}
cvs.texi(,10727) Use revision @var{tag}.
cvs.texi(,10728) @end table
cvs.texi(,10729) 
cvs.texi(,10730) In addition to the above, these options are available:
cvs.texi(,10731) 
cvs.texi(,10732) @table @code
cvs.texi(,10733) @item -c
cvs.texi(,10734) Use the context diff format.  This is the default format.
cvs.texi(,10735) 
cvs.texi(,10736) @item -s
cvs.texi(,10737) Create a summary change report instead of a patch.  The
cvs.texi(,10738) summary includes information about files that were
cvs.texi(,10739) changed or added between the releases.  It is sent to
cvs.texi(,10740) the standard output device.  This is useful for finding
cvs.texi(,10741) out, for example, which files have changed between two
cvs.texi(,10742) dates or revisions.
cvs.texi(,10743) 
cvs.texi(,10744) @item -t
cvs.texi(,10745) A diff of the top two revisions is sent to the standard
cvs.texi(,10746) output device.  This is most useful for seeing what the
cvs.texi(,10747) last change to a file was.
cvs.texi(,10748) 
cvs.texi(,10749) @item -u
cvs.texi(,10750) Use the unidiff format for the context diffs.
cvs.texi(,10751) Remember that old versions
cvs.texi(,10752) of the @code{patch} program can't handle the unidiff
cvs.texi(,10753) format, so if you plan to post this patch to the net
cvs.texi(,10754) you should probably not use @samp{-u}.
cvs.texi(,10755) 
cvs.texi(,10756) @item -V @var{vn}
cvs.texi(,10757) Expand keywords according to the rules current in
cvs.texi(,10758) @sc{rcs} version @var{vn} (the expansion format changed with
cvs.texi(,10759) @sc{rcs} version 5).  Note that this option is no
cvs.texi(,10760) longer accepted.  @sc{cvs} will always expand keywords the
cvs.texi(,10761) way that @sc{rcs} version 5 does.
cvs.texi(,10762) @end table
cvs.texi(,10763) 
cvs.texi(,10764) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10765) @node rdiff examples
cvs.texi(,10766) @appendixsubsec rdiff examples
cvs.texi(,10767) 
cvs.texi(,10768) Suppose you receive mail from @t{foo@@example.net} asking for an
cvs.texi(,10769) update from release 1.2 to 1.4 of the tc compiler.  You
cvs.texi(,10770) have no such patches on hand, but with @sc{cvs} that can
cvs.texi(,10771) easily be fixed with a command such as this:
cvs.texi(,10772) 
cvs.texi(,10773) @example
cvs.texi(,10774) $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \
cvs.texi(,10775) $$ Mail -s 'The patches you asked for' foo@@example.net
cvs.texi(,10776) @end example
cvs.texi(,10777) 
cvs.texi(,10778) Suppose you have made release 1.3, and forked a branch
cvs.texi(,10779) called @samp{R_1_3fix} for bugfixes.  @samp{R_1_3_1}
cvs.texi(,10780) corresponds to release 1.3.1, which was made some time
cvs.texi(,10781) ago.  Now, you want to see how much development has been
cvs.texi(,10782) done on the branch.  This command can be used:
cvs.texi(,10783) 
cvs.texi(,10784) @example
cvs.texi(,10785) $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
cvs.texi(,10786) cvs rdiff: Diffing module-name
cvs.texi(,10787) File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
cvs.texi(,10788) File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
cvs.texi(,10789) File bar.h,v changed from revision 1.29.2.1 to 1.2
cvs.texi(,10790) @end example
cvs.texi(,10791) 
cvs.texi(,10792) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10793) @node release
cvs.texi(,10794) @appendixsec release---Indicate that a Module is no longer in use
cvs.texi(,10795) @cindex release (subcommand)
cvs.texi(,10796) 
cvs.texi(,10797) @itemize @bullet
cvs.texi(,10798) @item
cvs.texi(,10799) release [-d] directories@dots{}
cvs.texi(,10800) @item
cvs.texi(,10801) Requires: Working directory.
cvs.texi(,10802) @item
cvs.texi(,10803) Changes: Working directory, history log.
cvs.texi(,10804) @end itemize
cvs.texi(,10805) 
cvs.texi(,10806) This command is meant to safely cancel the effect of
cvs.texi(,10807) @samp{cvs checkout}.  Since @sc{cvs} doesn't lock files, it
cvs.texi(,10808) isn't strictly necessary to use this command.  You can
cvs.texi(,10809) always simply delete your working directory, if you
cvs.texi(,10810) like; but you risk losing changes you may have
cvs.texi(,10811) forgotten, and you leave no trace in the @sc{cvs} history
cvs.texi(,10812) file (@pxref{history file}) that you've abandoned your
cvs.texi(,10813) checkout.
cvs.texi(,10814) 
cvs.texi(,10815) Use @samp{cvs release} to avoid these problems.  This
cvs.texi(,10816) command checks that no uncommitted changes are
cvs.texi(,10817) present; that you are executing it from immediately
cvs.texi(,10818) above a @sc{cvs} working directory; and that the repository
cvs.texi(,10819) recorded for your files is the same as the repository
cvs.texi(,10820) defined in the module database.
cvs.texi(,10821) 
cvs.texi(,10822) If all these conditions are true, @samp{cvs release}
cvs.texi(,10823) leaves a record of its execution (attesting to your
cvs.texi(,10824) intentionally abandoning your checkout) in the @sc{cvs}
cvs.texi(,10825) history log.
cvs.texi(,10826) 
cvs.texi(,10827) @menu
cvs.texi(,10828) * release options::             release options
cvs.texi(,10829) * release output::              release output
cvs.texi(,10830) * release examples::            release examples
cvs.texi(,10831) @end menu
cvs.texi(,10832) 
cvs.texi(,10833) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10834) @node release options
cvs.texi(,10835) @appendixsubsec release options
cvs.texi(,10836) 
cvs.texi(,10837) The @code{release} command supports one command option:
cvs.texi(,10838) 
cvs.texi(,10839) @table @code
cvs.texi(,10840) @item -d
cvs.texi(,10841) Delete your working copy of the file if the release
cvs.texi(,10842) succeeds.  If this flag is not given your files will
cvs.texi(,10843) remain in your working directory.
cvs.texi(,10844) 
cvs.texi(,10845) @strong{WARNING:  The @code{release} command deletes
cvs.texi(,10846) all directories and files recursively.  This
cvs.texi(,10847) has the very serious side-effect that any directory
cvs.texi(,10848) that you have created inside your checked-out sources,
cvs.texi(,10849) and not added to the repository (using the @code{add}
cvs.texi(,10850) command; @pxref{Adding files}) will be silently deleted---even
cvs.texi(,10851) if it is non-empty!}
cvs.texi(,10852) @end table
cvs.texi(,10853) 
cvs.texi(,10854) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10855) @node release output
cvs.texi(,10856) @appendixsubsec release output
cvs.texi(,10857) 
cvs.texi(,10858) Before @code{release} releases your sources it will
cvs.texi(,10859) print a one-line message for any file that is not
cvs.texi(,10860) up-to-date.
cvs.texi(,10861) 
cvs.texi(,10862) @table @code
cvs.texi(,10863) @item U @var{file}
cvs.texi(,10864) @itemx P @var{file}
cvs.texi(,10865) There exists a newer revision of this file in the
cvs.texi(,10866) repository, and you have not modified your local copy
cvs.texi(,10867) of the file (@samp{U} and @samp{P} mean the same thing).
cvs.texi(,10868) 
cvs.texi(,10869) @item A @var{file}
cvs.texi(,10870) The file has been added to your private copy of the
cvs.texi(,10871) sources, but has not yet been committed to the
cvs.texi(,10872) repository.  If you delete your copy of the sources
cvs.texi(,10873) this file will be lost.
cvs.texi(,10874) 
cvs.texi(,10875) @item R @var{file}
cvs.texi(,10876) The file has been removed from your private copy of the
cvs.texi(,10877) sources, but has not yet been removed from the
cvs.texi(,10878) repository, since you have not yet committed the
cvs.texi(,10879) removal.  @xref{commit}.
cvs.texi(,10880) 
cvs.texi(,10881) @item M @var{file}
cvs.texi(,10882) The file is modified in your working directory.  There
cvs.texi(,10883) might also be a newer revision inside the repository.
cvs.texi(,10884) 
cvs.texi(,10885) @item ? @var{file}
cvs.texi(,10886) @var{file} is in your working directory, but does not
cvs.texi(,10887) correspond to anything in the source repository, and is
cvs.texi(,10888) not in the list of files for @sc{cvs} to ignore (see the
cvs.texi(,10889) description of the @samp{-I} option, and
cvs.texi(,10890) @pxref{cvsignore}).  If you remove your working
cvs.texi(,10891) sources, this file will be lost.
cvs.texi(,10892) @end table
cvs.texi(,10893) 
cvs.texi(,10894) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10895) @node release examples
cvs.texi(,10896) @appendixsubsec release examples
cvs.texi(,10897) 
cvs.texi(,10898) Release the @file{tc} directory, and delete your local working copy
cvs.texi(,10899) of the files.
cvs.texi(,10900) 
cvs.texi(,10901) @example
cvs.texi(,10902) $ cd ..         # @r{You must stand immediately above the}
cvs.texi(,10903)                 # @r{sources when you issue @samp{cvs release}.}
cvs.texi(,10904) $ cvs release -d tc
cvs.texi(,10905) You have [0] altered files in this repository.
cvs.texi(,10906) Are you sure you want to release (and delete) directory `tc': y
cvs.texi(,10907) $
cvs.texi(,10908) @end example
cvs.texi(,10909) 
cvs.texi(,10910) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,10911) @node update
cvs.texi(,10912) @appendixsec update---Bring work tree in sync with repository
cvs.texi(,10913) @cindex update (subcommand)
cvs.texi(,10914) 
cvs.texi(,10915) @itemize @bullet
cvs.texi(,10916) @item
cvs.texi(,10917) update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files@dots{}
cvs.texi(,10918) @item
cvs.texi(,10919) Requires: repository, working directory.
cvs.texi(,10920) @item
cvs.texi(,10921) Changes: working directory.
cvs.texi(,10922) @end itemize
cvs.texi(,10923) 
cvs.texi(,10924) After you've run checkout to create your private copy
cvs.texi(,10925) of source from the common repository, other developers
cvs.texi(,10926) will continue changing the central source.  From time
cvs.texi(,10927) to time, when it is convenient in your development
cvs.texi(,10928) process, you can use the @code{update} command from
cvs.texi(,10929) within your working directory to reconcile your work
cvs.texi(,10930) with any revisions applied to the source repository
cvs.texi(,10931) since your last checkout or update.  Without the @code{-C}
cvs.texi(,10932) option, @code{update} will also merge any differences
cvs.texi(,10933) between the local copy of files and their base revisions
cvs.texi(,10934) into any destination revisions specified with @code{-r},
cvs.texi(,10935) @code{-D}, or @code{-A}.
cvs.texi(,10936) 
cvs.texi(,10937) @menu
cvs.texi(,10938) * update options::              update options
cvs.texi(,10939) * update output::               update output
cvs.texi(,10940) @end menu
cvs.texi(,10941) 
cvs.texi(,10942) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,10943) @node update options
cvs.texi(,10944) @appendixsubsec update options
cvs.texi(,10945) 
cvs.texi(,10946) These standard options are available with @code{update}
cvs.texi(,10947) (@pxref{Common options}, for a complete description of
cvs.texi(,10948) them):
cvs.texi(,10949) 
cvs.texi(,10950) @table @code
cvs.texi(,10951) @item -D date
cvs.texi(,10952) Use the most recent revision no later than @var{date}.
cvs.texi(,10953) This option is sticky, and implies @samp{-P}.
cvs.texi(,10954) See @ref{Sticky tags}, for more information on sticky tags/dates.
cvs.texi(,10955) 
cvs.texi(,10956) @item -f
cvs.texi(,10957) Only useful with the @samp{-D @var{date}} or @samp{-r
cvs.texi(,10958) @var{tag}} flags.  If no matching revision is found,
cvs.texi(,10959) retrieve the most recent revision (instead of ignoring
cvs.texi(,10960) the file).
cvs.texi(,10961) 
cvs.texi(,10962) @item -k @var{kflag}
cvs.texi(,10963) Process keywords according to @var{kflag}.  See
cvs.texi(,10964) @ref{Keyword substitution}.
cvs.texi(,10965) This option is sticky; future updates of
cvs.texi(,10966) this file in this working directory will use the same
cvs.texi(,10967) @var{kflag}.  The @code{status} command can be viewed
cvs.texi(,10968) to see the sticky options.  See @ref{Invoking CVS}, for
cvs.texi(,10969) more information on the @code{status} command.
cvs.texi(,10970) 
cvs.texi(,10971) @item -l
cvs.texi(,10972) Local; run only in current working directory.  @xref{Recursive behavior}.
cvs.texi(,10973) 
cvs.texi(,10974) @item -P
cvs.texi(,10975) Prune empty directories.  See @ref{Moving directories}.
cvs.texi(,10976) 
cvs.texi(,10977) @item -p
cvs.texi(,10978) Pipe files to the standard output.
cvs.texi(,10979) 
cvs.texi(,10980) @item -R
cvs.texi(,10981) Update directories recursively (default).  @xref{Recursive
cvs.texi(,10982) behavior}.
cvs.texi(,10983) 
cvs.texi(,10984) @item -r rev
cvs.texi(,10985) Retrieve revision/tag @var{rev}.  This option is sticky,
cvs.texi(,10986) and implies @samp{-P}.
cvs.texi(,10987) See @ref{Sticky tags}, for more information on sticky tags/dates.
cvs.texi(,10988) @end table
cvs.texi(,10989) 
cvs.texi(,10990) @need 800
cvs.texi(,10991) These special options are also available with
cvs.texi(,10992) @code{update}.
cvs.texi(,10993) 
cvs.texi(,10994) @table @code
cvs.texi(,10995) @item -A
cvs.texi(,10996) Reset any sticky tags, dates, or @samp{-k} options.
cvs.texi(,10997) See @ref{Sticky tags}, for more information on sticky tags/dates.
cvs.texi(,10998) 
cvs.texi(,10999) @item -C
cvs.texi(,11000) Overwrite locally modified files with clean copies from
cvs.texi(,11001) the repository (the modified file is saved in
cvs.texi(,11002) @file{.#@var{file}.@var{revision}}, however).
cvs.texi(,11003) 
cvs.texi(,11004) @item -d
cvs.texi(,11005) Create any directories that exist in the repository if
cvs.texi(,11006) they're missing from the working directory.  Normally,
cvs.texi(,11007) @code{update} acts only on directories and files that
cvs.texi(,11008) were already enrolled in your working directory.
cvs.texi(,11009) 
cvs.texi(,11010) This is useful for updating directories that were
cvs.texi(,11011) created in the repository since the initial checkout;
cvs.texi(,11012) but it has an unfortunate side effect.  If you
cvs.texi(,11013) deliberately avoided certain directories in the
cvs.texi(,11014) repository when you created your working directory
cvs.texi(,11015) (either through use of a module name or by listing
cvs.texi(,11016) explicitly the files and directories you wanted on the
cvs.texi(,11017) command line), then updating with @samp{-d} will create
cvs.texi(,11018) those directories, which may not be what you want.
cvs.texi(,11019) 
cvs.texi(,11020) @item -I @var{name}
cvs.texi(,11021) Ignore files whose names match @var{name} (in your
cvs.texi(,11022) working directory) during the update.  You can specify
cvs.texi(,11023) @samp{-I} more than once on the command line to specify
cvs.texi(,11024) several files to ignore.  Use @samp{-I !} to avoid
cvs.texi(,11025) ignoring any files at all.  @xref{cvsignore}, for other
cvs.texi(,11026) ways to make @sc{cvs} ignore some files.
cvs.texi(,11027) 
cvs.texi(,11028) @item -W@var{spec}
cvs.texi(,11029) Specify file names that should be filtered during
cvs.texi(,11030) update.  You can use this option repeatedly.
cvs.texi(,11031) 
cvs.texi(,11032) @var{spec} can be a file name pattern of the same type
cvs.texi(,11033) that you can specify in the @file{.cvswrappers}
cvs.texi(,11034) file. @xref{Wrappers}.
cvs.texi(,11035) 
cvs.texi(,11036) @item -j@var{revision}
cvs.texi(,11037) With two @samp{-j} options, merge changes from the
cvs.texi(,11038) revision specified with the first @samp{-j} option to
cvs.texi(,11039) the revision specified with the second @samp{j} option,
cvs.texi(,11040) into the working directory.
cvs.texi(,11041) 
cvs.texi(,11042) With one @samp{-j} option, merge changes from the
cvs.texi(,11043) ancestor revision to the revision specified with the
cvs.texi(,11044) @samp{-j} option, into the working directory.  The
cvs.texi(,11045) ancestor revision is the common ancestor of the
cvs.texi(,11046) revision which the working directory is based on, and
cvs.texi(,11047) the revision specified in the @samp{-j} option.
cvs.texi(,11048) 
cvs.texi(,11049) Note that using a single @samp{-j @var{tagname}} option rather than
cvs.texi(,11050) @samp{-j @var{branchname}} to merge changes from a branch will
cvs.texi(,11051) often not remove files which were removed on the branch.
cvs.texi(,11052) @xref{Merging adds and removals}, for more.
cvs.texi(,11053) 
cvs.texi(,11054) In addition, each @samp{-j} option can contain an optional
cvs.texi(,11055) date specification which, when used with branches, can
cvs.texi(,11056) limit the chosen revision to one within a specific
cvs.texi(,11057) date.  An optional date is specified by adding a colon
cvs.texi(,11058) (:) to the tag:
cvs.texi(,11059) @samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}.
cvs.texi(,11060) 
cvs.texi(,11061) @xref{Branching and merging}.
cvs.texi(,11062) 
cvs.texi(,11063) @end table
cvs.texi(,11064) 
cvs.texi(,11065) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,11066) @node update output
cvs.texi(,11067) @appendixsubsec update output
cvs.texi(,11068) 
cvs.texi(,11069) @code{update} and @code{checkout} keep you informed of
cvs.texi(,11070) their progress by printing a line for each file, preceded
cvs.texi(,11071) by one character indicating the status of the file:
cvs.texi(,11072) 
cvs.texi(,11073) @table @code
cvs.texi(,11074) @item U @var{file}
cvs.texi(,11075) The file was brought up to date with respect to the
cvs.texi(,11076) repository.  This is done for any file that exists in
cvs.texi(,11077) the repository but not in your source, and for files
cvs.texi(,11078) that you haven't changed but are not the most recent
cvs.texi(,11079) versions available in the repository.
cvs.texi(,11080) 
cvs.texi(,11081) @item P @var{file}
cvs.texi(,11082) Like @samp{U}, but the @sc{cvs} server sends a patch instead of an entire
cvs.texi(,11083) file.  This accomplishes the same thing as @samp{U} using less bandwidth.
cvs.texi(,11084) 
cvs.texi(,11085) @item A @var{file}
cvs.texi(,11086) The file has been added to your private copy of the
cvs.texi(,11087) sources, and will be added to the source repository
cvs.texi(,11088) when you run @code{commit} on the file.  This is a
cvs.texi(,11089) reminder to you that the file needs to be committed.
cvs.texi(,11090) 
cvs.texi(,11091) @item R @var{file}
cvs.texi(,11092) The file has been removed from your private copy of the
cvs.texi(,11093) sources, and will be removed from the source repository
cvs.texi(,11094) when you run @code{commit} on the file.  This is a
cvs.texi(,11095) reminder to you that the file needs to be committed.
cvs.texi(,11096) 
cvs.texi(,11097) @item M @var{file}
cvs.texi(,11098) The file is modified in  your  working  directory.
cvs.texi(,11099) 
cvs.texi(,11100) @samp{M} can indicate one of two states for a file
cvs.texi(,11101) you're working on: either there were no modifications
cvs.texi(,11102) to the same file in the repository, so that your file
cvs.texi(,11103) remains as you last saw it; or there were modifications
cvs.texi(,11104) in the repository as well as in your copy, but they
cvs.texi(,11105) were merged successfully, without conflict, in your
cvs.texi(,11106) working directory.
cvs.texi(,11107) 
cvs.texi(,11108) @sc{cvs} will print some messages if it merges your work,
cvs.texi(,11109) and a backup copy of your working file (as it looked
cvs.texi(,11110) before you ran @code{update}) will be made.  The exact
cvs.texi(,11111) name of that file is printed while @code{update} runs.
cvs.texi(,11112) 
cvs.texi(,11113) @item C @var{file}
cvs.texi(,11114) @cindex .# files
cvs.texi(,11115) @cindex __ files (VMS)
cvs.texi(,11116) A conflict was detected while trying to merge your
cvs.texi(,11117) changes to @var{file} with changes from the source
cvs.texi(,11118) repository.  @var{file} (the copy in your working
cvs.texi(,11119) directory) is now the result of attempting to merge
cvs.texi(,11120) the two revisions; an unmodified copy of your file
cvs.texi(,11121) is also in your working directory, with the name
cvs.texi(,11122) @file{.#@var{file}.@var{revision}} where @var{revision}
cvs.texi(,11123) is the revision that your modified file started
cvs.texi(,11124) from.  Resolve the conflict as described in
cvs.texi(,11125) @ref{Conflicts example}.
cvs.texi(,11126) @c "some systems" as in out-of-the-box OSes?  Not as
cvs.texi(,11127) @c far as I know.  We need to advise sysadmins as well
cvs.texi(,11128) @c as users how to set up this kind of purge, if that is
cvs.texi(,11129) @c what they want.
cvs.texi(,11130) @c We also might want to think about cleaner solutions,
cvs.texi(,11131) @c like having CVS remove the .# file once the conflict
cvs.texi(,11132) @c has been resolved or something like that.
cvs.texi(,11133) (Note that some systems automatically purge
cvs.texi(,11134) files that begin with @file{.#} if they have not been
cvs.texi(,11135) accessed for a few days.  If you intend to keep a copy
cvs.texi(,11136) of your original file, it is a very good idea to rename
cvs.texi(,11137) it.)  Under @sc{vms}, the file name starts with
cvs.texi(,11138) @file{__} rather than @file{.#}.
cvs.texi(,11139) 
cvs.texi(,11140) @item ? @var{file}
cvs.texi(,11141) @var{file} is in your working directory, but does not
cvs.texi(,11142) correspond to anything in the source repository, and is
cvs.texi(,11143) not in the list of files for @sc{cvs} to ignore (see the
cvs.texi(,11144) description of the @samp{-I} option, and
cvs.texi(,11145) @pxref{cvsignore}).
cvs.texi(,11146) @end table
cvs.texi(,11147) 
cvs.texi(,11148) @node Invoking CVS
cvs.texi(,11149) @appendix Quick reference to CVS commands
cvs.texi(,11150) @cindex Command reference
cvs.texi(,11151) @cindex Reference, commands
cvs.texi(,11152) @cindex Invoking CVS
cvs.texi(,11153) 
cvs.texi(,11154) This appendix describes how to invoke @sc{cvs}, with
cvs.texi(,11155) references to where each command or feature is
cvs.texi(,11156) described in detail.  For other references run the
cvs.texi(,11157) @code{cvs --help} command, or see @ref{Index}.
cvs.texi(,11158) 
cvs.texi(,11159) A @sc{cvs} command looks like:
cvs.texi(,11160) 
cvs.texi(,11161) @example
cvs.texi(,11162) cvs [ @var{global_options} ] @var{command} [ @var{command_options} ] [ @var{command_args} ]
cvs.texi(,11163) @end example
cvs.texi(,11164) 
cvs.texi(,11165) Global options:
cvs.texi(,11166) 
cvs.texi(,11167) @table @code
cvs.texi(,11168) @item --allow-root=@var{rootdir}
cvs.texi(,11169) Specify legal @sc{cvsroot} directory (server only) (not
cvs.texi(,11170) in @sc{cvs} 1.9 and older).  See @ref{Password
cvs.texi(,11171) authentication server}.
cvs.texi(,11172) 
cvs.texi(,11173) @item -a
cvs.texi(,11174) Authenticate all communication (client only) (not in @sc{cvs}
cvs.texi(,11175) 1.9 and older).  See @ref{Global options}.
cvs.texi(,11176) 
cvs.texi(,11177) @item -b
cvs.texi(,11178) Specify RCS location (@sc{cvs} 1.9 and older).  See
cvs.texi(,11179) @ref{Global options}.
cvs.texi(,11180) 
cvs.texi(,11181) @item -d @var{root}
cvs.texi(,11182) Specify the @sc{cvsroot}.  See @ref{Repository}.
cvs.texi(,11183) 
cvs.texi(,11184) @item -e @var{editor}
cvs.texi(,11185) Edit messages with @var{editor}.  See @ref{Committing
cvs.texi(,11186) your changes}.
cvs.texi(,11187) 
cvs.texi(,11188) @item -f
cvs.texi(,11189) Do not read the @file{~/.cvsrc} file.  See @ref{Global
cvs.texi(,11190) options}.
cvs.texi(,11191) 
cvs.texi(,11192) @item -H
cvs.texi(,11193) @itemx --help
cvs.texi(,11194) Print a help message.  See @ref{Global options}.
cvs.texi(,11195) 
cvs.texi(,11196) @item -l
cvs.texi(,11197) Do not log in @file{$CVSROOT/CVSROOT/history} file.  See @ref{Global
cvs.texi(,11198) options}.
cvs.texi(,11199) 
cvs.texi(,11200) @item -n
cvs.texi(,11201) Do not change any files.  See @ref{Global options}.
cvs.texi(,11202) 
cvs.texi(,11203) @item -Q
cvs.texi(,11204) Be really quiet.  See @ref{Global options}.
cvs.texi(,11205) 
cvs.texi(,11206) @item -q
cvs.texi(,11207) Be somewhat quiet.  See @ref{Global options}.
cvs.texi(,11208) 
cvs.texi(,11209) @item -r
cvs.texi(,11210) Make new working files read-only.  See @ref{Global options}.
cvs.texi(,11211) 
cvs.texi(,11212) @item -s @var{variable}=@var{value}
cvs.texi(,11213) Set a user variable.  See @ref{Variables}.
cvs.texi(,11214) 
cvs.texi(,11215) @item -T @var{tempdir}
cvs.texi(,11216) Put temporary files in @var{tempdir}.  See @ref{Global
cvs.texi(,11217) options}.
cvs.texi(,11218) 
cvs.texi(,11219) @item -t
cvs.texi(,11220) Trace @sc{cvs} execution.  See @ref{Global options}.
cvs.texi(,11221) 
cvs.texi(,11222) @item -v
cvs.texi(,11223) @item --version
cvs.texi(,11224) Display version and copyright information for @sc{cvs}.
cvs.texi(,11225) 
cvs.texi(,11226) @item -w
cvs.texi(,11227) Make new working files read-write.  See @ref{Global
cvs.texi(,11228) options}.
cvs.texi(,11229) 
cvs.texi(,11230) @item -x
cvs.texi(,11231) Encrypt all communication (client only).
cvs.texi(,11232) See @ref{Global options}.
cvs.texi(,11233) 
cvs.texi(,11234) @item -z @var{gzip-level}
cvs.texi(,11235) @cindex Compression
cvs.texi(,11236) @cindex Gzip
cvs.texi(,11237) Set the compression level (client only).
cvs.texi(,11238) See @ref{Global options}.
cvs.texi(,11239) @end table
cvs.texi(,11240) 
cvs.texi(,11241) Keyword expansion modes (@pxref{Substitution modes}):
cvs.texi(,11242) 
cvs.texi(,11243) @example
cvs.texi(splitrcskeyword,11244) -kkv  $ Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp $
cvs.texi(splitrcskeyword,11245) -kkvl $ Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
cvs.texi(splitrcskeyword,11246) -kk   $ Id$
cvs.texi(,11247) -kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
cvs.texi(,11248) -ko   @i{no expansion}
cvs.texi(,11249) -kb   @i{no expansion, file is binary}
cvs.texi(,11250) @end example
cvs.texi(,11251) 
cvs.texi(,11252) Keywords (@pxref{Keyword list}):
cvs.texi(,11253) 
cvs.texi(,11254) @example
cvs.texi(splitrcskeyword,11255) $ Author: joe $
cvs.texi(splitrcskeyword,11256) $ Date: 1993/12/09 03:21:13 $
cvs.texi(splitrcskeyword,11257) $ CVSHeader: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
cvs.texi(splitrcskeyword,11258) $ Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
cvs.texi(splitrcskeyword,11259) $ Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
cvs.texi(splitrcskeyword,11260) $ Locker: harry $
cvs.texi(splitrcskeyword,11261) $ Name: snapshot_1_14 $
cvs.texi(splitrcskeyword,11262) $ RCSfile: file1,v $
cvs.texi(splitrcskeyword,11263) $ Revision: 1.1 $
cvs.texi(splitrcskeyword,11264) $ Source: /home/files/file1,v $
cvs.texi(splitrcskeyword,11265) $ State: Exp $
cvs.texi(splitrcskeyword,11266) $ Log: file1,v $
cvs.texi(,11267) Revision 1.1  1993/12/09 03:30:17  joe
cvs.texi(,11268) Initial revision
cvs.texi(,11269) 
cvs.texi(,11270) @end example
cvs.texi(,11271) 
cvs.texi(,11272) @c The idea behind this table is that we want each item
cvs.texi(,11273) @c to be a sentence or two at most.  Preferably a
cvs.texi(,11274) @c single line.
cvs.texi(,11275) @c
cvs.texi(,11276) @c In some cases refs to "foo options" are just to get
cvs.texi(,11277) @c this thing written quickly, not because the "foo
cvs.texi(,11278) @c options" node is really the best place to point.
cvs.texi(,11279) Commands, command options, and command arguments:
cvs.texi(,11280) 
cvs.texi(,11281) @table @code
cvs.texi(,11282) @c ------------------------------------------------------------
cvs.texi(,11283) @item add [@var{options}] [@var{files}@dots{}]
cvs.texi(,11284) Add a new file/directory.  See @ref{Adding files}.
cvs.texi(,11285) 
cvs.texi(,11286) @table @code
cvs.texi(,11287) @item -k @var{kflag}
cvs.texi(,11288) Set keyword expansion.
cvs.texi(,11289) 
cvs.texi(,11290) @item -m @var{msg}
cvs.texi(,11291) Set file description.
cvs.texi(,11292) @end table
cvs.texi(,11293) 
cvs.texi(,11294) @c ------------------------------------------------------------
cvs.texi(,11295) @item admin [@var{options}] [@var{files}@dots{}]
cvs.texi(,11296) Administration of history files in the repository.  See
cvs.texi(,11297) @ref{admin}.
cvs.texi(,11298) @c This list omits those options which are not
cvs.texi(,11299) @c documented as being useful with CVS.  That might be
cvs.texi(,11300) @c a mistake...
cvs.texi(,11301) 
cvs.texi(,11302) @table @code
cvs.texi(,11303) @item -b[@var{rev}]
cvs.texi(,11304) Set default branch.  See @ref{Reverting local changes}.
cvs.texi(,11305) 
cvs.texi(,11306) @item -c@var{string}
cvs.texi(,11307) Set comment leader.
cvs.texi(,11308) 
cvs.texi(,11309) @item -k@var{subst}
cvs.texi(,11310) Set keyword substitution.  See @ref{Keyword
cvs.texi(,11311) substitution}.
cvs.texi(,11312) 
cvs.texi(,11313) @item -l[@var{rev}]
cvs.texi(,11314) Lock revision @var{rev}, or latest revision.
cvs.texi(,11315) 
cvs.texi(,11316) @item -m@var{rev}:@var{msg}
cvs.texi(,11317) Replace the log message of revision @var{rev} with
cvs.texi(,11318) @var{msg}.
cvs.texi(,11319) 
cvs.texi(,11320) @item -o@var{range}
cvs.texi(,11321) Delete revisions from the repository.  See
cvs.texi(,11322) @ref{admin options}.
cvs.texi(,11323) 
cvs.texi(,11324) @item -q
cvs.texi(,11325) Run quietly; do not print diagnostics.
cvs.texi(,11326) 
cvs.texi(,11327) @item -s@var{state}[:@var{rev}]
cvs.texi(,11328) Set the state.
cvs.texi(,11329) 
cvs.texi(,11330) @c Does not work for client/server CVS
cvs.texi(,11331) @item -t
cvs.texi(,11332) Set file description from standard input.
cvs.texi(,11333) 
cvs.texi(,11334) @item -t@var{file}
cvs.texi(,11335) Set file description from @var{file}.
cvs.texi(,11336) 
cvs.texi(,11337) @item -t-@var{string}
cvs.texi(,11338) Set file description to @var{string}.
cvs.texi(,11339) 
cvs.texi(,11340) @item -u[@var{rev}]
cvs.texi(,11341) Unlock revision @var{rev}, or latest revision.
cvs.texi(,11342) @end table
cvs.texi(,11343) 
cvs.texi(,11344) @c ------------------------------------------------------------
cvs.texi(,11345) @item annotate [@var{options}] [@var{files}@dots{}]
cvs.texi(,11346) Show last revision where each line was modified.  See
cvs.texi(,11347) @ref{annotate}.
cvs.texi(,11348) 
cvs.texi(,11349) @table @code
cvs.texi(,11350) @item -D @var{date}
cvs.texi(,11351) Annotate the most recent revision no later than
cvs.texi(,11352) @var{date}.  See @ref{Common options}.
cvs.texi(,11353) 
cvs.texi(,11354) @item -F
cvs.texi(,11355) Force annotation of binary files.  (Without this option,
cvs.texi(,11356) binary files are skipped with a message.)
cvs.texi(,11357) 
cvs.texi(,11358) @item -f
cvs.texi(,11359) Use head revision if tag/date not found.  See
cvs.texi(,11360) @ref{Common options}.
cvs.texi(,11361) 
cvs.texi(,11362) @item -l
cvs.texi(,11363) Local; run only in current working directory.  @xref{Recursive behavior}.
cvs.texi(,11364) 
cvs.texi(,11365) @item -R
cvs.texi(,11366) Operate recursively (default).  @xref{Recursive
cvs.texi(,11367) behavior}.
cvs.texi(,11368) 
cvs.texi(,11369) @item -r @var{tag}
cvs.texi(,11370) Annotate revision @var{tag}.  See @ref{Common options}.
cvs.texi(,11371) @end table
cvs.texi(,11372) 
cvs.texi(,11373) @c ------------------------------------------------------------
cvs.texi(,11374) @item checkout [@var{options}] @var{modules}@dots{}
cvs.texi(,11375) Get a copy of the sources.  See @ref{checkout}.
cvs.texi(,11376) 
cvs.texi(,11377) @table @code
cvs.texi(,11378) @item -A
cvs.texi(,11379) Reset any sticky tags/date/options.  See @ref{Sticky
cvs.texi(,11380) tags} and @ref{Keyword substitution}.
cvs.texi(,11381) 
cvs.texi(,11382) @item -c
cvs.texi(,11383) Output the module database.  See @ref{checkout options}.
cvs.texi(,11384) 
cvs.texi(,11385) @item -D @var{date}
cvs.texi(,11386) Check out revisions as of @var{date} (is sticky).  See
cvs.texi(,11387) @ref{Common options}.
cvs.texi(,11388) 
cvs.texi(,11389) @item -d @var{dir}
cvs.texi(,11390) Check out into @var{dir}.  See @ref{checkout options}.
cvs.texi(,11391) 
cvs.texi(,11392) @item -f
cvs.texi(,11393) Use head revision if tag/date not found.  See
cvs.texi(,11394) @ref{Common options}.
cvs.texi(,11395) 
cvs.texi(,11396) @c Probably want to use rev1/rev2 style like for diff
cvs.texi(,11397) @c -r.  Here and in on-line help.
cvs.texi(,11398) @item -j @var{rev}
cvs.texi(,11399) Merge in changes.  See @ref{checkout options}.
cvs.texi(,11400) 
cvs.texi(,11401) @item -k @var{kflag}
cvs.texi(,11402) Use @var{kflag} keyword expansion.  See
cvs.texi(,11403) @ref{Substitution modes}.
cvs.texi(,11404) 
cvs.texi(,11405) @item -l
cvs.texi(,11406) Local; run only in current working directory.  @xref{Recursive behavior}.
cvs.texi(,11407) 
cvs.texi(,11408) @item -N
cvs.texi(,11409) Don't ``shorten'' module paths if -d specified.  See
cvs.texi(,11410) @ref{checkout options}.
cvs.texi(,11411) 
cvs.texi(,11412) @item -n
cvs.texi(,11413) Do not run module program (if any).  See @ref{checkout options}.
cvs.texi(,11414) 
cvs.texi(,11415) @item -P
cvs.texi(,11416) Prune empty directories.  See @ref{Moving directories}.
cvs.texi(,11417) 
cvs.texi(,11418) @item -p
cvs.texi(,11419) Check out files to standard output (avoids
cvs.texi(,11420) stickiness).  See @ref{checkout options}.
cvs.texi(,11421) 
cvs.texi(,11422) @item -R
cvs.texi(,11423) Operate recursively (default).  @xref{Recursive
cvs.texi(,11424) behavior}.
cvs.texi(,11425) 
cvs.texi(,11426) @item -r @var{tag}
cvs.texi(,11427) Checkout revision @var{tag} (is sticky).  See @ref{Common options}.
cvs.texi(,11428) 
cvs.texi(,11429) @item -s
cvs.texi(,11430) Like -c, but include module status.  See @ref{checkout options}.
cvs.texi(,11431) @end table
cvs.texi(,11432) 
cvs.texi(,11433) @c ------------------------------------------------------------
cvs.texi(,11434) @item commit [@var{options}] [@var{files}@dots{}]
cvs.texi(,11435) Check changes into the repository.  See @ref{commit}.
cvs.texi(,11436) 
cvs.texi(,11437) @table @code
cvs.texi(,11438) @item -F @var{file}
cvs.texi(,11439) Read log message from @var{file}.  See @ref{commit options}.
cvs.texi(,11440) 
cvs.texi(,11441) @item -f
cvs.texi(,11442) @c What is this "disables recursion"?  It is from the
cvs.texi(,11443) @c on-line help; is it documented in this manual?
cvs.texi(,11444) Force the file to be committed; disables recursion.
cvs.texi(,11445) See @ref{commit options}.
cvs.texi(,11446) 
cvs.texi(,11447) @item -l
cvs.texi(,11448) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11449) 
cvs.texi(,11450) @item -m @var{msg}
cvs.texi(,11451) Use @var{msg} as log message.  See @ref{commit options}.
cvs.texi(,11452) 
cvs.texi(,11453) @item -n
cvs.texi(,11454) Do not run module program (if any).  See @ref{commit options}.
cvs.texi(,11455) 
cvs.texi(,11456) @item -R
cvs.texi(,11457) Operate recursively (default).  @xref{Recursive
cvs.texi(,11458) behavior}.
cvs.texi(,11459) 
cvs.texi(,11460) @item -r @var{rev}
cvs.texi(,11461) Commit to @var{rev}.  See @ref{commit options}.
cvs.texi(,11462) @c FIXME: should be dragging over text from
cvs.texi(,11463) @c commit options, especially if it can be cleaned up
cvs.texi(,11464) @c and made concise enough.
cvs.texi(,11465) @end table
cvs.texi(,11466) 
cvs.texi(,11467) @c ------------------------------------------------------------
cvs.texi(,11468) @item diff [@var{options}] [@var{files}@dots{}]
cvs.texi(,11469) Show differences between revisions.  See @ref{diff}.
cvs.texi(,11470) In addition to the options shown below, accepts a wide
cvs.texi(,11471) variety of options to control output style, for example
cvs.texi(,11472) @samp{-c} for context diffs.
cvs.texi(,11473) 
cvs.texi(,11474) @table @code
cvs.texi(,11475) @item -D @var{date1}
cvs.texi(,11476) Diff revision for date against working file.  See
cvs.texi(,11477) @ref{diff options}.
cvs.texi(,11478) 
cvs.texi(,11479) @item -D @var{date2}
cvs.texi(,11480) Diff @var{rev1}/@var{date1} against @var{date2}.  See
cvs.texi(,11481) @ref{diff options}.
cvs.texi(,11482) 
cvs.texi(,11483) @item -l
cvs.texi(,11484) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11485) 
cvs.texi(,11486) @item -N
cvs.texi(,11487) Include diffs for added and removed files.  See
cvs.texi(,11488) @ref{diff options}.
cvs.texi(,11489) 
cvs.texi(,11490) @item -R
cvs.texi(,11491) Operate recursively (default).  @xref{Recursive
cvs.texi(,11492) behavior}.
cvs.texi(,11493) 
cvs.texi(,11494) @item -r @var{rev1}
cvs.texi(,11495) Diff revision for @var{rev1} against working file.  See
cvs.texi(,11496) @ref{diff options}.
cvs.texi(,11497) 
cvs.texi(,11498) @item -r @var{rev2}
cvs.texi(,11499) Diff @var{rev1}/@var{date1} against @var{rev2}.  See @ref{diff options}.
cvs.texi(,11500) @end table
cvs.texi(,11501) 
cvs.texi(,11502) @c ------------------------------------------------------------
cvs.texi(,11503) @item edit [@var{options}] [@var{files}@dots{}]
cvs.texi(,11504) Get ready to edit a watched file.  See @ref{Editing files}.
cvs.texi(,11505) 
cvs.texi(,11506) @table @code
cvs.texi(,11507) @item -a @var{actions}
cvs.texi(,11508) Specify actions for temporary watch, where
cvs.texi(,11509) @var{actions} is @code{edit}, @code{unedit},
cvs.texi(,11510) @code{commit}, @code{all}, or @code{none}.  See
cvs.texi(,11511) @ref{Editing files}.
cvs.texi(,11512) 
cvs.texi(,11513) @item -l
cvs.texi(,11514) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11515) 
cvs.texi(,11516) @item -R
cvs.texi(,11517) Operate recursively (default).  @xref{Recursive
cvs.texi(,11518) behavior}.
cvs.texi(,11519) @end table
cvs.texi(,11520) 
cvs.texi(,11521) @c ------------------------------------------------------------
cvs.texi(,11522) @item editors [@var{options}] [@var{files}@dots{}]
cvs.texi(,11523) See who is editing a watched file.  See @ref{Watch information}.
cvs.texi(,11524) 
cvs.texi(,11525) @table @code
cvs.texi(,11526) @item -l
cvs.texi(,11527) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11528) 
cvs.texi(,11529) @item -R
cvs.texi(,11530) Operate recursively (default).  @xref{Recursive
cvs.texi(,11531) behavior}.
cvs.texi(,11532) @end table
cvs.texi(,11533) 
cvs.texi(,11534) @c ------------------------------------------------------------
cvs.texi(,11535) @item export [@var{options}] @var{modules}@dots{}
cvs.texi(,11536) Export files from @sc{cvs}.  See @ref{export}.
cvs.texi(,11537) 
cvs.texi(,11538) @table @code
cvs.texi(,11539) @item -D @var{date}
cvs.texi(,11540) Check out revisions as of @var{date}.  See
cvs.texi(,11541) @ref{Common options}.
cvs.texi(,11542) 
cvs.texi(,11543) @item -d @var{dir}
cvs.texi(,11544) Check out into @var{dir}.  See @ref{export options}.
cvs.texi(,11545) 
cvs.texi(,11546) @item -f
cvs.texi(,11547) Use head revision if tag/date not found.  See
cvs.texi(,11548) @ref{Common options}.
cvs.texi(,11549) 
cvs.texi(,11550) @item -k @var{kflag}
cvs.texi(,11551) Use @var{kflag} keyword expansion.  See
cvs.texi(,11552) @ref{Substitution modes}.
cvs.texi(,11553) 
cvs.texi(,11554) @item -l
cvs.texi(,11555) Local; run only in current working directory.  @xref{Recursive behavior}.
cvs.texi(,11556) 
cvs.texi(,11557) @item -N
cvs.texi(,11558) Don't ``shorten'' module paths if -d specified.  See
cvs.texi(,11559) @ref{export options}.
cvs.texi(,11560) 
cvs.texi(,11561) @item -n
cvs.texi(,11562) Do not run module program (if any).  See @ref{export options}.
cvs.texi(,11563) 
cvs.texi(,11564) @item -R
cvs.texi(,11565) Operate recursively (default).  @xref{Recursive
cvs.texi(,11566) behavior}.
cvs.texi(,11567) 
cvs.texi(,11568) @item -r @var{tag}
cvs.texi(,11569) Checkout revision @var{tag}.  See @ref{Common options}.
cvs.texi(,11570) @end table
cvs.texi(,11571) 
cvs.texi(,11572) @c ------------------------------------------------------------
cvs.texi(,11573) @item history [@var{options}] [@var{files}@dots{}]
cvs.texi(,11574) Show repository access history.  See @ref{history}.
cvs.texi(,11575) 
cvs.texi(,11576) @table @code
cvs.texi(,11577) @item -a
cvs.texi(,11578) All users (default is self).  See @ref{history options}.
cvs.texi(,11579) 
cvs.texi(,11580) @item -b @var{str}
cvs.texi(,11581) Back to record with @var{str} in module/file/repos
cvs.texi(,11582) field.  See @ref{history options}.
cvs.texi(,11583) 
cvs.texi(,11584) @item -c
cvs.texi(,11585) Report on committed (modified) files.  See @ref{history options}.
cvs.texi(,11586) 
cvs.texi(,11587) @item -D @var{date}
cvs.texi(,11588) Since @var{date}.  See @ref{history options}.
cvs.texi(,11589) 
cvs.texi(,11590) @item -e
cvs.texi(,11591) Report on all record types.  See @ref{history options}.
cvs.texi(,11592) 
cvs.texi(,11593) @item -l
cvs.texi(,11594) Last modified (committed or modified report).  See @ref{history options}.
cvs.texi(,11595) 
cvs.texi(,11596) @item -m @var{module}
cvs.texi(,11597) Report on @var{module} (repeatable).  See @ref{history options}.
cvs.texi(,11598) 
cvs.texi(,11599) @item -n @var{module}
cvs.texi(,11600) In @var{module}.  See @ref{history options}.
cvs.texi(,11601) 
cvs.texi(,11602) @item -o
cvs.texi(,11603) Report on checked out modules.  See @ref{history options}.
cvs.texi(,11604) 
cvs.texi(,11605) @item -p @var{repository}
cvs.texi(,11606) In @var{repository}.  See @ref{history options}.
cvs.texi(,11607) 
cvs.texi(,11608) @item -r @var{rev}
cvs.texi(,11609) Since revision @var{rev}.  See @ref{history options}.
cvs.texi(,11610) 
cvs.texi(,11611) @item -T
cvs.texi(,11612) @c What the @#$@# is a TAG?  Same as a tag?  This
cvs.texi(,11613) @c wording is also in the online-line help.
cvs.texi(,11614) Produce report on all TAGs.  See @ref{history options}.
cvs.texi(,11615) 
cvs.texi(,11616) @item -t @var{tag}
cvs.texi(,11617) Since tag record placed in history file (by anyone).
cvs.texi(,11618) See @ref{history options}.
cvs.texi(,11619) 
cvs.texi(,11620) @item -u @var{user}
cvs.texi(,11621) For user @var{user} (repeatable).  See @ref{history options}.
cvs.texi(,11622) 
cvs.texi(,11623) @item -w
cvs.texi(,11624) Working directory must match.  See @ref{history options}.
cvs.texi(,11625) 
cvs.texi(,11626) @item -x @var{types}
cvs.texi(,11627) Report on @var{types}, one or more of
cvs.texi(,11628) @code{TOEFWUCGMAR}.  See @ref{history options}.
cvs.texi(,11629) 
cvs.texi(,11630) @item -z @var{zone}
cvs.texi(,11631) Output for time zone @var{zone}.  See @ref{history options}.
cvs.texi(,11632) @end table
cvs.texi(,11633) 
cvs.texi(,11634) @c ------------------------------------------------------------
cvs.texi(,11635) @item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{}
cvs.texi(,11636) Import files into @sc{cvs}, using vendor branches.  See
cvs.texi(,11637) @ref{import}.
cvs.texi(,11638) 
cvs.texi(,11639) @table @code
cvs.texi(,11640) @item -b @var{bra}
cvs.texi(,11641) Import to vendor branch @var{bra}.  See
cvs.texi(,11642) @ref{Multiple vendor branches}.
cvs.texi(,11643) 
cvs.texi(,11644) @item -d
cvs.texi(,11645) Use the file's modification time as the time of
cvs.texi(,11646) import.  See @ref{import options}.
cvs.texi(,11647) 
cvs.texi(,11648) @item -k @var{kflag}
cvs.texi(,11649) Set default keyword substitution mode.  See
cvs.texi(,11650) @ref{import options}.
cvs.texi(,11651) 
cvs.texi(,11652) @item -m @var{msg}
cvs.texi(,11653) Use @var{msg} for log message.  See
cvs.texi(,11654) @ref{import options}.
cvs.texi(,11655) 
cvs.texi(,11656) @item -I @var{ign}
cvs.texi(,11657) More files to ignore (! to reset).  See
cvs.texi(,11658) @ref{import options}.
cvs.texi(,11659) 
cvs.texi(,11660) @item -W @var{spec}
cvs.texi(,11661) More wrappers.  See @ref{import options}.
cvs.texi(,11662) @end table
cvs.texi(,11663) 
cvs.texi(,11664) @c ------------------------------------------------------------
cvs.texi(,11665) @item init
cvs.texi(,11666) Create a @sc{cvs} repository if it doesn't exist.  See
cvs.texi(,11667) @ref{Creating a repository}.
cvs.texi(,11668) 
cvs.texi(,11669) @c ------------------------------------------------------------
cvs.texi(,11670) @item kserver
cvs.texi(,11671) Kerberos authenticated server.
cvs.texi(,11672) See @ref{Kerberos authenticated}.
cvs.texi(,11673) 
cvs.texi(,11674) @c ------------------------------------------------------------
cvs.texi(,11675) @item log [@var{options}] [@var{files}@dots{}]
cvs.texi(,11676) Print out history information for files.  See @ref{log}.
cvs.texi(,11677) 
cvs.texi(,11678) @table @code
cvs.texi(,11679) @item -b
cvs.texi(,11680) Only list revisions on the default branch.  See @ref{log options}.
cvs.texi(,11681) 
cvs.texi(,11682) @item -d @var{dates}
cvs.texi(,11683) Specify dates (@var{d1}<@var{d2} for range, @var{d} for
cvs.texi(,11684) latest before).  See @ref{log options}.
cvs.texi(,11685) 
cvs.texi(,11686) @item -h
cvs.texi(,11687) Only print header.  See @ref{log options}.
cvs.texi(,11688) 
cvs.texi(,11689) @item -l
cvs.texi(,11690) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11691) 
cvs.texi(,11692) @item -N
cvs.texi(,11693) Do not list tags.  See @ref{log options}.
cvs.texi(,11694) 
cvs.texi(,11695) @item -R
cvs.texi(,11696) Only print name of RCS file.  See @ref{log options}.
cvs.texi(,11697) 
cvs.texi(,11698) @item -r@var{revs}
cvs.texi(,11699) Only list revisions @var{revs}.  See @ref{log options}.
cvs.texi(,11700) 
cvs.texi(,11701) @item -s @var{states}
cvs.texi(,11702) Only list revisions with specified states.  See @ref{log options}.
cvs.texi(,11703) 
cvs.texi(,11704) @item -t
cvs.texi(,11705) Only print header and descriptive text.  See @ref{log
cvs.texi(,11706) options}.
cvs.texi(,11707) 
cvs.texi(,11708) @item -w@var{logins}
cvs.texi(,11709) Only list revisions checked in by specified logins.  See @ref{log options}.
cvs.texi(,11710) @end table
cvs.texi(,11711) 
cvs.texi(,11712) @c ------------------------------------------------------------
cvs.texi(,11713) @item login
cvs.texi(,11714) Prompt for password for authenticating server.  See
cvs.texi(,11715) @ref{Password authentication client}.
cvs.texi(,11716) 
cvs.texi(,11717) @c ------------------------------------------------------------
cvs.texi(,11718) @item logout
cvs.texi(,11719) Remove stored password for authenticating server.  See
cvs.texi(,11720) @ref{Password authentication client}.
cvs.texi(,11721) 
cvs.texi(,11722) @c ------------------------------------------------------------
cvs.texi(,11723) @item pserver
cvs.texi(,11724) Password authenticated server.
cvs.texi(,11725) See @ref{Password authentication server}.
cvs.texi(,11726) 
cvs.texi(,11727) @c ------------------------------------------------------------
cvs.texi(,11728) @item rannotate [@var{options}] [@var{modules}@dots{}]
cvs.texi(,11729) Show last revision where each line was modified.  See
cvs.texi(,11730) @ref{annotate}.
cvs.texi(,11731) 
cvs.texi(,11732) @table @code
cvs.texi(,11733) @item -D @var{date}
cvs.texi(,11734) Annotate the most recent revision no later than
cvs.texi(,11735) @var{date}.  See @ref{Common options}.
cvs.texi(,11736) 
cvs.texi(,11737) @item -F
cvs.texi(,11738) Force annotation of binary files.  (Without this option,
cvs.texi(,11739) binary files are skipped with a message.)
cvs.texi(,11740) 
cvs.texi(,11741) @item -f
cvs.texi(,11742) Use head revision if tag/date not found.  See
cvs.texi(,11743) @ref{Common options}.
cvs.texi(,11744) 
cvs.texi(,11745) @item -l
cvs.texi(,11746) Local; run only in current working directory.  @xref{Recursive behavior}.
cvs.texi(,11747) 
cvs.texi(,11748) @item -R
cvs.texi(,11749) Operate recursively (default).  @xref{Recursive behavior}.
cvs.texi(,11750) 
cvs.texi(,11751) @item -r @var{tag}
cvs.texi(,11752) Annotate revision @var{tag}.  See @ref{Common options}.
cvs.texi(,11753) @end table
cvs.texi(,11754) 
cvs.texi(,11755) @c ------------------------------------------------------------
cvs.texi(,11756) @item rdiff [@var{options}] @var{modules}@dots{}
cvs.texi(,11757) Show differences between releases.  See @ref{rdiff}.
cvs.texi(,11758) 
cvs.texi(,11759) @table @code
cvs.texi(,11760) @item -c
cvs.texi(,11761) Context diff output format (default).  See @ref{rdiff options}.
cvs.texi(,11762) 
cvs.texi(,11763) @item -D @var{date}
cvs.texi(,11764) Select revisions based on @var{date}.  See @ref{Common options}.
cvs.texi(,11765) 
cvs.texi(,11766) @item -f
cvs.texi(,11767) Use head revision if tag/date not found.  See
cvs.texi(,11768) @ref{Common options}.
cvs.texi(,11769) 
cvs.texi(,11770) @item -l
cvs.texi(,11771) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11772) 
cvs.texi(,11773) @item -R
cvs.texi(,11774) Operate recursively (default).  @xref{Recursive
cvs.texi(,11775) behavior}.
cvs.texi(,11776) 
cvs.texi(,11777) @item -r @var{rev}
cvs.texi(,11778) Select revisions based on @var{rev}.  See @ref{Common options}.
cvs.texi(,11779) 
cvs.texi(,11780) @item -s
cvs.texi(,11781) Short patch - one liner per file.  See @ref{rdiff options}.
cvs.texi(,11782) 
cvs.texi(,11783) @item -t
cvs.texi(,11784) Top two diffs - last change made to the file.  See
cvs.texi(,11785) @ref{diff options}.
cvs.texi(,11786) 
cvs.texi(,11787) @item -u
cvs.texi(,11788) Unidiff output format.  See @ref{rdiff options}.
cvs.texi(,11789) 
cvs.texi(,11790) @item -V @var{vers}
cvs.texi(,11791) Use RCS Version @var{vers} for keyword expansion (obsolete).  See
cvs.texi(,11792) @ref{rdiff options}.
cvs.texi(,11793) @end table
cvs.texi(,11794) 
cvs.texi(,11795) @c ------------------------------------------------------------
cvs.texi(,11796) @item release [@var{options}] @var{directory}
cvs.texi(,11797) Indicate that a directory is no longer in use.  See
cvs.texi(,11798) @ref{release}.
cvs.texi(,11799) 
cvs.texi(,11800) @table @code
cvs.texi(,11801) @item -d
cvs.texi(,11802) Delete the given directory.  See @ref{release options}.
cvs.texi(,11803) @end table
cvs.texi(,11804) 
cvs.texi(,11805) @c ------------------------------------------------------------
cvs.texi(,11806) @item remove [@var{options}] [@var{files}@dots{}]
cvs.texi(,11807) Remove an entry from the repository.  See @ref{Removing files}.
cvs.texi(,11808) 
cvs.texi(,11809) @table @code
cvs.texi(,11810) @item -f
cvs.texi(,11811) Delete the file before removing it.  See @ref{Removing files}.
cvs.texi(,11812) 
cvs.texi(,11813) @item -l
cvs.texi(,11814) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11815) 
cvs.texi(,11816) @item -R
cvs.texi(,11817) Operate recursively (default).  @xref{Recursive
cvs.texi(,11818) behavior}.
cvs.texi(,11819) @end table
cvs.texi(,11820) 
cvs.texi(,11821) @c ------------------------------------------------------------
cvs.texi(,11822) @item rlog [@var{options}] [@var{files}@dots{}]
cvs.texi(,11823) Print out history information for modules.  See @ref{log}.
cvs.texi(,11824) 
cvs.texi(,11825) @table @code
cvs.texi(,11826) @item -b
cvs.texi(,11827) Only list revisions on the default branch.  See @ref{log options}.
cvs.texi(,11828) 
cvs.texi(,11829) @item -d @var{dates}
cvs.texi(,11830) Specify dates (@var{d1}<@var{d2} for range, @var{d} for
cvs.texi(,11831) latest before).  See @ref{log options}.
cvs.texi(,11832) 
cvs.texi(,11833) @item -h
cvs.texi(,11834) Only print header.  See @ref{log options}.
cvs.texi(,11835) 
cvs.texi(,11836) @item -l
cvs.texi(,11837) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11838) 
cvs.texi(,11839) @item -N
cvs.texi(,11840) Do not list tags.  See @ref{log options}.
cvs.texi(,11841) 
cvs.texi(,11842) @item -R
cvs.texi(,11843) Only print name of RCS file.  See @ref{log options}.
cvs.texi(,11844) 
cvs.texi(,11845) @item -r@var{revs}
cvs.texi(,11846) Only list revisions @var{revs}.  See @ref{log options}.
cvs.texi(,11847) 
cvs.texi(,11848) @item -s @var{states}
cvs.texi(,11849) Only list revisions with specified states.  See @ref{log options}.
cvs.texi(,11850) 
cvs.texi(,11851) @item -t
cvs.texi(,11852) Only print header and descriptive text.  See @ref{log options}.
cvs.texi(,11853) 
cvs.texi(,11854) @item -w@var{logins}
cvs.texi(,11855) Only list revisions checked in by specified logins.  See @ref{log options}.
cvs.texi(,11856) @end table
cvs.texi(,11857) 
cvs.texi(,11858) @c ------------------------------------------------------------
cvs.texi(,11859) @item rtag [@var{options}] @var{tag} @var{modules}@dots{}
cvs.texi(,11860) Add a symbolic tag to a module.
cvs.texi(,11861) See @ref{Revisions} and @ref{Branching and merging}.
cvs.texi(,11862) 
cvs.texi(,11863) @table @code
cvs.texi(,11864) @item -a
cvs.texi(,11865) Clear tag from removed files that would not otherwise
cvs.texi(,11866) be tagged.  See @ref{Tagging add/remove}.
cvs.texi(,11867) 
cvs.texi(,11868) @item -b
cvs.texi(,11869) Create a branch named @var{tag}.  See @ref{Branching and merging}.
cvs.texi(,11870) 
cvs.texi(,11871) @item -B
cvs.texi(,11872) Used in conjunction with -F or -d, enables movement and deletion of
cvs.texi(,11873) branch tags.  Use with extreme caution. 
cvs.texi(,11874) 
cvs.texi(,11875) @item -D @var{date}
cvs.texi(,11876) Tag revisions as of @var{date}.  See @ref{Tagging by date/tag}.
cvs.texi(,11877) 
cvs.texi(,11878) @item -d
cvs.texi(,11879) Delete @var{tag}.  See @ref{Modifying tags}.
cvs.texi(,11880) 
cvs.texi(,11881) @item -F
cvs.texi(,11882) Move @var{tag} if it already exists.  See @ref{Modifying tags}.
cvs.texi(,11883) 
cvs.texi(,11884) @item -f
cvs.texi(,11885) Force a head revision match if tag/date not found.
cvs.texi(,11886) See @ref{Tagging by date/tag}.
cvs.texi(,11887) 
cvs.texi(,11888) @item -l
cvs.texi(,11889) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11890) 
cvs.texi(,11891) @item -n
cvs.texi(,11892) No execution of tag program.  See @ref{Common options}.
cvs.texi(,11893) 
cvs.texi(,11894) @item -R
cvs.texi(,11895) Operate recursively (default).  @xref{Recursive
cvs.texi(,11896) behavior}.
cvs.texi(,11897) 
cvs.texi(,11898) @item -r @var{rev}
cvs.texi(,11899) Tag existing tag @var{rev}.  See @ref{Tagging by date/tag}.
cvs.texi(,11900) @end table
cvs.texi(,11901) 
cvs.texi(,11902) @c ------------------------------------------------------------
cvs.texi(,11903) @item server
cvs.texi(,11904) Rsh server.  See @ref{Connecting via rsh}.
cvs.texi(,11905) 
cvs.texi(,11906) @c ------------------------------------------------------------
cvs.texi(,11907) @item status [@var{options}] @var{files}@dots{}
cvs.texi(,11908) Display status information in a working directory.  See
cvs.texi(,11909) @ref{File status}.
cvs.texi(,11910) 
cvs.texi(,11911) @table @code
cvs.texi(,11912) @item -l
cvs.texi(,11913) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11914) 
cvs.texi(,11915) @item -R
cvs.texi(,11916) Operate recursively (default).  @xref{Recursive
cvs.texi(,11917) behavior}.
cvs.texi(,11918) 
cvs.texi(,11919) @item -v
cvs.texi(,11920) Include tag information for file.  See @ref{Tags}.
cvs.texi(,11921) @end table
cvs.texi(,11922) 
cvs.texi(,11923) @c ------------------------------------------------------------
cvs.texi(,11924) @item tag [@var{options}] @var{tag} [@var{files}@dots{}]
cvs.texi(,11925) Add a symbolic tag to checked out version of files.
cvs.texi(,11926) See @ref{Revisions} and @ref{Branching and merging}.
cvs.texi(,11927) 
cvs.texi(,11928) @table @code
cvs.texi(,11929) @item -b
cvs.texi(,11930) Create a branch named @var{tag}.  See @ref{Branching and merging}.
cvs.texi(,11931) 
cvs.texi(,11932) @item -c
cvs.texi(,11933) Check that working files are unmodified.  See
cvs.texi(,11934) @ref{Tagging the working directory}.
cvs.texi(,11935) 
cvs.texi(,11936) @item -D @var{date}
cvs.texi(,11937) Tag revisions as of @var{date}.  See @ref{Tagging by date/tag}.
cvs.texi(,11938) 
cvs.texi(,11939) @item -d
cvs.texi(,11940) Delete @var{tag}.  See @ref{Modifying tags}.
cvs.texi(,11941) 
cvs.texi(,11942) @item -F
cvs.texi(,11943) Move @var{tag} if it already exists.  See @ref{Modifying tags}.
cvs.texi(,11944) 
cvs.texi(,11945) @item -f
cvs.texi(,11946) Force a head revision match if tag/date not found.
cvs.texi(,11947) See @ref{Tagging by date/tag}.
cvs.texi(,11948) 
cvs.texi(,11949) @item -l
cvs.texi(,11950) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11951) 
cvs.texi(,11952) @item -R
cvs.texi(,11953) Operate recursively (default).  @xref{Recursive
cvs.texi(,11954) behavior}.
cvs.texi(,11955) 
cvs.texi(,11956) @item -r @var{rev}
cvs.texi(,11957) Tag existing tag @var{rev}.  See @ref{Tagging by date/tag}.
cvs.texi(,11958) @end table
cvs.texi(,11959) 
cvs.texi(,11960) @c ------------------------------------------------------------
cvs.texi(,11961) @item unedit [@var{options}] [@var{files}@dots{}]
cvs.texi(,11962) Undo an edit command.  See @ref{Editing files}.
cvs.texi(,11963) 
cvs.texi(,11964) @table @code
cvs.texi(,11965) @item -l
cvs.texi(,11966) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,11967) 
cvs.texi(,11968) @item -R
cvs.texi(,11969) Operate recursively (default).  @xref{Recursive behavior}.
cvs.texi(,11970) @end table
cvs.texi(,11971) 
cvs.texi(,11972) @c ------------------------------------------------------------
cvs.texi(,11973) @item update [@var{options}] [@var{files}@dots{}]
cvs.texi(,11974) Bring work tree in sync with repository.  See
cvs.texi(,11975) @ref{update}.
cvs.texi(,11976) 
cvs.texi(,11977) @table @code
cvs.texi(,11978) @item -A
cvs.texi(,11979) Reset any sticky tags/date/options.  See @ref{Sticky
cvs.texi(,11980) tags} and @ref{Keyword substitution}.
cvs.texi(,11981) 
cvs.texi(,11982) @item -C
cvs.texi(,11983) Overwrite locally modified files with clean copies from
cvs.texi(,11984) the repository (the modified file is saved in
cvs.texi(,11985) @file{.#@var{file}.@var{revision}}, however).
cvs.texi(,11986) 
cvs.texi(,11987) @item -D @var{date}
cvs.texi(,11988) Check out revisions as of @var{date} (is sticky).  See
cvs.texi(,11989) @ref{Common options}.
cvs.texi(,11990) 
cvs.texi(,11991) @item -d
cvs.texi(,11992) Create directories.  See @ref{update options}.
cvs.texi(,11993) 
cvs.texi(,11994) @item -f
cvs.texi(,11995) Use head revision if tag/date not found.  See
cvs.texi(,11996) @ref{Common options}.
cvs.texi(,11997) 
cvs.texi(,11998) @item -I @var{ign}
cvs.texi(,11999) More files to ignore (! to reset).  See
cvs.texi(,12000) @ref{import options}.
cvs.texi(,12001) 
cvs.texi(,12002) @c Probably want to use rev1/rev2 style like for diff
cvs.texi(,12003) @c -r.  Here and in on-line help.
cvs.texi(,12004) @item -j @var{rev}
cvs.texi(,12005) Merge in changes.  See @ref{update options}.
cvs.texi(,12006) 
cvs.texi(,12007) @item -k @var{kflag}
cvs.texi(,12008) Use @var{kflag} keyword expansion.  See
cvs.texi(,12009) @ref{Substitution modes}.
cvs.texi(,12010) 
cvs.texi(,12011) @item -l
cvs.texi(,12012) Local; run only in current working directory.  @xref{Recursive behavior}.
cvs.texi(,12013) 
cvs.texi(,12014) @item -P
cvs.texi(,12015) Prune empty directories.  See @ref{Moving directories}.
cvs.texi(,12016) 
cvs.texi(,12017) @item -p
cvs.texi(,12018) Check out files to standard output (avoids
cvs.texi(,12019) stickiness).  See @ref{update options}.
cvs.texi(,12020) 
cvs.texi(,12021) @item -R
cvs.texi(,12022) Operate recursively (default).  @xref{Recursive
cvs.texi(,12023) behavior}.
cvs.texi(,12024) 
cvs.texi(,12025) @item -r @var{tag}
cvs.texi(,12026) Checkout revision @var{tag} (is sticky).  See @ref{Common options}.
cvs.texi(,12027) 
cvs.texi(,12028) @item -W @var{spec}
cvs.texi(,12029) More wrappers.  See @ref{import options}.
cvs.texi(,12030) @end table
cvs.texi(,12031) 
cvs.texi(,12032) @c ------------------------------------------------------------
cvs.texi(,12033) @item version
cvs.texi(,12034) @cindex version (subcommand)
cvs.texi(,12035) 
cvs.texi(,12036) Display the version of @sc{cvs} being used.  If the repository
cvs.texi(,12037) is remote, display both the client and server versions.
cvs.texi(,12038) 
cvs.texi(,12039) @c ------------------------------------------------------------
cvs.texi(,12040) @item watch [on|off|add|remove] [@var{options}] [@var{files}@dots{}]
cvs.texi(,12041) 
cvs.texi(,12042) on/off: turn on/off read-only checkouts of files.  See
cvs.texi(,12043) @ref{Setting a watch}.
cvs.texi(,12044) 
cvs.texi(,12045) add/remove: add or remove notification on actions.  See
cvs.texi(,12046) @ref{Getting Notified}.
cvs.texi(,12047) 
cvs.texi(,12048) @table @code
cvs.texi(,12049) @item -a @var{actions}
cvs.texi(,12050) Specify actions for temporary watch, where
cvs.texi(,12051) @var{actions} is @code{edit}, @code{unedit},
cvs.texi(,12052) @code{commit}, @code{all}, or @code{none}.  See
cvs.texi(,12053) @ref{Editing files}.
cvs.texi(,12054) 
cvs.texi(,12055) @item -l
cvs.texi(,12056) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,12057) 
cvs.texi(,12058) @item -R
cvs.texi(,12059) Operate recursively (default).  @xref{Recursive
cvs.texi(,12060) behavior}.
cvs.texi(,12061) @end table
cvs.texi(,12062) 
cvs.texi(,12063) @c ------------------------------------------------------------
cvs.texi(,12064) @item watchers [@var{options}] [@var{files}@dots{}]
cvs.texi(,12065) See who is watching a file.  See @ref{Watch information}.
cvs.texi(,12066) 
cvs.texi(,12067) @table @code
cvs.texi(,12068) @item -l
cvs.texi(,12069) Local; run only in current working directory.  See @ref{Recursive behavior}.
cvs.texi(,12070) 
cvs.texi(,12071) @item -R
cvs.texi(,12072) Operate recursively (default).  @xref{Recursive
cvs.texi(,12073) behavior}.
cvs.texi(,12074) @end table
cvs.texi(,12075) 
cvs.texi(,12076) @end table
cvs.texi(,12077) 
cvs.texi(,12078) @c ---------------------------------------------------------------------
cvs.texi(,12079) @node Administrative files
cvs.texi(,12080) @appendix Reference manual for Administrative files
cvs.texi(,12081) @cindex Administrative files (reference)
cvs.texi(,12082) @cindex Files, reference manual
cvs.texi(,12083) @cindex Reference manual (files)
cvs.texi(,12084) @cindex CVSROOT (file)
cvs.texi(,12085) 
cvs.texi(,12086) @c FIXME?  Somewhere there needs to be a more "how-to"
cvs.texi(,12087) @c guide to writing these.  I think the triggers
cvs.texi(,12088) @c (commitinfo, loginfo, taginfo, &c) are perhaps a
cvs.texi(,12089) @c different case than files like modules.  One
cvs.texi(,12090) @c particular issue that people sometimes are
cvs.texi(,12091) @c (unnecessarily?) worried about is performance, and
cvs.texi(,12092) @c the impact of writing in perl or sh or ____.
cvs.texi(,12093) Inside the repository, in the directory
cvs.texi(,12094) @file{$CVSROOT/CVSROOT}, there are a number of
cvs.texi(,12095) supportive files for @sc{cvs}.  You can use @sc{cvs} in a limited
cvs.texi(,12096) fashion without any of them, but if they are set up
cvs.texi(,12097) properly they can help make life easier.  For a
cvs.texi(,12098) discussion of how to edit them, see @ref{Intro
cvs.texi(,12099) administrative files}.
cvs.texi(,12100) 
cvs.texi(,12101) The most important of these files is the @file{modules}
cvs.texi(,12102) file, which defines the modules inside the repository.
cvs.texi(,12103) 
cvs.texi(,12104) @menu
cvs.texi(,12105) * modules::                     Defining modules
cvs.texi(,12106) * Wrappers::                    Specify binary-ness based on file name
cvs.texi(,12107) * commit files::                The commit support files (commitinfo,
cvs.texi(,12108)                                 verifymsg, editinfo, loginfo)
cvs.texi(,12109) * rcsinfo::                     Templates for the log messages
cvs.texi(,12110) * cvsignore::                   Ignoring files via cvsignore
cvs.texi(,12111) * checkoutlist::                Adding your own administrative files
cvs.texi(,12112) * history file::                History information
cvs.texi(,12113) * Variables::                   Various variables are expanded
cvs.texi(,12114) * config::                      Miscellaneous CVS configuration
cvs.texi(,12115) @end menu
cvs.texi(,12116) 
cvs.texi(,12117) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12118) @node modules
cvs.texi(,12119) @appendixsec The modules file
cvs.texi(,12120) @cindex Modules (admin file)
cvs.texi(,12121) @cindex Defining modules (reference manual)
cvs.texi(,12122) 
cvs.texi(,12123) The @file{modules} file records your definitions of
cvs.texi(,12124) names for collections of source code.  @sc{cvs} will
cvs.texi(,12125) use these definitions if you use @sc{cvs} to update the
cvs.texi(,12126) modules file (use normal commands like @code{add},
cvs.texi(,12127) @code{commit}, etc).
cvs.texi(,12128) 
cvs.texi(,12129) The @file{modules} file may contain blank lines and
cvs.texi(,12130) comments (lines beginning with @samp{#}) as well as
cvs.texi(,12131) module definitions.  Long lines can be continued on the
cvs.texi(,12132) next line by specifying a backslash (@samp{\}) as the
cvs.texi(,12133) last character on the line.
cvs.texi(,12134) 
cvs.texi(,12135) There are three basic types of modules: alias modules,
cvs.texi(,12136) regular modules, and ampersand modules.  The difference
cvs.texi(,12137) between them is the way that they map files in the
cvs.texi(,12138) repository to files in the working directory.  In all
cvs.texi(,12139) of the following examples, the top-level repository
cvs.texi(,12140) contains a directory called @file{first-dir}, which
cvs.texi(,12141) contains two files, @file{file1} and @file{file2}, and a
cvs.texi(,12142) directory @file{sdir}.  @file{first-dir/sdir} contains
cvs.texi(,12143) a file @file{sfile}.
cvs.texi(,12144) 
cvs.texi(,12145) @c FIXME: should test all the examples in this section.
cvs.texi(,12146) 
cvs.texi(,12147) @menu
cvs.texi(,12148) * Alias modules::             The simplest kind of module
cvs.texi(,12149) * Regular modules::
cvs.texi(,12150) * Ampersand modules::
cvs.texi(,12151) * Excluding directories::     Excluding directories from a module
cvs.texi(,12152) * Module options::            Regular and ampersand modules can take options
cvs.texi(,12153) * Module program options::    How the modules ``program options'' programs
cvs.texi(,12154)                               are run. 
cvs.texi(,12155) @end menu
cvs.texi(,12156) 
cvs.texi(,12157) @node Alias modules
cvs.texi(,12158) @appendixsubsec Alias modules
cvs.texi(,12159) @cindex Alias modules
cvs.texi(,12160) @cindex -a, in modules file
cvs.texi(,12161) 
cvs.texi(,12162) Alias modules are the simplest kind of module:
cvs.texi(,12163) 
cvs.texi(,12164) @table @code
cvs.texi(,12165) @item @var{mname} -a @var{aliases}@dots{}
cvs.texi(,12166) This represents the simplest way of defining a module
cvs.texi(,12167) @var{mname}.  The @samp{-a} flags the definition as a
cvs.texi(,12168) simple alias: @sc{cvs} will treat any use of @var{mname} (as
cvs.texi(,12169) a command argument) as if the list of names
cvs.texi(,12170) @var{aliases} had been specified instead.
cvs.texi(,12171) @var{aliases} may contain either other module names or
cvs.texi(,12172) paths.  When you use paths in aliases, @code{checkout}
cvs.texi(,12173) creates all intermediate directories in the working
cvs.texi(,12174) directory, just as if the path had been specified
cvs.texi(,12175) explicitly in the @sc{cvs} arguments.
cvs.texi(,12176) @end table
cvs.texi(,12177) 
cvs.texi(,12178) For example, if the modules file contains:
cvs.texi(,12179) 
cvs.texi(,12180) @example
cvs.texi(,12181) amodule -a first-dir
cvs.texi(,12182) @end example
cvs.texi(,12183) 
cvs.texi(,12184) @noindent
cvs.texi(,12185) then the following two commands are equivalent:
cvs.texi(,12186) 
cvs.texi(,12187) @example
cvs.texi(,12188) $ cvs co amodule
cvs.texi(,12189) $ cvs co first-dir
cvs.texi(,12190) @end example
cvs.texi(,12191) 
cvs.texi(,12192) @noindent
cvs.texi(,12193) and they each would provide output such as:
cvs.texi(,12194) 
cvs.texi(,12195) @example
cvs.texi(,12196) cvs checkout: Updating first-dir
cvs.texi(,12197) U first-dir/file1
cvs.texi(,12198) U first-dir/file2
cvs.texi(,12199) cvs checkout: Updating first-dir/sdir
cvs.texi(,12200) U first-dir/sdir/sfile
cvs.texi(,12201) @end example
cvs.texi(,12202) 
cvs.texi(,12203) @node Regular modules
cvs.texi(,12204) @appendixsubsec Regular modules
cvs.texi(,12205) @cindex Regular modules
cvs.texi(,12206) 
cvs.texi(,12207) @table @code
cvs.texi(,12208) @item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ]
cvs.texi(,12209) In the simplest case, this form of module definition
cvs.texi(,12210) reduces to @samp{@var{mname} @var{dir}}.  This defines
cvs.texi(,12211) all the files in directory @var{dir} as module mname.
cvs.texi(,12212) @var{dir} is a relative path (from @code{$CVSROOT}) to a
cvs.texi(,12213) directory of source in the source repository.  In this
cvs.texi(,12214) case, on checkout, a single directory called
cvs.texi(,12215) @var{mname} is created as a working directory; no
cvs.texi(,12216) intermediate directory levels are used by default, even
cvs.texi(,12217) if @var{dir} was a path involving several directory
cvs.texi(,12218) levels.
cvs.texi(,12219) @end table
cvs.texi(,12220) 
cvs.texi(,12221) For example, if a module is defined by:
cvs.texi(,12222) 
cvs.texi(,12223) @example
cvs.texi(,12224) regmodule first-dir
cvs.texi(,12225) @end example
cvs.texi(,12226) 
cvs.texi(,12227) @noindent
cvs.texi(,12228) then regmodule will contain the files from first-dir:
cvs.texi(,12229) 
cvs.texi(,12230) @example
cvs.texi(,12231) $ cvs co regmodule
cvs.texi(,12232) cvs checkout: Updating regmodule
cvs.texi(,12233) U regmodule/file1
cvs.texi(,12234) U regmodule/file2
cvs.texi(,12235) cvs checkout: Updating regmodule/sdir
cvs.texi(,12236) U regmodule/sdir/sfile
cvs.texi(,12237) $
cvs.texi(,12238) @end example
cvs.texi(,12239) 
cvs.texi(,12240) By explicitly specifying files in the module definition
cvs.texi(,12241) after @var{dir}, you can select particular files from
cvs.texi(,12242) directory @var{dir}.  Here is
cvs.texi(,12243) an example:
cvs.texi(,12244) 
cvs.texi(,12245) @example
cvs.texi(,12246) regfiles first-dir/sdir sfile
cvs.texi(,12247) @end example
cvs.texi(,12248) 
cvs.texi(,12249) @noindent
cvs.texi(,12250) With this definition, getting the regfiles module
cvs.texi(,12251) will create a single working directory
cvs.texi(,12252) @file{regfiles} containing the file listed, which
cvs.texi(,12253) comes from a directory deeper
cvs.texi(,12254) in the @sc{cvs} source repository:
cvs.texi(,12255) 
cvs.texi(,12256) @example
cvs.texi(,12257) $ cvs co regfiles
cvs.texi(,12258) U regfiles/sfile
cvs.texi(,12259) $
cvs.texi(,12260) @end example
cvs.texi(,12261) 
cvs.texi(,12262) @node Ampersand modules
cvs.texi(,12263) @appendixsubsec Ampersand modules
cvs.texi(,12264) @cindex Ampersand modules
cvs.texi(,12265) @cindex &, in modules file
cvs.texi(,12266) 
cvs.texi(,12267) A module definition can refer to other modules by
cvs.texi(,12268) including @samp{&@var{module}} in its definition.
cvs.texi(,12269) @example
cvs.texi(,12270) @var{mname} [ options ] @var{&module}@dots{}
cvs.texi(,12271) @end example
cvs.texi(,12272) 
cvs.texi(,12273) Then getting the module creates a subdirectory for each such
cvs.texi(,12274) module, in the directory containing the module.  For
cvs.texi(,12275) example, if modules contains
cvs.texi(,12276) 
cvs.texi(,12277) @example
cvs.texi(,12278) ampermod &first-dir
cvs.texi(,12279) @end example
cvs.texi(,12280) 
cvs.texi(,12281) @noindent
cvs.texi(,12282) then a checkout will create an @code{ampermod} directory
cvs.texi(,12283) which contains a directory called @code{first-dir},
cvs.texi(,12284) which in turns contains all the directories and files
cvs.texi(,12285) which live there.  For example, the command
cvs.texi(,12286) 
cvs.texi(,12287) @example
cvs.texi(,12288) $ cvs co ampermod
cvs.texi(,12289) @end example
cvs.texi(,12290) 
cvs.texi(,12291) @noindent
cvs.texi(,12292) will create the following files:
cvs.texi(,12293) 
cvs.texi(,12294) @example
cvs.texi(,12295) ampermod/first-dir/file1
cvs.texi(,12296) ampermod/first-dir/file2
cvs.texi(,12297) ampermod/first-dir/sdir/sfile
cvs.texi(,12298) @end example
cvs.texi(,12299) 
cvs.texi(,12300) There is one quirk/bug: the messages that @sc{cvs}
cvs.texi(,12301) prints omit the @file{ampermod}, and thus do not
cvs.texi(,12302) correctly display the location to which it is checking
cvs.texi(,12303) out the files:
cvs.texi(,12304) 
cvs.texi(,12305) @example
cvs.texi(,12306) $ cvs co ampermod
cvs.texi(,12307) cvs checkout: Updating first-dir
cvs.texi(,12308) U first-dir/file1
cvs.texi(,12309) U first-dir/file2
cvs.texi(,12310) cvs checkout: Updating first-dir/sdir
cvs.texi(,12311) U first-dir/sdir/sfile
cvs.texi(,12312) $
cvs.texi(,12313) @end example
cvs.texi(,12314) 
cvs.texi(,12315) Do not rely on this buggy behavior; it may get fixed in
cvs.texi(,12316) a future release of @sc{cvs}.
cvs.texi(,12317) 
cvs.texi(,12318) @c FIXCVS: What happens if regular and & modules are
cvs.texi(,12319) @c combined, as in "ampermodule first-dir &second-dir"?
cvs.texi(,12320) @c When I tried it, it seemed to just ignore the
cvs.texi(,12321) @c "first-dir".  I think perhaps it should be an error
cvs.texi(,12322) @c (but this needs further investigation).
cvs.texi(,12323) @c In addition to discussing what each one does, we
cvs.texi(,12324) @c should put in a few words about why you would use one or
cvs.texi(,12325) @c the other in various situations.
cvs.texi(,12326) 
cvs.texi(,12327) @node Excluding directories
cvs.texi(,12328) @appendixsubsec Excluding directories
cvs.texi(,12329) @cindex Excluding directories, in modules file
cvs.texi(,12330) @cindex !, in modules file
cvs.texi(,12331) 
cvs.texi(,12332) An alias module may exclude particular directories from
cvs.texi(,12333) other modules by using an exclamation mark (@samp{!})
cvs.texi(,12334) before the name of each directory to be excluded.
cvs.texi(,12335) 
cvs.texi(,12336) For example, if the modules file contains:
cvs.texi(,12337) 
cvs.texi(,12338) @example
cvs.texi(,12339) exmodule -a !first-dir/sdir first-dir
cvs.texi(,12340) @end example
cvs.texi(,12341) 
cvs.texi(,12342) @noindent
cvs.texi(,12343) then checking out the module @samp{exmodule} will check
cvs.texi(,12344) out everything in @samp{first-dir} except any files in
cvs.texi(,12345) the subdirectory @samp{first-dir/sdir}.
cvs.texi(,12346) @c Note that the "!first-dir/sdir" sometimes must be listed
cvs.texi(,12347) @c before "first-dir".  That seems like a probable bug, in which
cvs.texi(,12348) @c case perhaps it should be fixed (to allow either
cvs.texi(,12349) @c order) rather than documented.  See modules4 in testsuite.
cvs.texi(,12350) 
cvs.texi(,12351) @node Module options
cvs.texi(,12352) @appendixsubsec Module options
cvs.texi(,12353) @cindex Options, in modules file
cvs.texi(,12354) 
cvs.texi(,12355) Either regular modules or ampersand modules can contain
cvs.texi(,12356) options, which supply additional information concerning
cvs.texi(,12357) the module.
cvs.texi(,12358) 
cvs.texi(,12359) @table @code
cvs.texi(,12360) @cindex -d, in modules file
cvs.texi(,12361) @item -d @var{name}
cvs.texi(,12362) Name the working directory something other than the
cvs.texi(,12363) module name.
cvs.texi(,12364) @c FIXME: Needs a bunch of examples, analogous to the
cvs.texi(,12365) @c examples for alias, regular, and ampersand modules
cvs.texi(,12366) @c which show where the files go without -d.
cvs.texi(,12367) 
cvs.texi(,12368) @cindex Export program
cvs.texi(,12369) @cindex -e, in modules file
cvs.texi(,12370) @item -e @var{prog}
cvs.texi(,12371) Specify a program @var{prog} to run whenever files in a
cvs.texi(,12372) module are exported.  @var{prog} runs with a single
cvs.texi(,12373) argument, the module name.
cvs.texi(,12374) @c FIXME: Is it run on server? client?
cvs.texi(,12375) 
cvs.texi(,12376) @cindex Checkout program
cvs.texi(,12377) @cindex -o, in modules file
cvs.texi(,12378) @item -o @var{prog}
cvs.texi(,12379) Specify a program @var{prog} to run whenever files in a
cvs.texi(,12380) module are checked out.  @var{prog} runs with a single
cvs.texi(,12381) argument, the module name.  See @ref{Module program options} for
cvs.texi(,12382) information on how @var{prog} is called.
cvs.texi(,12383) @c FIXME: Is it run on server? client?
cvs.texi(,12384) 
cvs.texi(,12385) @cindex Status of a module
cvs.texi(,12386) @cindex Module status
cvs.texi(,12387) @cindex -s, in modules file
cvs.texi(,12388) @item -s @var{status}
cvs.texi(,12389) Assign a status to the module.  When the module file is
cvs.texi(,12390) printed with @samp{cvs checkout -s} the modules are
cvs.texi(,12391) sorted according to primarily module status, and
cvs.texi(,12392) secondarily according to the module name.  This option
cvs.texi(,12393) has no other meaning.  You can use this option for
cvs.texi(,12394) several things besides status: for instance, list the
cvs.texi(,12395) person that is responsible for this module.
cvs.texi(,12396) 
cvs.texi(,12397) @cindex Tag program
cvs.texi(,12398) @cindex -t, in modules file
cvs.texi(,12399) @item -t @var{prog}
cvs.texi(,12400) Specify a program @var{prog} to run whenever files in a
cvs.texi(,12401) module are tagged with @code{rtag}.  @var{prog} runs
cvs.texi(,12402) with two arguments: the module name and the symbolic
cvs.texi(,12403) tag specified to @code{rtag}.  It is not run
cvs.texi(,12404) when @code{tag} is executed.  Generally you will find
cvs.texi(,12405) that taginfo is a better solution (@pxref{user-defined logging}).
cvs.texi(,12406) @c FIXME: Is it run on server? client?
cvs.texi(,12407) @c Problems with -t include:
cvs.texi(,12408) @c * It is run after the tag not before
cvs.texi(,12409) @c * It doesn't get passed all the information that
cvs.texi(,12410) @c   taginfo does ("mov", &c).
cvs.texi(,12411) @c * It only is run for rtag, not tag.
cvs.texi(,12412) @end table
cvs.texi(,12413) 
cvs.texi(,12414) You should also see @pxref{Module program options} about how the
cvs.texi(,12415) ``program options'' programs are run.
cvs.texi(,12416) 
cvs.texi(,12417) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12418) 
cvs.texi(,12419) @node Module program options
cvs.texi(,12420) @appendixsubsec How the modules file ``program options'' programs are run
cvs.texi(,12421) @cindex Modules file program options
cvs.texi(,12422) @cindex -t, in modules file
cvs.texi(,12423) @cindex -o, in modules file
cvs.texi(,12424) @cindex -e, in modules file
cvs.texi(,12425) 
cvs.texi(,12426) @noindent
cvs.texi(,12427) For checkout, rtag, and export, the program is server-based, and as such the
cvs.texi(,12428) following applies:-
cvs.texi(,12429) 
cvs.texi(,12430) If using remote access methods (pserver, ext, etc.),
cvs.texi(,12431) @sc{cvs} will execute this program on the server from a temporary
cvs.texi(,12432) directory. The path is searched for this program.
cvs.texi(,12433) 
cvs.texi(,12434) If using ``local access'' (on a local or remote NFS file system, i.e.
cvs.texi(,12435) repository set just to a path),
cvs.texi(,12436) the program will be executed from the newly checked-out tree, if
cvs.texi(,12437) found there, or alternatively searched for in the path if not.
cvs.texi(,12438) 
cvs.texi(,12439) The programs are all run after the operation has effectively
cvs.texi(,12440) completed.
cvs.texi(,12441) 
cvs.texi(,12442) 
cvs.texi(,12443) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12444) @node Wrappers
cvs.texi(,12445) @appendixsec The cvswrappers file
cvs.texi(,12446) @cindex cvswrappers (admin file)
cvs.texi(,12447) @cindex CVSWRAPPERS, environment variable
cvs.texi(,12448) @cindex Wrappers
cvs.texi(,12449) 
cvs.texi(,12450) @c FIXME: need some better way of separating this out
cvs.texi(,12451) @c by functionality.  -m is
cvs.texi(,12452) @c one feature, and -k is a another.  And this discussion
cvs.texi(,12453) @c should be better motivated (e.g. start with the
cvs.texi(,12454) @c problems, then explain how the feature solves it).
cvs.texi(,12455) 
cvs.texi(,12456) Wrappers refers to a @sc{cvs} feature which lets you
cvs.texi(,12457) control certain settings based on the name of the file
cvs.texi(,12458) which is being operated on.  The settings are @samp{-k}
cvs.texi(,12459) for binary files, and @samp{-m} for nonmergeable text
cvs.texi(,12460) files.
cvs.texi(,12461) 
cvs.texi(,12462) The @samp{-m} option
cvs.texi(,12463) specifies the merge methodology that should be used when
cvs.texi(,12464) a non-binary file is updated.  @code{MERGE} means the usual
cvs.texi(,12465) @sc{cvs} behavior: try to merge the files.  @code{COPY}
cvs.texi(,12466) means that @code{cvs update} will refuse to merge
cvs.texi(,12467) files, as it also does for files specified as binary
cvs.texi(,12468) with @samp{-kb} (but if the file is specified as
cvs.texi(,12469) binary, there is no need to specify @samp{-m 'COPY'}).
cvs.texi(,12470) @sc{cvs} will provide the user with the
cvs.texi(,12471) two versions of the files, and require the user using
cvs.texi(,12472) mechanisms outside @sc{cvs}, to insert any necessary
cvs.texi(,12473) changes.
cvs.texi(,12474) 
cvs.texi(,12475) @strong{WARNING: do not use @code{COPY} with
cvs.texi(,12476) @sc{cvs} 1.9 or earlier - such versions of @sc{cvs} will
cvs.texi(,12477) copy one version of your file over the other, wiping
cvs.texi(,12478) out the previous contents.}
cvs.texi(,12479) @c Ordinarily we don't document the behavior of old
cvs.texi(,12480) @c versions.  But this one is so dangerous, I think we
cvs.texi(,12481) @c must.  I almost renamed it to -m 'NOMERGE' so we
cvs.texi(,12482) @c could say "never use -m 'COPY'".
cvs.texi(,12483) The @samp{-m} wrapper option only affects behavior when
cvs.texi(,12484) merging is done on update; it does not affect how files
cvs.texi(,12485) are stored.  See @ref{Binary files}, for more on
cvs.texi(,12486) binary files.
cvs.texi(,12487) 
cvs.texi(,12488) The basic format of the file @file{cvswrappers} is:
cvs.texi(,12489) 
cvs.texi(,12490) @c FIXME: @example is all wrong for this.  Use @deffn or
cvs.texi(,12491) @c something more sensible.
cvs.texi(,12492) @example
cvs.texi(,12493) wildcard     [option value][option value]...
cvs.texi(,12494) 
cvs.texi(,12495) where option is one of
cvs.texi(,12496) -m           update methodology      value: MERGE or COPY
cvs.texi(,12497) -k           keyword expansion       value: expansion mode
cvs.texi(,12498) 
cvs.texi(,12499) and value is a single-quote delimited value.
cvs.texi(,12500) @end example
cvs.texi(,12501) 
cvs.texi(,12563) 
cvs.texi(,12564) @c FIXME: We don't document -W or point to where it is
cvs.texi(,12565) @c documented.  Or .cvswrappers.
cvs.texi(,12566) For example, the following command imports a
cvs.texi(,12567) directory, treating files whose name ends in
cvs.texi(,12568) @samp{.exe} as binary:
cvs.texi(,12569) 
cvs.texi(,12570) @example
cvs.texi(,12571) cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag
cvs.texi(,12572) @end example
cvs.texi(,12573) 
cvs.texi(,12574) @c Another good example, would be storing files
cvs.texi(,12575) @c (e.g. binary files) compressed in the repository.
cvs.texi(,12576) @c 	::::::::::::::::::
cvs.texi(,12577) @c 	cvswrappers
cvs.texi(,12578) @c 	::::::::::::::::::
cvs.texi(,12579) @c 	*.t12 -m 'COPY'
cvs.texi(,12580) @c 	*.t[0-9][0-9] -f 'gunzipcp %s' -t 'gzipcp %s %s' -m 'COPY'
cvs.texi(,12581) @c
cvs.texi(,12582) @c	::::::::::::::::::
cvs.texi(,12583) @c	gunzipcp
cvs.texi(,12584) @c	::::::::::::::::::
cvs.texi(,12585) @c	:
cvs.texi(,12586) @c	[ -f $1 ] || exit 1
cvs.texi(,12587) @c	zcat $1 > /tmp/.#$1.$$
cvs.texi(,12588) @c	mv /tmp/.#$1.$$ $1
cvs.texi(,12589) @c
cvs.texi(,12590) @c	::::::::::::::::::
cvs.texi(,12591) @c	gzipcp
cvs.texi(,12592) @c	::::::::::::::::::
cvs.texi(,12593) @c	:
cvs.texi(,12594) @c	DIRNAME=`echo $1 | sed -e "s|/.*/||g"`
cvs.texi(,12595) @c	if [ ! -d $DIRNAME ] ; then
cvs.texi(,12596) @c	      DIRNAME=`echo $1 | sed -e "s|.*/||g"`
cvs.texi(,12597) @c	fi
cvs.texi(,12598) @c	gzip -c  $DIRNAME  > $2
cvs.texi(,12599) @c One catch--"cvs diff" will not invoke the wrappers
cvs.texi(,12600) @c (probably a CVS bug, although I haven't thought it out).
cvs.texi(,12601) 
cvs.texi(,12602) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12603) @node commit files
cvs.texi(,12604) @appendixsec The commit support files
cvs.texi(,12605) @cindex Committing, administrative support files
cvs.texi(,12606) 
cvs.texi(,12607) The @samp{-i} flag in the @file{modules} file can be
cvs.texi(,12608) used to run a certain program whenever files are
cvs.texi(,12609) committed (@pxref{modules}).  The files described in
cvs.texi(,12610) this section provide other, more flexible, ways to run
cvs.texi(,12611) programs whenever something is committed.
cvs.texi(,12612) 
cvs.texi(,12613) There are three kind of programs that can be run on
cvs.texi(,12614) commit.  They are specified in files in the repository,
cvs.texi(,12615) as described below.  The following table summarizes the
cvs.texi(,12616) file names and the purpose of the corresponding
cvs.texi(,12617) programs.
cvs.texi(,12618) 
cvs.texi(,12619) @table @file
cvs.texi(,12620) @item commitinfo
cvs.texi(,12621) The program is responsible for checking that the commit
cvs.texi(,12622) is allowed.  If it exits with a non-zero exit status
cvs.texi(,12623) the commit will be aborted.
cvs.texi(,12624) 
cvs.texi(,12625) @item verifymsg
cvs.texi(,12626) The specified program is used to evaluate the log message,
cvs.texi(,12627) and possibly verify that it contains all required
cvs.texi(,12628) fields.  This is most useful in combination with the
cvs.texi(,12629) @file{rcsinfo} file, which can hold a log message
cvs.texi(,12630) template (@pxref{rcsinfo}).
cvs.texi(,12631) 
cvs.texi(,12632) @item editinfo
cvs.texi(,12633) The specified program is used to edit the log message,
cvs.texi(,12634) and possibly verify that it contains all required
cvs.texi(,12635) fields.  This is most useful in combination with the
cvs.texi(,12636) @file{rcsinfo} file, which can hold a log message
cvs.texi(,12637) template (@pxref{rcsinfo}).  (obsolete)
cvs.texi(,12638) 
cvs.texi(,12639) @item loginfo
cvs.texi(,12640) The specified program is called when the commit is
cvs.texi(,12641) complete.  It receives the log message and some
cvs.texi(,12642) additional information and can store the log message in
cvs.texi(,12643) a file, or mail it to appropriate persons, or maybe
cvs.texi(,12644) post it to a local newsgroup, or@dots{}  Your
cvs.texi(,12645) imagination is the limit!
cvs.texi(,12646) @end table
cvs.texi(,12647) 
cvs.texi(,12648) @menu
cvs.texi(,12649) * syntax::                      The common syntax
cvs.texi(,12650) * commitinfo::                  Pre-commit checking
cvs.texi(,12651) * verifymsg::                   How are log messages evaluated?
cvs.texi(,12652) * editinfo::                    Specifying how log messages are created
cvs.texi(,12653)                                 (obsolete)
cvs.texi(,12654) * loginfo::                     Where should log messages be sent?
cvs.texi(,12655) @end menu
cvs.texi(,12656) 
cvs.texi(,12657) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,12658) @node syntax
cvs.texi(,12659) @appendixsubsec The common syntax
cvs.texi(,12660) @cindex Info files (syntax)
cvs.texi(,12661) @cindex Syntax of info files
cvs.texi(,12662) @cindex Common syntax of info files
cvs.texi(,12663) 
cvs.texi(,12664) @c FIXME: having this so totally separate from the
cvs.texi(,12665) @c Variables node is rather bogus.
cvs.texi(,12666) 
cvs.texi(,12667) The administrative files such as @file{commitinfo},
cvs.texi(,12668) @file{loginfo}, @file{rcsinfo}, @file{verifymsg}, etc.,
cvs.texi(,12669) all have a common format.  The purpose of the files are
cvs.texi(,12670) described later on.  The common syntax is described
cvs.texi(,12671) here.
cvs.texi(,12672) 
cvs.texi(,12673) @cindex Regular expression syntax
cvs.texi(,12674) Each line contains the following:
cvs.texi(,12675) @itemize @bullet
cvs.texi(,12676) @item
cvs.texi(,12677) @c Say anything about DEFAULT and ALL?  Right now we
cvs.texi(,12678) @c leave that to the description of each file (and in fact
cvs.texi(,12679) @c the practice is inconsistent which is really annoying).
cvs.texi(,12680) A regular expression.  This is a basic regular
cvs.texi(,12681) expression in the syntax used by GNU emacs.
cvs.texi(,12682) @c FIXME: What we probably should be saying is "POSIX Basic
cvs.texi(,12683) @c Regular Expression with the following extensions (`\('
cvs.texi(,12684) @c `\|' '+' etc)"
cvs.texi(,12685) @c rather than define it with reference to emacs.
cvs.texi(,12686) @c The reference to emacs is not strictly speaking
cvs.texi(,12687) @c true, as we don't support \=, \s, or \S.  Also it isn't
cvs.texi(,12688) @c clear we should document and/or promise to continue to
cvs.texi(,12689) @c support all the obscure emacs extensions like \<.
cvs.texi(,12690) @c Also need to better cite (or include) full
cvs.texi(,12691) @c documentation for the syntax.
cvs.texi(,12692) @c Also see comment in configure.in about what happens to the
cvs.texi(,12693) @c syntax if we pick up a system-supplied regexp matcher.
cvs.texi(,12694) 
cvs.texi(,12695) @item
cvs.texi(,12696) A whitespace separator---one or more spaces and/or tabs.
cvs.texi(,12697) 
cvs.texi(,12698) @item
cvs.texi(,12699) A file name or command-line template.
cvs.texi(,12700) @end itemize
cvs.texi(,12701) 
cvs.texi(,12702) @noindent
cvs.texi(,12703) Blank lines are ignored.  Lines that start with the
cvs.texi(,12704) character @samp{#} are treated as comments.  Long lines
cvs.texi(,12705) unfortunately can @emph{not} be broken in two parts in
cvs.texi(,12706) any way.
cvs.texi(,12707) 
cvs.texi(,12708) The first regular expression that matches the current
cvs.texi(,12709) directory name in the repository is used.  The rest of the line
cvs.texi(,12710) is used as a file name or command-line as appropriate.
cvs.texi(,12711) 
cvs.texi(,12712) @c FIXME: need an example.  In particular, show what
cvs.texi(,12713) @c the regular expression is matched against (one
cvs.texi(,12714) @c ordinarily clueful person got confused about whether it
cvs.texi(,12715) @c includes the filename--"directory name" above should be
cvs.texi(,12716) @c unambiguous but there is nothing like an example to
cvs.texi(,12717) @c confirm people's understanding of this sort of thing).
cvs.texi(,12718) 
cvs.texi(,12719) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12720) @node commitinfo
cvs.texi(,12721) @appendixsubsec Commitinfo
cvs.texi(,12722) @cindex @file{commitinfo}
cvs.texi(,12723) @cindex Commits, precommit verification of
cvs.texi(,12724) @cindex Precommit checking
cvs.texi(,12725) 
cvs.texi(,12726) The @file{commitinfo} file defines programs to execute
cvs.texi(,12727) whenever @samp{cvs commit} is about to execute.  These
cvs.texi(,12728) programs are used for pre-commit checking to verify
cvs.texi(,12729) that the modified, added and removed files are really
cvs.texi(,12730) ready to be committed.  This could be used, for
cvs.texi(,12731) instance, to verify that the changed files conform to
cvs.texi(,12732) to your site's standards for coding practice.
cvs.texi(,12733) 
cvs.texi(,12734) As mentioned earlier, each line in the
cvs.texi(,12735) @file{commitinfo} file consists of a regular expression
cvs.texi(,12736) and a command-line template.  The template can include
cvs.texi(,12737) a program name and any number of arguments you wish to
cvs.texi(,12738) supply to it.  The full path to the current source
cvs.texi(,12739) repository is appended to the template, followed by the
cvs.texi(,12740) file names of any files involved in the commit (added,
cvs.texi(,12741) removed, and modified files).
cvs.texi(,12742) 
cvs.texi(,12743) @cindex Exit status, of commitinfo
cvs.texi(,12744) The first line with a regular expression matching the
cvs.texi(,12745) directory within the repository will be used.  If the
cvs.texi(,12746) command returns a non-zero exit status the commit will
cvs.texi(,12747) be aborted.
cvs.texi(,12748) @c FIXME: need example(s) of what "directory within the
cvs.texi(,12749) @c repository" means.
cvs.texi(,12750) 
cvs.texi(,12751) @cindex DEFAULT in commitinfo
cvs.texi(,12752) If the repository name does not match any of the
cvs.texi(,12753) regular expressions in this file, the @samp{DEFAULT}
cvs.texi(,12754) line is used, if it is specified.
cvs.texi(,12755) 
cvs.texi(,12756) @cindex ALL in commitinfo
cvs.texi(,12757) All occurrences of the name @samp{ALL} appearing as a
cvs.texi(,12758) regular expression are used in addition to the first
cvs.texi(,12759) matching regular expression or the name @samp{DEFAULT}.
cvs.texi(,12760) 
cvs.texi(,12761) @cindex @file{commitinfo}, working directory
cvs.texi(,12762) @cindex @file{commitinfo}, command environment
cvs.texi(,12763) The command will be run in the root of the workspace
cvs.texi(,12764) containing the new versions of any files the user would like
cvs.texi(,12765) to modify (commit), @emph{or in a copy of the workspace on
cvs.texi(,12766) the server (@pxref{Remote repositories})}.  If a file is
cvs.texi(,12767) being removed, there will be no copy of the file under the
cvs.texi(,12768) current directory.  If a file is being added, there will be
cvs.texi(,12769) no corresponding archive file in the repository unless the
cvs.texi(,12770) file is being resurrected.
cvs.texi(,12771) 
cvs.texi(,12772) Note that both the repository directory and the corresponding
cvs.texi(,12773) Attic (@pxref{Attic}) directory may need to be checked to
cvs.texi(,12774) locate the archive file corresponding to any given file being
cvs.texi(,12775) committed.  Much of the information about the specific commit
cvs.texi(,12776) request being made, including the destination branch, commit
cvs.texi(,12777) message, and command line options specified, is not available
cvs.texi(,12778) to the command.
cvs.texi(,12779) 
cvs.texi(,12780) @c FIXME: should discuss using commitinfo to control
cvs.texi(,12781) @c who has checkin access to what (e.g. Joe can check into
cvs.texi(,12782) @c directories a, b, and c, and Mary can check into
cvs.texi(,12783) @c directories b, c, and d--note this case cannot be
cvs.texi(,12784) @c conveniently handled with unix groups).  Of course,
cvs.texi(,12785) @c adding a new set of features to CVS might be a more
cvs.texi(,12786) @c natural way to fix this problem than telling people to
cvs.texi(,12787) @c use commitinfo.
cvs.texi(,12788) @c FIXME: Should make some reference, especially in
cvs.texi(,12789) @c the context of controlling who has access, to the fact
cvs.texi(,12790) @c that commitinfo can be circumvented.  Perhaps
cvs.texi(,12791) @c mention SETXID (but has it been carefully examined
cvs.texi(,12792) @c for holes?).  This fits in with the discussion of
cvs.texi(,12793) @c general CVS security in "Password authentication
cvs.texi(,12794) @c security" (the bit which is not pserver-specific).
cvs.texi(,12795) 
cvs.texi(,12796) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12797) @node verifymsg
cvs.texi(,12798) @appendixsubsec Verifying log messages
cvs.texi(,12799) @cindex @file{verifymsg} (admin file)
cvs.texi(,12800) @cindex Log message, verifying
cvs.texi(,12801) 
cvs.texi(,12802) Once you have entered a log message, you can evaluate
cvs.texi(,12803) that message to check for specific content, such as
cvs.texi(,12804) a bug ID.  Use the @file{verifymsg} file to
cvs.texi(,12805) specify a program that is used to verify the log message.
cvs.texi(,12806) This program could be a simple script that checks
cvs.texi(,12807) that the entered message contains the required fields.
cvs.texi(,12808) 
cvs.texi(,12809) The @file{verifymsg} file is often most useful together
cvs.texi(,12810) with the @file{rcsinfo} file, which can be used to
cvs.texi(,12811) specify a log message template.
cvs.texi(,12812) 
cvs.texi(,12813) Each line in the @file{verifymsg} file consists of a
cvs.texi(,12814) regular expression and a command-line template.  The
cvs.texi(,12815) template must include a program name, and can include
cvs.texi(,12816) any number of arguments.  The full path to the current
cvs.texi(,12817) log message template file is appended to the template.
cvs.texi(,12818) 
cvs.texi(,12819) One thing that should be noted is that the @samp{ALL}
cvs.texi(,12820) keyword is not supported.  If more than one matching
cvs.texi(,12821) line is found, the first one is used.  This can be
cvs.texi(,12822) useful for specifying a default verification script in a
cvs.texi(,12823) directory, and then overriding it in a subdirectory.
cvs.texi(,12824) 
cvs.texi(,12825) @cindex DEFAULT in @file{verifymsg}
cvs.texi(,12826) If the repository name does not match any of the
cvs.texi(,12827) regular expressions in this file, the @samp{DEFAULT}
cvs.texi(,12828) line is used, if it is specified.
cvs.texi(,12829) 
cvs.texi(,12830) @cindex Exit status, of @file{verifymsg}
cvs.texi(,12831) If the verification script exits with a non-zero exit status,
cvs.texi(,12832) the commit is aborted.
cvs.texi(,12833) 
cvs.texi(,12834) @cindex @file{verifymsg}, changing the log message
cvs.texi(,12835) In the default configuration, CVS allows the
cvs.texi(,12836) verification script to change the log message. This is
cvs.texi(,12837) controlled via the RereadLogAfterVerify CVSROOT/config
cvs.texi(,12838) option.
cvs.texi(,12839) 
cvs.texi(,12840) When @samp{RereadLogAfterVerify=always} or
cvs.texi(,12841) @samp{RereadLogAfterVerify=stat}, the log message will
cvs.texi(,12842) either always be reread after the verification script
cvs.texi(,12843) is run or reread only if the log message file status
cvs.texi(,12844) has changed.
cvs.texi(,12845) 
cvs.texi(,12846) @xref{config}, for more on CVSROOT/config options.
cvs.texi(,12847) 
cvs.texi(,12848) It is NOT a good idea for a @file{verifymsg} script to
cvs.texi(,12849) interact directly with the user in the various
cvs.texi(,12850) client/server methods. For the @code{pserver} method,
cvs.texi(,12851) there is no protocol support for communicating between
cvs.texi(,12852) @file{verifymsg} and the client on the remote end. For the
cvs.texi(,12853) @code{ext} and @code{server} methods, it is possible
cvs.texi(,12854) for CVS to become confused by the characters going
cvs.texi(,12855) along the same channel as the CVS protocol
cvs.texi(,12856) messages. See @ref{Remote repositories}, for more
cvs.texi(,12857) information on client/server setups.  In addition, at the time
cvs.texi(,12858) the @file{verifymsg} script runs, the CVS
cvs.texi(,12859) server has locks in place in the repository.  If control is
cvs.texi(,12860) returned to the user here then other users may be stuck waiting
cvs.texi(,12861) for access to the repository.
cvs.texi(,12862) 
cvs.texi(,12863) This option can be useful if you find yourself using an
cvs.texi(,12864) rcstemplate that needs to be modified to remove empty
cvs.texi(,12865) elements or to fill in default values.  It can also be
cvs.texi(,12866) useful if the rcstemplate has changed in the repository
cvs.texi(,12867) and the CVS/Template was not updated, but is able to be
cvs.texi(,12868) adapted to the new format by the verification script
cvs.texi(,12869) that is run by @file{verifymsg}.
cvs.texi(,12870) 
cvs.texi(,12871) An example of an update might be to change all
cvs.texi(,12872) occurrences of 'BugId:' to be 'DefectId:' (which can be
cvs.texi(,12873) useful if the rcstemplate has recently been changed and
cvs.texi(,12874) there are still checked-out user trees with cached
cvs.texi(,12875) copies in the CVS/Template file of the older version).
cvs.texi(,12876) 
cvs.texi(,12877) Another example of an update might be to delete a line
cvs.texi(,12878) that contains 'BugID: none' from the log message after
cvs.texi(,12879) validation of that value as being allowed is made.
cvs.texi(,12880) 
cvs.texi(,12881) The following is a little silly example of a
cvs.texi(,12882) @file{verifymsg} file, together with the corresponding
cvs.texi(,12883) @file{rcsinfo} file, the log message template and an
cvs.texi(,12884) verification  script.  We begin with the log message template.
cvs.texi(,12885) We want to always record a bug-id number on the first
cvs.texi(,12886) line of the log message.  The rest of log message is
cvs.texi(,12887) free text.  The following template is found in the file
cvs.texi(,12888) @file{/usr/cvssupport/tc.template}.
cvs.texi(,12889) 
cvs.texi(,12890) @example
cvs.texi(,12891) BugId:
cvs.texi(,12892) @end example
cvs.texi(,12893) 
cvs.texi(,12894) The script @file{/usr/cvssupport/bugid.verify} is used to
cvs.texi(,12895) evaluate the log message.
cvs.texi(,12896) 
cvs.texi(,12897) @example
cvs.texi(,12898) #!/bin/sh
cvs.texi(,12899) #
cvs.texi(,12900) #       bugid.verify filename
cvs.texi(,12901) #
cvs.texi(,12902) #  Verify that the log message contains a valid bugid
cvs.texi(,12903) #  on the first line.
cvs.texi(,12904) #
cvs.texi(,12905) if head -1 < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
cvs.texi(,12906)     exit 0
cvs.texi(,12907) elif head -1 < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
cvs.texi(,12908)     # It is okay to allow commits with 'BugId: none',
cvs.texi(,12909)     # but do not put that text into the real log message.
cvs.texi(,12910)     grep -v '^BugId:[ ]*none$' > $1.rewrite
cvs.texi(,12911)     mv $1.rewrite $1
cvs.texi(,12912)     exit 0
cvs.texi(,12913) else
cvs.texi(,12914)     echo "No BugId found."
cvs.texi(,12915)     exit 1
cvs.texi(,12916) fi
cvs.texi(,12917) @end example
cvs.texi(,12918) 
cvs.texi(,12919) The @file{verifymsg} file contains this line:
cvs.texi(,12920) 
cvs.texi(,12921) @example
cvs.texi(,12922) ^tc     /usr/cvssupport/bugid.verify
cvs.texi(,12923) @end example
cvs.texi(,12924) 
cvs.texi(,12925) The @file{rcsinfo} file contains this line:
cvs.texi(,12926) 
cvs.texi(,12927) @example
cvs.texi(,12928) ^tc     /usr/cvssupport/tc.template
cvs.texi(,12929) @end example
cvs.texi(,12930) 
cvs.texi(,12931) The @file{config} file contains this line:
cvs.texi(,12932) 
cvs.texi(,12933) @example
cvs.texi(,12934) RereadLogAfterVerify=always
cvs.texi(,12935) @end example
cvs.texi(,12936) 
cvs.texi(,12937) 
cvs.texi(,12938) 
cvs.texi(,12939) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,12940) @node editinfo
cvs.texi(,12941) @appendixsubsec Editinfo
cvs.texi(,12942) @cindex editinfo (admin file)
cvs.texi(,12943) @cindex Editor, specifying per module
cvs.texi(,12944) @cindex Per-module editor
cvs.texi(,12945) @cindex Log messages, editing
cvs.texi(,12946) 
cvs.texi(,12947) @strong{Note: The @file{editinfo} feature has been
cvs.texi(,12948) rendered obsolete.  To set a default editor for log
cvs.texi(,12949) messages use the @code{CVSEDITOR}, @code{EDITOR} environment variables
cvs.texi(,12950) (@pxref{Environment variables}) or the @samp{-e} global
cvs.texi(,12951) option (@pxref{Global options}).  See @ref{verifymsg},
cvs.texi(,12952) for information on the use of the @file{verifymsg}
cvs.texi(,12953) feature for evaluating log messages.}
cvs.texi(,12954) 
cvs.texi(,12955) If you want to make sure that all log messages look the
cvs.texi(,12956) same way, you can use the @file{editinfo} file to
cvs.texi(,12957) specify a program that is used to edit the log message.
cvs.texi(,12958) This program could be a custom-made editor that always
cvs.texi(,12959) enforces a certain style of the log message, or maybe a
cvs.texi(,12960) simple shell script that calls an editor, and checks
cvs.texi(,12961) that the entered message contains the required fields.
cvs.texi(,12962) 
cvs.texi(,12963) If no matching line is found in the @file{editinfo}
cvs.texi(,12964) file, the editor specified in the environment variable
cvs.texi(,12965) @code{$CVSEDITOR} is used instead.  If that variable is
cvs.texi(,12966) not set, then the environment variable @code{$EDITOR}
cvs.texi(,12967) is used instead.  If that variable is not
cvs.texi(,12968) set a default will be used.  See @ref{Committing your changes}.
cvs.texi(,12969) 
cvs.texi(,12970) The @file{editinfo} file is often most useful together
cvs.texi(,12971) with the @file{rcsinfo} file, which can be used to
cvs.texi(,12972) specify a log message template.
cvs.texi(,12973) 
cvs.texi(,12974) Each line in the @file{editinfo} file consists of a
cvs.texi(,12975) regular expression and a command-line template.  The
cvs.texi(,12976) template must include a program name, and can include
cvs.texi(,12977) any number of arguments.  The full path to the current
cvs.texi(,12978) log message template file is appended to the template.
cvs.texi(,12979) 
cvs.texi(,12980) One thing that should be noted is that the @samp{ALL}
cvs.texi(,12981) keyword is not supported.  If more than one matching
cvs.texi(,12982) line is found, the first one is used.  This can be
cvs.texi(,12983) useful for specifying a default edit script in a
cvs.texi(,12984) module, and then overriding it in a subdirectory.
cvs.texi(,12985) 
cvs.texi(,12986) @cindex DEFAULT in editinfo
cvs.texi(,12987) If the repository name does not match any of the
cvs.texi(,12988) regular expressions in this file, the @samp{DEFAULT}
cvs.texi(,12989) line is used, if it is specified.
cvs.texi(,12990) 
cvs.texi(,12991) If the edit script exits with a non-zero exit status,
cvs.texi(,12992) the commit is aborted.
cvs.texi(,12993) 
cvs.texi(,12994) Note: when @sc{cvs} is accessing a remote repository,
cvs.texi(,12995) or when the @samp{-m} or @samp{-F} options to @code{cvs
cvs.texi(,12996) commit} are used, @file{editinfo} will not be consulted.
cvs.texi(,12997) There is no good workaround for this; use
cvs.texi(,12998) @file{verifymsg} instead.
cvs.texi(,12999) 
cvs.texi(,13000) @menu
cvs.texi(,13001) * editinfo example::            Editinfo example
cvs.texi(,13002) @end menu
cvs.texi(,13003) 
cvs.texi(,13004) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,13005) @node editinfo example
cvs.texi(,13006) @appendixsubsubsec Editinfo example
cvs.texi(,13007) 
cvs.texi(,13008) The following is a little silly example of a
cvs.texi(,13009) @file{editinfo} file, together with the corresponding
cvs.texi(,13010) @file{rcsinfo} file, the log message template and an
cvs.texi(,13011) editor script.  We begin with the log message template.
cvs.texi(,13012) We want to always record a bug-id number on the first
cvs.texi(,13013) line of the log message.  The rest of log message is
cvs.texi(,13014) free text.  The following template is found in the file
cvs.texi(,13015) @file{/usr/cvssupport/tc.template}.
cvs.texi(,13016) 
cvs.texi(,13017) @example
cvs.texi(,13018) BugId:
cvs.texi(,13019) @end example
cvs.texi(,13020) 
cvs.texi(,13021) The script @file{/usr/cvssupport/bugid.edit} is used to
cvs.texi(,13022) edit the log message.
cvs.texi(,13023) 
cvs.texi(,13024) @example
cvs.texi(,13025) #!/bin/sh
cvs.texi(,13026) #
cvs.texi(,13027) #       bugid.edit filename
cvs.texi(,13028) #
cvs.texi(,13029) #  Call $EDITOR on FILENAME, and verify that the
cvs.texi(,13030) #  resulting file contains a valid bugid on the first
cvs.texi(,13031) #  line.
cvs.texi(,13032) if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi
cvs.texi(,13033) if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
cvs.texi(,13034) $CVSEDITOR $1
cvs.texi(,13035) until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1
cvs.texi(,13036) do  echo -n  "No BugId found.  Edit again? ([y]/n)"
cvs.texi(,13037)     read ans
cvs.texi(,13038)     case $@{ans@} in
cvs.texi(,13039)         n*) exit 1;;
cvs.texi(,13040)     esac
cvs.texi(,13041)     $CVSEDITOR $1
cvs.texi(,13042) done
cvs.texi(,13043) @end example
cvs.texi(,13044) 
cvs.texi(,13045) The @file{editinfo} file contains this line:
cvs.texi(,13046) 
cvs.texi(,13047) @example
cvs.texi(,13048) ^tc     /usr/cvssupport/bugid.edit
cvs.texi(,13049) @end example
cvs.texi(,13050) 
cvs.texi(,13051) The @file{rcsinfo} file contains this line:
cvs.texi(,13052) 
cvs.texi(,13053) @example
cvs.texi(,13054) ^tc     /usr/cvssupport/tc.template
cvs.texi(,13055) @end example
cvs.texi(,13056) 
cvs.texi(,13057) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,13058) @node loginfo
cvs.texi(,13059) @appendixsubsec Loginfo
cvs.texi(,13060) @cindex loginfo (admin file)
cvs.texi(,13061) @cindex Storing log messages
cvs.texi(,13062) @cindex Mailing log messages
cvs.texi(,13063) @cindex Distributing log messages
cvs.texi(,13064) @cindex Log messages
cvs.texi(,13065) 
cvs.texi(,13066) @c "cvs commit" is not quite right.  What we
cvs.texi(,13067) @c mean is "when the repository gets changed" which
cvs.texi(,13068) @c also includes "cvs import" and "cvs add" on a directory.
cvs.texi(,13069) The @file{loginfo} file is used to control where
cvs.texi(,13070) @samp{cvs commit} log information is sent.  The first
cvs.texi(,13071) entry on a line is a regular expression which is tested
cvs.texi(,13072) against the directory that the change is being made to,
cvs.texi(,13073) relative to the @code{$CVSROOT}.  If a match is found, then
cvs.texi(,13074) the remainder of the line is a filter program that
cvs.texi(,13075) should expect log information on its standard input.
cvs.texi(,13076) 
cvs.texi(,13077) If the repository name does not match any of the
cvs.texi(,13078) regular expressions in this file, the @samp{DEFAULT}
cvs.texi(,13079) line is used, if it is specified.
cvs.texi(,13080) 
cvs.texi(,13081) All occurrences of the name @samp{ALL} appearing as a
cvs.texi(,13082) regular expression are used in addition to the first
cvs.texi(,13083) matching regular expression or @samp{DEFAULT}.
cvs.texi(,13084) 
cvs.texi(,13085) The first matching regular expression is used.
cvs.texi(,13086) 
cvs.texi(,13087) @xref{commit files}, for a description of the syntax of
cvs.texi(,13088) the @file{loginfo} file.
cvs.texi(,13089) 
cvs.texi(,13090) The user may specify a format string as
cvs.texi(,13091) part of the filter.  The string is composed of a
cvs.texi(,13092) @samp{%} followed by a space, or followed by a single
cvs.texi(,13093) format character, or followed by a set of format
cvs.texi(,13094) characters surrounded by @samp{@{} and @samp{@}} as
cvs.texi(,13095) separators.  The format characters are:
cvs.texi(,13096) 
cvs.texi(,13097) @table @t
cvs.texi(,13098) @item s
cvs.texi(,13099) file name
cvs.texi(,13100) @item V
cvs.texi(,13101) old version number (pre-checkin)
cvs.texi(,13102) @item v
cvs.texi(,13103) new version number (post-checkin)
cvs.texi(,13104) @end table
cvs.texi(,13105) 
cvs.texi(,13106) All other characters that appear in a format string
cvs.texi(,13107) expand to an empty field (commas separating fields are
cvs.texi(,13108) still provided).
cvs.texi(,13109) 
cvs.texi(,13110) For example, some valid format strings are @samp{%},
cvs.texi(,13111) @samp{%s}, @samp{%@{s@}}, and @samp{%@{sVv@}}.
cvs.texi(,13112) 
cvs.texi(,13113) The output will be a space separated string of tokens enclosed in
cvs.texi(,13114) quotation marks (@t{"}).
cvs.texi(,13115) Any embedded dollar signs (@t{$}), backticks (@t{`}),
cvs.texi(,13116) backslashes (@t{\}), or quotation marks will be preceded
cvs.texi(,13117) by a backslash (this allows the shell to correctly parse it
cvs.texi(,13118) as a single string, regardless of the characters it contains).
cvs.texi(,13119) For backwards compatibility, the first
cvs.texi(,13120) token will be the repository subdirectory.  The rest of the
cvs.texi(,13121) tokens will be comma-delimited lists of the information
cvs.texi(,13122) requested in the format string.  For example, if
cvs.texi(,13123) @samp{/u/src/master/yoyodyne/tc} is the repository, @samp{%@{sVv@}}
cvs.texi(,13124) is the format string, and three files (@t{ChangeLog},
cvs.texi(,13125) @t{Makefile}, @t{foo.c}) were modified, the output
cvs.texi(,13126) might be:
cvs.texi(,13127) 
cvs.texi(,13128) @example
cvs.texi(,13129) "yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13"
cvs.texi(,13130) @end example
cvs.texi(,13131) 
cvs.texi(,13132) As another example, @samp{%@{@}} means that only the
cvs.texi(,13133) name of the repository will be generated.
cvs.texi(,13134) 
cvs.texi(,13135) Note: when @sc{cvs} is accessing a remote repository,
cvs.texi(,13136) @file{loginfo} will be run on the @emph{remote}
cvs.texi(,13137) (i.e., server) side, not the client side (@pxref{Remote
cvs.texi(,13138) repositories}).
cvs.texi(,13139) 
cvs.texi(,13140) @menu
cvs.texi(,13141) * loginfo example::             Loginfo example
cvs.texi(,13142) * Keeping a checked out copy::  Updating a tree on every checkin
cvs.texi(,13143) @end menu
cvs.texi(,13144) 
cvs.texi(,13145) @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cvs.texi(,13146) @node loginfo example
cvs.texi(,13147) @appendixsubsubsec Loginfo example
cvs.texi(,13148) 
cvs.texi(,13149) The following @file{loginfo} file, together with the
cvs.texi(,13150) tiny shell-script below, appends all log messages
cvs.texi(,13151) to the file @file{$CVSROOT/CVSROOT/commitlog},
cvs.texi(,13152) and any commits to the administrative files (inside
cvs.texi(,13153) the @file{CVSROOT} directory) are also logged in
cvs.texi(,13154) @file{/usr/adm/cvsroot-log}.
cvs.texi(,13155) Commits to the @file{prog1} directory are mailed to @t{ceder}.
cvs.texi(,13156) 
cvs.texi(,13157) @c FIXME: is it a CVS feature or bug that only the
cvs.texi(,13158) @c first matching line is used?  It is documented
cvs.texi(,13159) @c above, but is it useful?  For example, if we wanted
cvs.texi(,13160) @c to run both "cvs-log" and "Mail" for the CVSROOT
cvs.texi(,13161) @c directory, it is kind of awkward if
cvs.texi(,13162) @c only the first matching line is used.
cvs.texi(,13163) @example
cvs.texi(,13164) ALL             /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
cvs.texi(,13165) ^CVSROOT        /usr/local/bin/cvs-log /usr/adm/cvsroot-log
cvs.texi(,13166) ^prog1          Mail -s %s ceder
cvs.texi(,13167) @end example
cvs.texi(,13168) 
cvs.texi(,13169) The shell-script @file{/usr/local/bin/cvs-log} looks
cvs.texi(,13170) like this:
cvs.texi(,13171) 
cvs.texi(,13172) @example
cvs.texi(,13173) #!/bin/sh
cvs.texi(,13174) (echo "------------------------------------------------------";
cvs.texi(,13175)  echo -n $2"  ";
cvs.texi(,13176)  date;
cvs.texi(,13177)  echo;
cvs.texi(,13178)  cat) >> $1
cvs.texi(,13179) @end example
cvs.texi(,13180) 
cvs.texi(,13181) @node Keeping a checked out copy
cvs.texi(,13182) @appendixsubsubsec Keeping a checked out copy
cvs.texi(,13183) 
cvs.texi(,13184) @c What other index entries?  It seems like
cvs.texi(,13185) @c people might want to use a lot of different
cvs.texi(,13186) @c words for this functionality.
cvs.texi(,13187) @cindex Keeping a checked out copy
cvs.texi(,13188) @cindex Checked out copy, keeping
cvs.texi(,13189) @cindex Web pages, maintaining with CVS
cvs.texi(,13190) 
cvs.texi(,13191) It is often useful to maintain a directory tree which
cvs.texi(,13192) contains files which correspond to the latest version
cvs.texi(,13193) in the repository.  For example, other developers might
cvs.texi(,13194) want to refer to the latest sources without having to
cvs.texi(,13195) check them out, or you might be maintaining a web site
cvs.texi(,13196) with @sc{cvs} and want every checkin to cause the files
cvs.texi(,13197) used by the web server to be updated.
cvs.texi(,13198) @c Can we offer more details on the web example?  Or
cvs.texi(,13199) @c point the user at how to figure it out?  This text
cvs.texi(,13200) @c strikes me as sufficient for someone who already has
cvs.texi(,13201) @c some idea of what we mean but not enough for the naive
cvs.texi(,13202) @c user/sysadmin to understand it and set it up.
cvs.texi(,13203) 
cvs.texi(,13204) The way to do this is by having loginfo invoke
cvs.texi(,13205) @code{cvs update}.  Doing so in the naive way will
cvs.texi(,13206) cause a problem with locks, so the @code{cvs update}
cvs.texi(,13207) must be run in the background.
cvs.texi(,13208) @c Should we try to describe the problem with locks?
cvs.texi(,13209) @c It seems like a digression for someone who just
cvs.texi(,13210) @c wants to know how to make it work.
cvs.texi(,13211) @c Another choice which might work for a single file
cvs.texi(,13212) @c is to use "cvs -n update -p" which doesn't take
cvs.texi(,13213) @c out locks (I think) but I don't see many advantages
cvs.texi(,13214) @c of that and we might as well document something which
cvs.texi(,13215) @c works for multiple files.
cvs.texi(,13216) Here is an example for unix (this should all be on one line):
cvs.texi(,13217) 
cvs.texi(,13218) @example
cvs.texi(,13219) ^cyclic-pages		(date; cat; (sleep 2; cd /u/www/local-docs;
cvs.texi(,13220)  cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1
cvs.texi(,13221) @end example
cvs.texi(,13222) 
cvs.texi(,13223) This will cause checkins to repository directories
cvs.texi(,13224) starting with @code{cyclic-pages} to update the checked
cvs.texi(,13225) out tree in @file{/u/www/local-docs}.
cvs.texi(,13226) @c More info on some of the details?  The "sleep 2" is
cvs.texi(,13227) @c so if we are lucky the lock will be gone by the time
cvs.texi(,13228) @c we start and we can wait 2 seconds instead of 30.
cvs.texi(,13229) 
cvs.texi(,13230) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,13231) @node rcsinfo
cvs.texi(,13232) @appendixsec Rcsinfo
cvs.texi(,13233) @cindex rcsinfo (admin file)
cvs.texi(,13234) @cindex Form for log message
cvs.texi(,13235) @cindex Log message template
cvs.texi(,13236) @cindex Template for log message
cvs.texi(,13237) 
cvs.texi(,13238) The @file{rcsinfo} file can be used to specify a form to
cvs.texi(,13239) edit when filling out the commit log.  The
cvs.texi(,13240) @file{rcsinfo} file has a syntax similar to the
cvs.texi(,13241) @file{verifymsg}, @file{commitinfo} and @file{loginfo}
cvs.texi(,13242) files.  @xref{syntax}.  Unlike the other files the second
cvs.texi(,13243) part is @emph{not} a command-line template.  Instead,
cvs.texi(,13244) the part after the regular expression should be a full pathname to
cvs.texi(,13245) a file containing the log message template.
cvs.texi(,13246) 
cvs.texi(,13247) If the repository name does not match any of the
cvs.texi(,13248) regular expressions in this file, the @samp{DEFAULT}
cvs.texi(,13249) line is used, if it is specified.
cvs.texi(,13250) 
cvs.texi(,13251) All occurrences of the name @samp{ALL} appearing as a
cvs.texi(,13252) regular expression are used in addition to the first
cvs.texi(,13253) matching regular expression or @samp{DEFAULT}.
cvs.texi(,13254) 
cvs.texi(,13255) @c FIXME: should be offering advice, somewhere around
cvs.texi(,13256) @c here, about where to put the template file.  The
cvs.texi(,13257) @c verifymsg example uses /usr/cvssupport but doesn't
cvs.texi(,13258) @c say anything about what that directory is for or
cvs.texi(,13259) @c whether it is hardwired into CVS or who creates
cvs.texi(,13260) @c it or anything.  In particular we should say
cvs.texi(,13261) @c how to version control the template file.  A
cvs.texi(,13262) @c probably better answer than the /usr/cvssupport
cvs.texi(,13263) @c stuff is to use checkoutlist (with xref to the
cvs.texi(,13264) @c checkoutlist doc).
cvs.texi(,13265) @c Also I am starting to see a connection between
cvs.texi(,13266) @c this and the Keeping a checked out copy node.
cvs.texi(,13267) @c Probably want to say something about that.
cvs.texi(,13268) The log message template will be used as a default log
cvs.texi(,13269) message.  If you specify a log message with @samp{cvs
cvs.texi(,13270) commit -m @var{message}} or @samp{cvs commit -f
cvs.texi(,13271) @var{file}} that log message will override the
cvs.texi(,13272) template.
cvs.texi(,13273) 
cvs.texi(,13274) @xref{verifymsg}, for an example @file{rcsinfo}
cvs.texi(,13275) file.
cvs.texi(,13276) 
cvs.texi(,13277) When @sc{cvs} is accessing a remote repository,
cvs.texi(,13278) the contents of @file{rcsinfo} at the time a directory
cvs.texi(,13279) is first checked out will specify a template. This
cvs.texi(,13280) template will be updated on all @samp{cvs update}
cvs.texi(,13281) commands. It will also be added to new directories
cvs.texi(,13282) added with a @samp{cvs add new-directry} command.
cvs.texi(,13283) In versions of @sc{cvs} prior to version 1.12, the
cvs.texi(,13284) @file{CVS/Template} file was not updated. If the
cvs.texi(,13285) @sc{cvs} server is at version 1.12 or higher an older
cvs.texi(,13286) client may be used and the @file{CVS/Template} will
cvs.texi(,13287) be updated from the server.
cvs.texi(,13288) 
cvs.texi(,13289) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,13290) @node cvsignore
cvs.texi(,13291) @appendixsec Ignoring files via cvsignore
cvs.texi(,13292) @cindex cvsignore (admin file), global
cvs.texi(,13293) @cindex Global cvsignore
cvs.texi(,13294) @cindex Ignoring files
cvs.texi(,13295) @c -- This chapter should maybe be moved to the
cvs.texi(,13296) @c tutorial part of the manual?
cvs.texi(,13297) 
cvs.texi(,13298) There are certain file names that frequently occur
cvs.texi(,13299) inside your working copy, but that you don't want to
cvs.texi(,13300) put under @sc{cvs} control.  Examples are all the object
cvs.texi(,13301) files that you get while you compile your sources.
cvs.texi(,13302) Normally, when you run @samp{cvs update}, it prints a
cvs.texi(,13303) line for each file it encounters that it doesn't know
cvs.texi(,13304) about (@pxref{update output}).
cvs.texi(,13305) 
cvs.texi(,13306) @sc{cvs} has a list of files (or sh(1) file name patterns)
cvs.texi(,13307) that it should ignore while running @code{update},
cvs.texi(,13308) @code{import} and @code{release}.
cvs.texi(,13309) @c -- Are those the only three commands affected?
cvs.texi(,13310) This list is constructed in the following way.
cvs.texi(,13311) 
cvs.texi(,13312) @itemize @bullet
cvs.texi(,13313) @item
cvs.texi(,13314) The list is initialized to include certain file name
cvs.texi(,13315) patterns: names associated with @sc{cvs}
cvs.texi(,13316) administration, or with other common source control
cvs.texi(,13317) systems; common names for patch files, object files,
cvs.texi(,13318) archive files, and editor backup files; and other names
cvs.texi(,13319) that are usually artifacts of assorted utilities.
cvs.texi(,13320) Currently, the default list of ignored file name
cvs.texi(,13321) patterns is:
cvs.texi(,13322) 
cvs.texi(,13323) @cindex Ignored files
cvs.texi(,13324) @cindex Automatically ignored files
cvs.texi(,13325) @example
cvs.texi(,13326)     RCS     SCCS    CVS     CVS.adm
cvs.texi(,13327)     RCSLOG  cvslog.*
cvs.texi(,13328)     tags    TAGS
cvs.texi(,13329)     .make.state     .nse_depinfo
cvs.texi(,13330)     *~      #*      .#*     ,*      _$*     *$
cvs.texi(,13331)     *.old   *.bak   *.BAK   *.orig  *.rej   .del-*
cvs.texi(,13332)     *.a     *.olb   *.o     *.obj   *.so    *.exe
cvs.texi(,13333)     *.Z     *.elc   *.ln
cvs.texi(,13334)     core
cvs.texi(,13335) @end example
cvs.texi(,13336) 
cvs.texi(,13337) @item
cvs.texi(,13338) The per-repository list in
cvs.texi(,13339) @file{$CVSROOT/CVSROOT/cvsignore} is appended to
cvs.texi(,13340) the list, if that file exists.
cvs.texi(,13341) 
cvs.texi(,13342) @item
cvs.texi(,13343) The per-user list in @file{.cvsignore} in your home
cvs.texi(,13344) directory is appended to the list, if it exists.
cvs.texi(,13345) 
cvs.texi(,13346) @item
cvs.texi(,13347) Any entries in the environment variable
cvs.texi(,13348) @code{$CVSIGNORE} is appended to the list.
cvs.texi(,13349) 
cvs.texi(,13350) @item
cvs.texi(,13351) Any @samp{-I} options given to @sc{cvs} is appended.
cvs.texi(,13352) 
cvs.texi(,13353) @item
cvs.texi(,13354) As @sc{cvs} traverses through your directories, the contents
cvs.texi(,13355) of any @file{.cvsignore} will be appended to the list.
cvs.texi(,13356) The patterns found in @file{.cvsignore} are only valid
cvs.texi(,13357) for the directory that contains them, not for
cvs.texi(,13358) any sub-directories.
cvs.texi(,13359) @end itemize
cvs.texi(,13360) 
cvs.texi(,13361) In any of the 5 places listed above, a single
cvs.texi(,13362) exclamation mark (@samp{!}) clears the ignore list.
cvs.texi(,13363) This can be used if you want to store any file which
cvs.texi(,13364) normally is ignored by @sc{cvs}.
cvs.texi(,13365) 
cvs.texi(,13366) Specifying @samp{-I !} to @code{cvs import} will import
cvs.texi(,13367) everything, which is generally what you want to do if
cvs.texi(,13368) you are importing files from a pristine distribution or
cvs.texi(,13369) any other source which is known to not contain any
cvs.texi(,13370) extraneous files.  However, looking at the rules above
cvs.texi(,13371) you will see there is a fly in the ointment; if the
cvs.texi(,13372) distribution contains any @file{.cvsignore} files, then
cvs.texi(,13373) the patterns from those files will be processed even if
cvs.texi(,13374) @samp{-I !} is specified.  The only workaround is to
cvs.texi(,13375) remove the @file{.cvsignore} files in order to do the
cvs.texi(,13376) import.  Because this is awkward, in the future
cvs.texi(,13377) @samp{-I !} might be modified to override
cvs.texi(,13378) @file{.cvsignore} files in each directory.
cvs.texi(,13379) 
cvs.texi(,13380) Note that the syntax of the ignore files consists of a
cvs.texi(,13381) series of lines, each of which contains a space
cvs.texi(,13382) separated list of filenames.  This offers no clean way
cvs.texi(,13383) to specify filenames which contain spaces, but you can
cvs.texi(,13384) use a workaround like @file{foo?bar} to match a file
cvs.texi(,13385) named @file{foo bar} (it also matches @file{fooxbar}
cvs.texi(,13386) and the like).  Also note that there is currently no
cvs.texi(,13387) way to specify comments.
cvs.texi(,13388) @c FIXCVS?  I don't _like_ this syntax at all, but
cvs.texi(,13389) @c changing it raises all the usual compatibility
cvs.texi(,13390) @c issues and I'm also not sure what to change it to.
cvs.texi(,13391) 
cvs.texi(,13392) @node checkoutlist
cvs.texi(,13393) @appendixsec The checkoutlist file
cvs.texi(,13394) @cindex checkoutlist
cvs.texi(,13395) 
cvs.texi(,13396) It may be helpful to use @sc{cvs} to maintain your own
cvs.texi(,13397) files in the @file{CVSROOT} directory.  For example,
cvs.texi(,13398) suppose that you have a script @file{logcommit.pl}
cvs.texi(,13399) which you run by including the following line in the
cvs.texi(,13400) @file{commitinfo} administrative file:
cvs.texi(,13401) 
cvs.texi(,13402) @example
cvs.texi(,13403) ALL   $CVSROOT/CVSROOT/logcommit.pl
cvs.texi(,13404) @end example
cvs.texi(,13405) 
cvs.texi(,13406) To maintain @file{logcommit.pl} with @sc{cvs} you would
cvs.texi(,13407) add the following line to the @file{checkoutlist}
cvs.texi(,13408) administrative file:
cvs.texi(,13409) 
cvs.texi(,13410) @example
cvs.texi(,13411) logcommit.pl
cvs.texi(,13412) @end example
cvs.texi(,13413) 
cvs.texi(,13414) The format of @file{checkoutlist} is one line for each
cvs.texi(,13415) file that you want to maintain using @sc{cvs}, giving
cvs.texi(,13416) the name of the file.
cvs.texi(,13417) 
cvs.texi(,13418) After setting up @file{checkoutlist} in this fashion,
cvs.texi(,13419) the files listed there will function just like
cvs.texi(,13420) @sc{cvs}'s built-in administrative files.  For example,
cvs.texi(,13421) when checking in one of the files you should get a
cvs.texi(,13422) message such as:
cvs.texi(,13423) 
cvs.texi(,13424) @example
cvs.texi(,13425) cvs commit: Rebuilding administrative file database
cvs.texi(,13426) @end example
cvs.texi(,13427) 
cvs.texi(,13428) @noindent
cvs.texi(,13429) and the checked out copy in the @file{CVSROOT}
cvs.texi(,13430) directory should be updated.
cvs.texi(,13431) 
cvs.texi(,13432) Note that listing @file{passwd} (@pxref{Password
cvs.texi(,13433) authentication server}) in @file{checkoutlist} is not
cvs.texi(,13434) recommended for security reasons.
cvs.texi(,13435) 
cvs.texi(,13436) For information about keeping a checkout out copy in a
cvs.texi(,13437) more general context than the one provided by
cvs.texi(,13438) @file{checkoutlist}, see @ref{Keeping a checked out
cvs.texi(,13439) copy}.
cvs.texi(,13440) 
cvs.texi(,13441) @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cvs.texi(,13442) @node history file
cvs.texi(,13443) @appendixsec The history file
cvs.texi(,13444) @cindex History file
cvs.texi(,13445) @cindex Log information, saving
cvs.texi(,13446) 
cvs.texi(,13447) The file @file{$CVSROOT/CVSROOT/history} is used
cvs.texi(,13448) to log information for the @code{history} command
cvs.texi(,13449) (@pxref{history}).  This file must be created to turn
cvs.texi(,13450) on logging.  This is done automatically if the
cvs.texi(,13451) @code{cvs init} command is used to set up the
cvs.texi(,13452) repository (@pxref{Creating a repository}).
cvs.texi(,13453) 
cvs.texi(,13454) The file format of the @file{history} file is
cvs.texi(,13455) documented only in comments in the @sc{cvs} source
cvs.texi(,13456) code, but generally programs should use the @code{cvs
cvs.texi(,13457) history} command to access it anyway, in case the
cvs.texi(,13458) format changes with future releases of @sc{cvs}.
cvs.texi(,13459) 
cvs.texi(,13460) @node Variables
cvs.texi(,13461) @appendixsec Expansions in administrative files
cvs.texi(,13462) @cindex Internal variables
cvs.texi(,13463) @cindex Variables
cvs.texi(,13464) 
cvs.texi(,13465) Sometimes in writing an administrative file, you might
cvs.texi(,13466) want the file to be able to know various things based
cvs.texi(,13467) on environment @sc{cvs} is running in.  There are
cvs.texi(,13468) several mechanisms to do that.
cvs.texi(,13469) 
cvs.texi(,13470) To find the home directory of the user running @sc{cvs}
cvs.texi(,13471) (from the @code{HOME} environment variable), use
cvs.texi(,13472) @samp{~} followed by @samp{/} or the end of the line.
cvs.texi(,13473) Likewise for the home directory of @var{user}, use
cvs.texi(,13474) @samp{~@var{user}}.  These variables are expanded on
cvs.texi(,13475) the server machine, and don't get any reasonable
cvs.texi(,13476) expansion if pserver (@pxref{Password authenticated})
cvs.texi(,13477) is in use; therefore user variables (see below) may be
cvs.texi(,13478) a better choice to customize behavior based on the user
cvs.texi(,13479) running @sc{cvs}.
cvs.texi(,13480) @c Based on these limitations, should we deprecate ~?
cvs.texi(,13481) @c What is it good for?  Are people using it?
cvs.texi(,13482) 
cvs.texi(,13483) One may want to know about various pieces of
cvs.texi(,13484) information internal to @sc{cvs}.  A @sc{cvs} internal
cvs.texi(,13485) variable has the syntax @code{$@{@var{variable}@}},
cvs.texi(,13486) where @var{variable} starts with a letter and consists
cvs.texi(,13487) of alphanumeric characters and @samp{_}.  If the
cvs.texi(,13488) character following @var{variable} is a
cvs.texi(,13489) non-alphanumeric character other than @samp{_}, the
cvs.texi(,13490) @samp{@{} and @samp{@}} can be omitted.  The @sc{cvs}
cvs.texi(,13491) internal variables are:
cvs.texi(,13492) 
cvs.texi(,13493) @table @code
cvs.texi(,13494) @item CVSROOT
cvs.texi(,13495) @cindex CVSROOT, internal variable
cvs.texi(,13496) This is the absolute path to the current @sc{cvs} root directory.
cvs.texi(,13497) @xref{Repository}, for a description of the various
cvs.texi(,13498) ways to specify this, but note that the internal
cvs.texi(,13499) variable contains just the directory and not any
cvs.texi(,13500) of the access method information.
cvs.texi(,13501) 
cvs.texi(,13502) @item RCSBIN
cvs.texi(,13503) @cindex RCSBIN, internal variable
cvs.texi(,13504) In @sc{cvs} 1.9.18 and older, this specified the
cvs.texi(,13505) directory where @sc{cvs} was looking for @sc{rcs}
cvs.texi(,13506) programs.  Because @sc{cvs} no longer runs @sc{rcs}
cvs.texi(,13507) programs, specifying this internal variable is now an
cvs.texi(,13508) error.
cvs.texi(,13509) 
cvs.texi(,13510) @item CVSEDITOR
cvs.texi(,13511) @cindex CVSEDITOR, internal variable
cvs.texi(,13512) @itemx EDITOR
cvs.texi(,13513) @cindex EDITOR, internal variable
cvs.texi(,13514) @itemx VISUAL
cvs.texi(,13515) @cindex VISUAL, internal variable
cvs.texi(,13516) These all expand to the same value, which is the editor
cvs.texi(,13517) that @sc{cvs} is using.  @xref{Global options}, for how
cvs.texi(,13518) to specify this.
cvs.texi(,13519) 
cvs.texi(,13520) @item USER
cvs.texi(,13521) @cindex USER, internal variable
cvs.texi(,13522) Username of the user running @sc{cvs} (on the @sc{cvs}
cvs.texi(,13523) server machine).
cvs.texi(,13524) When using pserver, this is the user specified in the repository
cvs.texi(,13525) specification which need not be the same as the username the
cvs.texi(,13526) server is running as (@pxref{Password authentication server}).
cvs.texi(,13527) Do not confuse this with the environment variable of the same name.
cvs.texi(,13528) @end table
cvs.texi(,13529) 
cvs.texi(,13530) If you want to pass a value to the administrative files
cvs.texi(,13531) which the user who is running @sc{cvs} can specify,
cvs.texi(,13532) use a user variable.
cvs.texi(,13533) @cindex User variables
cvs.texi(,13534) To expand a user variable, the
cvs.texi(,13535) administrative file contains
cvs.texi(,13536) @code{$@{=@var{variable}@}}.  To set a user variable,
cvs.texi(,13537) specify the global option @samp{-s} to @sc{cvs}, with
cvs.texi(,13538) argument @code{@var{variable}=@var{value}}.  It may be
cvs.texi(,13539) particularly useful to specify this option via
cvs.texi(,13540) @file{.cvsrc} (@pxref{~/.cvsrc}).
cvs.texi(,13541) 
cvs.texi(,13542) For example, if you want the administrative file to
cvs.texi(,13543) refer to a test directory you might create a user
cvs.texi(,13544) variable @code{TESTDIR}.  Then if @sc{cvs} is invoked
cvs.texi(,13545) as
cvs.texi(,13546) 
cvs.texi(,13547) @example
cvs.texi(,13548) cvs -s TESTDIR=/work/local/tests
cvs.texi(,13549) @end example
cvs.texi(,13550) 
cvs.texi(,13551) @noindent
cvs.texi(,13552) and the
cvs.texi(,13553) administrative file contains @code{sh
cvs.texi(,13554) $@{=TESTDIR@}/runtests}, then that string is expanded
cvs.texi(,13555) to @code{sh /work/local/tests/runtests}.
cvs.texi(,13556) 
cvs.texi(,13557) All other strings containing @samp{$} are reserved;
cvs.texi(,13558) there is no way to quote a @samp{$} character so that
cvs.texi(,13559) @samp{$} represents itself.
cvs.texi(,13560) 
cvs.texi(,13561) Environment variables passed to administrative files are:
cvs.texi(,13562) 
cvs.texi(,13563) @table @code
cvs.texi(,13564) @cindex environment variables, passed to administrative files
cvs.texi(,13565) 
cvs.texi(,13566) @item CVS_USER
cvs.texi(,13567) @cindex CVS_USER, environment variable
cvs.texi(,13568) The @sc{cvs}-specific username provided by the user, if it
cvs.texi(,13569) can be provided (currently just for the pserver access
cvs.texi(,13570) method), and to the empty string otherwise.  (@code{CVS_USER}
cvs.texi(,13571) and @code{USER} may differ when @file{$CVSROOT/CVSROOT/passwd}
cvs.texi(,13572) is used to map @sc{cvs} usernames to system usernames.)
cvs.texi(,13573) 
cvs.texi(,13574) @item LOGNAME
cvs.texi(,13575) @cindex LOGNAME, environment variable
cvs.texi(,13576) The username of the system user.
cvs.texi(,13577) 
cvs.texi(,13578) @item USER
cvs.texi(,13579) @cindex USER, environment variable
cvs.texi(,13580) Same as @code{LOGNAME}.
cvs.texi(,13581) Do not confuse this with the internal variable of the same name.
cvs.texi(,13582) @end table
cvs.texi(,13583) 
cvs.texi(,13584) @node config
cvs.texi(,13585) @appendixsec The CVSROOT/config configuration file
cvs.texi(,13586) 
cvs.texi(,13587) @cindex config, in CVSROOT
cvs.texi(,13588) @cindex CVSROOT/config
cvs.texi(,13589) 
cvs.texi(,13590) The administrative file @file{config} contains various
cvs.texi(,13591) miscellaneous settings which affect the behavior of
cvs.texi(,13592) @sc{cvs}.  The syntax is slightly different from the
cvs.texi(,13593) other administrative files.  Variables are not
cvs.texi(,13594) expanded.  Lines which start with @samp{#} are
cvs.texi(,13595) considered comments.
cvs.texi(,13596) @c FIXME: where do we define comments for the other
cvs.texi(,13597) @c administrative files.
cvs.texi(,13598) Other lines consist of a keyword, @samp{=}, and a
cvs.texi(,13599) value.  Note that this syntax is very strict.
cvs.texi(,13600) Extraneous spaces or tabs are not permitted.
cvs.texi(,13601) @c See comments in parseinfo.c:parse_config for more
cvs.texi(,13602) @c discussion of this strictness.
cvs.texi(,13603) 
cvs.texi(,13604) Currently defined keywords are:
cvs.texi(,13605) 
cvs.texi(,13606) @table @code
cvs.texi(,13607) @cindex RCSBIN, in CVSROOT/config
cvs.texi(,13608) @item RCSBIN=@var{bindir}
cvs.texi(,13609) For @sc{cvs} 1.9.12 through 1.9.18, this setting told
cvs.texi(,13610) @sc{cvs} to look for @sc{rcs} programs in the
cvs.texi(,13611) @var{bindir} directory.  Current versions of @sc{cvs}
cvs.texi(,13612) do not run @sc{rcs} programs; for compatibility this
cvs.texi(,13613) setting is accepted, but it does nothing.
cvs.texi(,13614) 
cvs.texi(,13615) @cindex SystemAuth, in CVSROOT/config
cvs.texi(,13616) @item SystemAuth=@var{value}
cvs.texi(,13617) If @var{value} is @samp{yes}, then pserver should check
cvs.texi(,13618) for users in the system's user database if not found in
cvs.texi(,13619) @file{CVSROOT/passwd}.  If it is @samp{no}, then all
cvs.texi(,13620) pserver users must exist in @file{CVSROOT/passwd}.
cvs.texi(,13621) The default is @samp{yes}.  For more on pserver, see
cvs.texi(,13622) @ref{Password authenticated}.
cvs.texi(,13623) 
cvs.texi(,13633) 
cvs.texi(,13634) @cindex TopLevelAdmin, in CVSROOT/config
cvs.texi(,13635) @item TopLevelAdmin=@var{value}
cvs.texi(,13636) Modify the @samp{checkout} command to create a
cvs.texi(,13637) @samp{CVS} directory at the top level of the new
cvs.texi(,13638) working directory, in addition to @samp{CVS}
cvs.texi(,13639) directories created within checked-out directories.
cvs.texi(,13640) The default value is @samp{no}.
cvs.texi(,13641) 
cvs.texi(,13642) This option is useful if you find yourself performing
cvs.texi(,13643) many commands at the top level of your working
cvs.texi(,13644) directory, rather than in one of the checked out
cvs.texi(,13645) subdirectories.  The @file{CVS} directory created there
cvs.texi(,13646) will mean you don't have to specify @code{CVSROOT} for
cvs.texi(,13647) each command.  It also provides a place for the
cvs.texi(,13648) @file{CVS/Template} file (@pxref{Working directory
cvs.texi(,13649) storage}).
cvs.texi(,13650) 
cvs.texi(,13651) @cindex LockDir, in CVSROOT/config
cvs.texi(,13652) @item LockDir=@var{directory}
cvs.texi(,13653) Put @sc{cvs} lock files in @var{directory} rather than
cvs.texi(,13654) directly in the repository.  This is useful if you want
cvs.texi(,13655) to let users read from the repository while giving them
cvs.texi(,13656) write access only to @var{directory}, not to the
cvs.texi(,13657) repository.
cvs.texi(,13658) It can also be used to put the locks on a very fast
cvs.texi(,13659) in-memory file system to speed up locking and unlocking
cvs.texi(,13660) the repository.
cvs.texi(,13661) You need to create @var{directory}, but
cvs.texi(,13662) @sc{cvs} will create subdirectories of @var{directory} as it
cvs.texi(,13663) needs them.  For information on @sc{cvs} locks, see
cvs.texi(,13664) @ref{Concurrency}.
cvs.texi(,13665) 
cvs.texi(,13666) @c Mention this in Compatibility section?
cvs.texi(,13667) Before enabling the LockDir option, make sure that you
cvs.texi(,13668) have tracked down and removed any copies of @sc{cvs} 1.9 or
cvs.texi(,13669) older.  Such versions neither support LockDir, nor will
cvs.texi(,13670) give an error indicating that they don't support it.
cvs.texi(,13671) The result, if this is allowed to happen, is that some
cvs.texi(,13672) @sc{cvs} users will put the locks one place, and others will
cvs.texi(,13673) put them another place, and therefore the repository
cvs.texi(,13674) could become corrupted.  @sc{cvs} 1.10 does not support
cvs.texi(,13675) LockDir but it will print a warning if run on a
cvs.texi(,13676) repository with LockDir enabled.
cvs.texi(,13677) 
cvs.texi(,13678) @cindex LogHistory, in CVSROOT/config
cvs.texi(,13679) @item LogHistory=@var{value}
cvs.texi(,13680) Control what is logged to the @file{CVSROOT/history} file (@pxref{history}).
cvs.texi(,13681) Default of @samp{TOEFWUCGMAR} (or simply @samp{all}) will log
cvs.texi(,13682) all transactions.  Any subset of the default is
cvs.texi(,13683) legal.  (For example, to only log transactions that modify the
cvs.texi(,13684) @file{*,v} files, use @samp{LogHistory=TMAR}.)
cvs.texi(,13685) 
cvs.texi(,13686) @cindex RereadLogAfterVerify, in CVSROOT/config
cvs.texi(,13687) @cindex @file{verifymsg}, changing the log message
cvs.texi(,13688) @item RereadLogAfterVerify=@var{value}
cvs.texi(,13689) Modify the @samp{commit} command such that CVS will reread the
cvs.texi(,13690) log message after running the program specified by @file{verifymsg}.
cvs.texi(,13691) @var{value} may be one of @samp{yes} or @samp{always}, indicating that
cvs.texi(,13692) the log message should always be reread; @samp{no}
cvs.texi(,13693) or @samp{never}, indicating that it should never be
cvs.texi(,13694) reread; or @var{value} may be @samp{stat}, indicating
cvs.texi(,13695) that the file should be checked with the filesystem
cvs.texi(,13696) @samp{stat()} function to see if it has changed (see warning below)
cvs.texi(,13697) before rereading.  The default value is @samp{always}.
cvs.texi(,13698) 
cvs.texi(,13699) @strong{Note: the `stat' mode can cause CVS to pause for up to
cvs.texi(,13700) one extra second per directory committed.  This can be less IO and
cvs.texi(,13701) CPU intensive but is not recommended for use with large repositories}
cvs.texi(,13702) 
cvs.texi(,13703) @xref{verifymsg}, for more information on how verifymsg
cvs.texi(,13704) may be used.
cvs.texi(,13705) 
cvs.texi(,13706) @cindex UserAdminOptions, in CVSROOT/config
cvs.texi(,13707) @item UserAdminOptions=@var{value}
cvs.texi(,13708) Control what options will be allowed with the @code{cvs admin}
cvs.texi(,13709) command (@pxref{admin}) for users not in the @code{cvsadmin} group.
cvs.texi(,13710) The @var{value} string is a list of single character options
cvs.texi(,13711) which should be allowed.  If a user who is not a member of the
cvs.texi(,13712) @code{cvsadmin} group tries to execute any @code{cvs admin}
cvs.texi(,13713) option which is not listed they will will receive an error message
cvs.texi(,13714) reporting that the option is restricted.
cvs.texi(,13715) 
cvs.texi(,13716) If no @code{cvsadmin} group exists on the server, @sc{cvs} will
cvs.texi(,13717) ignore the @code{UserAdminOptions} keyword (@pxref{admin}).
cvs.texi(,13718) 
cvs.texi(,13719) When not specified, @code{UserAdminOptions} defaults to
cvs.texi(,13720) @samp{k}.  In other words, it defaults to allowing
cvs.texi(,13721) users outside of the @code{cvsadmin} group to use the
cvs.texi(,13722) @code{cvs admin} command only to change the default keyword
cvs.texi(,13723) expansion mode for files.
cvs.texi(,13724) 
cvs.texi(,13725) As an example, to restrict users not in the @code{cvsadmin}
cvs.texi(,13726) group to using @code{cvs admin} to change the default keyword
cvs.texi(,13727) substitution mode, lock revisions, unlock revisions, and
cvs.texi(,13728) replace the log message, use @samp{UserAdminOptions=klum}.
cvs.texi(,13729) @end table
cvs.texi(,13730) 
cvs.texi(,13731) @c ---------------------------------------------------------------------
cvs.texi(,13732) @node Environment variables
cvs.texi(,13733) @appendix All environment variables which affect CVS
cvs.texi(,13734) @cindex Environment variables
cvs.texi(,13735) @cindex Reference manual for variables
cvs.texi(,13736) 
cvs.texi(,13737) This is a complete list of all environment variables
cvs.texi(,13738) that affect @sc{cvs}.
cvs.texi(,13739) 
cvs.texi(,13740) @table @code
cvs.texi(,13741) @cindex CVSIGNORE, environment variable
cvs.texi(,13742) @item $CVSIGNORE
cvs.texi(,13743) A whitespace-separated list of file name patterns that
cvs.texi(,13744) @sc{cvs} should ignore. @xref{cvsignore}.
cvs.texi(,13745) 
cvs.texi(,13746) @cindex CVSWRAPPERS, environment variable
cvs.texi(,13747) @item $CVSWRAPPERS
cvs.texi(,13748) A whitespace-separated list of file name patterns that
cvs.texi(,13749) @sc{cvs} should treat as wrappers. @xref{Wrappers}.
cvs.texi(,13750) 
cvs.texi(,13751) @cindex CVSREAD, environment variable
cvs.texi(,13752) @cindex Read-only files, and CVSREAD
cvs.texi(,13753) @item $CVSREAD
cvs.texi(,13754) If this is set, @code{checkout} and @code{update} will
cvs.texi(,13755) try hard to make the files in your working directory
cvs.texi(,13756) read-only.  When this is not set, the default behavior
cvs.texi(,13757) is to permit modification of your working files.
cvs.texi(,13758) 
cvs.texi(,13759) @cindex CVSREADONLYFS, environment variable
cvs.texi(,13760) @item $CVSREADONLYFS
cvs.texi(,13761) Turns on read-only repository mode. This allows one to
cvs.texi(,13762) check out from a read-only repository, such as within
cvs.texi(,13763) an anoncvs server, or from a CDROM repository.
cvs.texi(,13764) 
cvs.texi(,13765) It has the same effect as if the @samp{-R} command-line
cvs.texi(,13766) option is used. This can also allow the use of
cvs.texi(,13767) read-only NFS repositories.
cvs.texi(,13768) 
cvs.texi(,13769) @item $CVSUMASK
cvs.texi(,13770) Controls permissions of files in the repository.  See
cvs.texi(,13771) @ref{File permissions}.
cvs.texi(,13772) 
cvs.texi(,13773) @item $CVSROOT
cvs.texi(,13774) Should contain the full pathname to the root of the @sc{cvs}
cvs.texi(,13775) source repository (where the @sc{rcs} files are
cvs.texi(,13776) kept).  This information must be available to @sc{cvs} for
cvs.texi(,13777) most commands to execute; if @code{$CVSROOT} is not set,
cvs.texi(,13778) or if you wish to override it for one invocation, you
cvs.texi(,13779) can supply it on the command line: @samp{cvs -d cvsroot
cvs.texi(,13780) cvs_command@dots{}} Once you have checked out a working
cvs.texi(,13781) directory, @sc{cvs} stores the appropriate root (in
cvs.texi(,13782) the file @file{CVS/Root}), so normally you only need to
cvs.texi(,13783) worry about this when initially checking out a working
cvs.texi(,13784) directory.
cvs.texi(,13785) 
cvs.texi(,13786) @item $CVSEDITOR
cvs.texi(,13787) @cindex CVSEDITOR, environment variable
cvs.texi(,13788) @itemx $EDITOR
cvs.texi(,13789) @cindex EDITOR, environment variable
cvs.texi(,13790) @itemx $VISUAL
cvs.texi(,13791) @cindex VISUAL, environment variable
cvs.texi(,13792) Specifies the program to use for recording log messages
cvs.texi(,13793) during commit.  @code{$CVSEDITOR} overrides
cvs.texi(,13794) @code{$EDITOR}, which overrides @code{$VISUAL}.
cvs.texi(,13795) See @ref{Committing your changes} for more or
cvs.texi(,13796) @ref{Global options} for alternative ways of specifying a
cvs.texi(,13797) log editor.
cvs.texi(,13798) 
cvs.texi(,13799) @cindex PATH, environment variable
cvs.texi(,13800) @item $PATH
cvs.texi(,13801) If @code{$RCSBIN} is not set, and no path is compiled
cvs.texi(,13802) into @sc{cvs}, it will use @code{$PATH} to try to find all
cvs.texi(,13803) programs it uses.
cvs.texi(,13804) 
cvs.texi(,13805) @cindex HOME, environment variable
cvs.texi(,13806) @item $HOME
cvs.texi(,13807) @cindex HOMEPATH, environment variable
cvs.texi(,13808) @item $HOMEPATH
cvs.texi(,13809) @cindex HOMEDRIVE, environment variable
cvs.texi(,13810) @item $HOMEDRIVE
cvs.texi(,13811) Used to locate the directory where the @file{.cvsrc}
cvs.texi(,13812) file, and other such files, are searched.  On Unix, @sc{cvs}
cvs.texi(,13813) just checks for @code{HOME}.  On Windows NT, the system will
cvs.texi(,13814) set @code{HOMEDRIVE}, for example to @samp{d:} and @code{HOMEPATH},
cvs.texi(,13815) for example to @file{\joe}.  On Windows 95, you'll
cvs.texi(,13816) probably need to set @code{HOMEDRIVE} and @code{HOMEPATH} yourself.
cvs.texi(,13817) @c We are being vague about whether HOME works on
cvs.texi(,13818) @c Windows; see long comment in windows-NT/filesubr.c.
cvs.texi(,13819) 
cvs.texi(,13820) @cindex CVS_RSH, environment variable
cvs.texi(,13821) @item $CVS_RSH
cvs.texi(,13822) Specifies the external program which @sc{cvs} connects with,
cvs.texi(,13823) when @code{:ext:} access method is specified.
cvs.texi(,13824) @pxref{Connecting via rsh}.
cvs.texi(,13825) 
cvs.texi(,13826) @item $CVS_SERVER
cvs.texi(,13827) Used in client-server mode when accessing a remote
cvs.texi(,13828) repository using @sc{rsh}.  It specifies the name of
cvs.texi(,13829) the program to start on the server side (and any
cvs.texi(,13830) necessary arguments) when accessing a remote repository
cvs.texi(,13831) using the @code{:ext:}, @code{:fork:}, or @code{:server:} access methods.
cvs.texi(,13832) The default value for @code{:ext:} and @code{:server:} is @code{cvs};
cvs.texi(,13833) the default value for @code{:fork:} is the name used to run the client.
cvs.texi(,13834) @pxref{Connecting via rsh}
cvs.texi(,13835) 
cvs.texi(,13836) @item $CVS_PASSFILE
cvs.texi(,13837) Used in client-server mode when accessing the @code{cvs
cvs.texi(,13838) login server}.  Default value is @file{$HOME/.cvspass}.
cvs.texi(,13839) @pxref{Password authentication client}
cvs.texi(,13840) 
cvs.texi(,13841) @item $CVS_CLIENT_PORT
cvs.texi(,13842) Used in client-server mode to set the port to use when accessing the server
cvs.texi(,13843) via Kerberos, GSSAPI, or @sc{cvs}'s password authentication protocol
cvs.texi(,13844) if the port is not specified in the CVSROOT.
cvs.texi(,13845) @pxref{Remote repositories}
cvs.texi(,13846) 
cvs.texi(,13847) @cindex CVS_RCMD_PORT, environment variable
cvs.texi(,13848) @item $CVS_RCMD_PORT
cvs.texi(,13849) Used in client-server mode.  If set, specifies the port
cvs.texi(,13850) number to be used when accessing the @sc{rcmd} demon on
cvs.texi(,13851) the server side. (Currently not used for Unix clients).
cvs.texi(,13852) 
cvs.texi(,13853) @cindex CVS_CLIENT_LOG, environment variable
cvs.texi(,13854) @item $CVS_CLIENT_LOG
cvs.texi(,13855) Used for debugging only in client-server
cvs.texi(,13856) mode.  If set, everything sent to the server is logged
cvs.texi(,13857) into @file{@code{$CVS_CLIENT_LOG}.in} and everything
cvs.texi(,13858) sent from the server is logged into
cvs.texi(,13859) @file{@code{$CVS_CLIENT_LOG}.out}.
cvs.texi(,13860) 
cvs.texi(,13861) @cindex CVS_SERVER_SLEEP, environment variable
cvs.texi(,13862) @item $CVS_SERVER_SLEEP
cvs.texi(,13863) Used only for debugging the server side in
cvs.texi(,13864) client-server mode.  If set, delays the start of the
cvs.texi(,13865) server child process the specified amount of
cvs.texi(,13866) seconds so that you can attach to it with a debugger.
cvs.texi(,13867) 
cvs.texi(,13868) @cindex CVS_IGNORE_REMOTE_ROOT, environment variable
cvs.texi(,13869) @item $CVS_IGNORE_REMOTE_ROOT
cvs.texi(,13870) For @sc{cvs} 1.10 and older, setting this variable
cvs.texi(,13871) prevents @sc{cvs} from overwriting the @file{CVS/Root}
cvs.texi(,13872) file when the @samp{-d} global option is specified.
cvs.texi(,13873) Later versions of @sc{cvs} do not rewrite
cvs.texi(,13874) @file{CVS/Root}, so @code{CVS_IGNORE_REMOTE_ROOT} has no
cvs.texi(,13875) effect.
cvs.texi(,13876) 
cvs.texi(,13877) @cindex CVS_LOCAL_BRANCH_NUM, environment variable
cvs.texi(,13878) @item $CVS_LOCAL_BRANCH_NUM
cvs.texi(,13879) Setting this variable allows some control over the
cvs.texi(,13880) branch number that is assigned. This is specifically to
cvs.texi(,13881) support the local commit feature of CVSup. If one sets
cvs.texi(,13882) @code{CVS_LOCAL_BRANCH_NUM} to (say) 1000 then branches
cvs.texi(,13883) the local repository, the revision numbers will look
cvs.texi(,13884) like 1.66.1000.xx. There is almost a dead-set certainty
cvs.texi(,13885) that there will be no conflicts with version numbers.
cvs.texi(,13886) 
cvs.texi(,13887) @cindex COMSPEC, environment variable
cvs.texi(,13888) @item $COMSPEC
cvs.texi(,13889) Used under OS/2 only.  It specifies the name of the
cvs.texi(,13890) command interpreter and defaults to @sc{cmd.exe}.
cvs.texi(,13891) 
cvs.texi(,13892) @cindex TMPDIR, environment variable
cvs.texi(,13893) @item $TMPDIR
cvs.texi(,13894) @cindex TMP, environment variable
cvs.texi(,13895) @itemx $TMP
cvs.texi(,13896) @cindex TEMP, environment variable
cvs.texi(,13897) @itemx $TEMP
cvs.texi(,13898) @cindex Temporary files, location of
cvs.texi(,13899) @c This is quite nuts.  We don't talk about tempnam
cvs.texi(,13900) @c or mkstemp which we sometimes use.  The discussion
cvs.texi(,13901) @c of "Global options" is semi-incoherent.
cvs.texi(,13902) @c I'm not even sure those are the only inaccuracies.
cvs.texi(,13903) @c Furthermore, the conventions are
cvs.texi(,13904) @c pretty crazy and they should be simplified.
cvs.texi(,13905) Directory in which temporary files are located.
cvs.texi(,13906) The @sc{cvs} server uses
cvs.texi(,13907) @code{TMPDIR}.  @xref{Global options}, for a
cvs.texi(,13908) description of how to specify this.
cvs.texi(,13909) Some parts of @sc{cvs} will always use @file{/tmp} (via
cvs.texi(,13910) the @code{tmpnam} function provided by the system).
cvs.texi(,13911) 
cvs.texi(,13912) On Windows NT, @code{TMP} is used (via the @code{_tempnam}
cvs.texi(,13913) function provided by the system).
cvs.texi(,13914) 
cvs.texi(,13915) The @code{patch} program which is used by the @sc{cvs}
cvs.texi(,13916) client uses @code{TMPDIR}, and if it is not set, uses
cvs.texi(,13917) @file{/tmp} (at least with GNU patch 2.1).  Note that
cvs.texi(,13918) if your server and client are both running @sc{cvs}
cvs.texi(,13919) 1.9.10 or later, @sc{cvs} will not invoke an external
cvs.texi(,13920) @code{patch} program.
cvs.texi(,13921) 
cvs.texi(,13922) @cindex CVS_PID, environment variable
cvs.texi(,13923) @item $CVS_PID
cvs.texi(,13924) This is the process identification (aka pid) number of
cvs.texi(,13925) the @sc{cvs} process. It is often useful in the
cvs.texi(,13926) programs and/or scripts specified by the
cvs.texi(,13927) @file{commitinfo}, @file{verifymsg}, @file{loginfo}
cvs.texi(,13928) files.
cvs.texi(,13929) @end table
cvs.texi(,13930) 
cvs.texi(,13931) @node Compatibility
cvs.texi(,13932) @appendix Compatibility between CVS Versions
cvs.texi(,13933) 
cvs.texi(,13934) @cindex CVS, versions of
cvs.texi(,13935) @cindex Versions, of CVS
cvs.texi(,13936) @cindex Compatibility, between CVS versions
cvs.texi(,13937) @c We don't mention versions older than CVS 1.3
cvs.texi(,13938) @c on the theory that it would clutter it up for the vast
cvs.texi(,13939) @c majority of people, who don't have anything that old.
cvs.texi(,13940) @c
cvs.texi(,13941) The repository format is compatible going back to
cvs.texi(,13942) @sc{cvs} 1.3.  But see @ref{Watches Compatibility}, if
cvs.texi(,13943) you have copies of @sc{cvs} 1.6 or older and you want
cvs.texi(,13944) to use the optional developer communication features.
cvs.texi(,13945) @c If you "cvs rm" and commit using 1.3, then you'll
cvs.texi(,13946) @c want to run "rcs -sdead <file,v>" on each of the
cvs.texi(,13947) @c files in the Attic if you then want 1.5 and
cvs.texi(,13948) @c later to recognize those files as dead (I think the
cvs.texi(,13949) @c symptom if this is not done is that files reappear
cvs.texi(,13950) @c in joins).  (Wait: the above will work but really to
cvs.texi(,13951) @c be strictly correct we should suggest checking
cvs.texi(,13952) @c in a new revision rather than just changing the
cvs.texi(,13953) @c state of the head revision, shouldn't we?).
cvs.texi(,13954) @c The old convert.sh script was for this, but it never
cvs.texi(,13955) @c did get updated to reflect use of the RCS "dead"
cvs.texi(,13956) @c state.
cvs.texi(,13957) @c Note: this is tricky to document without confusing
cvs.texi(,13958) @c people--need to carefully say what CVS version we
cvs.texi(,13959) @c are talking about and keep in mind the distinction
cvs.texi(,13960) @c between a
cvs.texi(,13961) @c repository created with 1.3 and on which one now
cvs.texi(,13962) @c uses 1.5+, and a repository on which one wants to
cvs.texi(,13963) @c use both versions side by side (e.g. during a
cvs.texi(,13964) @c transition period).
cvs.texi(,13965) @c Wait, can't CVS just detect the case in which a file
cvs.texi(,13966) @c is in the Attic but the head revision is not dead?
cvs.texi(,13967) @c Not sure whether this should produce a warning or
cvs.texi(,13968) @c something, and probably needs further thought, but
cvs.texi(,13969) @c it would appear that the situation can be detected.
cvs.texi(,13970) @c
cvs.texi(,13971) @c We might want to separate out the 1.3 compatibility
cvs.texi(,13972) @c section (for repository & working directory) from the
cvs.texi(,13973) @c rest--that might help avoid confusing people who
cvs.texi(,13974) @c are upgrading (for example) from 1.6 to 1.8.
cvs.texi(,13975) @c
cvs.texi(,13976) @c A minor incompatibility is if a current version of CVS
cvs.texi(,13977) @c puts "Nfoo" into CVS/Tag, then CVS 1.9 or older will
cvs.texi(,13978) @c see this as if there is no tag.  Seems to me this is
cvs.texi(,13979) @c too obscure to mention.
cvs.texi(,13980) 
cvs.texi(,13981) The working directory format is compatible going back
cvs.texi(,13982) to @sc{cvs} 1.5.  It did change between @sc{cvs} 1.3
cvs.texi(,13983) and @sc{cvs} 1.5.  If you run @sc{cvs} 1.5 or newer on
cvs.texi(,13984) a working directory checked out with @sc{cvs} 1.3,
cvs.texi(,13985) @sc{cvs} will convert it, but to go back to @sc{cvs}
cvs.texi(,13986) 1.3 you need to check out a new working directory with
cvs.texi(,13987) @sc{cvs} 1.3.
cvs.texi(,13988) 
cvs.texi(,13989) The remote protocol is interoperable going back to @sc{cvs} 1.5, but no
cvs.texi(,13990) further (1.5 was the first official release with the remote protocol,
cvs.texi(,13991) but some older versions might still be floating around).  In many
cvs.texi(,13992) cases you need to upgrade both the client and the server to take
cvs.texi(,13993) advantage of new features and bugfixes, however.
cvs.texi(,13994) 
cvs.texi(,13995) @c Perhaps should be saying something here about the
cvs.texi(,13996) @c "D" lines in Entries (written by CVS 1.9; 1.8 and
cvs.texi(,13997) @c older don't use them).  These are supposed to be
cvs.texi(,13998) @c compatible in both directions, but I'm not sure
cvs.texi(,13999) @c they quite are 100%.  One common gripe is if you
cvs.texi(,14000) @c "rm -r" a directory and 1.9 gets confused, as it
cvs.texi(,14001) @c still sees it in Entries.  That one is fixed in
cvs.texi(,14002) @c (say) 1.9.6.  Someone else reported problems with
cvs.texi(,14003) @c starting with a directory which was checked out with
cvs.texi(,14004) @c an old version, and then using a new version, and
cvs.texi(,14005) @c some "D" lines appeared, but not for every
cvs.texi(,14006) @c directory, causing some directories to be skipped.
cvs.texi(,14007) @c They weren't sure how to reproduce this, though.
cvs.texi(,14008) 
cvs.texi(,14009) @c ---------------------------------------------------------------------
cvs.texi(,14010) @node Troubleshooting
cvs.texi(,14011) @appendix Troubleshooting
cvs.texi(,14012) 
cvs.texi(,14013) If you are having trouble with @sc{cvs}, this appendix
cvs.texi(,14014) may help.  If there is a particular error message which
cvs.texi(,14015) you are seeing, then you can look up the message
cvs.texi(,14016) alphabetically.  If not, you can look through the
cvs.texi(,14017) section on other problems to see if your problem is
cvs.texi(,14018) mentioned there.
cvs.texi(,14019) 
cvs.texi(,14020) @menu
cvs.texi(,14021) * Error messages::              Partial list of CVS errors
cvs.texi(,14022) * Connection::                  Trouble making a connection to a CVS server
cvs.texi(,14023) * Other problems::              Problems not readily listed by error message
cvs.texi(,14024) @end menu
cvs.texi(,14025) 
cvs.texi(,14033) 
cvs.texi(,14034) @node Error messages
cvs.texi(,14035) @appendixsec Partial list of error messages
cvs.texi(,14036) 
cvs.texi(,14037) Here is a partial list of error messages that you may
cvs.texi(,14038) see from @sc{cvs}.  It is not a complete list---@sc{cvs}
cvs.texi(,14039) is capable of printing many, many error messages, often
cvs.texi(,14040) with parts of them supplied by the operating system,
cvs.texi(,14041) but the intention is to list the common and/or
cvs.texi(,14042) potentially confusing error messages.
cvs.texi(,14043) 
cvs.texi(,14044) The messages are alphabetical, but introductory text
cvs.texi(,14045) such as @samp{cvs update: } is not considered in
cvs.texi(,14046) ordering them.
cvs.texi(,14047) 
cvs.texi(,14048) In some cases the list includes messages printed by old
cvs.texi(,14049) versions of @sc{cvs} (partly because users may not be
cvs.texi(,14050) sure which version of @sc{cvs} they are using at any
cvs.texi(,14051) particular moment).
cvs.texi(,14052) @c If we want to start retiring messages, perhaps we
cvs.texi(,14053) @c should pick a cutoff version (for example, no more
cvs.texi(,14054) @c messages which are specific to versions before 1.9)
cvs.texi(,14055) @c and then move the old messages to an "old messages"
cvs.texi(,14056) @c node rather than deleting them completely.
cvs.texi(,14057) 
cvs.texi(,14058) @table @code
cvs.texi(,14059) @c FIXME: What is the correct way to format a multiline
cvs.texi(,14060) @c error message here?  Maybe @table is the wrong
cvs.texi(,14061) @c choice?  Texinfo gurus?
cvs.texi(,14062) @item @var{file}:@var{line}: Assertion '@var{text}' failed
cvs.texi(,14063) The exact format of this message may vary depending on
cvs.texi(,14064) your system.  It indicates a bug in @sc{cvs}, which can
cvs.texi(,14065) be handled as described in @ref{BUGS}.
cvs.texi(,14066) 
cvs.texi(,14067) @item cvs @var{command}: authorization failed: server @var{host} rejected access
cvs.texi(,14068) This is a generic response when trying to connect to a
cvs.texi(,14069) pserver server which chooses not to provide a
cvs.texi(,14070) specific reason for denying authorization.  Check that
cvs.texi(,14071) the username and password specified are correct and
cvs.texi(,14072) that the @code{CVSROOT} specified is allowed by @samp{--allow-root}
cvs.texi(,14073) in @file{inetd.conf}.  See @ref{Password authenticated}.
cvs.texi(,14074) 
cvs.texi(,14075) @item cvs @var{command}: conflict: removed @var{file} was modified by second party
cvs.texi(,14076) This message indicates that you removed a file, and
cvs.texi(,14077) someone else modified it.  To resolve the conflict,
cvs.texi(,14078) first run @samp{cvs add @var{file}}.  If desired, look
cvs.texi(,14079) at the other party's modification to decide whether you
cvs.texi(,14080) still want to remove it.  If you don't want to remove
cvs.texi(,14081) it, stop here.  If you do want to remove it, proceed
cvs.texi(,14082) with @samp{cvs remove @var{file}} and commit your
cvs.texi(,14083) removal.
cvs.texi(,14084) @c Tests conflicts2-142b* in sanity.sh test for this.
cvs.texi(,14085) 
cvs.texi(,14086) @item cannot change permissions on temporary directory
cvs.texi(,14087) @example
cvs.texi(,14088) Operation not permitted
cvs.texi(,14089) @end example
cvs.texi(,14090) This message has been happening in a non-reproducible,
cvs.texi(,14091) occasional way when we run the client/server testsuite,
cvs.texi(,14092) both on Red Hat Linux 3.0.3 and 4.1.  We haven't been
cvs.texi(,14093) able to figure out what causes it, nor is it known
cvs.texi(,14094) whether it is specific to linux (or even to this
cvs.texi(,14095) particular machine!).  If the problem does occur on
cvs.texi(,14096) other unices, @samp{Operation not permitted} would be
cvs.texi(,14097) likely to read @samp{Not owner} or whatever the system
cvs.texi(,14098) in question uses for the unix @code{EPERM} error.  If
cvs.texi(,14099) you have any information to add, please let us know as
cvs.texi(,14100) described in @ref{BUGS}.  If you experience this error
cvs.texi(,14101) while using @sc{cvs}, retrying the operation which
cvs.texi(,14102) produced it should work fine.
cvs.texi(,14103) @c This has been seen in a variety of tests, including
cvs.texi(,14104) @c multibranch-2, multibranch-5, and basic1-24-rm-rm,
cvs.texi(,14105) @c so it doesn't seem particularly specific to any one
cvs.texi(,14106) @c test.
cvs.texi(,14107) 
cvs.texi(,14108) @item cvs [server aborted]: Cannot check out files into the repository itself
cvs.texi(,14109) The obvious cause for this message (especially for
cvs.texi(,14110) non-client/server @sc{cvs}) is that the @sc{cvs} root
cvs.texi(,14111) is, for example, @file{/usr/local/cvsroot} and you try
cvs.texi(,14112) to check out files when you are in a subdirectory, such
cvs.texi(,14113) as @file{/usr/local/cvsroot/test}.  However, there is a
cvs.texi(,14114) more subtle cause, which is that the temporary
cvs.texi(,14115) directory on the server is set to a subdirectory of the
cvs.texi(,14116) root (which is also not allowed).  If this is the
cvs.texi(,14117) problem, set the temporary directory to somewhere else,
cvs.texi(,14118) for example @file{/var/tmp}; see @code{TMPDIR} in
cvs.texi(,14119) @ref{Environment variables}, for how to set the
cvs.texi(,14120) temporary directory.
cvs.texi(,14121) 
cvs.texi(,14122) @item cannot commit files as 'root'
cvs.texi(,14123) See @samp{'root' is not allowed to commit files}.
cvs.texi(,14124) 
cvs.texi(,14125) @c For one example see basica-1a10 in the testsuite
cvs.texi(,14126) @c For another example, "cvs co ." on NT; see comment
cvs.texi(,14127) @c at windows-NT/filesubr.c (expand_wild).
cvs.texi(,14128) @c For another example, "cvs co foo/bar" where foo exists.
cvs.texi(,14129) @item cannot open CVS/Entries for reading: No such file or directory
cvs.texi(,14130) This generally indicates a @sc{cvs} internal error, and
cvs.texi(,14131) can be handled as with other @sc{cvs} bugs
cvs.texi(,14132) (@pxref{BUGS}).  Usually there is a workaround---the
cvs.texi(,14133) exact nature of which would depend on the situation but
cvs.texi(,14134) which hopefully could be figured out.
cvs.texi(,14135) 
cvs.texi(,14136) @c This is more obscure than it might sound; it only
cvs.texi(,14137) @c happens if you run "cvs init" from a directory which
cvs.texi(,14138) @c contains a CVS/Root file at the start.
cvs.texi(,14139) @item cvs [init aborted]: cannot open CVS/Root: No such file or directory
cvs.texi(,14140) This message is harmless.  Provided it is not
cvs.texi(,14141) accompanied by other errors, the operation has
cvs.texi(,14142) completed successfully.  This message should not occur
cvs.texi(,14143) with current versions of @sc{cvs}, but it is documented
cvs.texi(,14144) here for the benefit of @sc{cvs} 1.9 and older.
cvs.texi(,14145) 
cvs.texi(,14146) @item cvs server: cannot open /root/.cvsignore: Permission denied
cvs.texi(,14147) @itemx cvs [server aborted]: can't chdir(/root): Permission denied
cvs.texi(,14148) See @ref{Connection}.
cvs.texi(,14149) 
cvs.texi(,14150) @item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument
cvs.texi(,14151) This message has been reported as intermittently
cvs.texi(,14152) happening with @sc{cvs} 1.9 on Solaris 2.5.  The cause is
cvs.texi(,14153) unknown; if you know more about what causes it, let us
cvs.texi(,14154) know as described in @ref{BUGS}.
cvs.texi(,14155) 
cvs.texi(,14156) @item cvs [@var{command} aborted]: cannot start server via rcmd
cvs.texi(,14157) This, unfortunately, is a rather nonspecific error
cvs.texi(,14158) message which @sc{cvs} 1.9 will print if you are
cvs.texi(,14159) running the @sc{cvs} client and it is having trouble
cvs.texi(,14160) connecting to the server.  Current versions of @sc{cvs}
cvs.texi(,14161) should print a much more specific error message.  If
cvs.texi(,14162) you get this message when you didn't mean to run the
cvs.texi(,14163) client at all, you probably forgot to specify
cvs.texi(,14164) @code{:local:}, as described in @ref{Repository}.
cvs.texi(,14165) 
cvs.texi(,14166) @item ci: @var{file},v: bad diff output line: Binary files - and /tmp/T2a22651 differ
cvs.texi(,14167) @sc{cvs} 1.9 and older will print this message
cvs.texi(,14168) when trying to check in a binary file if
cvs.texi(,14169) @sc{rcs} is not correctly installed.  Re-read the
cvs.texi(,14170) instructions that came with your @sc{rcs} distribution
cvs.texi(,14171) and the @sc{install} file in the @sc{cvs}
cvs.texi(,14172) distribution.  Alternately, upgrade to a current
cvs.texi(,14173) version of @sc{cvs}, which checks in files itself
cvs.texi(,14174) rather than via @sc{rcs}.
cvs.texi(,14175) 
cvs.texi(,14176) @item cvs checkout: could not check out @var{file}
cvs.texi(,14177) With @sc{cvs} 1.9, this can mean that the @code{co} program
cvs.texi(,14178) (part of @sc{rcs}) returned a failure.  It should be
cvs.texi(,14179) preceded by another error message, however it has been
cvs.texi(,14180) observed without another error message and the cause is
cvs.texi(,14181) not well-understood.  With the current version of @sc{cvs},
cvs.texi(,14182) which does not run @code{co}, if this message occurs
cvs.texi(,14183) without another error message, it is definitely a @sc{cvs}
cvs.texi(,14184) bug (@pxref{BUGS}).
cvs.texi(,14185) @c My current suspicion is that the RCS in the rcs (not
cvs.texi(,14186) @c cvs/winnt/rcs57nt.zip) directory on the _Practical_
cvs.texi(,14187) @c CD is bad (remains to be confirmed).
cvs.texi(,14188) @c There is also a report of something which looks
cvs.texi(,14189) @c very similar on SGI, Irix 5.2, so I dunno.
cvs.texi(,14190) 
cvs.texi(,14191) @item cvs [login aborted]: could not find out home directory
cvs.texi(,14192) This means that you need to set the environment
cvs.texi(,14193) variables that @sc{cvs} uses to locate your home directory.
cvs.texi(,14194) See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in
cvs.texi(,14195) @ref{Environment variables}.
cvs.texi(,14196) 
cvs.texi(,14197) @item cvs update: could not merge revision @var{rev} of @var{file}: No such file or directory
cvs.texi(,14198) @sc{cvs} 1.9 and older will print this message if there was
cvs.texi(,14199) a problem finding the @code{rcsmerge} program.  Make
cvs.texi(,14200) sure that it is in your @code{PATH}, or upgrade to a
cvs.texi(,14201) current version of @sc{cvs}, which does not require
cvs.texi(,14202) an external @code{rcsmerge} program.
cvs.texi(,14203) 
cvs.texi(,14204) @item cvs [update aborted]: could not patch @var{file}: No such file or directory
cvs.texi(,14205) This means that there was a problem finding the
cvs.texi(,14206) @code{patch} program.  Make sure that it is in your
cvs.texi(,14207) @code{PATH}.  Note that despite appearances the message
cvs.texi(,14208) is @emph{not} referring to whether it can find @var{file}.
cvs.texi(,14209) If both the client and the server are running a current
cvs.texi(,14210) version of @sc{cvs}, then there is no need for an
cvs.texi(,14211) external patch program and you should not see this
cvs.texi(,14212) message.  But if either client or server is running
cvs.texi(,14213) @sc{cvs} 1.9, then you need @code{patch}.
cvs.texi(,14214) 
cvs.texi(,14215) @item cvs update: could not patch @var{file}; will refetch
cvs.texi(,14216) This means that for whatever reason the client was
cvs.texi(,14217) unable to apply a patch that the server sent.  The
cvs.texi(,14218) message is nothing to be concerned about, because
cvs.texi(,14219) inability to apply the patch only slows things down and
cvs.texi(,14220) has no effect on what @sc{cvs} does.
cvs.texi(,14221) @c xref to update output.  Or File status?
cvs.texi(,14222) @c Or some place else that
cvs.texi(,14223) @c explains this whole "patch"/P/Needs Patch thing?
cvs.texi(,14224) 
cvs.texi(,14225) @item dying gasps from @var{server} unexpected
cvs.texi(,14226) There is a known bug in the server for @sc{cvs} 1.9.18
cvs.texi(,14227) and older which can cause this.  For me, this was
cvs.texi(,14228) reproducible if I used the @samp{-t} global option.  It
cvs.texi(,14229) was fixed by Andy Piper's 14 Nov 1997 change to
cvs.texi(,14230) src/filesubr.c, if anyone is curious.
cvs.texi(,14231) If you see the message,
cvs.texi(,14232) you probably can just retry the operation which failed,
cvs.texi(,14233) or if you have discovered information concerning its
cvs.texi(,14234) cause, please let us know as described in @ref{BUGS}.
cvs.texi(,14235) 
cvs.texi(,14236) @item end of file from server (consult above messages if any)
cvs.texi(,14237) The most common cause for this message is if you are
cvs.texi(,14238) using an external @code{rsh} program and it exited with
cvs.texi(,14239) an error.  In this case the @code{rsh} program should
cvs.texi(,14240) have printed a message, which will appear before the
cvs.texi(,14241) above message.  For more information on setting up a
cvs.texi(,14242) @sc{cvs} client and server, see @ref{Remote repositories}.
cvs.texi(,14243) 
cvs.texi(,14244) @item cvs [update aborted]: EOF in key in RCS file @var{file},v
cvs.texi(,14245) @itemx cvs [checkout aborted]: EOF while looking for end of string in RCS file @var{file},v
cvs.texi(,14246) This means that there is a syntax error in the given
cvs.texi(,14247) @sc{rcs} file.  Note that this might be true even if @sc{rcs} can
cvs.texi(,14248) read the file OK; @sc{cvs} does more error checking of
cvs.texi(,14249) errors in the RCS file.  That is why you may see this
cvs.texi(,14250) message when upgrading from @sc{cvs} 1.9 to @sc{cvs}
cvs.texi(,14251) 1.10.  The likely cause for the original corruption is
cvs.texi(,14252) hardware, the operating system, or the like.  Of
cvs.texi(,14253) course, if you find a case in which @sc{cvs} seems to
cvs.texi(,14254) corrupting the file, by all means report it,
cvs.texi(,14255) (@pxref{BUGS}).
cvs.texi(,14256) There are quite a few variations of this error message,
cvs.texi(,14257) depending on exactly where in the @sc{rcs} file @sc{cvs}
cvs.texi(,14258) finds the syntax error.
cvs.texi(,14259) 
cvs.texi(,14260) @cindex mkmodules
cvs.texi(,14261) @item cvs commit: Executing 'mkmodules'
cvs.texi(,14262) This means that your repository is set up for a version
cvs.texi(,14263) of @sc{cvs} prior to @sc{cvs} 1.8.  When using @sc{cvs}
cvs.texi(,14264) 1.8 or later, the above message will be preceded by
cvs.texi(,14265) 
cvs.texi(,14266) @example
cvs.texi(,14267) cvs commit: Rebuilding administrative file database
cvs.texi(,14268) @end example
cvs.texi(,14269) 
cvs.texi(,14270) If you see both messages, the database is being rebuilt
cvs.texi(,14271) twice, which is unnecessary but harmless.  If you wish
cvs.texi(,14272) to avoid the duplication, and you have no versions of
cvs.texi(,14273) @sc{cvs} 1.7 or earlier in use, remove @code{-i mkmodules}
cvs.texi(,14274) every place it appears in your @code{modules}
cvs.texi(,14275) file.  For more information on the @code{modules} file,
cvs.texi(,14276) see @ref{modules}.
cvs.texi(,14277) 
cvs.texi(,14278) @c This message comes from "co", and I believe is
cvs.texi(,14279) @c possible only with older versions of CVS which call
cvs.texi(,14280) @c co.  The problem with being able to create the bogus
cvs.texi(,14281) @c RCS file still exists, though (and I think maybe
cvs.texi(,14282) @c there is a different symptom(s) now).
cvs.texi(,14283) @c FIXME: Would be nice to have a more exact wording
cvs.texi(,14284) @c for this message.
cvs.texi(,14285) @item missing author
cvs.texi(,14286) Typically this can happen if you created an RCS file
cvs.texi(,14287) with your username set to empty.  @sc{cvs} will, bogusly,
cvs.texi(,14288) create an illegal RCS file with no value for the author
cvs.texi(,14289) field.  The solution is to make sure your username is
cvs.texi(,14290) set to a non-empty value and re-create the RCS file.
cvs.texi(,14291) @c "make sure your username is set" is complicated in
cvs.texi(,14292) @c and of itself, as there are the environment
cvs.texi(,14293) @c variables the system login name, &c, and it depends
cvs.texi(,14294) @c on the version of CVS.
cvs.texi(,14295) 
cvs.texi(,14296) @item cvs [checkout aborted]: no such tag @var{tag}
cvs.texi(,14297) This message means that @sc{cvs} isn't familiar with
cvs.texi(,14298) the tag @var{tag}.  Usually this means that you have
cvs.texi(,14299) mistyped a tag name; however there are (relatively
cvs.texi(,14300) obscure) cases in which @sc{cvs} will require you to
cvs.texi(,14301) @c Search sanity.sh for "no such tag" to see some of
cvs.texi(,14302) @c the relatively obscure cases.
cvs.texi(,14303) try a few other @sc{cvs} commands involving that tag,
cvs.texi(,14304) before you find one which will cause @sc{cvs} to update
cvs.texi(,14305) the @file{val-tags} file; see discussion of val-tags in
cvs.texi(,14306) @ref{File permissions}.  You only need to worry about
cvs.texi(,14307) this once for a given tag; when a tag is listed in
cvs.texi(,14308) @file{val-tags}, it stays there.  Note that using
cvs.texi(,14309) @samp{-f} to not require tag matches does not override
cvs.texi(,14310) this check; see @ref{Common options}.
cvs.texi(,14311) 
cvs.texi(,14312) @item *PANIC* administration files missing
cvs.texi(,14313) This typically means that there is a directory named
cvs.texi(,14314) @sc{cvs} but it does not contain the administrative files
cvs.texi(,14315) which @sc{cvs} puts in a CVS directory.  If the problem is
cvs.texi(,14316) that you created a CVS directory via some mechanism
cvs.texi(,14317) other than @sc{cvs}, then the answer is simple, use a name
cvs.texi(,14318) other than @sc{cvs}.  If not, it indicates a @sc{cvs} bug
cvs.texi(,14319) (@pxref{BUGS}).
cvs.texi(,14320) 
cvs.texi(,14321) @item rcs error: Unknown option: -x,v/
cvs.texi(,14322) This message will be followed by a usage message for
cvs.texi(,14323) @sc{rcs}.  It means that you have an old version of
cvs.texi(,14324) @sc{rcs} (probably supplied with your operating
cvs.texi(,14325) system), as well as an old version of @sc{cvs}.
cvs.texi(,14326) @sc{cvs} 1.9.18 and earlier only work with @sc{rcs} version 5 and
cvs.texi(,14327) later; current versions of @sc{cvs} do not run @sc{rcs} programs.
cvs.texi(,14328) @c For more information on installing @sc{cvs}, see
cvs.texi(,14329) @c (FIXME: where?  it depends on whether you are
cvs.texi(,14330) @c getting binaries or sources or what).
cvs.texi(,14331) @c The message can also say "ci error" or something
cvs.texi(,14332) @c instead of "rcs error", I suspect.
cvs.texi(,14333) 
cvs.texi(,14334) @item cvs [server aborted]: received broken pipe signal
cvs.texi(,14335) This message seems to be caused by a hard-to-track-down
cvs.texi(,14336) bug in @sc{cvs} or the systems it runs on (we don't
cvs.texi(,14337) know---we haven't tracked it down yet!).  It seems to
cvs.texi(,14338) happen only after a @sc{cvs} command has completed, and
cvs.texi(,14339) you should be able to just ignore the message.
cvs.texi(,14340) However, if you have discovered information concerning its
cvs.texi(,14341) cause, please let us know as described in @ref{BUGS}.
cvs.texi(,14342) 
cvs.texi(,14343) @item 'root' is not allowed to commit files
cvs.texi(,14344) When committing a permanent change, @sc{cvs} makes a log entry of
cvs.texi(,14345) who committed the change.  If you are committing the change logged
cvs.texi(,14346) in as "root" (not under "su" or other root-priv giving program),
cvs.texi(,14347) @sc{cvs} cannot determine who is actually making the change.
cvs.texi(,14348) As such, by default, @sc{cvs} disallows changes to be committed by users
cvs.texi(,14349) logged in as "root".  (You can disable this option by passing the
cvs.texi(,14350) @code{--enable-rootcommit} option to @file{configure} and recompiling @sc{cvs}.
cvs.texi(,14351) On some systems this means editing the appropriate @file{config.h} file
cvs.texi(,14352) before building @sc{cvs}.)
cvs.texi(,14353) 
cvs.texi(,14354) @item Too many arguments!
cvs.texi(,14355) This message is typically printed by the @file{log.pl}
cvs.texi(,14356) script which is in the @file{contrib} directory in the
cvs.texi(,14357) @sc{cvs} source distribution.  In some versions of
cvs.texi(,14358) @sc{cvs}, @file{log.pl} has been part of the default
cvs.texi(,14359) @sc{cvs} installation.  The @file{log.pl} script gets
cvs.texi(,14360) called from the @file{loginfo} administrative file.
cvs.texi(,14361) Check that the arguments passed in @file{loginfo} match
cvs.texi(,14362) what your version of @file{log.pl} expects.  In
cvs.texi(,14363) particular, the @file{log.pl} from @sc{cvs} 1.3 and
cvs.texi(,14364) older expects the logfile as an argument whereas the
cvs.texi(,14365) @file{log.pl} from @sc{cvs} 1.5 and newer expects the
cvs.texi(,14366) logfile to be specified with a @samp{-f} option.  Of
cvs.texi(,14367) course, if you don't need @file{log.pl} you can just
cvs.texi(,14368) comment it out of @file{loginfo}.
cvs.texi(,14369) 
cvs.texi(,14370) @item cvs [update aborted]: unexpected EOF reading @var{file},v
cvs.texi(,14371) See @samp{EOF in key in RCS file}.
cvs.texi(,14372) 
cvs.texi(,14373) @item cvs [login aborted]: unrecognized auth response from @var{server}
cvs.texi(,14374) This message typically means that the server is not set
cvs.texi(,14375) up properly.  For example, if @file{inetd.conf} points
cvs.texi(,14376) to a nonexistent cvs executable.  To debug it further,
cvs.texi(,14377) find the log file which inetd writes
cvs.texi(,14378) (@file{/var/log/messages} or whatever inetd uses on
cvs.texi(,14379) your system).  For details, see @ref{Connection}, and
cvs.texi(,14380) @ref{Password authentication server}.
cvs.texi(,14381) 
cvs.texi(,14382) @item cvs commit: Up-to-date check failed for `@var{file}'
cvs.texi(,14383) This means that someone else has committed a change to
cvs.texi(,14384) that file since the last time that you did a @code{cvs
cvs.texi(,14385) update}.  So before proceeding with your @code{cvs
cvs.texi(,14386) commit} you need to @code{cvs update}.  @sc{cvs} will merge
cvs.texi(,14387) the changes that you made and the changes that the
cvs.texi(,14388) other person made.  If it does not detect any conflicts
cvs.texi(,14389) it will report @samp{M @var{file}} and you are ready
cvs.texi(,14390) to @code{cvs commit}.  If it detects conflicts it will
cvs.texi(,14391) print a message saying so, will report @samp{C @var{file}},
cvs.texi(,14392) and you need to manually resolve the
cvs.texi(,14393) conflict.  For more details on this process see
cvs.texi(,14394) @ref{Conflicts example}.
cvs.texi(,14395) 
cvs.texi(,14396) @item Usage:	diff3 [-exEX3 [-i | -m] [-L label1 -L label3]] file1 file2 file3
cvs.texi(,14397) @example
cvs.texi(,14398) Only one of [exEX3] allowed
cvs.texi(,14399) @end example
cvs.texi(,14400) This indicates a problem with the installation of
cvs.texi(,14401) @code{diff3} and @code{rcsmerge}.  Specifically
cvs.texi(,14402) @code{rcsmerge} was compiled to look for GNU diff3, but
cvs.texi(,14403) it is finding unix diff3 instead.  The exact text of
cvs.texi(,14404) the message will vary depending on the system.  The
cvs.texi(,14405) simplest solution is to upgrade to a current version of
cvs.texi(,14406) @sc{cvs}, which does not rely on external
cvs.texi(,14407) @code{rcsmerge} or @code{diff3} programs.
cvs.texi(,14408) 
cvs.texi(,14409) @item warning: unrecognized response `@var{text}' from cvs server
cvs.texi(,14410) If @var{text} contains a valid response (such as
cvs.texi(,14411) @samp{ok}) followed by an extra carriage return
cvs.texi(,14412) character (on many systems this will cause the second
cvs.texi(,14413) part of the message to overwrite the first part), then
cvs.texi(,14414) it probably means that you are using the @samp{:ext:}
cvs.texi(,14415) access method with a version of rsh, such as most
cvs.texi(,14416) non-unix rsh versions, which does not by default
cvs.texi(,14417) provide a transparent data stream.  In such cases you
cvs.texi(,14418) probably want to try @samp{:server:} instead of
cvs.texi(,14419) @samp{:ext:}.  If @var{text} is something else, this
cvs.texi(,14420) may signify a problem with your @sc{cvs} server.
cvs.texi(,14421) Double-check your installation against the instructions
cvs.texi(,14422) for setting up the @sc{cvs} server.
cvs.texi(,14423) @c FIXCVS: should be printing CR as \r or \015 or some
cvs.texi(,14424) @c such, probably.
cvs.texi(,14425) 
cvs.texi(,14426) @item cvs commit: [@var{time}] waiting for @var{user}'s lock in @var{directory}
cvs.texi(,14427) This is a normal message, not an error.  See
cvs.texi(,14428) @ref{Concurrency}, for more details.
cvs.texi(,14429) 
cvs.texi(,14430) @item cvs commit: warning: editor session failed
cvs.texi(,14431) @cindex Exit status, of editor
cvs.texi(,14432) This means that the editor which @sc{cvs} is using exits with a nonzero
cvs.texi(,14433) exit status.  Some versions of vi will do this even when there was not
cvs.texi(,14434) a problem editing the file.  If so, point the
cvs.texi(,14435) @code{CVSEDITOR} environment variable to a small script
cvs.texi(,14436) such as:
cvs.texi(,14437) 
cvs.texi(,14438) @example
cvs.texi(,14439) #!/bin/sh
cvs.texi(,14440) vi $*
cvs.texi(,14441) exit 0
cvs.texi(,14442) @end example
cvs.texi(,14443) 
cvs.texi(,14444) @c "warning: foo was lost" and "no longer pertinent" (both normal).
cvs.texi(,14445) @c Would be nice to write these up--they are
cvs.texi(,14446) @c potentially confusing for the new user.
cvs.texi(,14447) @end table
cvs.texi(,14448) 
cvs.texi(,14449) @node Connection
cvs.texi(,14450) @appendixsec Trouble making a connection to a CVS server
cvs.texi(,14451) 
cvs.texi(,14452) This section concerns what to do if you are having
cvs.texi(,14453) trouble making a connection to a @sc{cvs} server.  If
cvs.texi(,14454) you are running the @sc{cvs} command line client
cvs.texi(,14455) running on Windows, first upgrade the client to
cvs.texi(,14456) @sc{cvs} 1.9.12 or later.  The error reporting in
cvs.texi(,14457) earlier versions provided much less information about
cvs.texi(,14458) what the problem was.  If the client is non-Windows,
cvs.texi(,14459) @sc{cvs} 1.9 should be fine.
cvs.texi(,14460) 
cvs.texi(,14461) If the error messages are not sufficient to track down
cvs.texi(,14462) the problem, the next steps depend largely on which
cvs.texi(,14463) access method you are using.
cvs.texi(,14464) 
cvs.texi(,14465) @table @code
cvs.texi(,14466) @cindex :ext:, troubleshooting
cvs.texi(,14467) @item :ext:
cvs.texi(,14468) Try running the rsh program from the command line.  For
cvs.texi(,14469) example: "rsh servername cvs -v" should print @sc{cvs}
cvs.texi(,14470) version information.  If this doesn't work, you need to
cvs.texi(,14471) fix it before you can worry about @sc{cvs} problems.
cvs.texi(,14472) 
cvs.texi(,14473) @cindex :server:, troubleshooting
cvs.texi(,14474) @item :server:
cvs.texi(,14475) You don't need a command line rsh program to use this
cvs.texi(,14476) access method, but if you have an rsh program around,
cvs.texi(,14477) it may be useful as a debugging tool.  Follow the
cvs.texi(,14478) directions given for :ext:.
cvs.texi(,14479) 
cvs.texi(,14480) @cindex :pserver:, troubleshooting
cvs.texi(,14481) @item :pserver:
cvs.texi(,14482) Errors along the lines of "connection refused" typically indicate
cvs.texi(,14483) that inetd isn't even listening for connections on port 2401
cvs.texi(,14484) whereas errors like "connection reset by peer",
cvs.texi(,14485) "received broken pipe signal", "recv() from server: EOF",
cvs.texi(,14486) or "end of file from server"
cvs.texi(,14487) typically indicate that inetd is listening for
cvs.texi(,14488) connections but is unable to start @sc{cvs} (this is frequently
cvs.texi(,14489) caused by having an incorrect path in @file{inetd.conf}
cvs.texi(,14490) or by firewall software rejecting the connection).
cvs.texi(,14491) "unrecognized auth response" errors are caused by a bad command
cvs.texi(,14492) line in @file{inetd.conf}, typically an invalid option or forgetting
cvs.texi(,14493) to put the @samp{pserver} command at the end of the line.
cvs.texi(,14494) Another less common problem is invisible control characters that
cvs.texi(,14495) your editor "helpfully" added without you noticing.
cvs.texi(,14496) 
cvs.texi(,14497) One good debugging tool is to "telnet servername
cvs.texi(,14498) 2401".  After connecting, send any text (for example
cvs.texi(,14499) "foo" followed by return).  If @sc{cvs} is working
cvs.texi(,14500) correctly, it will respond with
cvs.texi(,14501) 
cvs.texi(,14502) @example
cvs.texi(,14503) cvs [pserver aborted]: bad auth protocol start: foo
cvs.texi(,14504) @end example
cvs.texi(,14505) 
cvs.texi(,14506) If instead you get:
cvs.texi(,14507) 
cvs.texi(,14508) @example
cvs.texi(,14509) Usage: cvs [cvs-options] command [command-options-and-arguments]
cvs.texi(,14510) ...
cvs.texi(,14511) @end example
cvs.texi(,14512) 
cvs.texi(,14513) @noindent
cvs.texi(,14514) then you're missing the @samp{pserver} command at the end of the
cvs.texi(,14515) line in @file{inetd.conf}; check to make sure that the entire command
cvs.texi(,14516) is on one line and that it's complete.
cvs.texi(,14517) 
cvs.texi(,14518) Likewise, if you get something like:
cvs.texi(,14519) 
cvs.texi(,14520) @example
cvs.texi(,14521) Unknown command: `pserved'
cvs.texi(,14522) 
cvs.texi(,14523) CVS commands are:
cvs.texi(,14524)         add          Add a new file/directory to the repository
cvs.texi(,14525) ...
cvs.texi(,14526) @end example
cvs.texi(,14527) 
cvs.texi(,14528) @noindent
cvs.texi(,14529) then you've misspelled @samp{pserver} in some way.  If it isn't
cvs.texi(,14530) obvious, check for invisible control characters (particularly
cvs.texi(,14531) carriage returns) in @file{inetd.conf}.
cvs.texi(,14532) 
cvs.texi(,14533) If it fails to work at all, then make sure inetd is working
cvs.texi(,14534) right.  Change the invocation in @file{inetd.conf} to run the
cvs.texi(,14535) echo program instead of cvs.  For example:
cvs.texi(,14536) 
cvs.texi(,14537) @example
cvs.texi(,14538) 2401  stream  tcp  nowait  root /bin/echo echo hello
cvs.texi(,14539) @end example
cvs.texi(,14540) 
cvs.texi(,14541) After making that change and instructing inetd to
cvs.texi(,14542) re-read its configuration file, "telnet servername
cvs.texi(,14543) 2401" should show you the text hello and then the
cvs.texi(,14544) server should close the connection.  If this doesn't
cvs.texi(,14545) work, you need to fix it before you can worry about
cvs.texi(,14546) @sc{cvs} problems.
cvs.texi(,14547) 
cvs.texi(,14548) On AIX systems, the system will often have its own
cvs.texi(,14549) program trying to use port 2401.  This is AIX's problem
cvs.texi(,14550) in the sense that port 2401 is registered for use with
cvs.texi(,14551) @sc{cvs}.  I hear that there is an AIX patch available
cvs.texi(,14552) to address this problem.
cvs.texi(,14553) 
cvs.texi(,14554) Another good debugging tool is the @samp{-d}
cvs.texi(,14555) (debugging) option to inetd.  Consult your system
cvs.texi(,14556) documentation for more information.
cvs.texi(,14557) 
cvs.texi(,14558) If you seem to be connecting but get errors like:
cvs.texi(,14559) 
cvs.texi(,14560) @example
cvs.texi(,14561) cvs server: cannot open /root/.cvsignore: Permission denied
cvs.texi(,14562) cvs [server aborted]: can't chdir(/root): Permission denied
cvs.texi(,14563) @end example
cvs.texi(,14564) 
cvs.texi(,14565) @noindent
cvs.texi(,14566) then you probably haven't specified @samp{-f} in @file{inetd.conf}.
cvs.texi(,14567) (In releases prior to @sc{cvs} 1.11.1, this problem can be caused by
cvs.texi(,14568) your system setting the @code{$HOME} environment variable
cvs.texi(,14569) for programs being run by inetd.  In this case, you can either
cvs.texi(,14570) have inetd run a shell script that unsets @code{$HOME} and then runs
cvs.texi(,14571) @sc{cvs}, or you can use @code{env} to run @sc{cvs} with a pristine
cvs.texi(,14572) environment.)
cvs.texi(,14573) 
cvs.texi(,14574) If you can connect successfully for a while but then can't,
cvs.texi(,14575) you've probably hit inetd's rate limit.
cvs.texi(,14576) (If inetd receives too many requests for the same service
cvs.texi(,14577) in a short period of time, it assumes that something is wrong
cvs.texi(,14578) and temporarily disables the service.)
cvs.texi(,14579) Check your inetd documentation to find out how to adjust the
cvs.texi(,14580) rate limit (some versions of inetd have a single rate limit,
cvs.texi(,14581) others allow you to set the limit for each service separately.)
cvs.texi(,14582) @end table
cvs.texi(,14583) 
cvs.texi(,14584) @node Other problems
cvs.texi(,14585) @appendixsec Other common problems
cvs.texi(,14586) 
cvs.texi(,14587) Here is a list of problems which do not fit into the
cvs.texi(,14588) above categories.  They are in no particular order.
cvs.texi(,14589) 
cvs.texi(,14590) @itemize @bullet
cvs.texi(,14591) @item
cvs.texi(,14592) On Windows, if there is a 30 second or so delay when
cvs.texi(,14593) you run a @sc{cvs} command, it may mean that you have
cvs.texi(,14594) your home directory set to @file{C:/}, for example (see
cvs.texi(,14595) @code{HOMEDRIVE} and @code{HOMEPATH} in
cvs.texi(,14596) @ref{Environment variables}).  @sc{cvs} expects the home
cvs.texi(,14597) directory to not end in a slash, for example @file{C:}
cvs.texi(,14598) or @file{C:\cvs}.
cvs.texi(,14599) @c FIXCVS: CVS should at least detect this and print an
cvs.texi(,14600) @c error, presumably.
cvs.texi(,14601) 
cvs.texi(,14602) @item
cvs.texi(,14603) If you are running @sc{cvs} 1.9.18 or older, and
cvs.texi(,14604) @code{cvs update} finds a conflict and tries to
cvs.texi(,14605) merge, as described in @ref{Conflicts example}, but
cvs.texi(,14606) doesn't tell you there were conflicts, then you may
cvs.texi(,14607) have an old version of @sc{rcs}.  The easiest solution
cvs.texi(,14608) probably is to upgrade to a current version of
cvs.texi(,14609) @sc{cvs}, which does not rely on external @sc{rcs}
cvs.texi(,14610) programs.
cvs.texi(,14611) @end itemize
cvs.texi(,14612) 
cvs.texi(,14613) @c ---------------------------------------------------------------------
cvs.texi(,14614) @node Credits
cvs.texi(,14615) @appendix Credits
cvs.texi(,14616) 
cvs.texi(,14617) @cindex Contributors (manual)
cvs.texi(,14618) @cindex Credits (manual)
cvs.texi(,14619) Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}>
cvs.texi(,14620) wrote the manual pages which were distributed with
cvs.texi(,14621) @sc{cvs} 1.3.  Much of their text was copied into this
cvs.texi(,14622) manual.  He also read an early draft
cvs.texi(,14623) of this manual and contributed many ideas and
cvs.texi(,14624) corrections.
cvs.texi(,14625) 
cvs.texi(,14626) The mailing-list @code{info-cvs} is sometimes
cvs.texi(,14627) informative. I have included information from postings
cvs.texi(,14628) made by the following persons:
cvs.texi(,14629) David G. Grubbs <@t{dgg@@think.com}>.
cvs.texi(,14630) 
cvs.texi(,14631) Some text has been extracted from the man pages for
cvs.texi(,14632) @sc{rcs}.
cvs.texi(,14633) 
cvs.texi(,14634) The @sc{cvs} @sc{faq} by David G. Grubbs has provided
cvs.texi(,14635) useful material.  The @sc{faq} is no longer maintained,
cvs.texi(,14636) however, and this manual is about the closest thing there
cvs.texi(,14637) is to a successor (with respect to documenting how to
cvs.texi(,14638) use @sc{cvs}, at least).
cvs.texi(,14639) 
cvs.texi(,14640) In addition, the following persons have helped by
cvs.texi(,14641) telling me about mistakes I've made:
cvs.texi(,14642) 
cvs.texi(,14643) @display
cvs.texi(,14644) Roxanne Brunskill <@t{rbrunski@@datap.ca}>,
cvs.texi(,14645) Kathy Dyer <@t{dyer@@phoenix.ocf.llnl.gov}>,
cvs.texi(,14646) Karl Pingle <@t{pingle@@acuson.com}>,
cvs.texi(,14647) Thomas A Peterson <@t{tap@@src.honeywell.com}>,
cvs.texi(,14648) Inge Wallin <@t{ingwa@@signum.se}>,
cvs.texi(,14649) Dirk Koschuetzki <@t{koschuet@@fmi.uni-passau.de}>
cvs.texi(,14650) and Michael Brown <@t{brown@@wi.extrel.com}>.
cvs.texi(,14651) @end display
cvs.texi(,14652) 
cvs.texi(,14653) The list of contributors here is not comprehensive; for a more
cvs.texi(,14654) complete list of who has contributed to this manual see
cvs.texi(,14655) the file @file{doc/ChangeLog} in the @sc{cvs} source
cvs.texi(,14656) distribution.
cvs.texi(,14657) 
cvs.texi(,14658) @c ---------------------------------------------------------------------
cvs.texi(,14659) @node BUGS
cvs.texi(,14660) @appendix Dealing with bugs in CVS or this manual
cvs.texi(,14661) 
cvs.texi(,14662) @cindex Bugs in this manual or CVS
cvs.texi(,14663) Neither @sc{cvs} nor this manual is perfect, and they
cvs.texi(,14664) probably never will be.  If you are having trouble
cvs.texi(,14665) using @sc{cvs}, or think you have found a bug, there
cvs.texi(,14666) are a number of things you can do about it.  Note that
cvs.texi(,14667) if the manual is unclear, that can be considered a bug
cvs.texi(,14668) in the manual, so these problems are often worth doing
cvs.texi(,14669) something about as well as problems with @sc{cvs} itself.
cvs.texi(,14670) 
cvs.texi(,14671) @cindex Reporting bugs
cvs.texi(,14672) @cindex Bugs, reporting
cvs.texi(,14673) @cindex Errors, reporting
cvs.texi(,14674) @itemize @bullet
cvs.texi(,14675) @item
cvs.texi(,14676) If you want someone to help you and fix bugs that you
cvs.texi(,14677) report, there are companies which will do that for a
cvs.texi(,14678) fee.  One such company is:
cvs.texi(,14679) 
cvs.texi(,14680) @cindex Ximbiot
cvs.texi(,14681) @cindex Support, getting CVS support
cvs.texi(,14682) @example
cvs.texi(,14683) Ximbiot
cvs.texi(,14684) 319 S. River St.
cvs.texi(,14685) Harrisburg, PA  17104-1657
cvs.texi(,14686) USA
cvs.texi(,14687) Email: info@@ximbiot.com
cvs.texi(,14688) Phone: (717) 579-6168
cvs.texi(,14689) Fax:   (717) 234-3125
cvs.texi(,14690) http://ximbiot.com/
cvs.texi(,14691) 
cvs.texi(,14692) @end example
cvs.texi(,14693) 
cvs.texi(,14694) @item
cvs.texi(,14695) If you got @sc{cvs} through a distributor, such as an
cvs.texi(,14696) operating system vendor or a vendor of freeware
cvs.texi(,14697) @sc{cd-rom}s, you may wish to see whether the
cvs.texi(,14698) distributor provides support.  Often, they will provide
cvs.texi(,14699) no support or minimal support, but this may vary from
cvs.texi(,14700) distributor to distributor.
cvs.texi(,14701) 
cvs.texi(,14702) @item
cvs.texi(,14703) If you have the skills and time to do so, you may wish
cvs.texi(,14704) to fix the bug yourself.  If you wish to submit your
cvs.texi(,14705) fix for inclusion in future releases of @sc{cvs}, see
cvs.texi(,14706) the file @sc{hacking} in the @sc{cvs} source
cvs.texi(,14707) distribution.  It contains much more information on the
cvs.texi(,14708) process of submitting fixes.
cvs.texi(,14709) 
cvs.texi(,14710) @item
cvs.texi(,14711) There may be resources on the net which can help.  Two
cvs.texi(,14712) good places to start are:
cvs.texi(,14713) 
cvs.texi(,14714) @example
cvs.texi(,14715) http://www.cvshome.org
cvs.texi(,14716) http://www.loria.fr/~molli/cvs-index.html
cvs.texi(,14717) @end example
cvs.texi(,14718) 
cvs.texi(,14719) If you are so inspired, increasing the information
cvs.texi(,14720) available on the net is likely to be appreciated.  For
cvs.texi(,14721) example, before the standard @sc{cvs} distribution
cvs.texi(,14722) worked on Windows 95, there was a web page with some
cvs.texi(,14723) explanation and patches for running @sc{cvs} on Windows
cvs.texi(,14724) 95, and various people helped out by mentioning this
cvs.texi(,14725) page on mailing lists or newsgroups when the subject
cvs.texi(,14726) came up.
cvs.texi(,14727) 
cvs.texi(,14728) @item
cvs.texi(,14729) It is also possible to report bugs to @code{bug-cvs}.
cvs.texi(,14730) Note that someone may or may not want to do anything
cvs.texi(,14731) with your bug report---if you need a solution consider
cvs.texi(,14732) one of the options mentioned above.  People probably do
cvs.texi(,14733) want to hear about bugs which are particularly severe
cvs.texi(,14734) in consequences and/or easy to fix, however.  You can
cvs.texi(,14735) also increase your odds by being as clear as possible
cvs.texi(,14736) about the exact nature of the bug and any other
cvs.texi(,14737) relevant information.  The way to report bugs is to
cvs.texi(,14738) send email to @code{bug-cvs@@gnu.org}.  Note
cvs.texi(,14739) that submissions to @code{bug-cvs} may be distributed
cvs.texi(,14740) under the terms of the @sc{gnu} Public License, so if
cvs.texi(,14741) you don't like this, don't submit them.  There is
cvs.texi(,14742) usually no justification for sending mail directly to
cvs.texi(,14743) one of the @sc{cvs} maintainers rather than to
cvs.texi(,14744) @code{bug-cvs}; those maintainers who want to hear
cvs.texi(,14745) about such bug reports read @code{bug-cvs}.  Also note
cvs.texi(,14746) that sending a bug report to other mailing lists or
cvs.texi(,14747) newsgroups is @emph{not} a substitute for sending it to
cvs.texi(,14748) @code{bug-cvs}.  It is fine to discuss @sc{cvs} bugs on
cvs.texi(,14749) whatever forum you prefer, but there are not
cvs.texi(,14750) necessarily any maintainers reading bug reports sent
cvs.texi(,14751) anywhere except @code{bug-cvs}.
cvs.texi(,14752) @end itemize
cvs.texi(,14753) 
cvs.texi(,14754) @cindex Known bugs in this manual or CVS
cvs.texi(,14755) People often ask if there is a list of known bugs or
cvs.texi(,14756) whether a particular bug is a known one.  The file
cvs.texi(,14757) @sc{bugs} in the @sc{cvs} source distribution is one
cvs.texi(,14758) list of known bugs, but it doesn't necessarily try to
cvs.texi(,14759) be comprehensive.  Perhaps there will never be a
cvs.texi(,14760) comprehensive, detailed list of known bugs.
cvs.texi(,14761) 
cvs.texi(,14762) @c ---------------------------------------------------------------------
cvs.texi(,14763) @node Index
cvs.texi(,14764) @unnumbered Index
cvs.texi(,14765) @cindex Index
cvs.texi(,14766) 
cvs.texi(,14767) @printindex cp
cvs.texi(,14768) 
cvs.texi(,14769) @summarycontents
cvs.texi(,14770) 
cvs.texi(,14771) @contents
cvs.texi(,14772) 
cvs.texi(,14773) @bye
