home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / cvs-960311 / info / cvs.info-3 < prev    next >
Encoding:
GNU Info File  |  1996-01-24  |  49.5 KB  |  1,285 lines

  1. This is Info file cvs.info, produced by Makeinfo-1.64 from the input
  2. file ./cvs.texinfo.
  3.  
  4.    Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994
  5. Free Software Foundation, Inc.
  6.  
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.  
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the section entitled "GNU General Public License" is included
  14. exactly as in the original, and provided that the entire resulting
  15. derived work is distributed under the terms of a permission notice
  16. identical to this one.
  17.  
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions, except that the section entitled "GNU General Public License"
  21. and this permission notice may be included in translations approved by
  22. the Free Software Foundation instead of in the original English.
  23.  
  24. 
  25. File: cvs.info,  Node: Avoiding substitution,  Next: Substitution modes,  Prev: Using keywords,  Up: Keyword substitution
  26.  
  27. Avoiding substitution
  28. =====================
  29.  
  30.    Keyword substitution has its disadvantages.  Sometimes you might
  31. want the literal text string `$Author$' to appear inside a file without
  32. RCS interpreting it as a keyword and expanding it into something like
  33. `$Author: ceder $'.
  34.  
  35.    There is unfortunately no way to selectively turn off keyword
  36. substitution.  You can use `-ko' (*note Substitution modes::.) to turn
  37. off keyword substitution entirely.
  38.  
  39.    In many cases you can avoid using RCS keywords in the source, even
  40. though they appear in the final product.  For example, the source for
  41. this manual contains `$@asis{}Author$' whenever the text `$Author$'
  42. should appear.  In `nroff' and `troff' you can embed the null-character
  43. `\&' inside the keyword for a similar effect.
  44.  
  45. 
  46. File: cvs.info,  Node: Substitution modes,  Next: Log keyword,  Prev: Avoiding substitution,  Up: Keyword substitution
  47.  
  48. Substitution modes
  49. ==================
  50.  
  51.    You can control how RCS expands keywords through the use of the `-k'
  52. option (*note Common options::.).  The `-k' option is available with the
  53. `add', `checkout', `diff' and `update' commands.
  54.  
  55.    The modes available are:
  56.  
  57. `-kkv'
  58.      Generate keyword strings using the default form, e.g.  `$Revision:
  59.      5.7 $' for the `Revision' keyword.
  60.  
  61. `-kkvl'
  62.      Like `-kkv', except that a locker's name is always inserted if the
  63.      given revision is currently locked.  This option is normally not
  64.      useful when CVS is used.
  65.  
  66. `-kk'
  67.      Generate only keyword names in keyword strings; omit their values.
  68.      For example, for the `Revision' keyword, generate the string
  69.      `$Revision$' instead of `$Revision: 5.7 $'.  This option is useful
  70.      to ignore differences due to keyword substitution when comparing
  71.      different revisions of a file.
  72.  
  73. `-ko'
  74.      Generate the old keyword string, present in the working file just
  75.      before it was checked in.  For example, for the `Revision'
  76.      keyword, generate the string `$Revision: 1.1 $' instead of
  77.      `$Revision: 5.7 $' if that is how the string appeared when the
  78.      file was checked in.
  79.  
  80. `-kb'
  81.      Like `-ko', but also inhibit conversion of line endings between
  82.      the canonical form in which they are stored in the repository
  83.      (linefeed only), and the form appropriate to the operating system
  84.      in use on the client.  For systems, like unix, which use linefeed
  85.      only to terminate lines, this is the same as `-ko'.  For more
  86.      information on binary files, see *Note Binary files::.
  87.  
  88. `-kv'
  89.      Generate only keyword values for keyword strings.  For example,
  90.      for the `Revision' keyword, generate the string `5.7' instead of
  91.      `$Revision: 5.7 $'.  This can help generate files in programming
  92.      languages where it is hard to strip keyword delimiters like
  93.      `$Revision: $' from a string.  However, further keyword
  94.      substitution cannot be performed once the keyword names are
  95.      removed, so this option should be used with care.
  96.  
  97.      One often would like to use `-kv' with `cvs export'--*note
  98.      export::..  But be aware that doesn't handle an export containing
  99.      binary files correctly.
  100.  
  101. 
  102. File: cvs.info,  Node: Log keyword,  Prev: Substitution modes,  Up: Keyword substitution
  103.  
  104. Problems with the $Log$ keyword.
  105. ================================
  106.  
  107.    The `$Log$' keyword is somewhat controversial.  As long as you are
  108. working on your development system the information is easily accessible
  109. even if you do not use the `$Log$' keyword--just do a `cvs log'.  Once
  110. you export the file the history information might be useless anyhow.
  111.  
  112.    A more serious concern is that RCS is not good at handling `$Log$'
  113. entries when a branch is merged onto the main trunk.  Conflicts often
  114. result from the merging operation.
  115.  
  116.    People also tend to "fix" the log entries in the file (correcting
  117. spelling mistakes and maybe even factual errors).  If that is done the
  118. information from `cvs log' will not be consistent with the information
  119. inside the file.  This may or may not be a problem in real life.
  120.  
  121.    It has been suggested that the `$Log$' keyword should be inserted
  122. *last* in the file, and not in the files header, if it is to be used at
  123. all.  That way the long list of change messages will not interfere with
  124. everyday source file browsing.
  125.  
  126. 
  127. File: cvs.info,  Node: Binary files,  Next: Revision management,  Prev: Keyword substitution,  Up: Top
  128.  
  129. Handling binary files
  130. *********************
  131.  
  132.    There are two issues with using CVS to store binary files.  The
  133. first is that CVS by default convert line endings between the canonical
  134. form in which they are stored in the repository (linefeed only), and
  135. the form appropriate to the operating system in use on the client (for
  136. example, carriage return followed by line feed for Windows NT).
  137.  
  138.    The second is that a binary file might happen to contain data which
  139. looks like a keyword (*note Keyword substitution::.), so keyword
  140. expansion must be turned off.
  141.  
  142.    The `-kb' option available with some CVS commands insures that
  143. neither line ending conversion nor keyword expansion will be done.  If
  144. you are using an old version of RCS without this option, and you are
  145. using an operating system, such as unix, which terminates lines with
  146. linefeeds only, you can use `-ko' instead; if you are on another
  147. operating system, upgrade to a version of RCS, such as 5.7 or later,
  148. which supports `-kb'.
  149.  
  150.    Here is an example of how you can create a new file using the `-kb'
  151. flag:
  152.  
  153.      $ echo '$Id$' > kotest
  154.      $ cvs add -kb -m"A test file" kotest
  155.      $ cvs ci -m"First checkin; contains a keyword" kotest
  156.  
  157.    If a file accidentally gets added without `-kb', one can use the
  158. `cvs admin' command to recover.  For example:
  159.  
  160.      $ echo '$Id$' > kotest
  161.      $ cvs add -m"A test file" kotest
  162.      $ cvs ci -m"First checkin; contains a keyword" kotest
  163.      $ cvs admin -kb kotest
  164.      $ rm kotest
  165.      $ cvs update kotest
  166.  
  167.    When you check in the file `kotest' the keywords are expanded.  (Try
  168. the above example, and do a `cat kotest' after every command).  The `cvs
  169. admin -kb' command sets the default keyword substitution method for
  170. this file, but it does not alter the working copy of the file that you
  171. have.  The easiest way to get the unexpanded version of `kotest' is to
  172. remove it and check it out again.
  173.  
  174. 
  175. File: cvs.info,  Node: Revision management,  Next: Invoking CVS,  Prev: Binary files,  Up: Top
  176.  
  177. Revision management
  178. *******************
  179.  
  180.    If you have read this far, you probably have a pretty good grasp on
  181. what CVS can do for you.  This chapter talks a little about things that
  182. you still have to decide.
  183.  
  184.    If you are doing development on your own using CVS you could
  185. probably skip this chapter.  The questions this chapter takes up become
  186. more important when more than one person is working in a repository.
  187.  
  188. * Menu:
  189.  
  190. * When to commit::              Some discussion on the subject
  191.  
  192. 
  193. File: cvs.info,  Node: When to commit,  Up: Revision management
  194.  
  195. When to commit?
  196. ===============
  197.  
  198.    Your group should decide which policy to use regarding commits.
  199. Several policies are possible, and as your experience with CVS grows
  200. you will probably find out what works for you.
  201.  
  202.    If you commit files too quickly you might commit files that do not
  203. even compile.  If your partner updates his working sources to include
  204. your buggy file, he will be unable to compile the code.  On the other
  205. hand, other persons will not be able to benefit from the improvements
  206. you make to the code if you commit very seldom, and conflicts will
  207. probably be more common.
  208.  
  209.    It is common to only commit files after making sure that they can be
  210. compiled.  Some sites require that the files pass a test suite.
  211. Policies like this can be enforced using the commitinfo file (*note
  212. commitinfo::.), but you should think twice before you enforce such a
  213. convention.  By making the development environment too controlled it
  214. might become too regimented and thus counter-productive to the real
  215. goal, which is to get software written.
  216.  
  217. 
  218. File: cvs.info,  Node: Invoking CVS,  Next: Administrative files,  Prev: Revision management,  Up: Top
  219.  
  220. Reference manual for CVS commands
  221. *********************************
  222.  
  223.    This appendix describes how to invoke CVS, and describes in detail
  224. those subcommands of CVS which are not fully described elsewhere.  To
  225. look up a particular subcommand, see *Note Index::.
  226.  
  227. * Menu:
  228.  
  229. * Structure::                   Overall structure of CVS commands
  230. * ~/.cvsrc::                    Default options with the ~/.csvrc file
  231. * Global options::              Options you give to the left of cvs_command
  232. * Common options::              Options you give to the right of cvs_command
  233. * add::                         Add a new file/directory to the repository
  234. * admin::                       Administration front end for rcs
  235. * checkout::                    Checkout sources for editing
  236. * commit::                      Check files into the repository
  237. * diff::                        Run diffs between revisions
  238. * export::                      Export sources from CVS, similar to checkout
  239. * history::                     Show status of files and users
  240. * import::                      Import sources into CVS, using vendor branches
  241. * log::                         Print out 'rlog' information for files
  242. * rdiff::                       'patch' format diffs between releases
  243. * release::                     Indicate that a Module is no longer in use
  244. * remove::                      Remove an entry from the repository
  245. * rtag::                        Add a tag to a module
  246. * status::                      Status info on the revisions
  247. * tag::                         Add a tag to checked out version
  248. * update::                      Bring work tree in sync with repository
  249.  
  250. 
  251. File: cvs.info,  Node: Structure,  Next: ~/.cvsrc,  Up: Invoking CVS
  252.  
  253. Overall structure of CVS commands
  254. =================================
  255.  
  256.    The first release of CVS consisted of a number of shell-scripts.
  257. Today CVS is implemented as a single program that is a front-end to RCS
  258. and `diff'. The overall format of all CVS commands is:
  259.  
  260.      cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
  261.  
  262. `cvs'
  263.      The program that is a front-end to RCS.
  264.  
  265. `cvs_options'
  266.      Some options that affect all sub-commands of CVS.  These are
  267.      described below.
  268.  
  269. `cvs_command'
  270.      One of several different sub-commands.  Some of the commands have
  271.      aliases that can be used instead; those aliases are noted in the
  272.      reference manual for that command.  There are only two situations
  273.      where you may omit `cvs_command': `cvs -H' elicits a list of
  274.      available commands, and `cvs -v' displays version information on
  275.      CVS itself.
  276.  
  277. `command_options'
  278.      Options that are specific for the command.
  279.  
  280. `command_args'
  281.      Arguments to the commands.
  282.  
  283.    There is unfortunately some confusion between `cvs_options' and
  284. `command_options'.  `-l', when given as a `cvs_option', only affects
  285. some of the commands.  When it is given as a `command_option' is has a
  286. different meaning, and is accepted by more commands.  In other words,
  287. do not take the above categorization too seriously.  Look at the
  288. documentation instead.
  289.  
  290. 
  291. File: cvs.info,  Node: ~/.cvsrc,  Next: Global options,  Prev: Structure,  Up: Invoking CVS
  292.  
  293. Default options and the ~/.cvsrc file
  294. =====================================
  295.  
  296.    There are some `command_options' that are used so often that you
  297. might have set up an alias or some other means to make sure you always
  298. specify that option.  One example (the one that drove the
  299. implementation of the .cvsrc support, actually) is that many people
  300. find the default output of the `diff' command to be very hard to read,
  301. and that either context diffs or unidiffs are much easier to understand.
  302.  
  303.    The `~/.cvsrc' file is a way that you can add default options to
  304. `cvs_commands' within cvs, instead of relying on aliases or other shell
  305. scripts.
  306.  
  307.    The format of the `~/.cvsrc' file is simple.  The file is searched
  308. for a line that begins with the same name as the `cvs_command' being
  309. executed.  If a match is found, then the remainder of the line is split
  310. up (at whitespace characters) into separate options and added to the
  311. command arguments *before* any options from the command line.
  312.  
  313.    If a command has two names (e.g., `checkout' and `co'), the official
  314. name, not necessarily the one used on the command line, will be used to
  315. match against the file.  So if this is the contents of the user's
  316. `~/.cvsrc' file:
  317.  
  318.      log -N
  319.      diff -u
  320.      update -P
  321.      co -P
  322.  
  323. the command `cvs checkout foo' would have the `-P' option added to the
  324. arguments, as well as `cvs co foo'.
  325.  
  326.    With the example file above, the output from `cvs diff foobar' will
  327. be in unidiff format.  `cvs diff -c foobar' will provide context diffs,
  328. as usual.  Getting "old" format diffs would be slightly more
  329. complicated, because `diff' doesn't have an option to specify use of
  330. the "old" format, so you would need `cvs -f diff foobar'.
  331.  
  332. 
  333. File: cvs.info,  Node: Global options,  Next: Common options,  Prev: ~/.cvsrc,  Up: Invoking CVS
  334.  
  335. Global options
  336. ==============
  337.  
  338.    The available `cvs_options' (that are given to the left of
  339. `cvs_command') are:
  340.  
  341. `-b BINDIR'
  342.      Use BINDIR as the directory where RCS programs are located.
  343.      Overrides the setting of the `$RCSBIN' environment variable and
  344.      any precompiled directory.  This parameter should be specified as
  345.      an absolute pathname.
  346.  
  347. `-d CVS_ROOT_DIRECTORY'
  348.      Use CVS_ROOT_DIRECTORY as the root directory pathname of the
  349.      repository.  Overrides the setting of the `$CVSROOT' environment
  350.      variable.  *Note Repository::.
  351.  
  352. `-e EDITOR'
  353.      Use EDITOR to enter revision log information.  Overrides the
  354.      setting of the `$CVSEDITOR' and `$EDITOR' environment variables.
  355.  
  356. `-f'
  357.      Do not read the `~/.cvsrc' file.  This option is most often used
  358.      because of the non-orthogonality of the CVS option set.  For
  359.      example, the `cvs log' option `-N' (turn off display of tag names)
  360.      does not have a corresponding option to turn the display on.  So
  361.      if you have `-N' in the `~/.cvsrc' entry for `diff', you may need
  362.      to use `-f' to show the tag names.  (1)
  363.  
  364. `-H'
  365.      Display usage information about the specified `cvs_command' (but
  366.      do not actually execute the command).  If you don't specify a
  367.      command name, `cvs -H' displays a summary of all the commands
  368.      available.
  369.  
  370. `-l'
  371.      Do not log the cvs_command in the command history (but execute it
  372.      anyway).  *Note history::, for information on command history.
  373.  
  374. `-n'
  375.      Do not change any files.  Attempt to execute the `cvs_command',
  376.      but only to issue reports; do not remove, update, or merge any
  377.      existing files, or create any new files.
  378.  
  379. `-Q'
  380.      Cause the command to be really quiet; the command will only
  381.      generate output for serious problems.
  382.  
  383. `-q'
  384.      Cause the command to be somewhat quiet; informational messages,
  385.      such as reports of recursion through subdirectories, are
  386.      suppressed.
  387.  
  388. `-r'
  389.      Make new working files files read-only.  Same effect as if the
  390.      `$CVSREAD' environment variable is set (*note Environment
  391.      variables::.).  The default is to make working files writable.
  392.  
  393. `-t'
  394.      Trace program execution; display messages showing the steps of CVS
  395.      activity.  Particularly useful with `-n' to explore the potential
  396.      impact of an unfamiliar command.
  397.  
  398. `-v'
  399.      Display version and copyright information for CVS.
  400.  
  401. `-w'
  402.      Make new working files read-write.  Overrides the setting of the
  403.      `$CVSREAD' environment variable.  Files are created read-write by
  404.      default, unless `$CVSREAD' is set or `-r' is given.
  405.  
  406.    ---------- Footnotes ----------
  407.  
  408.    (1)  Yes, this really should be fixed, and it's being worked on
  409.  
  410. 
  411. File: cvs.info,  Node: Common options,  Next: add,  Prev: Global options,  Up: Invoking CVS
  412.  
  413. Common command options
  414. ======================
  415.  
  416.    This section describes the `command_options' that are available
  417. across several CVS commands.  These options are always given to the
  418. right of `cvs_command'. Not all commands support all of these options;
  419. each option is only supported for commands where it makes sense.
  420. However, when a command has one of these options you can almost always
  421. count on the same behavior of the option as in other commands.  (Other
  422. command options, which are listed with the individual commands, may have
  423. different behavior from one CVS command to the other).
  424.  
  425.    *Warning:* the `history' command is an exception; it supports many
  426. options that conflict even with these standard options.
  427.  
  428. `-D DATE_SPEC'
  429.      Use the most recent revision no later than DATE_SPEC.  DATE_SPEC
  430.      is a single argument, a date description specifying a date in the
  431.      past.
  432.  
  433.      The specification is "sticky" when you use it to make a private
  434.      copy of a source file; that is, when you get a working file using
  435.      `-D', CVS records the date you specified, so that further updates
  436.      in the same directory will use the same date (unless you
  437.      explicitly override it; *note update::.).
  438.  
  439.      A wide variety of date formats are supported by the underlying RCS
  440.      facilities, similar to those described in co(1), but not exactly
  441.      the same.  The DATE_SPEC is interpreted as being in the local
  442.      timezone, unless a specific timezone is specified.  Examples of
  443.      valid date specifications include:
  444.  
  445.                               1 month ago
  446.                               2 hours ago
  447.                               400000 seconds ago
  448.                               last year
  449.                               last Monday
  450.                               yesterday
  451.                               a fortnight ago
  452.                               3/31/92 10:00:07 PST
  453.                               January 23, 1987 10:05pm
  454.                               22:00 GMT
  455.  
  456.      `-D' is available with the `checkout', `diff', `export', `history',
  457.      `rdiff', `rtag', and `update' commands.  (The `history' command
  458.      uses this option in a slightly different way; *note history
  459.      options::.).
  460.  
  461.      Remember to quote the argument to the `-D' flag so that your shell
  462.      doesn't interpret spaces as argument separators.  A command using
  463.      the `-D' flag can look like this:
  464.  
  465.           $ cvs diff -D "1 hour ago" cvs.texinfo
  466.  
  467. `-f'
  468.      When you specify a particular date or tag to CVS commands, they
  469.      normally ignore files that do not contain the tag (or did not
  470.      exist prior to the date) that you specified.  Use the `-f' option
  471.      if you want files retrieved even when there is no match for the
  472.      tag or date.  (The most recent revision of the file will be used).
  473.  
  474.      `-f' is available with these commands: `checkout', `export',
  475.      `rdiff', `rtag', and `update'.
  476.  
  477.      *Warning:*  The `commit' command also has a `-f' option, but it
  478.      has a different behavior for that command.  *Note commit options::.
  479.  
  480. `-H'
  481.      Help; describe the options available for this command.  This is
  482.      the only option supported for all CVS commands.
  483.  
  484. `-k KFLAG'
  485.      Alter the default RCS processing of keywords.  *Note Keyword
  486.      substitution::, for the meaning of KFLAG.  Your KFLAG
  487.      specification is "sticky" when you use it to create a private copy
  488.      of a source file; that is, when you use this option with the
  489.      `checkout' or `update' commands, CVS associates your selected
  490.      KFLAG with the file, and continues to use it with future update
  491.      commands on the same file until you specify otherwise.
  492.  
  493.      The `-k' option is available with the `add', `checkout', `diff' and
  494.      `update' commands.
  495.  
  496. `-l'
  497.      Local; run only in current working directory, rather than
  498.      recursing through subdirectories.
  499.  
  500.      *Warning:* this is not the same as the overall `cvs -l' option,
  501.      which you can specify to the left of a cvs command!
  502.  
  503.      Available with the following commands: `checkout', `commit',
  504.      `diff', `export', `log', `remove', `rdiff', `rtag', `status',
  505.      `tag', and `update'.
  506.  
  507. `-m MESSAGE'
  508.      Use MESSAGE as log information, instead of invoking an editor.
  509.  
  510.      Available with the following commands: `add', `commit' and
  511.      `import'.
  512.  
  513. `-n'
  514.      Do not run any checkout/commit/tag program.  (A program can be
  515.      specified to run on each of these activities, in the modules
  516.      database (*note modules::.); this option bypasses it).
  517.  
  518.      *Warning:* this is not the same as the overall `cvs -n' option,
  519.      which you can specify to the left of a cvs command!
  520.  
  521.      Available with the `checkout', `commit', `export', and `rtag'
  522.      commands.
  523.  
  524. `-P'
  525.      Prune (remove) directories that are empty after being updated, on
  526.      `checkout', or `update'.  Normally, an empty directory (one that
  527.      is void of revision-controlled files) is left alone.  Specifying
  528.      `-P' will cause these directories to be silently removed from your
  529.      checked-out sources.  This does not remove the directory from the
  530.      repository, only from your checked out copy.  Note that this
  531.      option is implied by the `-r' or `-D' options of `checkout' and
  532.      `export'.
  533.  
  534. `-p'
  535.      Pipe the files retrieved from the repository to standard output,
  536.      rather than writing them in the current directory.  Available with
  537.      the `checkout' and `update' commands.
  538.  
  539. `-W'
  540.      Specify file names that should be filtered.  You can use this
  541.      option repeatedly.  The spec can be a file name pattern of the
  542.      same type that you can specify in the `.cvswrappers' file.
  543.      Avaliable with the following commands: `import', and `update'.
  544.  
  545. `-r TAG'
  546.      Use the revision specified by the TAG argument instead of the
  547.      default "head" revision.  As well as arbitrary tags defined with
  548.      the `tag' or `rtag' command, two special tags are always
  549.      available: `HEAD' refers to the most recent version available in
  550.      the repository, and `BASE' refers to the revision you last checked
  551.      out into the current working directory.
  552.  
  553.      The tag specification is sticky when you use this option with
  554.      `checkout' or `update' to make your own copy of a file: CVS
  555.      remembers the tag and continues to use it on future update
  556.      commands, until you specify otherwise.  The tag can be either a
  557.      symbolic or numeric tag.  *Note Tags::.
  558.  
  559.      Specifying the `-q' global option along with the `-r' command
  560.      option is often useful, to suppress the warning messages when the
  561.      RCS history file does not contain the specified tag.
  562.  
  563.      *Warning:* this is not the same as the overall `cvs -r' option,
  564.      which you can specify to the left of a cvs command!
  565.  
  566.      `-r' is available with the `checkout', `commit', `diff',
  567.      `history', `export', `rdiff', `rtag', and `update' commands.
  568.  
  569. 
  570. File: cvs.info,  Node: add,  Next: admin,  Prev: Common options,  Up: Invoking CVS
  571.  
  572. add--Add a new file/directory to the repository
  573. ===============================================
  574.  
  575.    * Synopsis: add [-k kflag] [-m 'message'] files...
  576.  
  577.    * Requires: repository, working directory.
  578.  
  579.    * Changes: working directory.
  580.  
  581.    * Synonym: new
  582.  
  583.    Use the `add' command to create a new file or directory in the
  584. source repository.  The files or directories specified with `add' must
  585. already exist in the current directory (which must have been created
  586. with the `checkout' command).  To add a whole new directory hierarchy
  587. to the source repository (for example, files received from a
  588. third-party vendor), use the `import' command instead.  *Note import::.
  589.  
  590.    If the argument to `add' refers to an immediate sub-directory, the
  591. directory is created at the correct place in the source repository, and
  592. the necessary CVS administration files are created in your working
  593. directory.  If the directory already exists in the source repository,
  594. `add' still creates the administration files in your version of the
  595. directory.  This allows you to use `add' to add a particular directory
  596. to your private sources even if someone else created that directory
  597. after your checkout of the sources.  You can do the following:
  598.  
  599.      $ mkdir new_directory
  600.      $ cvs add new_directory
  601.      $ cvs update new_directory
  602.  
  603.    An alternate approach using `update' might be:
  604.  
  605.      $ cvs update -d new_directory
  606.  
  607.    (To add any available new directories to your working directory,
  608. it's probably simpler to use `checkout' (*note checkout::.) or `update
  609. -d' (*note update::.)).
  610.  
  611.    The added files are not placed in the source repository until you
  612. use `commit' to make the change permanent.  Doing an `add' on a file
  613. that was removed with the `remove' command will resurrect the file,
  614. unless a `commit' command intervened.  *Note remove examples:: for an
  615. example.
  616.  
  617.    Unlike most other commands `add' never recurses down directories.
  618. It cannot yet handle relative paths.  Instead of
  619.  
  620.      $ cvs add foo/bar.c
  621.  
  622.    you have to do
  623.  
  624.      $ cd foo
  625.      $ cvs add bar.c
  626.  
  627. * Menu:
  628.  
  629. * add options::                 add options
  630. * add examples::                add examples
  631.  
  632. 
  633. File: cvs.info,  Node: add options,  Next: add examples,  Up: add
  634.  
  635. add options
  636. -----------
  637.  
  638.    There are only two options you can give to `add':
  639.  
  640. `-k KFLAG'
  641.      This option specifies the default way that this file will be
  642.      checked out.  The KFLAG argument (*note Substitution modes::.) is
  643.      stored in the RCS file and can be changed with `admin -k' (*note
  644.      admin options::.).  See *Note Binary files::, for information on
  645.      using this option for binary files.
  646.  
  647. `-m DESCRIPTION'
  648.      Using this option, you can give a description for the file.  This
  649.      description appears in the history log (if it is enabled, *note
  650.      history file::.).  It will also be saved in the RCS history file
  651.      inside the repository when the file is committed.  The `log'
  652.      command displays this description.
  653.  
  654.      The description can be changed using `admin -t'.  *Note admin::.
  655.  
  656.      If you omit the `-m DESCRIPTION' flag, an empty string will be
  657.      used.  You will not be prompted for a description.
  658.  
  659. 
  660. File: cvs.info,  Node: add examples,  Prev: add options,  Up: add
  661.  
  662. add examples
  663. ------------
  664.  
  665.    To add the file `backend.c' to the repository, with a description,
  666. the following can be used.
  667.  
  668.      $ cvs add -m "Optimizer and code generation passes." backend.c
  669.      $ cvs commit -m "Early version. Not yet compilable." backend.c
  670.  
  671. 
  672. File: cvs.info,  Node: admin,  Next: checkout,  Prev: add,  Up: Invoking CVS
  673.  
  674. admin--Administration front end for rcs
  675. =======================================
  676.  
  677.    * Requires: repository, working directory.
  678.  
  679.    * Changes: repository.
  680.  
  681.    * Synonym: rcs
  682.  
  683.    This is the CVS interface to assorted administrative RCS facilities,
  684. documented in rcs(1).  `admin' simply passes all its options and
  685. arguments to the `rcs' command; it does no filtering or other
  686. processing.  This command *does* work recursively, however, so extreme
  687. care should be used.
  688.  
  689.    If there is a group whose name matches a compiled in value which
  690. defaults to `cvsadmin', only members of that group can use `cvs admin'.
  691. To disallow `cvs admin' for all users, create a group with no users in
  692. it.
  693.  
  694. * Menu:
  695.  
  696. * admin options::               admin options
  697. * admin examples::              admin examples
  698.  
  699. 
  700. File: cvs.info,  Node: admin options,  Next: admin examples,  Up: admin
  701.  
  702. admin options
  703. -------------
  704.  
  705.    Not all valid `rcs' options are useful together with CVS.  Some even
  706. makes it impossible to use CVS until you undo the effect!
  707.  
  708.    This description of the available options is based on the `rcs(1)'
  709. man page, but modified to suit readers that are more interrested in CVS
  710. than RCS.
  711.  
  712. `-AOLDFILE'
  713.      Might not work together with CVS.  Append the access list of
  714.      OLDFILE to the access list of the RCS file.
  715.  
  716. `-aLOGINS'
  717.      Might not work together with CVS.  Append the login names
  718.      appearing in the comma-separated list LOGINS to the access list of
  719.      the RCS file.
  720.  
  721. `-b[REV]'
  722.      Breaks CVS.  When used with bare RCS, this option sets the default
  723.      branch to REV.  If REV is omitted, the default branch is reset to
  724.      the (dynamically) highest branch on the trunk.  Use sticky tags
  725.      instead, as in `cvs co -r'.  *Note Sticky tags::.
  726.  
  727. `-cSTRING'
  728.      Useful with CVS.  Sets the comment leader to STRING.  The comment
  729.      leader is printed before every log message line generated by the
  730.      keyword `$Log$' (*note Keyword substitution::.).  This is useful
  731.      for programming languages without multi-line comments.  RCS
  732.      initially guesses the value of the comment leader from the file
  733.      name extension when the file is first committed.
  734.  
  735. `-e[LOGINS]'
  736.      Might not work together with CVS.  Erase the login names appearing
  737.      in the comma-separated list LOGINS from the access list of the RCS
  738.      file.  If LOGINS is omitted, erase the entire access list.
  739.  
  740. `-I'
  741.      Run interactively, even if the standard input is not a terminal.
  742.  
  743. `-i'
  744.      Useless with CVS.  When using bare RCS, this is used to create and
  745.      initialize a new RCS file, without depositing a revision.
  746.  
  747. `-kSUBST'
  748.      Useful with CVS.  Set the default keyword substitution to SUBST.
  749.      *Note Keyword substitution::.  Giving an explicit `-k' option to
  750.      `cvs update' or `cvs checkout' overrides this default.  `cvs
  751.      export' always uses `-kv', regardless of which keyword
  752.      substitution is set with `cvs admin'.
  753.  
  754. `-l[REV]'
  755.      Probably useless with CVS.  With bare RCS, this option can be used
  756.      to lock the revision with number REV.  If a branch is given, lock
  757.      the latest revision on that branch.  If REV is omitted, lock the
  758.      latest revision on the default branch.
  759.  
  760. `-L'
  761.      Probably useless with CVS.  Used with bare RCS to set locking to
  762.      strict.  Strict locking means that the owner of an RCS file is not
  763.      exempt from locking for checkin.
  764.  
  765. `-mREV:MSG'
  766.      Replace the log message of revision REV with MSG.
  767.  
  768. `-NNAME[:[REV]]'
  769.      Act like `-n', except override any previous assignment of NAME.
  770.  
  771. `-nNAME[:[REV]]'
  772.      Associate the symbolic name NAME with the branch or revision REV.
  773.      It is normally better to use `cvs tag' or `cvs rtag' instead.
  774.      Delete the symbolic name if both `:' and REV are omitted;
  775.      otherwise, print an error message if NAME is already associated
  776.      with another number.  If REV is symbolic, it is expanded before
  777.      association.  A REV consisting of a branch number followed by a
  778.      `.' stands for the current latest revision in the branch.  A `:'
  779.      with an empty REV stands for the current latest revision on the
  780.      default branch, normally the trunk.  For example, `rcs -nNAME:
  781.      RCS/*' associates NAME with the current latest revision of all the
  782.      named RCS files; this contrasts with `rcs -nNAME:$ RCS/*' which
  783.      associates NAME with the revision numbers extracted from keyword
  784.      strings in the corresponding working files.
  785.  
  786. `-oRANGE'
  787.      Potentially useful, but dangerous, with CVS (see below).  Deletes
  788.      ("outdates") the revisions given by RANGE.  A range consisting of
  789.      a single revision number means that revision.  A range consisting
  790.      of a branch number means the latest revision on that branch.  A
  791.      range of the form `REV1:REV2' means revisions REV1 to REV2 on the
  792.      same branch, `:REV' means from the beginning of the branch
  793.      containing REV up to and including REV, and `REV:' means from
  794.      revision REV to the end of the branch containing REV.  None of the
  795.      outdated revisions may have branches or locks.
  796.  
  797.      Due to the way CVS handles branches REV cannot be specified
  798.      symbolically if it is a branch.  *Note Magic branch numbers::, for
  799.      an explanation.
  800.  
  801.      Make sure that no-one has checked out a copy of the revision you
  802.      outdate.  Strange things will happen if he starts to edit it and
  803.      tries to check it back in.  For this reason, this option is not a
  804.      good way to take back a bogus commit; commit a new revision
  805.      undoing the bogus change instead (*note Merging two revisions::.).
  806.  
  807. `-q'
  808.      Run quietly; do not print diagnostics.
  809.  
  810. `-sSTATE[:REV]'
  811.      Useful with CVS.  Set the state attribute of the revision REV to
  812.      STATE.  If REV is a branch number, assume the latest revision on
  813.      that branch.  If REV is omitted, assume the latest revision on the
  814.      default branch.  Any identifier is acceptable for STATE.  A useful
  815.      set of states is `Exp' (for experimental), `Stab' (for stable),
  816.      and `Rel' (for released).  By default, the state of a new revision
  817.      is set to `Exp' when it is created.  The state is visible in the
  818.      output from CVS LOG (*note log::.), and in the `$Log$' and
  819.      `$State$' keywords (*note Keyword substitution::.).
  820.  
  821. `-t[FILE]'
  822.      Useful with CVS.  Write descriptive text from the contents of the
  823.      named FILE into the RCS file, deleting the existing text.  The
  824.      FILE pathname may not begin with `-'.  If FILE is omitted, obtain
  825.      the text from standard input, terminated by end-of-file or by a
  826.      line containing `.' by itself.  Prompt for the text if interaction
  827.      is possible; see `-I'.  The descriptive text can be seen in the
  828.      output from `cvs log' (*note log::.).
  829.  
  830. `-t-STRING'
  831.      Similar to `-tFILE'. Write descriptive text from the STRING into
  832.      the RCS file, deleting the existing text.
  833.  
  834. `-U'
  835.      Probably useless with CVS.  Used with bare RCS to set locking to
  836.      non-strict.  Non-strict locking means that the owner of a file
  837.      need not lock a revision for checkin.
  838.  
  839. `-u[REV]'
  840.      Probably useless with CVS.  With bare RCS, unlock the revision
  841.      with number REV.  If a branch is given, unlock the latest revision
  842.      on that branch.  If REV is omitted, remove the latest lock held by
  843.      the caller.  Normally, only the locker of a revision may unlock
  844.      it.  Somebody else unlocking a revision breaks the lock.  This
  845.      causes a mail message to be sent to the original locker.  The
  846.      message contains a commentary solicited from the breaker.  The
  847.      commentary is terminated by end-of-file or by a line containing
  848.      `.' by itself.
  849.  
  850. `-VN'
  851.      Emulate RCS version N. Use -VN to make an RCS file acceptable to
  852.      RCS version N by discarding information that would confuse version
  853.      N.
  854.  
  855. `-xSUFFIXES'
  856.      Useless with CVS. Use SUFFIXES to characterize RCS files.
  857.  
  858. 
  859. File: cvs.info,  Node: admin examples,  Prev: admin options,  Up: admin
  860.  
  861. admin examples
  862. --------------
  863.  
  864. Outdating is dangerous
  865. ......................
  866.  
  867.    First, an example of how *not* to use the `admin' command.  It is
  868. included to stress the fact that this command can be quite dangerous
  869. unless you know *exactly* what you are doing.
  870.  
  871.    The `-o' option can be used to "outdate" old revisions from the
  872. history file.  If you are short on disc this option might help you.
  873. But think twice before using it--there is no way short of restoring the
  874. latest backup to undo this command!
  875.  
  876.    The next line is an example of a command that you would *not* like
  877. to execute.
  878.  
  879.      $ cvs admin -o:R_1_02 .
  880.  
  881.    The above command will delete all revisions up to, and including,
  882. the revision that corresponds to the tag R_1_02.  But beware!  If there
  883. are files that have not changed between R_1_02 and R_1_03 the file will
  884. have *the same* numerical revision number assigned to the tags R_1_02
  885. and R_1_03.  So not only will it be impossible to retrieve R_1_02;
  886. R_1_03 will also have to be restored from the tapes!
  887.  
  888. Comment leaders
  889. ...............
  890.  
  891.    If you use the `$Log$' keyword and you do not agree with the guess
  892. for comment leader that CVS has done, you can enforce your will with
  893. `cvs admin -c'.  This might be suitable for `nroff' source:
  894.  
  895.      $ cvs admin -c'.\" ' *.man
  896.      $ rm *.man
  897.      $ cvs update
  898.  
  899.    The two last steps are to make sure that you get the versions with
  900. correct comment leaders in your working files.
  901.  
  902. 
  903. File: cvs.info,  Node: checkout,  Next: commit,  Prev: admin,  Up: Invoking CVS
  904.  
  905. checkout--Check out sources for editing
  906. =======================================
  907.  
  908.    * Synopsis: checkout [options] modules...
  909.  
  910.    * Requires: repository.
  911.  
  912.    * Changes: working directory.
  913.  
  914.    * Synonyms: co, get
  915.  
  916.    Make a working directory containing copies of the source files
  917. specified by MODULES.  You must execute `checkout' before using most of
  918. the other CVS commands, since most of them operate on your working
  919. directory.
  920.  
  921.    The MODULES part of the command are either symbolic names for some
  922. collection of source directories and files, or paths to directories or
  923. files in the repository.  The symbolic names are defined in the
  924. `modules' file.  *Note modules::.
  925.  
  926.    Depending on the modules you specify, `checkout' may recursively
  927. create directories and populate them with the appropriate source files.
  928. You can then edit these source files at any time (regardless of
  929. whether other software developers are editing their own copies of the
  930. sources); update them to include new changes applied by others to the
  931. source repository; or commit your work as a permanent change to the
  932. source repository.
  933.  
  934.    Note that `checkout' is used to create directories.  The top-level
  935. directory created is always added to the directory where `checkout' is
  936. invoked, and usually has the same name as the specified module.  In the
  937. case of a module alias, the created sub-directory may have a different
  938. name, but you can be sure that it will be a sub-directory, and that
  939. `checkout' will show the relative path leading to each file as it is
  940. extracted into your private work area (unless you specify the `-Q'
  941. global option).
  942.  
  943.    The files created by `checkout' are created read-write, unless the
  944. `-r' option to CVS (*note Global options::.) is specified, the
  945. `CVSREAD' environment variable is specified (*note Environment
  946. variables::.), or a watch is in effect for that file (*note Watches::.).
  947.  
  948.    Running `checkout' on a directory that was already built by a prior
  949. `checkout' is also permitted, and has the same effect as specifying the
  950. `-d' option to the `update' command, that is, any new directories that
  951. have been created in the repository will appear in your work area.
  952. *Note update::.
  953.  
  954. * Menu:
  955.  
  956. * checkout options::            checkout options
  957. * checkout examples::           checkout examples
  958.  
  959. 
  960. File: cvs.info,  Node: checkout options,  Next: checkout examples,  Up: checkout
  961.  
  962. checkout options
  963. ----------------
  964.  
  965.    These standard options are supported by `checkout' (*note Common
  966. options::., for a complete description of them):
  967.  
  968. `-D DATE'
  969.      Use the most recent revision no later than DATE.  This option is
  970.      sticky, and implies `-P'.
  971.  
  972. `-f'
  973.      Only useful with the `-D DATE' or `-r TAG' flags.  If no matching
  974.      revision is found, retrieve the most recent revision (instead of
  975.      ignoring the file).
  976.  
  977. `-k KFLAG'
  978.      Process RCS keywords according to KFLAG.  See co(1).  This option
  979.      is sticky; future updates of this file in this working directory
  980.      will use the same KFLAG.  The `status' command can be viewed to
  981.      see the sticky options.  *Note status::.
  982.  
  983. `-l'
  984.      Local; run only in current working directory.
  985.  
  986. `-n'
  987.      Do not run any checkout program (as specified with the `-o' option
  988.      in the modules file; *note modules::.).
  989.  
  990. `-P'
  991.      Prune empty directories.
  992.  
  993. `-p'
  994.      Pipe files to the standard output.
  995.  
  996. `-r TAG'
  997.      Use revision TAG.  This option is sticky, and implies `-P'.
  998.  
  999.    In addition to those, you can use these special command options with
  1000. `checkout':
  1001.  
  1002. `-A'
  1003.      Reset any sticky tags, dates, or `-k' options.  (If you get a
  1004.      working file using one of the `-r', `-D', or `-k' options, CVS
  1005.      remembers the corresponding tag, date, or KFLAG and continues using
  1006.      it for future updates; use the `-A' option to make CVS forget
  1007.      these specifications, and retrieve the `head' revision of the
  1008.      file).
  1009.  
  1010. `-c'
  1011.      Copy the module file, sorted, to the standard output, instead of
  1012.      creating or modifying any files or directories in your working
  1013.      directory.
  1014.  
  1015. `-d DIR'
  1016.      Create a directory called DIR for the working files, instead of
  1017.      using the module name.  Unless you also use `-N', the paths
  1018.      created under DIR will be as short as possible.
  1019.  
  1020. `-j TAG'
  1021.      With two `-j' options, merge changes from the revision specified
  1022.      with the first `-j' option to the revision specified with the
  1023.      second `j' option, into the working directory.
  1024.  
  1025.      With one `-j' option, merge changes from the ancestor revision to
  1026.      the revision specified with the `-j' option, into the working
  1027.      directory.  The ancestor revision is the common ancestor of the
  1028.      revision which the working directory is based on, and the revision
  1029.      specified in the `-j' option.
  1030.  
  1031.      In addition, each -j option can contain an optional date
  1032.      specification which, when used with branches, can limit the chosen
  1033.      revision to one within a specific date.  An optional date is
  1034.      specified by adding a colon (:) to the tag:
  1035.      `-jSYMBOLIC_TAG:DATE_SPECIFIER'.
  1036.  
  1037.      *Note Merging::.
  1038.  
  1039. `-N'
  1040.      Only useful together with `-d DIR'.  With this option, CVS will
  1041.      not shorten module paths in your working directory.  (Normally,
  1042.      CVS shortens paths as much as possible when you specify an
  1043.      explicit target directory).
  1044.  
  1045. `-s'
  1046.      Like `-c', but include the status of all modules, and sort it by
  1047.      the status string.  *Note modules::, for info about the `-s'
  1048.      option that is used inside the modules file to set the module
  1049.      status.
  1050.  
  1051. 
  1052. File: cvs.info,  Node: checkout examples,  Prev: checkout options,  Up: checkout
  1053.  
  1054. checkout examples
  1055. -----------------
  1056.  
  1057.    Get a copy of the module `tc':
  1058.  
  1059.      $ cvs checkout tc
  1060.  
  1061.    Get a copy of the module `tc' as it looked one day ago:
  1062.  
  1063.      $ cvs checkout -D yesterday tc
  1064.  
  1065. 
  1066. File: cvs.info,  Node: commit,  Next: diff,  Prev: checkout,  Up: Invoking CVS
  1067.  
  1068. commit--Check files into the repository
  1069. =======================================
  1070.  
  1071.    * Version 1.3 Synopsis: commit [-lnR] [-m 'log_message' | -f file]
  1072.      [-r revision] [files...]
  1073.  
  1074.    * Version 1.3.1 Synopsis: commit [-lnRf] [-m 'log_message' | -F
  1075.      file] [-r revision] [files...]
  1076.  
  1077.    * Requires: working directory, repository.
  1078.  
  1079.    * Changes: repository.
  1080.  
  1081.    * Synonym: ci
  1082.  
  1083.    *Warning:* The `-f FILE' option will probably be renamed to `-F
  1084. FILE', and `-f' will be given a new behavior in future releases of CVS.
  1085.  
  1086.    Use `commit' when you want to incorporate changes from your working
  1087. source files into the source repository.
  1088.  
  1089.    If you don't specify particular files to commit, all of the files in
  1090. your working current directory are examined.  `commit' is careful to
  1091. change in the repository only those files that you have really changed.
  1092. By default (or if you explicitly specify the `-R' option), files in
  1093. subdirectories are also examined and committed if they have changed;
  1094. you can use the `-l' option to limit `commit' to the current directory
  1095. only.
  1096.  
  1097.    `commit' verifies that the selected files are up to date with the
  1098. current revisions in the source repository; it will notify you, and
  1099. exit without committing, if any of the specified files must be made
  1100. current first with `update' (*note update::.).  `commit' does not call
  1101. the `update' command for you, but rather leaves that for you to do when
  1102. the time is right.
  1103.  
  1104.    When all is well, an editor is invoked to allow you to enter a log
  1105. message that will be written to one or more logging programs (*note
  1106. modules::., and *note loginfo::.) and placed in the RCS history file
  1107. inside the repository.  This log message can be retrieved with the
  1108. `log' command; *Note log::.  You can specify the log message on the
  1109. command line with the `-m MESSAGE' option, and thus avoid the editor
  1110. invocation, or use the `-f FILE' option to specify that the argument
  1111. file contains the log message.
  1112.  
  1113. * Menu:
  1114.  
  1115. * commit options::              commit options
  1116. * commit examples::             commit examples
  1117.  
  1118. 
  1119. File: cvs.info,  Node: commit options,  Next: commit examples,  Up: commit
  1120.  
  1121. commit options
  1122. --------------
  1123.  
  1124.    These standard options are supported by `commit' (*note Common
  1125. options::., for a complete description of them):
  1126.  
  1127. `-l'
  1128.      Local; run only in current working directory.
  1129.  
  1130. `-n'
  1131.      Do not run any module program.
  1132.  
  1133. `-R'
  1134.      Commit directories recursively.  This is on by default.
  1135.  
  1136. `-r REVISION'
  1137.      Commit to REVISION.  REVISION must be either a branch, or a
  1138.      revision on the main trunk that is higher than any existing
  1139.      revision number.  You cannot commit to a specific revision on a
  1140.      branch.
  1141.  
  1142.    `commit' also supports these options:
  1143.  
  1144. `-F FILE'
  1145.      This option is present in CVS releases 1.3-s3 and later.  Read the
  1146.      log message from FILE, instead of invoking an editor.
  1147.  
  1148. `-f'
  1149.      This option is present in CVS 1.3-s3 and later releases of CVS.
  1150.      Note that this is not the standard behavior of the `-f' option as
  1151.      defined in *Note Common options::.
  1152.  
  1153.      Force CVS to commit a new revision even if you haven't made any
  1154.      changes to the file.  If the current revision of FILE is 1.7, then
  1155.      the following two commands are equivalent:
  1156.  
  1157.           $ cvs commit -f FILE
  1158.           $ cvs commit -r 1.8 FILE
  1159.  
  1160. `-f FILE'
  1161.      This option is present in CVS releases 1.3, 1.3-s1 and 1.3-s2.
  1162.      Note that this is not the standard behavior of the `-f' option as
  1163.      defined in *Note Common options::.
  1164.  
  1165.      Read the log message from FILE, instead of invoking an editor.
  1166.  
  1167. `-m MESSAGE'
  1168.      Use MESSAGE as the log message, instead of invoking an editor.
  1169.  
  1170. 
  1171. File: cvs.info,  Node: commit examples,  Prev: commit options,  Up: commit
  1172.  
  1173. commit examples
  1174. ---------------
  1175.  
  1176. New major release number
  1177. ........................
  1178.  
  1179.    When you make a major release of your product, you might want the
  1180. revision numbers to track your major release number.  You should
  1181. normally not care about the revision numbers, but this is a thing that
  1182. many people want to do, and it can be done without doing any harm.
  1183.  
  1184.    To bring all your files up to the RCS revision 3.0 (including those
  1185. that haven't changed), you might do:
  1186.  
  1187.      $ cvs commit -r 3.0
  1188.  
  1189.    Note that it is generally a bad idea to try to make the RCS revision
  1190. number equal to the current release number of your product.  You should
  1191. think of the revision number as an internal number that the CVS package
  1192. maintains, and that you generally never need to care much about.  Using
  1193. the `tag' and `rtag' commands you can give symbolic names to the
  1194. releases instead.  *Note tag:: and *Note rtag::.
  1195.  
  1196.    Note that the number you specify with `-r' must be larger than any
  1197. existing revision number.  That is, if revision 3.0 exists, you cannot
  1198. `cvs commit -r 1.3'.
  1199.  
  1200. Committing to a branch
  1201. ......................
  1202.  
  1203.    You can commit to a branch revision (one that has an even number of
  1204. dots) with the `-r' option.  To create a branch revision, use the `-b'
  1205. option of the `rtag' or `tag' commands (*note tag::.  or *note
  1206. rtag::.).  Then, either `checkout' or `update' can be used to base your
  1207. sources on the newly created branch.  From that point on, all `commit'
  1208. changes made within these working sources will be automatically added
  1209. to a branch revision, thereby not disturbing main-line development in
  1210. any way.  For example, if you had to create a patch to the 1.2 version
  1211. of the product, even though the 2.0 version is already under
  1212. development, you might do:
  1213.  
  1214.      $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
  1215.      $ cvs checkout -r FCS1_2_Patch product_module
  1216.      $ cd product_module
  1217.      [[ hack away ]]
  1218.      $ cvs commit
  1219.  
  1220. This works automatically since the `-r' option is sticky.
  1221.  
  1222. Creating the branch after editing
  1223. .................................
  1224.  
  1225.    Say you have been working on some extremely experimental software,
  1226. based on whatever revision you happened to checkout last week.  If
  1227. others in your group would like to work on this software with you, but
  1228. without disturbing main-line development, you could commit your change
  1229. to a new branch.  Others can then checkout your experimental stuff and
  1230. utilize the full benefit of CVS conflict resolution.  The scenario might
  1231. look like:
  1232.  
  1233.      [[ hacked sources are present ]]
  1234.      $ cvs tag -b EXPR1
  1235.      $ cvs update -r EXPR1
  1236.      $ cvs commit
  1237.  
  1238.    The `update' command will make the `-r EXPR1' option sticky on all
  1239. files.  Note that your changes to the files will never be removed by the
  1240. `update' command.  The `commit' will automatically commit to the
  1241. correct branch, because the `-r' is sticky.  You could also do like
  1242. this:
  1243.  
  1244.      [[ hacked sources are present ]]
  1245.      $ cvs tag -b EXPR1
  1246.      $ cvs commit -r EXPR1
  1247.  
  1248. but then, only those files that were changed by you will have the `-r
  1249. EXPR1' sticky flag.  If you hack away, and commit without specifying
  1250. the `-r EXPR1' flag, some files may accidentally end up on the main
  1251. trunk.
  1252.  
  1253.    To work with you on the experimental change, others would simply do
  1254.  
  1255.      $ cvs checkout -r EXPR1 whatever_module
  1256.  
  1257. 
  1258. File: cvs.info,  Node: diff,  Next: export,  Prev: commit,  Up: Invoking CVS
  1259.  
  1260. diff--Run diffs between revisions
  1261. =================================
  1262.  
  1263.    * Synopsis: diff [-l] [rcsdiff_options] [[-r rev1 | -D date1] [-r
  1264.      rev2 |  -D date2]] [files...]
  1265.  
  1266.    * Requires: working directory, repository.
  1267.  
  1268.    * Changes: nothing.
  1269.  
  1270.    The `diff' command is used to compare different revisions of files.
  1271. The default action is to compare your working files with the revisions
  1272. they were based on, and report any differences that are found.
  1273.  
  1274.    If any file names are given, only those files are compared.  If any
  1275. directories are given, all files under them will be compared.
  1276.  
  1277.    The exit status will be 0 if no differences were found, 1 if some
  1278. differences were found, and 2 if any error occurred.
  1279.  
  1280. * Menu:
  1281.  
  1282. * diff options::                diff options
  1283. * diff examples::               diff examples
  1284.  
  1285.