PageRenderTime 1040ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/contrib/cvs/doc/cvs.1

https://bitbucket.org/freebsd/freebsd-head/
Unknown | 3968 lines | 3937 code | 31 blank | 0 comment | 0 complexity | 67448ebcc103d7fe3cc0c5d37422628d MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, LGPL-2.0, LGPL-2.1, BSD-2-Clause, 0BSD, JSON, AGPL-1.0, GPL-2.0
  1. .\" This is the man page for CVS. It is auto-generated from the
  2. .\" cvs.man.header, cvs.texinfo, & cvs.man.footer files. Please make changes
  3. .\" there. A full copyright & license notice may also be found in cvs.texinfo.
  4. .\"
  5. .\" Man page autogeneration, including this header file, is
  6. .\" Copyright 2004-2005 The Free Software Foundation, Inc.,
  7. .\" Derek R. Price, & Ximbiot <http://ximbiot.com>.
  8. .\"
  9. .\" This documentation is free software; you can redistribute it and/or modify
  10. .\" it under the terms of the GNU General Public License as published by
  11. .\" the Free Software Foundation; either version 2, or (at your option)
  12. .\" any later version.
  13. .\"
  14. .\" This documentation is distributed in the hope that it will be useful,
  15. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. .\" GNU General Public License for more details.
  18. .\"
  19. .\" You should have received a copy of the GNU General Public License
  20. .\" along with this documentation; if not, write to the Free Software
  21. .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. .de Id
  23. .ds Rv \\$3
  24. .ds Dt \\$4
  25. ..
  26. .TH CVS 1 "\*(Dt"
  27. .\" Full space in nroff; half space in troff
  28. .de SP
  29. .if n .sp
  30. .if t .sp .5
  31. ..
  32. .\" quoted command
  33. .de `
  34. .RB ` "\|\\$1\|" '\\$2
  35. ..
  36. .SH "NAME"
  37. cvs \- Concurrent Versions System
  38. .SH "SYNOPSIS"
  39. .TP
  40. \fBcvs\fP [ \fIcvs_options\fP ]
  41. .I cvs_command
  42. [
  43. .I command_options
  44. ] [
  45. .I command_args
  46. ]
  47. .SH "NOTE"
  48. .IX "revision control system" "\fLcvs\fR"
  49. .IX cvs "" "\fLcvs\fP \- concurrent versions system"
  50. .IX "concurrent versions system \- \fLcvs\fP"
  51. .IX "release control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system"
  52. .IX "source control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system"
  53. .IX revisions "cvs command" "" "\fLcvs\fP \- source control"
  54. This manpage is a summary of some of the features of
  55. \fBcvs\fP. It is auto-generated from an appendix of the CVS manual.
  56. For more in-depth documentation, please consult the
  57. Cederqvist manual (via the
  58. .B info CVS
  59. command or otherwise,
  60. as described in the SEE ALSO section of this manpage). Cross-references
  61. in this man page refer to nodes in the same.
  62. .SH "CVS commands"
  63. .SS "Guide to CVS commands"
  64. .SP
  65. This appendix describes the overall structure of
  66. \fBcvs\fR commands, and describes some commands in
  67. detail (others are described elsewhere; for a quick
  68. reference to \fBcvs\fR commands, see node `Invoking CVS\(aq in the CVS manual).
  69. .SP
  70. .SH "Structure"
  71. .SS "Overall structure of CVS commands"
  72. .IX "Structure"
  73. .IX "CVS command structure"
  74. .IX "Command structure"
  75. .IX "Format of CVS commands"
  76. .SP
  77. The overall format of all \fBcvs\fR commands is:
  78. .SP
  79. .PD 0
  80. .SP
  81. .IP "" 2
  82. cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
  83. .PD
  84. .IP "" 0
  85. .SP
  86. .IP "" 0
  87. \fBcvs\fR
  88. .IP "" 2
  89. The name of the \fBcvs\fR program.
  90. .SP
  91. .IP "" 0
  92. \fBcvs_options\fR
  93. .IP "" 2
  94. Some options that affect all sub-commands of \fBcvs\fR. These are
  95. described below.
  96. .SP
  97. .IP "" 0
  98. \fBcvs_command\fR
  99. .IP "" 2
  100. One of several different sub-commands. Some of the commands have
  101. aliases that can be used instead; those aliases are noted in the
  102. reference manual for that command. There are only two situations
  103. where you may omit \fBcvs_command\fR: \fBcvs -H\fR elicits a
  104. list of available commands, and \fBcvs -v\fR displays version
  105. information on \fBcvs\fR itself.
  106. .SP
  107. .IP "" 0
  108. \fBcommand_options\fR
  109. .IP "" 2
  110. Options that are specific for the command.
  111. .SP
  112. .IP "" 0
  113. \fBcommand_args\fR
  114. .IP "" 2
  115. Arguments to the commands.
  116. .SP
  117. There is unfortunately some confusion between
  118. \fBcvs_options\fR and \fBcommand_options\fR.
  119. When given as a \fBcvs_option\fR, some options only
  120. affect some of the commands. When given as a
  121. \fBcommand_option\fR it may have a different meaning, and
  122. be accepted by more commands. In other words, do not
  123. take the above categorization too seriously. Look at
  124. the documentation instead.
  125. .SP
  126. .SH "Exit status"
  127. .SS "CVS\(aqs exit status"
  128. .IX "Exit status, of CVS"
  129. .SP
  130. \fBcvs\fR can indicate to the calling environment whether it
  131. succeeded or failed by setting its \fIexit status\fR.
  132. The exact way of testing the exit status will vary from
  133. one operating system to another. For example in a unix
  134. shell script the \fB$?\fR variable will be 0 if the
  135. last command returned a successful exit status, or
  136. greater than 0 if the exit status indicated failure.
  137. .SP
  138. If \fBcvs\fR is successful, it returns a successful status;
  139. if there is an error, it prints an error message and
  140. returns a failure status. The one exception to this is
  141. the \fBcvs diff\fR command. It will return a
  142. successful status if it found no differences, or a
  143. failure status if there were differences or if there
  144. was an error. Because this behavior provides no good
  145. way to detect errors, in the future it is possible that
  146. \fBcvs diff\fR will be changed to behave like the
  147. other \fBcvs\fR commands.
  148. .SP
  149. .SH "~/.cvsrc"
  150. .SS "Default options and the ~/.cvsrc file"
  151. .IX "\&.cvsrc file"
  152. .IX "Option defaults"
  153. .SP
  154. There are some \fBcommand_options\fR that are used so
  155. often that you might have set up an alias or some other
  156. means to make sure you always specify that option. One
  157. example (the one that drove the implementation of the
  158. \fB.cvsrc\fR support, actually) is that many people find the
  159. default output of the \fBdiff\fR command to be very
  160. hard to read, and that either context diffs or unidiffs
  161. are much easier to understand.
  162. .SP
  163. The \fB~/.cvsrc\fR file is a way that you can add
  164. default options to \fBcvs_commands\fR within cvs,
  165. instead of relying on aliases or other shell scripts.
  166. .SP
  167. The format of the \fB~/.cvsrc\fR file is simple. The
  168. file is searched for a line that begins with the same
  169. name as the \fBcvs_command\fR being executed. If a
  170. match is found, then the remainder of the line is split
  171. up (at whitespace characters) into separate options and
  172. added to the command arguments \fIbefore\fR any
  173. options from the command line.
  174. .SP
  175. If a command has two names (e.g., \fBcheckout\fR and
  176. \fBco\fR), the official name, not necessarily the one
  177. used on the command line, will be used to match against
  178. the file. So if this is the contents of the user\(aqs
  179. \fB~/.cvsrc\fR file:
  180. .SP
  181. .PD 0
  182. .SP
  183. .IP "" 2
  184. log -N
  185. .IP "" 2
  186. diff -uN
  187. .IP "" 2
  188. rdiff -u
  189. .IP "" 2
  190. update -Pd
  191. .IP "" 2
  192. checkout -P
  193. .IP "" 2
  194. release -d
  195. .PD
  196. .IP "" 0
  197. .SP
  198. the command \fBcvs checkout foo\fR would have the
  199. \fB-P\fR option added to the arguments, as well as
  200. \fBcvs co foo\fR.
  201. .SP
  202. With the example file above, the output from \fBcvs
  203. diff foobar\fR will be in unidiff format. \fBcvs diff
  204. -c foobar\fR will provide context diffs, as usual.
  205. Getting "old" format diffs would be slightly more
  206. complicated, because \fBdiff\fR doesn\(aqt have an option
  207. to specify use of the "old" format, so you would need
  208. \fBcvs -f diff foobar\fR.
  209. .SP
  210. In place of the command name you can use \fBcvs\fR to
  211. specify global options (see node `Global options\(aq in the CVS manual). For
  212. example the following line in \fB.cvsrc\fR
  213. .SP
  214. .PD 0
  215. .SP
  216. .IP "" 2
  217. cvs -z6
  218. .PD
  219. .IP "" 0
  220. .SP
  221. causes \fBcvs\fR to use compression level 6.
  222. .SP
  223. .SH "Global options"
  224. .IX "Options, global"
  225. .IX "Global options"
  226. .IX "Left-hand options"
  227. .SP
  228. The available \fBcvs_options\fR (that are given to the
  229. left of \fBcvs_command\fR) are:
  230. .SP
  231. .IP "" 0
  232. \fB--allow-root=\fIrootdir\fB\fR
  233. .IP "" 2
  234. Specify legal \fBcvsroot\fR directory. See
  235. `Password authentication server\(aq in the CVS manual.
  236. .SP
  237. .IX "Authentication, stream"
  238. .IX "Stream authentication"
  239. .IP "" 0
  240. \fB-a\fR
  241. .IP "" 2
  242. Authenticate all communication between the client and
  243. the server. Only has an effect on the \fBcvs\fR client.
  244. As of this writing, this is only implemented when using
  245. a GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual).
  246. Authentication prevents certain sorts of attacks
  247. involving hijacking the active \fBtcp\fR connection.
  248. Enabling authentication does not enable encryption.
  249. .SP
  250. .IX "RCSBIN, overriding"
  251. .IX "Overriding RCSBIN"
  252. .IP "" 0
  253. \fB-b \fIbindir\fB\fR
  254. .IP "" 2
  255. In \fBcvs\fR 1.9.18 and older, this specified that
  256. \fBrcs\fR programs are in the \fIbindir\fR directory.
  257. Current versions of \fBcvs\fR do not run \fBrcs\fR
  258. programs; for compatibility this option is accepted,
  259. but it does nothing.
  260. .SP
  261. .IX "TMPDIR, overriding"
  262. .IX "Overriding TMPDIR"
  263. .IP "" 0
  264. \fB-T \fItempdir\fB\fR
  265. .IP "" 2
  266. Use \fItempdir\fR as the directory where temporary files are
  267. located. Overrides the setting of the \fB$TMPDIR\fR environment
  268. variable and any precompiled directory. This parameter should be
  269. specified as an absolute pathname.
  270. (When running client/server, \fB-T\fR affects only the local process;
  271. specifying \fB-T\fR for the client has no effect on the server and
  272. vice versa.)
  273. .SP
  274. .IX "CVSROOT, overriding"
  275. .IX "Overriding CVSROOT"
  276. .IP "" 0
  277. \fB-d \fIcvs_root_directory\fB\fR
  278. .IP "" 2
  279. Use \fIcvs_root_directory\fR as the root directory
  280. pathname of the repository. Overrides the setting of
  281. the \fB$CVSROOT\fR environment variable. See `Repository\(aq in the CVS manual.
  282. .SP
  283. .IX "EDITOR, overriding"
  284. .IX "Overriding EDITOR"
  285. .IP "" 0
  286. \fB-e \fIeditor\fB\fR
  287. .IP "" 2
  288. Use \fIeditor\fR to enter revision log information. Overrides the
  289. setting of the \fB$CVSEDITOR\fR and \fB$EDITOR\fR
  290. environment variables. For more information, see
  291. `Committing your changes\(aq in the CVS manual.
  292. .SP
  293. .IP "" 0
  294. \fB-f\fR
  295. .IP "" 2
  296. Do not read the \fB~/.cvsrc\fR file. This
  297. option is most often used because of the
  298. non-orthogonality of the \fBcvs\fR option set. For
  299. example, the \fBcvs log\fR option \fB-N\fR (turn off
  300. display of tag names) does not have a corresponding
  301. option to turn the display on. So if you have
  302. \fB-N\fR in the \fB~/.cvsrc\fR entry for \fBlog\fR,
  303. you may need to use \fB-f\fR to show the tag names.
  304. .SP
  305. .IP "" 0
  306. \fB-H\fR
  307. .IP "" 2
  308. .IP "" 0
  309. \fB--help\fR
  310. .IP "" 2
  311. Display usage information about the specified \fBcvs_command\fR
  312. (but do not actually execute the command). If you don\(aqt specify
  313. a command name, \fBcvs -H\fR displays overall help for
  314. \fBcvs\fR, including a list of other help options.
  315. .SP
  316. .IX "Read-only mode"
  317. .IP "" 0
  318. \fB-n\fR
  319. .IP "" 2
  320. Do not change any files. Attempt to execute the
  321. \fBcvs_command\fR, but only to issue reports; do not remove,
  322. update, or merge any existing files, or create any new files.
  323. .SP
  324. Note that \fBcvs\fR will not necessarily produce exactly
  325. the same output as without \fB-n\fR. In some cases
  326. the output will be the same, but in other cases
  327. \fBcvs\fR will skip some of the processing that would
  328. have been required to produce the exact same output.
  329. .SP
  330. .IP "" 0
  331. \fB-Q\fR
  332. .IP "" 2
  333. Cause the command to be really quiet; the command will only
  334. generate output for serious problems.
  335. .SP
  336. .IP "" 0
  337. \fB-q\fR
  338. .IP "" 2
  339. Cause the command to be somewhat quiet; informational messages,
  340. such as reports of recursion through subdirectories, are
  341. suppressed.
  342. .SP
  343. .IX "Read-only files, and -r"
  344. .IP "" 0
  345. \fB-r\fR
  346. .IP "" 2
  347. Make new working files read-only. Same effect
  348. as if the \fB$CVSREAD\fR environment variable is set
  349. (see node `Environment variables\(aq in the CVS manual). The default is to
  350. make working files writable, unless watches are on
  351. (see node `Watches\(aq in the CVS manual).
  352. .SP
  353. .IP "" 0
  354. \fB-s \fIvariable\fB=\fIvalue\fB\fR
  355. .IP "" 2
  356. Set a user variable (see node `Variables\(aq in the CVS manual).
  357. .SP
  358. .IX "Trace"
  359. .IP "" 0
  360. \fB-t\fR
  361. .IP "" 2
  362. Trace program execution; display messages showing the steps of
  363. \fBcvs\fR activity. Particularly useful with \fB-n\fR to explore the
  364. potential impact of an unfamiliar command.
  365. .SP
  366. .IP "" 0
  367. \fB-v\fR
  368. .IP "" 2
  369. .IP "" 0
  370. \fB--version\fR
  371. .IP "" 2
  372. Display version and copyright information for \fBcvs\fR.
  373. .SP
  374. .IX "CVSREAD, overriding"
  375. .IX "Overriding CVSREAD"
  376. .IP "" 0
  377. \fB-w\fR
  378. .IP "" 2
  379. Make new working files read-write. Overrides the
  380. setting of the \fB$CVSREAD\fR environment variable.
  381. Files are created read-write by default, unless \fB$CVSREAD\fR is
  382. set or \fB-r\fR is given.
  383. .SP
  384. .IP "" 0
  385. \fB-x\fR
  386. .IP "" 2
  387. .IX "Encryption"
  388. Encrypt all communication between the client and the
  389. server. Only has an effect on the \fBcvs\fR client. As
  390. of this writing, this is only implemented when using a
  391. GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual) or a
  392. Kerberos connection (see node `Kerberos authenticated\(aq in the CVS manual).
  393. Enabling encryption implies that message traffic is
  394. also authenticated. Encryption support is not
  395. available by default; it must be enabled using a
  396. special configure option, \fB--enable-encryption\fR,
  397. when you build \fBcvs\fR.
  398. .SP
  399. .IP "" 0
  400. \fB-z \fIgzip-level\fB\fR
  401. .IP "" 2
  402. .IX "Compression"
  403. .IX "Gzip"
  404. Set the compression level.
  405. Valid levels are 1 (high speed, low compression) to
  406. 9 (low speed, high compression), or 0 to disable
  407. compression (the default).
  408. Only has an effect on the \fBcvs\fR client.
  409. .SP
  410. .SP
  411. .SH "Common options"
  412. .SS "Common command options"
  413. .IX "Common options"
  414. .IX "Right-hand options"
  415. .SP
  416. This section describes the \fBcommand_options\fR that
  417. are available across several \fBcvs\fR commands. These
  418. options are always given to the right of
  419. \fBcvs_command\fR. Not all
  420. commands support all of these options; each option is
  421. only supported for commands where it makes sense.
  422. However, when a command has one of these options you
  423. can almost always count on the same behavior of the
  424. option as in other commands. (Other command options,
  425. which are listed with the individual commands, may have
  426. different behavior from one \fBcvs\fR command to the other).
  427. .SP
  428. \fBThe \fBhistory\fB command is an exception; it supports
  429. many options that conflict even with these standard options.\fR
  430. .SP
  431. .IX "Dates"
  432. .IX "Time"
  433. .IX "Specifying dates"
  434. .IP "" 0
  435. \fB-D \fIdate_spec\fB\fR
  436. .IP "" 2
  437. Use the most recent revision no later than \fIdate_spec\fR.
  438. \fIdate_spec\fR is a single argument, a date description
  439. specifying a date in the past.
  440. .SP
  441. The specification is \fIsticky\fR when you use it to make a
  442. private copy of a source file; that is, when you get a working
  443. file using \fB-D\fR, \fBcvs\fR records the date you specified, so that
  444. further updates in the same directory will use the same date
  445. (for more information on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual).
  446. .SP
  447. \fB-D\fR is available with the \fBannotate\fR, \fBcheckout\fR,
  448. \fBdiff\fR, \fBexport\fR, \fBhistory\fR,
  449. \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR commands.
  450. (The \fBhistory\fR command uses this option in a
  451. slightly different way; see node `history options\(aq in the CVS manual).
  452. .SP
  453. .IX "Timezone, in input"
  454. .IX "Zone, time, in input"
  455. A wide variety of date formats are supported by
  456. \fBcvs\fR. The most standard ones are ISO8601 (from the
  457. International Standards Organization) and the Internet
  458. e-mail standard (specified in RFC822 as amended by
  459. RFC1123).
  460. .SP
  461. ISO8601 dates have many variants but a few examples
  462. are:
  463. .SP
  464. .PD 0
  465. .SP
  466. .IP "" 4
  467. 1972-09-24
  468. .IP "" 4
  469. 1972-09-24 20:05
  470. .PD
  471. .IP "" 2
  472. .SP
  473. There are a lot more ISO8601 date formats, and \fBcvs\fR
  474. accepts many of them, but you probably don\(aqt want to
  475. hear the \fIwhole\fR long story :-).
  476. .SP
  477. In addition to the dates allowed in Internet e-mail
  478. itself, \fBcvs\fR also allows some of the fields to be
  479. omitted. For example:
  480. .SP
  481. .PD 0
  482. .SP
  483. .IP "" 4
  484. 24 Sep 1972 20:05
  485. .IP "" 4
  486. 24 Sep
  487. .PD
  488. .IP "" 2
  489. .SP
  490. The date is interpreted as being in the
  491. local timezone, unless a specific timezone is
  492. specified.
  493. .SP
  494. These two date formats are preferred. However,
  495. \fBcvs\fR currently accepts a wide variety of other date
  496. formats. They are intentionally not documented here in
  497. any detail, and future versions of \fBcvs\fR might not
  498. accept all of them.
  499. .SP
  500. One such format is
  501. \fB\fImonth\fB/\fIday\fB/\fIyear\fB\fR. This may
  502. confuse people who are accustomed to having the month
  503. and day in the other order; \fB1/4/96\fR is January 4,
  504. not April 1.
  505. .SP
  506. Remember to quote the argument to the \fB-D\fR
  507. flag so that your shell doesn\(aqt interpret spaces as
  508. argument separators. A command using the \fB-D\fR
  509. flag can look like this:
  510. .SP
  511. .PD 0
  512. .SP
  513. .IP "" 4
  514. $ cvs diff -D "1 hour ago" cvs.texinfo
  515. .PD
  516. .IP "" 2
  517. .SP
  518. .IX "Forcing a tag match"
  519. .IP "" 0
  520. \fB-f\fR
  521. .IP "" 2
  522. When you specify a particular date or tag to \fBcvs\fR commands, they
  523. normally ignore files that do not contain the tag (or did not
  524. exist prior to the date) that you specified. Use the \fB-f\fR option
  525. if you want files retrieved even when there is no match for the
  526. tag or date. (The most recent revision of the file
  527. will be used).
  528. .SP
  529. Note that even with \fB-f\fR, a tag that you specify
  530. must exist (that is, in some file, not necessary in
  531. every file). This is so that \fBcvs\fR will continue to
  532. give an error if you mistype a tag name.
  533. .SP
  534. \fB-f\fR is available with these commands:
  535. \fBannotate\fR, \fBcheckout\fR, \fBexport\fR,
  536. \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR.
  537. .SP
  538. \fBWARNING: The \fBcommit\fB and \fBremove\fB
  539. commands also have a
  540. \fB-f\fB option, but it has a different behavior for
  541. those commands. See `commit options\(aq in the CVS manual, and
  542. `Removing files\(aq in the CVS manual.\fR
  543. .SP
  544. .IP "" 0
  545. \fB-k \fIkflag\fB\fR
  546. .IP "" 2
  547. Alter the default processing of keywords.
  548. See `Keyword substitution\(aq in the CVS manual, for the meaning of
  549. \fIkflag\fR. Your \fIkflag\fR specification is
  550. \fIsticky\fR when you use it to create a private copy
  551. of a source file; that is, when you use this option
  552. with the \fBcheckout\fR or \fBupdate\fR commands,
  553. \fBcvs\fR associates your selected \fIkflag\fR with the
  554. file, and continues to use it with future update
  555. commands on the same file until you specify otherwise.
  556. .SP
  557. The \fB-k\fR option is available with the \fBadd\fR,
  558. \fBcheckout\fR, \fBdiff\fR, \fBrdiff\fR, \fBimport\fR and
  559. \fBupdate\fR commands.
  560. .SP
  561. .IP "" 0
  562. \fB-l\fR
  563. .IP "" 2
  564. Local; run only in current working directory, rather than
  565. recursing through subdirectories.
  566. .SP
  567. Available with the following commands: \fBannotate\fR, \fBcheckout\fR,
  568. \fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR,
  569. \fBlog\fR, \fBrdiff\fR, \fBremove\fR, \fBrtag\fR,
  570. \fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR,
  571. and \fBwatchers\fR.
  572. .SP
  573. .IX "Editor, avoiding invocation of"
  574. .IX "Avoiding editor invocation"
  575. .IP "" 0
  576. \fB-m \fImessage\fB\fR
  577. .IP "" 2
  578. Use \fImessage\fR as log information, instead of
  579. invoking an editor.
  580. .SP
  581. Available with the following commands: \fBadd\fR,
  582. \fBcommit\fR and \fBimport\fR.
  583. .SP
  584. .IP "" 0
  585. \fB-n\fR
  586. .IP "" 2
  587. Do not run any tag program. (A program can be
  588. specified to run in the modules
  589. database (see node `modules\(aq in the CVS manual); this option bypasses it).
  590. .SP
  591. \fBThis is not the same as the \fBcvs -n\fB
  592. program option, which you can specify to the left of a cvs command!\fR
  593. .SP
  594. Available with the \fBcheckout\fR, \fBexport\fR,
  595. and \fBrtag\fR commands.
  596. .SP
  597. .IP "" 0
  598. \fB-P\fR
  599. .IP "" 2
  600. Prune empty directories. See `Removing directories\(aq in the CVS manual.
  601. .SP
  602. .IP "" 0
  603. \fB-p\fR
  604. .IP "" 2
  605. Pipe the files retrieved from the repository to standard output,
  606. rather than writing them in the current directory. Available
  607. with the \fBcheckout\fR and \fBupdate\fR commands.
  608. .SP
  609. .IP "" 0
  610. \fB-R\fR
  611. .IP "" 2
  612. Process directories recursively. This is on by default.
  613. .SP
  614. Available with the following commands: \fBannotate\fR, \fBcheckout\fR,
  615. \fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR,
  616. \fBrdiff\fR, \fBremove\fR, \fBrtag\fR,
  617. \fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR,
  618. and \fBwatchers\fR.
  619. .SP
  620. .IP "" 0
  621. \fB-r \fItag\fB\fR
  622. .IP "" 2
  623. .IX "HEAD, special tag"
  624. .IX "BASE, special tag"
  625. Use the revision specified by the \fItag\fR argument instead of the
  626. default \fIhead\fR revision. As well as arbitrary tags defined
  627. with the \fBtag\fR or \fBrtag\fR command, two special tags are
  628. always available: \fBHEAD\fR refers to the most recent version
  629. available in the repository, and \fBBASE\fR refers to the
  630. revision you last checked out into the current working directory.
  631. .SP
  632. The tag specification is sticky when you use this
  633. with \fBcheckout\fR or \fBupdate\fR to make your own
  634. copy of a file: \fBcvs\fR remembers the tag and continues to use it on
  635. future update commands, until you specify otherwise (for more information
  636. on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual).
  637. .SP
  638. The tag can be either a symbolic or numeric tag, as
  639. described in `Tags\(aq in the CVS manual, or the name of a branch, as
  640. described in `Branching and merging\(aq in the CVS manual.
  641. When a command expects a specific revision,
  642. the name of a branch is interpreted as the most recent
  643. revision on that branch.
  644. .SP
  645. Specifying the \fB-q\fR global option along with the
  646. \fB-r\fR command option is often useful, to suppress
  647. the warning messages when the \fBrcs\fR file
  648. does not contain the specified tag.
  649. .SP
  650. \fBThis is not the same as the overall \fBcvs -r\fB option,
  651. which you can specify to the left of a \fBcvs\fB command!\fR
  652. .SP
  653. \fB-r\fR is available with the \fBannotate\fR, \fBcheckout\fR,
  654. \fBcommit\fR, \fBdiff\fR, \fBhistory\fR, \fBexport\fR, \fBrdiff\fR,
  655. \fBrtag\fR, and \fBupdate\fR commands.
  656. .SP
  657. .IP "" 0
  658. \fB-W\fR
  659. .IP "" 2
  660. Specify file names that should be filtered. You can
  661. use this option repeatedly. The spec can be a file
  662. name pattern of the same type that you can specify in
  663. the \fB.cvswrappers\fR file.
  664. Available with the following commands: \fBimport\fR,
  665. and \fBupdate\fR.
  666. .SP
  667. .SP
  668. .SH "add"
  669. .SS "Add files and directories to the repository"
  670. .IX "add (subcommand)"
  671. .SP
  672. .IP "\(bu" 2
  673. Synopsis: add [-k rcs-kflag] [-m message] files...
  674. .IP "\(bu" 2
  675. Requires: repository, working directory.
  676. .IP "\(bu" 2
  677. Changes: repository, working directory.
  678. .SP
  679. The \fBadd\fR command is used to present new files
  680. and directories for addition into the \fBcvs\fR
  681. repository. When \fBadd\fR is used on a directory,
  682. a new directory is created in the repository
  683. immediately. When used on a file, only the working
  684. directory is updated. Changes to the repository are
  685. not made until the \fBcommit\fR command is used on
  686. the newly added file.
  687. .SP
  688. The \fBadd\fR command also resurrects files that
  689. have been previously removed. This can be done
  690. before or after the \fBcommit\fR command is used
  691. to finalize the removal of files. Resurrected files
  692. are restored into the working directory at the time
  693. the \fBadd\fR command is executed.
  694. .SP
  695. .SH "add options"
  696. .SP
  697. These standard options are supported by \fBadd\fR
  698. (see node `Common options\(aq in the CVS manual, for a complete description of
  699. them):
  700. .SP
  701. .IP "" 0
  702. \fB-k \fIkflag\fB\fR
  703. .IP "" 2
  704. Process keywords according to \fIkflag\fR. See
  705. `Keyword substitution\(aq in the CVS manual.
  706. This option is sticky; future updates of
  707. this file in this working directory will use the same
  708. \fIkflag\fR. The \fBstatus\fR command can be viewed
  709. to see the sticky options. For more information on
  710. the \fBstatus\fR command, see node `Invoking CVS\(aq in the CVS manual.
  711. .SP
  712. .IP "" 0
  713. \fB-m \fImessage\fB\fR
  714. .IP "" 2
  715. Use \fImessage\fR as the log message, instead of
  716. invoking an editor.
  717. .SP
  718. .SH "add examples"
  719. .SP
  720. .SS "Adding a directory"
  721. .SP
  722. .PD 0
  723. .SP
  724. .IP "" 2
  725. $ mkdir doc
  726. .IP "" 2
  727. $ cvs add doc
  728. .IP "" 2
  729. Directory /path/to/repository/doc added to the repository
  730. .PD
  731. .IP "" 0
  732. .SP
  733. .SS "Adding a file"
  734. .SP
  735. .PD 0
  736. .SP
  737. .SP
  738. .IP "" 2
  739. $ >TODO
  740. .IP "" 2
  741. $ cvs add TODO
  742. .IP "" 2
  743. cvs add: scheduling file \`TODO\(aq for addition
  744. .IP "" 2
  745. cvs add: use \(aqcvs commit\(aq to add this file permanently
  746. .PD
  747. .IP "" 0
  748. .SP
  749. .SS "Undoing a \fBremove\fR command"
  750. .SP
  751. .PD 0
  752. .SP
  753. .IP "" 2
  754. $ rm -f makefile
  755. .IP "" 2
  756. $ cvs remove makefile
  757. .IP "" 2
  758. cvs remove: scheduling \`makefile\(aq for removal
  759. .IP "" 2
  760. cvs remove: use \(aqcvs commit\(aq to remove this file permanently
  761. .IP "" 2
  762. $ cvs add makefile
  763. .IP "" 2
  764. U makefile
  765. .IP "" 2
  766. cvs add: makefile, version 1.2, resurrected
  767. .PD
  768. .IP "" 0
  769. .SP
  770. .SH "admin"
  771. .SS "Administration"
  772. .IX "Admin (subcommand)"
  773. .SP
  774. .IP "\(bu" 2
  775. Requires: repository, working directory.
  776. .IP "\(bu" 2
  777. Changes: repository.
  778. .IP "\(bu" 2
  779. Synonym: rcs
  780. .SP
  781. This is the \fBcvs\fR interface to assorted
  782. administrative facilities. Some of them have
  783. questionable usefulness for \fBcvs\fR but exist for
  784. historical purposes. Some of the questionable options
  785. are likely to disappear in the future. This command
  786. \fIdoes\fR work recursively, so extreme care should be
  787. used.
  788. .SP
  789. .IX "cvsadmin"
  790. On unix, if there is a group named \fBcvsadmin\fR,
  791. only members of that group can run \fBcvs admin\fR
  792. (except for the \fBcvs admin -k\fR command, which can
  793. be run by anybody). This group should exist on the
  794. server, or any system running the non-client/server
  795. \fBcvs\fR. To disallow \fBcvs admin\fR for all users,
  796. create a group with no users in it. On NT, the
  797. \fBcvsadmin\fR feature does not exist and all users
  798. can run \fBcvs admin\fR.
  799. .SP
  800. .SH "admin options"
  801. .SP
  802. Some of these options have questionable usefulness for
  803. \fBcvs\fR but exist for historical purposes. Some even
  804. make it impossible to use \fBcvs\fR until you undo the
  805. effect!
  806. .SP
  807. .IP "" 0
  808. \fB-A\fIoldfile\fB\fR
  809. .IP "" 2
  810. Might not work together with \fBcvs\fR. Append the
  811. access list of \fIoldfile\fR to the access list of the
  812. \fBrcs\fR file.
  813. .SP
  814. .IP "" 0
  815. \fB-a\fIlogins\fB\fR
  816. .IP "" 2
  817. Might not work together with \fBcvs\fR. Append the
  818. login names appearing in the comma-separated list
  819. \fIlogins\fR to the access list of the \fBrcs\fR file.
  820. .SP
  821. .IP "" 0
  822. \fB-b[\fIrev\fB]\fR
  823. .IP "" 2
  824. Set the default branch to \fIrev\fR. In \fBcvs\fR, you
  825. normally do not manipulate default branches; sticky
  826. tags (see node `Sticky tags\(aq in the CVS manual) are a better way to decide
  827. which branch you want to work on. There is one reason
  828. to run \fBcvs admin -b\fR: to revert to the vendor\(aqs
  829. version when using vendor branches (see node `Reverting
  830. local changes\(aq in the CVS manual).
  831. There can be no space between \fB-b\fR and its argument.
  832. .SP
  833. .IX "Comment leader"
  834. .IP "" 0
  835. \fB-c\fIstring\fB\fR
  836. .IP "" 2
  837. Sets the comment leader to \fIstring\fR. The comment
  838. leader is not used by current versions of \fBcvs\fR or
  839. \fBrcs\fR 5.7. Therefore, you can almost surely not
  840. worry about it. See `Keyword substitution\(aq in the CVS manual.
  841. .SP
  842. .IP "" 0
  843. \fB-e[\fIlogins\fB]\fR
  844. .IP "" 2
  845. Might not work together with \fBcvs\fR. Erase the login
  846. names appearing in the comma-separated list
  847. \fIlogins\fR from the access list of the RCS file. If
  848. \fIlogins\fR is omitted, erase the entire access list.
  849. There can be no space between \fB-e\fR and its argument.
  850. .SP
  851. .IP "" 0
  852. \fB-I\fR
  853. .IP "" 2
  854. Run interactively, even if the standard input is not a
  855. terminal. This option does not work with the
  856. client/server \fBcvs\fR and is likely to disappear in
  857. a future release of \fBcvs\fR.
  858. .SP
  859. .IP "" 0
  860. \fB-i\fR
  861. .IP "" 2
  862. Useless with \fBcvs\fR. This creates and initializes a
  863. new \fBrcs\fR file, without depositing a revision. With
  864. \fBcvs\fR, add files with the \fBcvs add\fR command
  865. (see node `Adding files\(aq in the CVS manual).
  866. .SP
  867. .IP "" 0
  868. \fB-k\fIsubst\fB\fR
  869. .IP "" 2
  870. Set the default keyword
  871. substitution to \fIsubst\fR. See `Keyword
  872. substitution\(aq in the CVS manual. Giving an explicit \fB-k\fR option to
  873. \fBcvs update\fR, \fBcvs export\fR, or \fBcvs
  874. checkout\fR overrides this default.
  875. .SP
  876. .IP "" 0
  877. \fB-l[\fIrev\fB]\fR
  878. .IP "" 2
  879. Lock the revision with number \fIrev\fR. If a branch
  880. is given, lock the latest revision on that branch. If
  881. \fIrev\fR is omitted, lock the latest revision on the
  882. default branch. There can be no space between
  883. \fB-l\fR and its argument.
  884. .SP
  885. This can be used in conjunction with the
  886. \fBrcslock.pl\fR script in the \fBcontrib\fR
  887. directory of the \fBcvs\fR source distribution to
  888. provide reserved checkouts (where only one user can be
  889. editing a given file at a time). See the comments in
  890. that file for details (and see the \fBREADME\fR file
  891. in that directory for disclaimers about the unsupported
  892. nature of contrib). According to comments in that
  893. file, locking must set to strict (which is the default).
  894. .SP
  895. .IP "" 0
  896. \fB-L\fR
  897. .IP "" 2
  898. Set locking to strict. Strict locking means that the
  899. owner of an RCS file is not exempt from locking for
  900. checkin. For use with \fBcvs\fR, strict locking must be
  901. set; see the discussion under the \fB-l\fR option above.
  902. .SP
  903. .IX "Changing a log message"
  904. .IX "Replacing a log message"
  905. .IX "Correcting a log message"
  906. .IX "Fixing a log message"
  907. .IX "Log message, correcting"
  908. .IP "" 0
  909. \fB-m\fIrev\fB:\fImsg\fB\fR
  910. .IP "" 2
  911. Replace the log message of revision \fIrev\fR with
  912. \fImsg\fR.
  913. .SP
  914. .IP "" 0
  915. \fB-N\fIname\fB[:[\fIrev\fB]]\fR
  916. .IP "" 2
  917. Act like \fB-n\fR, except override any previous
  918. assignment of \fIname\fR. For use with magic branches,
  919. see `Magic branch numbers\(aq in the CVS manual.
  920. .SP
  921. .IP "" 0
  922. \fB-n\fIname\fB[:[\fIrev\fB]]\fR
  923. .IP "" 2
  924. Associate the symbolic name \fIname\fR with the branch
  925. or revision \fIrev\fR. It is normally better to use
  926. \fBcvs tag\fR or \fBcvs rtag\fR instead. Delete the
  927. symbolic name if both \fB:\fR and \fIrev\fR are
  928. omitted; otherwise, print an error message if
  929. \fIname\fR is already associated with another number.
  930. If \fIrev\fR is symbolic, it is expanded before
  931. association. A \fIrev\fR consisting of a branch number
  932. followed by a \fB.\fR stands for the current latest
  933. revision in the branch. A \fB:\fR with an empty
  934. \fIrev\fR stands for the current latest revision on the
  935. default branch, normally the trunk. For example,
  936. \fBcvs admin -n\fIname\fB:\fR associates \fIname\fR with the
  937. current latest revision of all the RCS files;
  938. this contrasts with \fBcvs admin -n\fIname\fB:$\fR which
  939. associates \fIname\fR with the revision numbers
  940. extracted from keyword strings in the corresponding
  941. working files.
  942. .SP
  943. .IX "Deleting revisions"
  944. .IX "Outdating revisions"
  945. .IX "Saving space"
  946. .IP "" 0
  947. \fB-o\fIrange\fB\fR
  948. .IP "" 2
  949. Deletes (\fIoutdates\fR) the revisions given by
  950. \fIrange\fR.
  951. .SP
  952. Note that this command can be quite dangerous unless
  953. you know \fIexactly\fR what you are doing (for example
  954. see the warnings below about how the
  955. \fIrev1\fR:\fIrev2\fR syntax is confusing).
  956. .SP
  957. If you are short on disc this option might help you.
  958. But think twice before using it\(emthere is no way short
  959. of restoring the latest backup to undo this command!
  960. If you delete different revisions than you planned,
  961. either due to carelessness or (heaven forbid) a \fBcvs\fR
  962. bug, there is no opportunity to correct the error
  963. before the revisions are deleted. It probably would be
  964. a good idea to experiment on a copy of the repository
  965. first.
  966. .SP
  967. Specify \fIrange\fR in one of the following ways:
  968. .SP
  969. .IP "" 2
  970. \fB\fIrev1\fB::\fIrev2\fB\fR
  971. .IP "" 4
  972. Collapse all revisions between rev1 and rev2, so that
  973. \fBcvs\fR only stores the differences associated with going
  974. from rev1 to rev2, not intermediate steps. For
  975. example, after \fB-o 1.3::1.5\fR one can retrieve
  976. revision 1.3, revision 1.5, or the differences to get
  977. from 1.3 to 1.5, but not the revision 1.4, or the
  978. differences between 1.3 and 1.4. Other examples:
  979. \fB-o 1.3::1.4\fR and \fB-o 1.3::1.3\fR have no
  980. effect, because there are no intermediate revisions to
  981. remove.
  982. .SP
  983. .IP "" 2
  984. \fB::\fIrev\fB\fR
  985. .IP "" 4
  986. Collapse revisions between the beginning of the branch
  987. containing \fIrev\fR and \fIrev\fR itself. The
  988. branchpoint and \fIrev\fR are left intact. For
  989. example, \fB-o ::1.3.2.6\fR deletes revision 1.3.2.1,
  990. revision 1.3.2.5, and everything in between, but leaves
  991. 1.3 and 1.3.2.6 intact.
  992. .SP
  993. .IP "" 2
  994. \fB\fIrev\fB::\fR
  995. .IP "" 4
  996. Collapse revisions between \fIrev\fR and the end of the
  997. branch containing \fIrev\fR. Revision \fIrev\fR is
  998. left intact but the head revision is deleted.
  999. .SP
  1000. .IP "" 2
  1001. \fB\fIrev\fB\fR
  1002. .IP "" 4
  1003. Delete the revision \fIrev\fR. For example, \fB-o
  1004. 1.3\fR is equivalent to \fB-o 1.2::1.4\fR.
  1005. .SP
  1006. .IP "" 2
  1007. \fB\fIrev1\fB:\fIrev2\fB\fR
  1008. .IP "" 4
  1009. Delete the revisions from \fIrev1\fR to \fIrev2\fR,
  1010. inclusive, on the same branch. One will not be able to
  1011. retrieve \fIrev1\fR or \fIrev2\fR or any of the
  1012. revisions in between. For example, the command
  1013. \fBcvs admin -oR_1_01:R_1_02 \&.\fR is rarely useful.
  1014. It means to delete revisions up to, and including, the
  1015. tag R_1_02. But beware! If there are files that have not
  1016. changed between R_1_02 and R_1_03 the file will have
  1017. \fIthe same\fR numerical revision number assigned to
  1018. the tags R_1_02 and R_1_03. So not only will it be
  1019. impossible to retrieve R_1_02; R_1_03 will also have to
  1020. be restored from the tapes! In most cases you want to
  1021. specify \fIrev1\fR::\fIrev2\fR instead.
  1022. .SP
  1023. .IP "" 2
  1024. \fB:\fIrev\fB\fR
  1025. .IP "" 4
  1026. Delete revisions from the beginning of the
  1027. branch containing \fIrev\fR up to and including
  1028. \fIrev\fR.
  1029. .SP
  1030. .IP "" 2
  1031. \fB\fIrev\fB:\fR
  1032. .IP "" 4
  1033. Delete revisions from revision \fIrev\fR, including
  1034. \fIrev\fR itself, to the end of the branch containing
  1035. \fIrev\fR.
  1036. .SP
  1037. None of the revisions to be deleted may have
  1038. branches or locks.
  1039. .SP
  1040. If any of the revisions to be deleted have symbolic
  1041. names, and one specifies one of the \fB::\fR syntaxes,
  1042. then \fBcvs\fR will give an error and not delete any
  1043. revisions. If you really want to delete both the
  1044. symbolic names and the revisions, first delete the
  1045. symbolic names with \fBcvs tag -d\fR, then run
  1046. \fBcvs admin -o\fR. If one specifies the
  1047. non-\fB::\fR syntaxes, then \fBcvs\fR will delete the
  1048. revisions but leave the symbolic names pointing to
  1049. nonexistent revisions. This behavior is preserved for
  1050. compatibility with previous versions of \fBcvs\fR, but
  1051. because it isn\(aqt very useful, in the future it may
  1052. change to be like the \fB::\fR case.
  1053. .SP
  1054. Due to the way \fBcvs\fR handles branches \fIrev\fR
  1055. cannot be specified symbolically if it is a branch.
  1056. See `Magic branch numbers\(aq in the CVS manual for an explanation.
  1057. .SP
  1058. Make sure that no-one has checked out a copy of the
  1059. revision you outdate. Strange things will happen if he
  1060. starts to edit it and tries to check it back in. For
  1061. this reason, this option is not a good way to take back
  1062. a bogus commit; commit a new revision undoing the bogus
  1063. change instead (see node `Merging two revisions\(aq in the CVS manual).
  1064. .SP
  1065. .IP "" 0
  1066. \fB-q\fR
  1067. .IP "" 2
  1068. Run quietly; do not print diagnostics.
  1069. .SP
  1070. .IP "" 0
  1071. \fB-s\fIstate\fB[:\fIrev\fB]\fR
  1072. .IP "" 2
  1073. Useful with \fBcvs\fR. Set the state attribute of the
  1074. revision \fIrev\fR to \fIstate\fR. If \fIrev\fR is a
  1075. branch number, assume the latest revision on that
  1076. branch. If \fIrev\fR is omitted, assume the latest
  1077. revision on the default branch. Any identifier is
  1078. acceptable for \fIstate\fR. A useful set of states is
  1079. \fBExp\fR (for experimental), \fBStab\fR (for
  1080. stable), and \fBRel\fR (for released). By default,
  1081. the state of a new revision is set to \fBExp\fR when
  1082. it is created. The state is visible in the output from
  1083. \fIcvs log\fR (see node `log\(aq in the CVS manual), and in the
  1084. \fB$\fP\fPLog$\fR and \fB$\fP\fPState$\fR keywords
  1085. (see node `Keyword substitution\(aq in the CVS manual). Note that \fBcvs\fR
  1086. uses the \fBdead\fR state for its own purposes (see node `Attic\(aq in the CVS manual); to
  1087. take a file to or from the \fBdead\fR state use
  1088. commands like \fBcvs remove\fR and \fBcvs add\fR
  1089. (see node `Adding and removing\(aq in the CVS manual), not \fBcvs admin -s\fR.
  1090. .SP
  1091. .IP "" 0
  1092. \fB-t[\fIfile\fB]\fR
  1093. .IP "" 2
  1094. Useful with \fBcvs\fR. Write descriptive text from the
  1095. contents of the named \fIfile\fR into the RCS file,
  1096. deleting the existing text. The \fIfile\fR pathname
  1097. may not begin with \fB-\fR. The descriptive text can be seen in the
  1098. output from \fBcvs log\fR (see node `log\(aq in the CVS manual).
  1099. There can be no space between \fB-t\fR and its argument.
  1100. .SP
  1101. If \fIfile\fR is omitted,
  1102. obtain the text from standard input, terminated by
  1103. end-of-file or by a line containing \fB.\fR by itself.
  1104. Prompt for the text if interaction is possible; see
  1105. \fB-I\fR.
  1106. .SP
  1107. .IP "" 0
  1108. \fB-t-\fIstring\fB\fR
  1109. .IP "" 2
  1110. Similar to \fB-t\fIfile\fB\fR. Write descriptive text
  1111. from the \fIstring\fR into the \fBrcs\fR file, deleting
  1112. the existing text.
  1113. There can be no space between \fB-t\fR and its argument.
  1114. .SP
  1115. .IP "" 0
  1116. \fB-U\fR
  1117. .IP "" 2
  1118. Set locking to non-strict. Non-strict locking means
  1119. that the owner of a file need not lock a revision for
  1120. checkin. For use with \fBcvs\fR, strict locking must be
  1121. set; see the discussion under the \fB-l\fR option
  1122. above.
  1123. .SP
  1124. .IP "" 0
  1125. \fB-u[\fIrev\fB]\fR
  1126. .IP "" 2
  1127. See the option \fB-l\fR above, for a discussion of
  1128. using this option with \fBcvs\fR. Unlock the revision
  1129. with number \fIrev\fR. If a branch is given, unlock
  1130. the latest revision on that branch. If \fIrev\fR is
  1131. omitted, remove the latest lock held by the caller.
  1132. Normally, only the locker of a revision may unlock it;
  1133. somebody else unlocking a revision breaks the lock.
  1134. This causes the original locker to be sent a \fBcommit\fR
  1135. notification (see node `Getting Notified\(aq in the CVS manual).
  1136. There can be no space between \fB-u\fR and its argument.
  1137. .SP
  1138. .IP "" 0
  1139. \fB-V\fIn\fB\fR
  1140. .IP "" 2
  1141. In previous versions of \fBcvs\fR, this option meant to
  1142. write an \fBrcs\fR file which would be acceptable to
  1143. \fBrcs\fR version \fIn\fR, but it is now obsolete and
  1144. specifying it will produce an error.
  1145. .SP
  1146. .IP "" 0
  1147. \fB-x\fIsuffixes\fB\fR
  1148. .IP "" 2
  1149. In previous versions of \fBcvs\fR, this was documented
  1150. as a way of specifying the names of the \fBrcs\fR
  1151. files. However, \fBcvs\fR has always required that the
  1152. \fBrcs\fR files used by \fBcvs\fR end in \fB,v\fR, so
  1153. this option has never done anything useful.
  1154. .SP
  1155. .SP
  1156. .SH "annotate"
  1157. .SS "What revision modified each line of a file?"
  1158. .IX "annotate (subcommand)"
  1159. .SP
  1160. .IP "\(bu" 2
  1161. Synopsis: annotate [options] files\&...
  1162. .IP "\(bu" 2
  1163. Requires: repository.
  1164. .IP "\(bu" 2
  1165. Synonym: blame
  1166. .IP "\(bu" 2
  1167. Changes: nothing.
  1168. .SP
  1169. For each file in \fIfiles\fR, print the head revision
  1170. of the trunk, together with information on the last
  1171. modification for each line.
  1172. .SP
  1173. .SH "annotate options"
  1174. .SP
  1175. These standard options are supported by \fBannotate\fR
  1176. (see node `Common options\(aq in the CVS manual for a complete description of
  1177. them):
  1178. .SP
  1179. .IP "" 0
  1180. \fB-l\fR
  1181. .IP "" 2
  1182. Local directory only, no recursion.
  1183. .SP
  1184. .IP "" 0
  1185. \fB-R\fR
  1186. .IP "" 2
  1187. Process directories recursively.
  1188. .SP
  1189. .IP "" 0
  1190. \fB-f\fR
  1191. .IP "" 2
  1192. Use head revision if tag/date not found.
  1193. .SP
  1194. .IP "" 0
  1195. \fB-F\fR
  1196. .IP "" 2
  1197. Annotate binary files.
  1198. .SP
  1199. .IP "" 0
  1200. \fB-r \fIrevision\fB\fR
  1201. .IP "" 2
  1202. Annotate file as of specified revision/tag.
  1203. .SP
  1204. .IP "" 0
  1205. \fB-D \fIdate\fB\fR
  1206. .IP "" 2
  1207. Annotate file as of specified date.
  1208. .SP
  1209. .SH "annotate example"
  1210. .SP
  1211. For example:
  1212. .SP
  1213. .PD 0
  1214. .SP
  1215. .IP "" 2
  1216. $ cvs annotate ssfile
  1217. .IP "" 2
  1218. Annotations for ssfile
  1219. .IP "" 2
  1220. ***************
  1221. .IP "" 2
  1222. 1.1 (mary 27-Mar-96): ssfile line 1
  1223. .IP "" 2
  1224. 1.2 (joe 28-Mar-96): ssfile line 2
  1225. .PD
  1226. .IP "" 0
  1227. .SP
  1228. The file \fBssfile\fR currently contains two lines.
  1229. The \fBssfile line 1\fR line was checked in by
  1230. \fBmary\fR on March 27. Then, on March 28, \fBjoe\fR
  1231. added a line \fBssfile line 2\fR, without modifying
  1232. the \fBssfile line 1\fR line. This report doesn\(aqt
  1233. tell you anything about lines which have been deleted
  1234. or replaced; you need to use \fBcvs diff\fR for that
  1235. (see node `diff\(aq in the CVS manual).
  1236. .SP
  1237. The options to \fBcvs annotate\fR are listed in
  1238. `Invoking CVS\(aq in the CVS manual, and can be used to select the files
  1239. and revisions to annotate. The options are described
  1240. in more detail there and in `Common options\(aq in the CVS manual.
  1241. .SP
  1242. .SH "checkout"
  1243. .SS "Check out sources for editing"
  1244. .IX "checkout (subcommand)"
  1245. .IX "co (subcommand)"
  1246. .SP
  1247. .IP "\(bu" 2
  1248. Synopsis: checkout [options] modules\&...
  1249. .IP "\(bu" 2
  1250. Requires: repository.
  1251. .IP "\(bu" 2
  1252. Changes: working directory.
  1253. .IP "\(bu" 2
  1254. Synonyms: co, get
  1255. .SP
  1256. Create or update a working directory containing copies of the
  1257. source files specified by \fImodules\fR. You must execute
  1258. \fBcheckout\fR before using most of the other \fBcvs\fR
  1259. commands, since most of them operate on your working
  1260. directory.
  1261. .SP
  1262. The \fImodules\fR are either
  1263. symbolic names for some
  1264. collection of source directories and files, or paths to
  1265. directories or files in the repository. The symbolic
  1266. names are defined in the \fBmodules\fR file.
  1267. See `modules\(aq in the CVS manual.
  1268. .SP
  1269. Depending on the modules you specify, \fBcheckout\fR may
  1270. recursively create directories and populate them with
  1271. the appropriate source files. You can then edit these
  1272. source files at any time (regardless of whether other
  1273. software developers are editing their own copies of the
  1274. sources); update them to include new changes applied by
  1275. others to the source repository; or commit your work as
  1276. a permanent change to the source repository.
  1277. .SP
  1278. Note that \fBcheckout\fR is used to create
  1279. directories. The top-level directory created is always
  1280. added to the directory where \fBcheckout\fR is
  1281. invoked, and usually has the same name as the specified
  1282. module. In the case of a module alias, the created
  1283. sub-directory may have a different name, but you can be
  1284. sure that it will be a sub-directory, and that
  1285. \fBcheckout\fR will show the relative path leading to
  1286. each file as it is extracted into your private work
  1287. area (unless you specify the \fB-Q\fR global option).
  1288. .SP
  1289. The files created by \fBcheckout\fR are created
  1290. read-write, unless the \fB-r\fR option to \fBcvs\fR
  1291. (see node `Global options\(aq in the CVS manual) is specified, the
  1292. \fBCVSREAD\fR environment variable is specified
  1293. (see node `Environment variables\(aq in the CVS manual), or a watch is in
  1294. effect for that file (see node `Watches\(aq in the CVS manual).
  1295. .SP
  1296. Note that running \fBcheckout\fR on a directory that was already
  1297. built by a prior \fBcheckout\fR is also permitted.
  1298. This is similar to specifying the \fB-d\fR option
  1299. to the \fBupdate\fR command in the sense that new
  1300. directories that have been created in the repository
  1301. will appear in your work area.
  1302. However, \fBcheckout\fR takes a module name whereas
  1303. \fBupdate\fR takes a directory name. Also
  1304. to use \fBcheckout\fR this way it must be run from the
  1305. top level directory (where you originally ran
  1306. \fBcheckout\fR from), so before you run
  1307. \fBcheckout\fR to update an existing directory, don\(aqt
  1308. forget to change your directory to the top level
  1309. directory.
  1310. .SP
  1311. For the output produced by the \fBcheckout\fR command,
  1312. see node `update output\(aq in the CVS manual.
  1313. .SP
  1314. .SH "checkout options"
  1315. .SP
  1316. These standard options are supported by \fBcheckout\fR
  1317. (see node `Common options\(aq in the CVS manual for a complete description of
  1318. them):
  1319. .SP
  1320. .IP "" 0
  1321. \fB-D \fIdate\fB\fR
  1322. .IP "" 2
  1323. Use the most recent revision no later than \fIdate\fR.
  1324. This option is sticky, and implies \fB-P\fR. See
  1325. `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates.
  1326. .SP
  1327. .IP "" 0
  1328. \fB-f\fR
  1329. .IP "" 2
  1330. Only useful with the \fB-D \fIdate\fB\fR or \fB-r
  1331. \fItag\fB\fR flags. If no matching revision is found,
  1332. retrieve the most recent revision (instead of ignoring
  1333. the file).
  1334. .SP
  1335. .IP "" 0
  1336. \fB-k \fIkflag\fB\fR
  1337. .IP "" 2
  1338. Process keywords according to \fIkflag\fR. See
  1339. `Keyword substitution\(aq in the CVS manual.
  1340. This option is sticky; future updates of
  1341. this file in this working directory will use the same
  1342. \fIkflag\fR. The \fBstatus\fR command can be viewed
  1343. to see the sticky options. See `Invoking CVS\(aq in the CVS manual for
  1344. more information on the \fBstatus\fR command.
  1345. .SP
  1346. .IP "" 0
  1347. \fB-l\fR
  1348. .IP "" 2
  1349. Local; run only in current working directory.
  1350. .SP
  1351. .IP "" 0
  1352. \fB-n\fR
  1353. .IP "" 2
  1354. Do not run any checkout program (as specified
  1355. with the \fB-o\fR option in the modules file;
  1356. see node `modules\(aq in the CVS manual).
  1357. .SP
  1358. .IP "" 0
  1359. \fB-P\fR
  1360. .IP "" 2
  1361. Prune empty directories. See `Moving directories\(aq in the CVS manual.
  1362. .SP
  1363. .IP "" 0
  1364. \fB-p\fR
  1365. .IP "" 2
  1366. Pipe files to the standard output.
  1367. .SP
  1368. .IP "" 0
  1369. \fB-R\fR
  1370. .IP "" 2
  1371. Checkout directories recursively. This option is on by default.
  1372. .SP
  1373. .IP "" 0
  1374. \fB-r \fItag\fB\fR
  1375. .IP "" 2
  1376. Use revision \fItag\fR. This option is sticky, and implies \fB-P\fR.
  1377. See `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
  1378. .SP
  1379. In addition to those, you can use these special command
  1380. options with \fBcheckout\fR:
  1381. .SP
  1382. .IP "" 0
  1383. \fB-A\fR
  1384. .IP "" 2
  1385. Reset any sticky tags, dates, or \fB-k\fR options.
  1386. Does not reset sticky \fB-k\fR options on modified files.
  1387. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates.
  1388. .SP
  1389. .IP "" 0
  1390. \fB-c\fR
  1391. .IP "" 2
  1392. Copy the module file, sorted, to the standard output,
  1393. instead of creating or modifying any files or
  1394. directories in your working directory.
  1395. .SP
  1396. .IP "" 0
  1397. \fB-d \fIdir\fB\fR
  1398. .IP "" 2
  1399. Create a directory called \fIdir\fR for the working
  1400. files, instead of using the module name. In general,
  1401. using this flag is equivalent to using \fBmkdir
  1402. \fIdir\fB; cd \fIdir\fB\fR followed by the checkout
  1403. command without the \fB-d\fR flag.
  1404. .SP
  1405. There is an important exception, however. It is very
  1406. convenient when checking out a single item to have the
  1407. output appear in a directory that doesn\(aqt contain empty
  1408. intermediate directories. In this case \fIonly\fR,
  1409. \fBcvs\fR tries to \`\`shorten\(aq\(aq pathnames to avoid those empty
  1410. directories.
  1411. .SP
  1412. For example, given a module \fBfoo\fR that contains
  1413. the file \fBbar.c\fR, the command \fBcvs co -d dir
  1414. foo\fR will create directory \fBdir\fR and place
  1415. \fBbar.c\fR inside. Similarly, given a module
  1416. \fBbar\fR which has subdirectory \fBbaz\fR wherein
  1417. there is a file \fBquux.c\fR, the command \fBcvs co
  1418. -d dir bar/baz\fR will create directory \fBdir\fR and
  1419. place \fBquux.c\fR inside.
  1420. .SP
  1421. Using the \fB-N\fR flag will defeat this behavior.
  1422. Given the same module definitions above, \fBcvs co
  1423. -N -d dir foo\fR will create directories \fBdir/foo\fR
  1424. and place \fBbar.c\fR inside, while \fBcvs co -N -d
  1425. dir bar/baz\fR will create directories \fBdir/bar/baz\fR
  1426. and place \fBquux.c\fR inside.
  1427. .SP
  1428. .IP "" 0
  1429. \fB-j \fItag\fB\fR
  1430. .IP "" 2
  1431. With two \fB-j\fR options, merge changes from the
  1432. revision specified with the first \fB-j\fR option to
  1433. the revision specified with the second \fBj\fR option,
  1434. into the working directory.
  1435. .SP
  1436. With one \fB-j\fR option, merge changes from the
  1437. ancestor revision to the revision specified with the
  1438. \fB-j\fR option, into the working directory. The
  1439. ancestor revision is the common ancestor of the
  1440. revision which the working directory is based on, and
  1441. the revision specified in the \fB-j\fR option.
  1442. .SP
  1443. In addition, each -j option can contain an optional
  1444. date specification which, when used with branches, can
  1445. limit the chosen revision to one within a specific
  1446. date. An optional date is specified by adding a colon
  1447. (:) to the tag:
  1448. \fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR.
  1449. .SP
  1450. See `Branching and merging\(aq in the CVS manual.
  1451. .SP
  1452. .IP "" 0
  1453. \fB-N\fR
  1454. .IP "" 2
  1455. Only useful together with \fB-d \fIdir\fB\fR. With
  1456. this option, \fBcvs\fR will not \`\`shorten\(aq\(aq module paths
  1457. in your working directory when you check out a single
  1458. module. See the \fB-d\fR flag for examples and a
  1459. discussion.
  1460. .SP
  1461. .IP "" 0
  1462. \fB-s\fR
  1463. .IP "" 2
  1464. Like \fB-c\fR, but include the status of all modules,
  1465. and sort it by the status string. See `modules\(aq in the CVS manual, for
  1466. info about the \fB-s\fR option that is used inside the
  1467. modules file to set the module status.
  1468. .SP
  1469. .SH "checkout examples"
  1470. .SP
  1471. Get a copy of the module \fBtc\fR:
  1472. .SP
  1473. .PD 0
  1474. .SP
  1475. .IP "" 2
  1476. $ cvs checkout tc
  1477. .PD
  1478. .IP "" 0
  1479. .SP
  1480. Get a copy of the module \fBtc\fR as it looked one day
  1481. ago:
  1482. .SP
  1483. .PD 0
  1484. .SP
  1485. .IP "" 2
  1486. $ cvs checkout -D yesterday tc
  1487. .PD
  1488. .IP "" 0
  1489. .SP
  1490. .SH "commit"
  1491. .SS "Check files into the repository"
  1492. .IX "commit (subcommand)"
  1493. .SP
  1494. .IP "\(bu" 2
  1495. Synopsis: commit [-lRf] [-m \(aqlog_message\(aq |
  1496. -F file] [-r revision] [files\&...]
  1497. .IP "\(bu" 2
  1498. Requires: working directory, repository.
  1499. .IP "\(bu" 2
  1500. Changes: repository.
  1501. .IP "\(bu" 2
  1502. Synonym: ci
  1503. .SP
  1504. Use \fBcommit\fR when you want to incorporate changes
  1505. from your working source files into the source
  1506. repository.
  1507. .SP
  1508. If you don\(aqt specify particular files to commit, all of
  1509. the files in your working current directory are
  1510. examined. \fBcommit\fR is careful to change in the
  1511. repository only those files that you have really
  1512. changed. By default (or if you explicitly specify the
  1513. \fB-R\fR option), files in subdirectories are also
  1514. examined and committed if they have changed; you can
  1515. use the \fB-l\fR option to limit \fBcommit\fR to the
  1516. current directory only.
  1517. .SP
  1518. \fBcommit\fR verifies that the selected files are up
  1519. to date with the current revisions in the source
  1520. repository; it will notify you, and exit without
  1521. committing, if any of the specified files must be made
  1522. current first with \fBupdate\fR (see node `update\(aq in the CVS manual).
  1523. \fBcommit\fR does not call the \fBupdate\fR command
  1524. for you, but rather leaves that for you to do when the
  1525. time is right.
  1526. .SP
  1527. When all is well, an editor is invoked to allow you to
  1528. enter a log message that will be written to one or more
  1529. logging programs (see node `modules\(aq in the CVS manual, and see node `loginfo\(aq in the CVS manual)
  1530. and placed in the \fBrcs\fR file inside the
  1531. repository. This log message can be retrieved with the
  1532. \fBlog\fR command; see node `log\(aq in the CVS manual. You can specify the
  1533. log message on the command line with the \fB-m
  1534. \fImessage\fB\fR option, and thus avoid the editor invocation,
  1535. or use the \fB-F \fIfile\fB\fR option to specify
  1536. that the argument file contains the log message.
  1537. .SP
  1538. .SH "commit options"
  1539. .SP
  1540. These standard options are supported by \fBcommit\fR
  1541. (see node `Common options\(aq in the CVS manual for a complete description of
  1542. them):
  1543. .SP
  1544. .IP "" 0
  1545. \fB-l\fR
  1546. .IP "" 2
  1547. Local; run only in current working directory.
  1548. .SP
  1549. .IP "" 0
  1550. \fB-R\fR
  1551. .IP "" 2
  1552. Commit directories recursively. This is on by default.
  1553. .SP
  1554. .IP "" 0
  1555. \fB-r \fIrevision\fB\fR
  1556. .IP "" 2
  1557. Commit to \fIrevision\fR. \fIrevision\fR must be
  1558. either a branch, or a revision on the main trunk that
  1559. is higher than any existing revision number
  1560. (see node `Assigning revisions\(aq in the CVS manual). You
  1561. cannot commit to a specific revision on a branch.
  1562. .SP
  1563. \fBcommit\fR also supports these options:
  1564. .SP
  1565. .IP "" 0
  1566. \fB-F \fIfile\fB\fR
  1567. .IP "" 2
  1568. Read the log message from \fIfile\fR, instead
  1569. of invoking an editor.
  1570. .SP
  1571. .IP "" 0
  1572. \fB-f\fR
  1573. .IP "" 2
  1574. Note that this is not the standard behavior of
  1575. the \fB-f\fR option as defined in `Common options\(aq in the CVS manual.
  1576. .SP
  1577. Force \fBcvs\fR to commit a new revision even if you haven\(aqt
  1578. made any changes to the file. If the current revision
  1579. of \fIfile\fR is 1.7, then the following two commands
  1580. are equivalent:
  1581. .SP
  1582. .PD 0
  1583. .SP
  1584. .IP "" 4
  1585. $ cvs commit -f \fIfile\fR
  1586. .IP "" 4
  1587. $ cvs commit -r 1.8 \fIfile\fR
  1588. .PD
  1589. .IP "" 2
  1590. .SP
  1591. The \fB-f\fR option disables recursion (i.e., it
  1592. implies \fB-l\fR). To force \fBcvs\fR to commit a new
  1593. revision for all files in all subdirectories, you must
  1594. use \fB-f -R\fR.
  1595. .SP
  1596. .IP "" 0
  1597. \fB-m \fImessage\fB\fR
  1598. .IP "" 2
  1599. Use \fImessage\fR as the log message, instead of
  1600. invoking an editor.
  1601. .SP
  1602. .SH "commit examples"
  1603. .SP
  1604. .SS "Committing to a branch"
  1605. .SP
  1606. You can commit to a branch revision (one that has an
  1607. even number of dots) with the \fB-r\fR option. To
  1608. create a branch revision, use the \fB-b\fR option
  1609. of the \fBrtag\fR or \fBtag\fR commands
  1610. (see node `Branching and merging\(aq in the CVS manual). Then, either \fBcheckout\fR or
  1611. \fBupdate\fR can be used to base your sources on the
  1612. newly created branch. From that point on, all
  1613. \fBcommit\fR changes made within these working sources
  1614. will be automatically added to a branch revision,
  1615. thereby not disturbing main-line development in any
  1616. way. For example, if you had to create a patch to the
  1617. 1.2 version of the product, even though the 2.0 version
  1618. is already under development, you might do:
  1619. .SP
  1620. .PD 0
  1621. .SP
  1622. .IP "" 2
  1623. $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
  1624. .IP "" 2
  1625. $ cvs checkout -r FCS1_2_Patch product_module
  1626. .IP "" 2
  1627. $ cd product_module
  1628. .IP "" 2
  1629. [[ hack away ]]
  1630. .IP "" 2
  1631. $ cvs commit
  1632. .PD
  1633. .IP "" 0
  1634. .SP
  1635. This works automatically since the \fB-r\fR option is
  1636. sticky.
  1637. .SP
  1638. .SS "Creating the branch after editing"
  1639. .SP
  1640. Say you have been working on some extremely
  1641. experimental software, based on whatever revision you
  1642. happened to checkout last week. If others in your
  1643. group would like to work on this software with you, but
  1644. without disturbing main-line development, you could
  1645. commit your change to a new branch. Others can then
  1646. checkout your experimental stuff and utilize the full
  1647. benefit of \fBcvs\fR conflict resolution. The scenario might
  1648. look like:
  1649. .SP
  1650. .PD 0
  1651. .SP
  1652. .IP "" 2
  1653. [[ hacked sources are present ]]
  1654. .IP "" 2
  1655. $ cvs tag -b EXPR1
  1656. .IP "" 2
  1657. $ cvs update -r EXPR1
  1658. .IP "" 2
  1659. $ cvs commit
  1660. .PD
  1661. .IP "" 0
  1662. .SP
  1663. The \fBupdate\fR command will make the \fB-r
  1664. EXPR1\fR option sticky on all files. Note that your
  1665. changes to the files will never be removed by the
  1666. \fBupdate\fR command. The \fBcommit\fR will
  1667. automatically commit to the correct branch, because the
  1668. \fB-r\fR is sticky. You could also do like this:
  1669. .SP
  1670. .PD 0
  1671. .SP
  1672. .IP "" 2
  1673. [[ hacked sources are present ]]
  1674. .IP "" 2
  1675. $ cvs tag -b EXPR1
  1676. .IP "" 2
  1677. $ cvs commit -r EXPR1
  1678. .PD
  1679. .IP "" 0
  1680. .SP
  1681. but then, only those files that were changed by you
  1682. will have the \fB-r EXPR1\fR sticky flag. If you hack
  1683. away, and commit without specifying the \fB-r EXPR1\fR
  1684. flag, some files may accidentally end up on the main
  1685. trunk.
  1686. .SP
  1687. To work with you on the experimental change, others
  1688. would simply do
  1689. .SP
  1690. .PD 0
  1691. .SP
  1692. .IP "" 2
  1693. $ cvs checkout -r EXPR1 whatever_module
  1694. .PD
  1695. .IP "" 0
  1696. .SP
  1697. .SH "diff"
  1698. .SS "Show differences between revisions"
  1699. .IX "diff (subcommand)"
  1700. .SP
  1701. .IP "\(bu" 2
  1702. Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files\&...]
  1703. .IP "\(bu" 2
  1704. Requires: working directory, repository.
  1705. .IP "\(bu" 2
  1706. Changes: nothing.
  1707. .SP
  1708. The \fBdiff\fR command is used to compare different
  1709. revisions of files. The default action is to compare
  1710. your working files with the revisions they were based
  1711. on, and report any differences that are found.
  1712. .SP
  1713. If any file names are given, only those files are
  1714. compared. If any directories are given, all files
  1715. under them will be compared.
  1716. .SP
  1717. The exit status for diff is different than for other
  1718. \fBcvs\fR commands; for details see node `Exit status\(aq in the CVS manual.
  1719. .SP
  1720. .SH "diff options"
  1721. .SP
  1722. These standard options are supported by \fBdiff\fR
  1723. (see node `Common options\(aq in the CVS manual for a complete description of
  1724. them):
  1725. .SP
  1726. .IP "" 0
  1727. \fB-D \fIdate\fB\fR
  1728. .IP "" 2
  1729. Use the most recent revision no later than \fIdate\fR.
  1730. See \fB-r\fR for how this affects the comparison.
  1731. .SP
  1732. .IP "" 0
  1733. \fB-k \fIkflag\fB\fR
  1734. .IP "" 2
  1735. Process keywords according to \fIkflag\fR. See
  1736. `Keyword substitution\(aq in the CVS manual.
  1737. .SP
  1738. .IP "" 0
  1739. \fB-l\fR
  1740. .IP "" 2
  1741. Local; run only in current working directory.
  1742. .SP
  1743. .IP "" 0
  1744. \fB-R\fR
  1745. .IP "" 2
  1746. Examine directories recursively. This option is on by
  1747. default.
  1748. .SP
  1749. .IP "" 0
  1750. \fB-r \fItag\fB\fR
  1751. .IP "" 2
  1752. Compare with revision \fItag\fR. Zero, one or two
  1753. \fB-r\fR options can be present. With no \fB-r\fR
  1754. option, the working file will be compared with the
  1755. revision it was based on. With one \fB-r\fR, that
  1756. revision will be compared to your current working file.
  1757. With two \fB-r\fR options those two revisions will be
  1758. compared (and your working file will not affect the
  1759. outcome in any way).
  1760. .SP
  1761. One or both \fB-r\fR options can be replaced by a
  1762. \fB-D \fIdate\fB\fR option, described above.
  1763. .SP
  1764. The following options specify the format of the
  1765. output. They have the same meaning as in GNU diff.
  1766. Most options have two equivalent names, one of which is a single letter
  1767. preceded by \fB-\fR, and the other of which is a long name preceded by
  1768. \fB--\fR.
  1769. .SP
  1770. .IP "" 0
  1771. \fB-\fIlines\fB\fR
  1772. .IP "" 2
  1773. Show \fIlines\fR (an integer) lines of context. This option does not
  1774. specify an output format by itself; it has no effect unless it is
  1775. combined with \fB-c\fR or \fB-u\fR. This option is obsolete. For proper
  1776. operation, \fBpatch\fR typically needs at least two lines of context.
  1777. .SP
  1778. .IP "" 0
  1779. \fB-a\fR
  1780. .IP "" 2
  1781. Treat all files as text and compare them line-by-line, even if they
  1782. do not seem to be text.
  1783. .SP
  1784. .IP "" 0
  1785. \fB-b\fR
  1786. .IP "" 2
  1787. Ignore trailing white space and consider all other sequences of one or
  1788. more white space characters to be equivalent.
  1789. .SP
  1790. .IP "" 0
  1791. \fB-B\fR
  1792. .IP "" 2
  1793. Ignore changes that just insert or delete blank lines.
  1794. .SP
  1795. .IP "" 0
  1796. \fB--binary\fR
  1797. .IP "" 2
  1798. Read and write data in binary mode.
  1799. .SP
  1800. .IP "" 0
  1801. \fB--brief\fR
  1802. .IP "" 2
  1803. Report only whether the files differ, not the details of the
  1804. differences.
  1805. .SP
  1806. .IP "" 0
  1807. \fB-c\fR
  1808. .IP "" 2
  1809. Use the context output format.
  1810. .SP
  1811. .IP "" 0
  1812. \fB-C \fIlines\fB\fR
  1813. .IP "" 2
  1814. .IP "" 0
  1815. \fB--context\fR[\fB=\fIlines\fB\fR]\fB\fR
  1816. .IP "" 2
  1817. Use the context output format, showing \fIlines\fR (an integer) lines of
  1818. context, or three if \fIlines\fR is not given.
  1819. For proper operation, \fBpatch\fR typically needs at least two lines of
  1820. context.
  1821. .SP
  1822. .IP "" 0
  1823. \fB--changed-group-format=\fIformat\fB\fR
  1824. .IP "" 2
  1825. Use \fIformat\fR to output a line group containing differing lines from
  1826. both files in if-then-else format. See `Line group formats\(aq in the CVS manual.
  1827. .SP
  1828. .IP "" 0
  1829. \fB-d\fR
  1830. .IP "" 2
  1831. Change the algorithm to perhaps find a smaller set of changes. This makes
  1832. \fBdiff\fR slower (sometimes much slower).
  1833. .SP
  1834. .IP "" 0
  1835. \fB-e\fR
  1836. .IP "" 2
  1837. .IP "" 0
  1838. \fB--ed\fR
  1839. .IP "" 2
  1840. Make output that is a valid \fBed\fR script.
  1841. .SP
  1842. .IP "" 0
  1843. \fB--expand-tabs\fR
  1844. .IP "" 2
  1845. Expand tabs to spaces in the output, to preserve the alignment of tabs
  1846. in the input files.
  1847. .SP
  1848. .IP "" 0
  1849. \fB-f\fR
  1850. .IP "" 2
  1851. Make output that looks vaguely like an \fBed\fR script but has changes
  1852. in the order they appear in the file.
  1853. .SP
  1854. .IP "" 0
  1855. \fB-F \fIregexp\fB\fR
  1856. .IP "" 2
  1857. In context and unified format, for each hunk of differences, show some
  1858. of the last preceding line that matches \fIregexp\fR.
  1859. .SP
  1860. .IP "" 0
  1861. \fB--forward-ed\fR
  1862. .IP "" 2
  1863. Make output that looks vaguely like an \fBed\fR script but has changes
  1864. in the order they appear in the file.
  1865. .SP
  1866. .IP "" 0
  1867. \fB-H\fR
  1868. .IP "" 2
  1869. Use heuristics to speed handling of large files that have numerous
  1870. scattered small changes.
  1871. .SP
  1872. .IP "" 0
  1873. \fB--horizon-lines=\fIlines\fB\fR
  1874. .IP "" 2
  1875. Do not discard the last \fIlines\fR lines of the common prefix
  1876. and the first \fIlines\fR lines of the common suffix.
  1877. .SP
  1878. .IP "" 0
  1879. \fB-i\fR
  1880. .IP "" 2
  1881. Ignore changes in case; consider upper- and lower-case letters
  1882. equivalent.
  1883. .SP
  1884. .IP "" 0
  1885. \fB-I \fIregexp\fB\fR
  1886. .IP "" 2
  1887. Ignore changes that just insert or delete lines that match \fIregexp\fR.
  1888. .SP
  1889. .IP "" 0
  1890. \fB--ifdef=\fIname\fB\fR
  1891. .IP "" 2
  1892. Make merged if-then-else output using \fIname\fR.
  1893. .SP
  1894. .IP "" 0
  1895. \fB--ignore-all-space\fR
  1896. .IP "" 2
  1897. Ignore white space when comparing lines.
  1898. .SP
  1899. .IP "" 0
  1900. \fB--ignore-blank-lines\fR
  1901. .IP "" 2
  1902. Ignore changes that just insert or delete blank lines.
  1903. .SP
  1904. .IP "" 0
  1905. \fB--ignore-case\fR
  1906. .IP "" 2
  1907. Ignore changes in case; consider upper- and lower-case to be the same.
  1908. .SP
  1909. .IP "" 0
  1910. \fB--ignore-matching-lines=\fIregexp\fB\fR
  1911. .IP "" 2
  1912. Ignore changes that just insert or delete lines that match \fIregexp\fR.
  1913. .SP
  1914. .IP "" 0
  1915. \fB--ignore-space-change\fR
  1916. .IP "" 2
  1917. Ignore trailing white space and consider all other sequences of one or
  1918. more white space characters to be equivalent.
  1919. .SP
  1920. .IP "" 0
  1921. \fB--initial-tab\fR
  1922. .IP "" 2
  1923. Output a tab rather than a space before the text of a line in normal or
  1924. context format. This causes the alignment of tabs in the line to look
  1925. normal.
  1926. .SP
  1927. .IP "" 0
  1928. \fB-L \fIlabel\fB\fR
  1929. .IP "" 2
  1930. Use \fIlabel\fR instead of the file name in the context format
  1931. and unified format headers.
  1932. .SP
  1933. .IP "" 0
  1934. \fB--label=\fIlabel\fB\fR
  1935. .IP "" 2
  1936. Use \fIlabel\fR instead of the file name in the context format
  1937. and unified format headers.
  1938. .SP
  1939. .IP "" 0
  1940. \fB--left-column\fR
  1941. .IP "" 2
  1942. Print only the left column of two common lines in side by side format.
  1943. .SP
  1944. .IP "" 0
  1945. \fB--line-format=\fIformat\fB\fR
  1946. .IP "" 2
  1947. Use \fIformat\fR to output all input lines in if-then-else format.
  1948. See `Line formats\(aq in the CVS manual.
  1949. .SP
  1950. .IP "" 0
  1951. \fB--minimal\fR
  1952. .IP "" 2
  1953. Change the algorithm to perhaps find a smaller set of changes. This
  1954. makes \fBdiff\fR slower (sometimes much slower).
  1955. .SP
  1956. .IP "" 0
  1957. \fB-n\fR
  1958. .IP "" 2
  1959. Output RCS-format diffs; like \fB-f\fR except that each command
  1960. specifies the number of lines affected.
  1961. .SP
  1962. .IP "" 0
  1963. \fB-N\fR
  1964. .IP "" 2
  1965. .IP "" 0
  1966. \fB--new-file\fR
  1967. .IP "" 2
  1968. In directory comparison, if a file is found in only one directory,
  1969. treat it as present but empty in the other directory.
  1970. .SP
  1971. .IP "" 0
  1972. \fB--new-group-format=\fIformat\fB\fR
  1973. .IP "" 2
  1974. Use \fIformat\fR to output a group of lines taken from just the second
  1975. file in if-then-else format. See `Line group formats\(aq in the CVS manual.
  1976. .SP
  1977. .IP "" 0
  1978. \fB--new-line-format=\fIformat\fB\fR
  1979. .IP "" 2
  1980. Use \fIformat\fR to output a line taken from just the second file in
  1981. if-then-else format. See `Line formats\(aq in the CVS manual.
  1982. .SP
  1983. .IP "" 0
  1984. \fB--old-group-format=\fIformat\fB\fR
  1985. .IP "" 2
  1986. Use \fIformat\fR to output a group of lines taken from just the first
  1987. file in if-then-else format. See `Line group formats\(aq in the CVS manual.
  1988. .SP
  1989. .IP "" 0
  1990. \fB--old-line-format=\fIformat\fB\fR
  1991. .IP "" 2
  1992. Use \fIformat\fR to output a line taken from just the first file in
  1993. if-then-else format. See `Line formats\(aq in the CVS manual.
  1994. .SP
  1995. .IP "" 0
  1996. \fB-p\fR
  1997. .IP "" 2
  1998. Show which C function each change is in.
  1999. .SP
  2000. .IP "" 0
  2001. \fB--rcs\fR
  2002. .IP "" 2
  2003. Output RCS-format diffs; like \fB-f\fR except that each command
  2004. specifies the number of lines affected.
  2005. .SP
  2006. .IP "" 0
  2007. \fB--report-identical-files\fR
  2008. .IP "" 2
  2009. .IP "" 0
  2010. \fB-s\fR
  2011. .IP "" 2
  2012. Report when two files are the same.
  2013. .SP
  2014. .IP "" 0
  2015. \fB--show-c-function\fR
  2016. .IP "" 2
  2017. Show which C function each change is in.
  2018. .SP
  2019. .IP "" 0
  2020. \fB--show-function-line=\fIregexp\fB\fR
  2021. .IP "" 2
  2022. In context and unified format, for each hunk of differences, show some
  2023. of the last preceding line that matches \fIregexp\fR.
  2024. .SP
  2025. .IP "" 0
  2026. \fB--side-by-side\fR
  2027. .IP "" 2
  2028. Use the side by side output format.
  2029. .SP
  2030. .IP "" 0
  2031. \fB--speed-large-files\fR
  2032. .IP "" 2
  2033. Use heuristics to speed handling of large files that have numerous
  2034. scattered small changes.
  2035. .SP
  2036. .IP "" 0
  2037. \fB--suppress-common-lines\fR
  2038. .IP "" 2
  2039. Do not print common lines in side by side format.
  2040. .SP
  2041. .IP "" 0
  2042. \fB-t\fR
  2043. .IP "" 2
  2044. Expand tabs to spaces in the output, to preserve the alignment of tabs
  2045. in the input files.
  2046. .SP
  2047. .IP "" 0
  2048. \fB-T\fR
  2049. .IP "" 2
  2050. Output a tab rather than a space before the text of a line in normal or
  2051. context format. This causes the alignment of tabs in the line to look
  2052. normal.
  2053. .SP
  2054. .IP "" 0
  2055. \fB--text\fR
  2056. .IP "" 2
  2057. Treat all files as text and compare them line-by-line, even if they
  2058. do not appear to be text.
  2059. .SP
  2060. .IP "" 0
  2061. \fB-u\fR
  2062. .IP "" 2
  2063. Use the unified output format.
  2064. .SP
  2065. .IP "" 0
  2066. \fB--unchanged-group-format=\fIformat\fB\fR
  2067. .IP "" 2
  2068. Use \fIformat\fR to output a group of common lines taken from both files
  2069. in if-then-else format. see node `Line group formats\(aq in the CVS manual.
  2070. .SP
  2071. .IP "" 0
  2072. \fB--unchanged-line-format=\fIformat\fB\fR
  2073. .IP "" 2
  2074. Use \fIformat\fR to output a line common to both files in if-then-else
  2075. format. see node `Line formats\(aq in the CVS manual.
  2076. .SP
  2077. .IP "" 0
  2078. \fB-U \fIlines\fB\fR
  2079. .IP "" 2
  2080. .IP "" 0
  2081. \fB--unified\fR[\fB=\fIlines\fB\fR]\fB\fR
  2082. .IP "" 2
  2083. Use the unified output format, showing \fIlines\fR (an integer) lines of
  2084. context, or three if \fIlines\fR is not given.
  2085. For proper operation, \fBpatch\fR typically needs at least two lines of
  2086. context.
  2087. .SP
  2088. .IP "" 0
  2089. \fB-w\fR
  2090. .IP "" 2
  2091. Ignore white space when comparing lines.
  2092. .SP
  2093. .IP "" 0
  2094. \fB-W \fIcolumns\fB\fR
  2095. .IP "" 2
  2096. .IP "" 0
  2097. \fB--width=\fIcolumns\fB\fR
  2098. .IP "" 2
  2099. Use an output width of \fIcolumns\fR in side by side format.
  2100. .SP
  2101. .IP "" 0
  2102. \fB-y\fR
  2103. .IP "" 2
  2104. Use the side by side output format.
  2105. .SP
  2106. .SH "Line group formats"
  2107. .SP
  2108. Line group formats let you specify formats suitable for many
  2109. applications that allow if-then-else input, including programming
  2110. languages and text formatting languages. A line group format specifies
  2111. the output format for a contiguous group of similar lines.
  2112. .SP
  2113. For example, the following command compares the TeX file \fBmyfile\fR
  2114. with the original version from the repository,
  2115. and outputs a merged file in which old regions are
  2116. surrounded by \fB\\begin{em}\fR-\fB\\end{em}\fR lines, and new
  2117. regions are surrounded by \fB\\begin{bf}\fR-\fB\\end{bf}\fR lines.
  2118. .SP
  2119. .PD 0
  2120. .SP
  2121. .IP "" 2
  2122. cvs diff \\
  2123. .IP "" 2
  2124. --old-group-format=\(aq\\begin{em}
  2125. .IP "" 2
  2126. %<\\end{em}
  2127. .IP "" 2
  2128. \(aq \\
  2129. .IP "" 2
  2130. --new-group-format=\(aq\\begin{bf}
  2131. .IP "" 2
  2132. %>\\end{bf}
  2133. .IP "" 2
  2134. \(aq \\
  2135. .IP "" 2
  2136. myfile
  2137. .PD
  2138. .IP "" 0
  2139. .SP
  2140. The following command is equivalent to the above example, but it is a
  2141. little more verbose, because it spells out the default line group formats.
  2142. .SP
  2143. .PD 0
  2144. .SP
  2145. .IP "" 2
  2146. cvs diff \\
  2147. .IP "" 2
  2148. --old-group-format=\(aq\\begin{em}
  2149. .IP "" 2
  2150. %<\\end{em}
  2151. .IP "" 2
  2152. \(aq \\
  2153. .IP "" 2
  2154. --new-group-format=\(aq\\begin{bf}
  2155. .IP "" 2
  2156. %>\\end{bf}
  2157. .IP "" 2
  2158. \(aq \\
  2159. .IP "" 2
  2160. --unchanged-group-format=\(aq%=\(aq \\
  2161. .IP "" 2
  2162. --changed-group-format=\(aq\\begin{em}
  2163. .IP "" 2
  2164. %<\\end{em}
  2165. .IP "" 2
  2166. \\begin{bf}
  2167. .IP "" 2
  2168. %>\\end{bf}
  2169. .IP "" 2
  2170. \(aq \\
  2171. .IP "" 2
  2172. myfile
  2173. .PD
  2174. .IP "" 0
  2175. .SP
  2176. Here is a more advanced example, which outputs a diff listing with
  2177. headers containing line numbers in a \`\`plain English\(aq\(aq style.
  2178. .SP
  2179. .PD 0
  2180. .SP
  2181. .IP "" 2
  2182. cvs diff \\
  2183. .IP "" 2
  2184. --unchanged-group-format=\(aq\(aq \\
  2185. .IP "" 2
  2186. --old-group-format=\(aq-------- %dn line%(n=1?:s) deleted at %df:
  2187. .IP "" 2
  2188. %<\(aq \\
  2189. .IP "" 2
  2190. --new-group-format=\(aq-------- %dN line%(N=1?:s) added after %de:
  2191. .IP "" 2
  2192. %>\(aq \\
  2193. .IP "" 2
  2194. --changed-group-format=\(aq-------- %dn line%(n=1?:s) changed at %df:
  2195. .IP "" 2
  2196. %<-------- to:
  2197. .IP "" 2
  2198. %>\(aq \\
  2199. .IP "" 2
  2200. myfile
  2201. .PD
  2202. .IP "" 0
  2203. .SP
  2204. To specify a line group format, use one of the options
  2205. listed below. You can specify up to four line group formats, one for
  2206. each kind of line group. You should quote \fIformat\fR, because it
  2207. typically contains shell metacharacters.
  2208. .SP
  2209. .IP "" 0
  2210. \fB--old-group-format=\fIformat\fB\fR
  2211. .IP "" 2
  2212. These line groups are hunks containing only lines from the first file.
  2213. The default old group format is the same as the changed group format if
  2214. it is specified; otherwise it is a format that outputs the line group as-is.
  2215. .SP
  2216. .IP "" 0
  2217. \fB--new-group-format=\fIformat\fB\fR
  2218. .IP "" 2
  2219. These line groups are hunks containing only lines from the second
  2220. file. The default new group format is same as the changed group
  2221. format if it is specified; otherwise it is a format that outputs the
  2222. line group as-is.
  2223. .SP
  2224. .IP "" 0
  2225. \fB--changed-group-format=\fIformat\fB\fR
  2226. .IP "" 2
  2227. These line groups are hunks containing lines from both files. The
  2228. default changed group format is the concatenation of the old and new
  2229. group formats.
  2230. .SP
  2231. .IP "" 0
  2232. \fB--unchanged-group-format=\fIformat\fB\fR
  2233. .IP "" 2
  2234. These line groups contain lines common to both files. The default
  2235. unchanged group format is a format that outputs the line group as-is.
  2236. .SP
  2237. In a line group format, ordinary characters represent themselves;
  2238. conversion specifications start with \fB%\fR and have one of the
  2239. following forms.
  2240. .SP
  2241. .IP "" 0
  2242. \fB%<\fR
  2243. .IP "" 2
  2244. stands for the lines from the first file, including the trailing newline.
  2245. Each line is formatted according to the old line format (see node `Line formats\(aq in the CVS manual).
  2246. .SP
  2247. .IP "" 0
  2248. \fB%>\fR
  2249. .IP "" 2
  2250. stands for the lines from the second file, including the trailing newline.
  2251. Each line is formatted according to the new line format.
  2252. .SP
  2253. .IP "" 0
  2254. \fB%=\fR
  2255. .IP "" 2
  2256. stands for the lines common to both files, including the trailing newline.
  2257. Each line is formatted according to the unchanged line format.
  2258. .SP
  2259. .IP "" 0
  2260. \fB%%\fR
  2261. .IP "" 2
  2262. stands for \fB%\fR.
  2263. .SP
  2264. .IP "" 0
  2265. \fB%c\(aq\fIC\fB\(aq\fR
  2266. .IP "" 2
  2267. where \fIC\fR is a single character, stands for \fIC\fR.
  2268. \fIC\fR may not be a backslash or an apostrophe.
  2269. For example, \fB%c\(aq:\(aq\fR stands for a colon, even inside
  2270. the then-part of an if-then-else format, which a colon would
  2271. normally terminate.
  2272. .SP
  2273. .IP "" 0
  2274. \fB%c\(aq\\\fIO\fB\(aq\fR
  2275. .IP "" 2
  2276. where \fIO\fR is a string of 1, 2, or 3 octal digits,
  2277. stands for the character with octal code \fIO\fR.
  2278. For example, \fB%c\(aq\\0\(aq\fR stands for a null character.
  2279. .SP
  2280. .IP "" 0
  2281. \fB\fIF\fB\fIn\fB\fR
  2282. .IP "" 2
  2283. where \fIF\fR is a \fBprintf\fR conversion specification and \fIn\fR is one
  2284. of the following letters, stands for \fIn\fR\(aqs value formatted with \fIF\fR.
  2285. .SP
  2286. .IP "" 2
  2287. \fBe\fR
  2288. .IP "" 4
  2289. The line number of the line just before the group in the old file.
  2290. .SP
  2291. .IP "" 2
  2292. \fBf\fR
  2293. .IP "" 4
  2294. The line number of the first line in the group in the old file;
  2295. equals \fIe\fR + 1.
  2296. .SP
  2297. .IP "" 2
  2298. \fBl\fR
  2299. .IP "" 4
  2300. The line number of the last line in the group in the old file.
  2301. .SP
  2302. .IP "" 2
  2303. \fBm\fR
  2304. .IP "" 4
  2305. The line number of the line just after the group in the old file;
  2306. equals \fIl\fR + 1.
  2307. .SP
  2308. .IP "" 2
  2309. \fBn\fR
  2310. .IP "" 4
  2311. The number of lines in the group in the old file; equals \fIl\fR - \fIf\fR + 1.
  2312. .SP
  2313. .IP "" 2
  2314. \fBE, F, L, M, N\fR
  2315. .IP "" 4
  2316. Likewise, for lines in the new file.
  2317. .SP
  2318. .SP
  2319. The \fBprintf\fR conversion specification can be \fB%d\fR,
  2320. \fB%o\fR, \fB%x\fR, or \fB%X\fR, specifying decimal, octal,
  2321. lower case hexadecimal, or upper case hexadecimal output
  2322. respectively. After the \fB%\fR the following options can appear in
  2323. sequence: a \fB-\fR specifying left-justification; an integer
  2324. specifying the minimum field width; and a period followed by an
  2325. optional integer specifying the minimum number of digits.
  2326. For example, \fB%5dN\fR prints the number of new lines in the group
  2327. in a field of width 5 characters, using the \fBprintf\fR format \fB"%5d"\fR.
  2328. .SP
  2329. .IP "" 0
  2330. \fB(\fIA\fB=\fIB\fB?\fIT\fB:\fIE\fB)\fR
  2331. .IP "" 2
  2332. If \fIA\fR equals \fIB\fR then \fIT\fR else \fIE\fR.
  2333. \fIA\fR and \fIB\fR are each either a decimal constant
  2334. or a single letter interpreted as above.
  2335. This format spec is equivalent to \fIT\fR if
  2336. \fIA\fR\(aqs value equals \fIB\fR\(aqs; otherwise it is equivalent to \fIE\fR.
  2337. .SP
  2338. For example, \fB%(N=0?no:%dN) line%(N=1?:s)\fR is equivalent to
  2339. \fBno lines\fR if \fIN\fR (the number of lines in the group in the
  2340. new file) is 0, to \fB1 line\fR if \fIN\fR is 1, and to \fB%dN lines\fR
  2341. otherwise.
  2342. .SP
  2343. .SH "Line formats"
  2344. .SP
  2345. Line formats control how each line taken from an input file is
  2346. output as part of a line group in if-then-else format.
  2347. .SP
  2348. For example, the following command outputs text with a one-column
  2349. change indicator to the left of the text. The first column of output
  2350. is \fB-\fR for deleted lines, \fB|\fR for added lines, and a space
  2351. for unchanged lines. The formats contain newline characters where
  2352. newlines are desired on output.
  2353. .SP
  2354. .PD 0
  2355. .SP
  2356. .IP "" 2
  2357. cvs diff \\
  2358. .IP "" 2
  2359. --old-line-format=\(aq-%l
  2360. .IP "" 2
  2361. \(aq \\
  2362. .IP "" 2
  2363. --new-line-format=\(aq|%l
  2364. .IP "" 2
  2365. \(aq \\
  2366. .IP "" 2
  2367. --unchanged-line-format=\(aq %l
  2368. .IP "" 2
  2369. \(aq \\
  2370. .IP "" 2
  2371. myfile
  2372. .PD
  2373. .IP "" 0
  2374. .SP
  2375. To specify a line format, use one of the following options. You should
  2376. quote \fIformat\fR, since it often contains shell metacharacters.
  2377. .SP
  2378. .IP "" 0
  2379. \fB--old-line-format=\fIformat\fB\fR
  2380. .IP "" 2
  2381. formats lines just from the first file.
  2382. .SP
  2383. .IP "" 0
  2384. \fB--new-line-format=\fIformat\fB\fR
  2385. .IP "" 2
  2386. formats lines just from the second file.
  2387. .SP
  2388. .IP "" 0
  2389. \fB--unchanged-line-format=\fIformat\fB\fR
  2390. .IP "" 2
  2391. formats lines common to both files.
  2392. .SP
  2393. .IP "" 0
  2394. \fB--line-format=\fIformat\fB\fR
  2395. .IP "" 2
  2396. formats all lines; in effect, it sets all three above options simultaneously.
  2397. .SP
  2398. In a line format, ordinary characters represent themselves;
  2399. conversion specifications start with \fB%\fR and have one of the
  2400. following forms.
  2401. .SP
  2402. .IP "" 0
  2403. \fB%l\fR
  2404. .IP "" 2
  2405. stands for the contents of the line, not counting its trailing
  2406. newline (if any). This format ignores whether the line is incomplete.
  2407. .SP
  2408. .IP "" 0
  2409. \fB%L\fR
  2410. .IP "" 2
  2411. stands for the contents of the line, including its trailing newline
  2412. (if any). If a line is incomplete, this format preserves its
  2413. incompleteness.
  2414. .SP
  2415. .IP "" 0
  2416. \fB%%\fR
  2417. .IP "" 2
  2418. stands for \fB%\fR.
  2419. .SP
  2420. .IP "" 0
  2421. \fB%c\(aq\fIC\fB\(aq\fR
  2422. .IP "" 2
  2423. where \fIC\fR is a single character, stands for \fIC\fR.
  2424. \fIC\fR may not be a backslash or an apostrophe.
  2425. For example, \fB%c\(aq:\(aq\fR stands for a colon.
  2426. .SP
  2427. .IP "" 0
  2428. \fB%c\(aq\\\fIO\fB\(aq\fR
  2429. .IP "" 2
  2430. where \fIO\fR is a string of 1, 2, or 3 octal digits,
  2431. stands for the character with octal code \fIO\fR.
  2432. For example, \fB%c\(aq\\0\(aq\fR stands for a null character.
  2433. .SP
  2434. .IP "" 0
  2435. \fB\fIF\fBn\fR
  2436. .IP "" 2
  2437. where \fIF\fR is a \fBprintf\fR conversion specification,
  2438. stands for the line number formatted with \fIF\fR.
  2439. For example, \fB%.5dn\fR prints the line number using the
  2440. \fBprintf\fR format \fB"%.5d"\fR. see node `Line group formats\(aq in the CVS manual, for
  2441. more about printf conversion specifications.
  2442. .SP
  2443. .SP
  2444. The default line format is \fB%l\fR followed by a newline character.
  2445. .SP
  2446. If the input contains tab characters and it is important that they line
  2447. up on output, you should ensure that \fB%l\fR or \fB%L\fR in a line
  2448. format is just after a tab stop (e.g. by preceding \fB%l\fR or
  2449. \fB%L\fR with a tab character), or you should use the \fB-t\fR or
  2450. \fB--expand-tabs\fR option.
  2451. .SP
  2452. Taken together, the line and line group formats let you specify many
  2453. different formats. For example, the following command uses a format
  2454. similar to \fBdiff\fR\(aqs normal format. You can tailor this command
  2455. to get fine control over \fBdiff\fR\(aqs output.
  2456. .SP
  2457. .PD 0
  2458. .SP
  2459. .IP "" 2
  2460. cvs diff \\
  2461. .IP "" 2
  2462. --old-line-format=\(aq< %l
  2463. .IP "" 2
  2464. \(aq \\
  2465. .IP "" 2
  2466. --new-line-format=\(aq> %l
  2467. .IP "" 2
  2468. \(aq \\
  2469. .IP "" 2
  2470. --old-group-format=\(aq%df%(f=l?:,%dl)d%dE
  2471. .IP "" 2
  2472. %<\(aq \\
  2473. .IP "" 2
  2474. --new-group-format=\(aq%dea%dF%(F=L?:,%dL)
  2475. .IP "" 2
  2476. %>\(aq \\
  2477. .IP "" 2
  2478. --changed-group-format=\(aq%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
  2479. .IP "" 2
  2480. %<\(em
  2481. .IP "" 2
  2482. %>\(aq \\
  2483. .IP "" 2
  2484. --unchanged-group-format=\(aq\(aq \\
  2485. .IP "" 2
  2486. myfile
  2487. .PD
  2488. .IP "" 0
  2489. .SP
  2490. .SH "diff examples"
  2491. .SP
  2492. The following line produces a Unidiff (\fB-u\fR flag)
  2493. between revision 1.14 and 1.19 of
  2494. \fBbackend.c\fR. Due to the \fB-kk\fR flag no
  2495. keywords are substituted, so differences that only depend
  2496. on keyword substitution are ignored.
  2497. .SP
  2498. .PD 0
  2499. .SP
  2500. .IP "" 2
  2501. $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
  2502. .PD
  2503. .IP "" 0
  2504. .SP
  2505. Suppose the experimental branch EXPR1 was based on a
  2506. set of files tagged RELEASE_1_0. To see what has
  2507. happened on that branch, the following can be used:
  2508. .SP
  2509. .PD 0
  2510. .SP
  2511. .IP "" 2
  2512. $ cvs diff -r RELEASE_1_0 -r EXPR1
  2513. .PD
  2514. .IP "" 0
  2515. .SP
  2516. A command like this can be used to produce a context
  2517. diff between two releases:
  2518. .SP
  2519. .PD 0
  2520. .SP
  2521. .IP "" 2
  2522. $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
  2523. .PD
  2524. .IP "" 0
  2525. .SP
  2526. If you are maintaining ChangeLogs, a command like the following
  2527. just before you commit your changes may help you write
  2528. the ChangeLog entry. All local modifications that have
  2529. not yet been committed will be printed.
  2530. .SP
  2531. .PD 0
  2532. .SP
  2533. .IP "" 2
  2534. $ cvs diff -u | less
  2535. .PD
  2536. .IP "" 0
  2537. .SP
  2538. .SH "export"
  2539. .SS "Export sources from CVS, similar to checkout"
  2540. .IX "export (subcommand)"
  2541. .SP
  2542. .IP "\(bu" 2
  2543. Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module\&...
  2544. .IP "\(bu" 2
  2545. Requires: repository.
  2546. .IP "\(bu" 2
  2547. Changes: current directory.
  2548. .SP
  2549. This command is a variant of \fBcheckout\fR; use it
  2550. when you want a copy of the source for module without
  2551. the \fBcvs\fR administrative directories. For example, you
  2552. might use \fBexport\fR to prepare source for shipment
  2553. off-site. This command requires that you specify a
  2554. date or tag (with \fB-D\fR or \fB-r\fR), so that you
  2555. can count on reproducing the source you ship to others
  2556. (and thus it always prunes empty directories).
  2557. .SP
  2558. One often would like to use \fB-kv\fR with \fBcvs
  2559. export\fR. This causes any keywords to be
  2560. expanded such that an import done at some other site
  2561. will not lose the keyword revision information. But be
  2562. aware that doesn\(aqt handle an export containing binary
  2563. files correctly. Also be aware that after having used
  2564. \fB-kv\fR, one can no longer use the \fBident\fR
  2565. command (which is part of the \fBrcs\fR suite\(emsee
  2566. ident(1)) which looks for keyword strings. If
  2567. you want to be able to use \fBident\fR you must not
  2568. use \fB-kv\fR.
  2569. .SP
  2570. .SH "export options"
  2571. .SP
  2572. These standard options are supported by \fBexport\fR
  2573. (see node `Common options\(aq in the CVS manual, for a complete description of
  2574. them):
  2575. .SP
  2576. .IP "" 0
  2577. \fB-D \fIdate\fB\fR
  2578. .IP "" 2
  2579. Use the most recent revision no later than \fIdate\fR.
  2580. .SP
  2581. .IP "" 0
  2582. \fB-f\fR
  2583. .IP "" 2
  2584. If no matching revision is found, retrieve the most
  2585. recent revision (instead of ignoring the file).
  2586. .SP
  2587. .IP "" 0
  2588. \fB-l\fR
  2589. .IP "" 2
  2590. Local; run only in current working directory.
  2591. .SP
  2592. .IP "" 0
  2593. \fB-n\fR
  2594. .IP "" 2
  2595. Do not run any checkout program.
  2596. .SP
  2597. .IP "" 0
  2598. \fB-R\fR
  2599. .IP "" 2
  2600. Export directories recursively. This is on by default.
  2601. .SP
  2602. .IP "" 0
  2603. \fB-r \fItag\fB\fR
  2604. .IP "" 2
  2605. Use revision \fItag\fR.
  2606. .SP
  2607. In addition, these options (that are common to
  2608. \fBcheckout\fR and \fBexport\fR) are also supported:
  2609. .SP
  2610. .IP "" 0
  2611. \fB-d \fIdir\fB\fR
  2612. .IP "" 2
  2613. Create a directory called \fIdir\fR for the working
  2614. files, instead of using the module name.
  2615. See `checkout options\(aq in the CVS manual for complete details on how
  2616. \fBcvs\fR handles this flag.
  2617. .SP
  2618. .IP "" 0
  2619. \fB-k \fIsubst\fB\fR
  2620. .IP "" 2
  2621. Set keyword expansion mode (see node `Substitution modes\(aq in the CVS manual).
  2622. .SP
  2623. .IP "" 0
  2624. \fB-N\fR
  2625. .IP "" 2
  2626. Only useful together with \fB-d \fIdir\fB\fR.
  2627. See `checkout options\(aq in the CVS manual for complete details on how
  2628. \fBcvs\fR handles this flag.
  2629. .SP
  2630. .SH "history"
  2631. .SS "Show status of files and users"
  2632. .IX "history (subcommand)"
  2633. .SP
  2634. .IP "\(bu" 2
  2635. Synopsis: history [-report] [-flags] [-options args] [files\&...]
  2636. .IP "\(bu" 2
  2637. Requires: the file \fB$CVSROOT/CVSROOT/history\fR
  2638. .IP "\(bu" 2
  2639. Changes: nothing.
  2640. .SP
  2641. \fBcvs\fR can keep a history file that tracks each use of the
  2642. \fBcheckout\fR, \fBcommit\fR, \fBrtag\fR,
  2643. \fBupdate\fR, and \fBrelease\fR commands. You can
  2644. use \fBhistory\fR to display this information in
  2645. various formats.
  2646. .SP
  2647. Logging must be enabled by creating the file
  2648. \fB$CVSROOT/CVSROOT/history\fR.
  2649. .SP
  2650. \fB\fBhistory\fB uses \fB-f\fB, \fB-l\fB,
  2651. \fB-n\fB, and \fB-p\fB in ways that conflict with the
  2652. normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR
  2653. .SP
  2654. .SH "history options"
  2655. .SP
  2656. Several options (shown above as \fB-report\fR) control what
  2657. kind of report is generated:
  2658. .SP
  2659. .IP "" 0
  2660. \fB-c\fR
  2661. .IP "" 2
  2662. Report on each time commit was used (i.e., each time
  2663. the repository was modified).
  2664. .SP
  2665. .IP "" 0
  2666. \fB-e\fR
  2667. .IP "" 2
  2668. Everything (all record types). Equivalent to
  2669. specifying \fB-x\fR with all record types. Of course,
  2670. \fB-e\fR will also include record types which are
  2671. added in a future version of \fBcvs\fR; if you are
  2672. writing a script which can only handle certain record
  2673. types, you\(aqll want to specify \fB-x\fR.
  2674. .SP
  2675. .IP "" 0
  2676. \fB-m \fImodule\fB\fR
  2677. .IP "" 2
  2678. Report on a particular module. (You can meaningfully
  2679. use \fB-m\fR more than once on the command line.)
  2680. .SP
  2681. .IP "" 0
  2682. \fB-o\fR
  2683. .IP "" 2
  2684. Report on checked-out modules. This is the default report type.
  2685. .SP
  2686. .IP "" 0
  2687. \fB-T\fR
  2688. .IP "" 2
  2689. Report on all tags.
  2690. .SP
  2691. .IP "" 0
  2692. \fB-x \fItype\fB\fR
  2693. .IP "" 2
  2694. Extract a particular set of record types \fItype\fR from the \fBcvs\fR
  2695. history. The types are indicated by single letters,
  2696. which you may specify in combination.
  2697. .SP
  2698. Certain commands have a single record type:
  2699. .SP
  2700. .IP "" 2
  2701. \fBF\fR
  2702. .IP "" 4
  2703. release
  2704. .IP "" 2
  2705. \fBO\fR
  2706. .IP "" 4
  2707. checkout
  2708. .IP "" 2
  2709. \fBE\fR
  2710. .IP "" 4
  2711. export
  2712. .IP "" 2
  2713. \fBT\fR
  2714. .IP "" 4
  2715. rtag
  2716. .SP
  2717. One of five record types may result from an update:
  2718. .SP
  2719. .IP "" 2
  2720. \fBC\fR
  2721. .IP "" 4
  2722. A merge was necessary but collisions were
  2723. detected (requiring manual merging).
  2724. .IP "" 2
  2725. \fBG\fR
  2726. .IP "" 4
  2727. A merge was necessary and it succeeded.
  2728. .IP "" 2
  2729. \fBU\fR
  2730. .IP "" 4
  2731. A working file was copied from the repository.
  2732. .IP "" 2
  2733. \fBP\fR
  2734. .IP "" 4
  2735. A working file was patched to match the repository.
  2736. .IP "" 2
  2737. \fBW\fR
  2738. .IP "" 4
  2739. The working copy of a file was deleted during
  2740. update (because it was gone from the repository).
  2741. .SP
  2742. One of three record types results from commit:
  2743. .SP
  2744. .IP "" 2
  2745. \fBA\fR
  2746. .IP "" 4
  2747. A file was added for the first time.
  2748. .IP "" 2
  2749. \fBM\fR
  2750. .IP "" 4
  2751. A file was modified.
  2752. .IP "" 2
  2753. \fBR\fR
  2754. .IP "" 4
  2755. A file was removed.
  2756. .SP
  2757. The options shown as \fB-flags\fR constrain or expand
  2758. the report without requiring option arguments:
  2759. .SP
  2760. .IP "" 0
  2761. \fB-a\fR
  2762. .IP "" 2
  2763. Show data for all users (the default is to show data
  2764. only for the user executing \fBhistory\fR).
  2765. .SP
  2766. .IP "" 0
  2767. \fB-l\fR
  2768. .IP "" 2
  2769. Show last modification only.
  2770. .SP
  2771. .IP "" 0
  2772. \fB-w\fR
  2773. .IP "" 2
  2774. Show only the records for modifications done from the
  2775. same working directory where \fBhistory\fR is
  2776. executing.
  2777. .SP
  2778. The options shown as \fB-options \fIargs\fB\fR constrain the report
  2779. based on an argument:
  2780. .SP
  2781. .IP "" 0
  2782. \fB-b \fIstr\fB\fR
  2783. .IP "" 2
  2784. Show data back to a record containing the string
  2785. \fIstr\fR in either the module name, the file name, or
  2786. the repository path.
  2787. .SP
  2788. .IP "" 0
  2789. \fB-D \fIdate\fB\fR
  2790. .IP "" 2
  2791. Show data since \fIdate\fR. This is slightly different
  2792. from the normal use of \fB-D \fIdate\fB\fR, which
  2793. selects the newest revision older than \fIdate\fR.
  2794. .SP
  2795. .IP "" 0
  2796. \fB-f \fIfile\fB\fR
  2797. .IP "" 2
  2798. Show data for a particular file
  2799. (you can specify several \fB-f\fR options on the same command line).
  2800. This is equivalent to specifying the file on the command line.
  2801. .SP
  2802. .IP "" 0
  2803. \fB-n \fImodule\fB\fR
  2804. .IP "" 2
  2805. Show data for a particular module
  2806. (you can specify several \fB-n\fR options on the same command line).
  2807. .SP
  2808. .IP "" 0
  2809. \fB-p \fIrepository\fB\fR
  2810. .IP "" 2
  2811. Show data for a particular source repository (you
  2812. can specify several \fB-p\fR options on the same command
  2813. line).
  2814. .SP
  2815. .IP "" 0
  2816. \fB-r \fIrev\fB\fR
  2817. .IP "" 2
  2818. Show records referring to revisions since the revision
  2819. or tag named \fIrev\fR appears in individual \fBrcs\fR
  2820. files. Each \fBrcs\fR file is searched for the revision or
  2821. tag.
  2822. .SP
  2823. .IP "" 0
  2824. \fB-t \fItag\fB\fR
  2825. .IP "" 2
  2826. Show records since tag \fItag\fR was last added to the
  2827. history file. This differs from the \fB-r\fR flag
  2828. above in that it reads only the history file, not the
  2829. \fBrcs\fR files, and is much faster.
  2830. .SP
  2831. .IP "" 0
  2832. \fB-u \fIname\fB\fR
  2833. .IP "" 2
  2834. Show records for user \fIname\fR.
  2835. .SP
  2836. .IP "" 0
  2837. \fB-z \fItimezone\fB\fR
  2838. .IP "" 2
  2839. Show times in the selected records using the specified
  2840. time zone instead of UTC.
  2841. .SP
  2842. .SH "import"
  2843. .SS "Import sources into CVS, using vendor branches"
  2844. .IX "import (subcommand)"
  2845. .SP
  2846. .IP "\(bu" 2
  2847. Synopsis: import [-options] repository vendortag releasetag\&...
  2848. .IP "\(bu" 2
  2849. Requires: Repository, source distribution directory.
  2850. .IP "\(bu" 2
  2851. Changes: repository.
  2852. .SP
  2853. Use \fBimport\fR to incorporate an entire source
  2854. distribution from an outside source (e.g., a source
  2855. vendor) into your source repository directory. You can
  2856. use this command both for initial creation of a
  2857. repository, and for wholesale updates to the module
  2858. from the outside source. See `Tracking sources\(aq in the CVS manual for
  2859. a discussion on this subject.
  2860. .SP
  2861. The \fIrepository\fR argument gives a directory name
  2862. (or a path to a directory) under the \fBcvs\fR root directory
  2863. for repositories; if the directory did not exist,
  2864. import creates it.
  2865. .SP
  2866. When you use import for updates to source that has been
  2867. modified in your source repository (since a prior
  2868. import), it will notify you of any files that conflict
  2869. in the two branches of development; use \fBcheckout
  2870. -j\fR to reconcile the differences, as import instructs
  2871. you to do.
  2872. .SP
  2873. If \fBcvs\fR decides a file should be ignored
  2874. (see node `cvsignore\(aq in the CVS manual), it does not import it and prints
  2875. \fBI \fR followed by the filename (see node `import output\(aq in the CVS manual for a
  2876. complete description of the output).
  2877. .SP
  2878. If the file \fB$CVSROOT/CVSROOT/cvswrappers\fR exists,
  2879. any file whose names match the specifications in that
  2880. file will be treated as packages and the appropriate
  2881. filtering will be performed on the file/directory
  2882. before being imported. See `Wrappers\(aq in the CVS manual.
  2883. .SP
  2884. The outside source is saved in a first-level
  2885. branch, by default 1.1.1. Updates are leaves of this
  2886. branch; for example, files from the first imported
  2887. collection of source will be revision 1.1.1.1, then
  2888. files from the first imported update will be revision
  2889. 1.1.1.2, and so on.
  2890. .SP
  2891. At least three arguments are required.
  2892. \fIrepository\fR is needed to identify the collection
  2893. of source. \fIvendortag\fR is a tag for the entire
  2894. branch (e.g., for 1.1.1). You must also specify at
  2895. least one \fIreleasetag\fR to uniquely identify the files at
  2896. the leaves created each time you execute \fBimport\fR. The
  2897. \fIreleasetag\fR should be new, not previously existing in the
  2898. repository file, and uniquely identify the imported release,
  2899. .SP
  2900. Note that \fBimport\fR does \fInot\fR change the
  2901. directory in which you invoke it. In particular, it
  2902. does not set up that directory as a \fBcvs\fR working
  2903. directory; if you want to work with the sources import
  2904. them first and then check them out into a different
  2905. directory (see node `Getting the source\(aq in the CVS manual).
  2906. .SP
  2907. .SH "import options"
  2908. .SP
  2909. This standard option is supported by \fBimport\fR
  2910. (see node `Common options\(aq in the CVS manual for a complete description):
  2911. .SP
  2912. .IP "" 0
  2913. \fB-m \fImessage\fB\fR
  2914. .IP "" 2
  2915. Use \fImessage\fR as log information, instead of
  2916. invoking an editor.
  2917. .SP
  2918. There are the following additional special options.
  2919. .SP
  2920. .IP "" 0
  2921. \fB-b \fIbranch\fB\fR
  2922. .IP "" 2
  2923. See `Multiple vendor branches\(aq in the CVS manual.
  2924. .SP
  2925. .IP "" 0
  2926. \fB-k \fIsubst\fB\fR
  2927. .IP "" 2
  2928. Indicate the keyword expansion mode desired. This
  2929. setting will apply to all files created during the
  2930. import, but not to any files that previously existed in
  2931. the repository. See `Substitution modes\(aq in the CVS manual for a
  2932. list of valid \fB-k\fR settings.
  2933. .SP
  2934. .IP "" 0
  2935. \fB-I \fIname\fB\fR
  2936. .IP "" 2
  2937. Specify file names that should be ignored during
  2938. import. You can use this option repeatedly. To avoid
  2939. ignoring any files at all (even those ignored by
  2940. default), specify \`-I !\(aq.
  2941. .SP
  2942. \fIname\fR can be a file name pattern of the same type
  2943. that you can specify in the \fB.cvsignore\fR file.
  2944. See `cvsignore\(aq in the CVS manual.
  2945. .SP
  2946. .IP "" 0
  2947. \fB-W \fIspec\fB\fR
  2948. .IP "" 2
  2949. Specify file names that should be filtered during
  2950. import. You can use this option repeatedly.
  2951. .SP
  2952. \fIspec\fR can be a file name pattern of the same type
  2953. that you can specify in the \fB.cvswrappers\fR
  2954. file. see node `Wrappers\(aq in the CVS manual.
  2955. .SP
  2956. .SH "import output"
  2957. .SP
  2958. \fBimport\fR keeps you informed of its progress by printing a line
  2959. for each file, preceded by one character indicating the status of the file:
  2960. .SP
  2961. .IP "" 0
  2962. \fBU \fIfile\fB\fR
  2963. .IP "" 2
  2964. The file already exists in the repository and has not been locally
  2965. modified; a new revision has been created (if necessary).
  2966. .SP
  2967. .IP "" 0
  2968. \fBN \fIfile\fB\fR
  2969. .IP "" 2
  2970. The file is a new file which has been added to the repository.
  2971. .SP
  2972. .IP "" 0
  2973. \fBC \fIfile\fB\fR
  2974. .IP "" 2
  2975. The file already exists in the repository but has been locally modified;
  2976. you will have to merge the changes.
  2977. .SP
  2978. .IP "" 0
  2979. \fBI \fIfile\fB\fR
  2980. .IP "" 2
  2981. The file is being ignored (see node `cvsignore\(aq in the CVS manual).
  2982. .SP
  2983. .IX "Symbolic link, importing"
  2984. .IX "Link, symbolic, importing"
  2985. .IP "" 0
  2986. \fBL \fIfile\fB\fR
  2987. .IP "" 2
  2988. The file is a symbolic link; \fBcvs import\fR ignores symbolic links.
  2989. People periodically suggest that this behavior should
  2990. be changed, but if there is a consensus on what it
  2991. should be changed to, it doesn\(aqt seem to be apparent.
  2992. (Various options in the \fBmodules\fR file can be used
  2993. to recreate symbolic links on checkout, update, etc.;
  2994. see node `modules\(aq in the CVS manual.)
  2995. .SP
  2996. .SH "import examples"
  2997. .SP
  2998. See `Tracking sources\(aq in the CVS manual, and `From files\(aq in the CVS manual.
  2999. .SP
  3000. .SH "log"
  3001. .SS "Print out log information for files"
  3002. .IX "log (subcommand)"
  3003. .SP
  3004. .IP "\(bu" 2
  3005. Synopsis: log [options] [files\&...]
  3006. .IP "\(bu" 2
  3007. Requires: repository, working directory.
  3008. .IP "\(bu" 2
  3009. Changes: nothing.
  3010. .SP
  3011. Display log information for files. \fBlog\fR used to
  3012. call the \fBrcs\fR utility \fBrlog\fR. Although this
  3013. is no longer true in the current sources, this history
  3014. determines the format of the output and the options,
  3015. which are not quite in the style of the other \fBcvs\fR
  3016. commands.
  3017. .SP
  3018. .IX "Timezone, in output"
  3019. .IX "Zone, time, in output"
  3020. The output includes the location of the \fBrcs\fR file,
  3021. the \fIhead\fR revision (the latest revision on the
  3022. trunk), all symbolic names (tags) and some other
  3023. things. For each revision, the revision number, the
  3024. author, the number of lines added/deleted and the log
  3025. message are printed. All times are displayed in
  3026. Coordinated Universal Time (UTC). (Other parts of
  3027. \fBcvs\fR print times in the local timezone).
  3028. .SP
  3029. \fB\fBlog\fB uses \fB-R\fB in a way that conflicts
  3030. with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR
  3031. .SP
  3032. .SH "log options"
  3033. .SP
  3034. By default, \fBlog\fR prints all information that is
  3035. available. All other options restrict the output. Note that the revision
  3036. selection options (\fB-b\fR, \fB-d\fR, \fB-r\fR, \fB-s\fR, and \fB-w\fR)
  3037. have no
  3038. effect, other than possibly causing a search for files in Attic directories,
  3039. when used in conjunction with the options that restrict the output to only
  3040. \fBlog\fR header fields (\fB-h\fR, \fB-R\fR, and \fB-t\fR)
  3041. unless the \fB-S\fR option is also specified.
  3042. .SP
  3043. .IP "" 0
  3044. \fB-b\fR
  3045. .IP "" 2
  3046. Print information about the revisions on the default
  3047. branch, normally the highest branch on the trunk.
  3048. .SP
  3049. .IP "" 0
  3050. \fB-d \fIdates\fB\fR
  3051. .IP "" 2
  3052. Print information about revisions with a checkin
  3053. date/time in the range given by the
  3054. semicolon-separated list of dates. The date formats
  3055. accepted are those accepted by the \fB-D\fR option to
  3056. many other \fBcvs\fR commands (see node `Common options\(aq in the CVS manual).
  3057. Dates can be combined into ranges as follows:
  3058. .SP
  3059. .IP "" 2
  3060. \fB\fId1\fB<\fId2\fB\fR
  3061. .IP "" 4
  3062. .IP "" 2
  3063. \fB\fId2\fB>\fId1\fB\fR
  3064. .IP "" 4
  3065. Select the revisions that were deposited between
  3066. \fId1\fR and \fId2\fR.
  3067. .SP
  3068. .IP "" 2
  3069. \fB<\fId\fB\fR
  3070. .IP "" 4
  3071. .IP "" 2
  3072. \fB\fId\fB>\fR
  3073. .IP "" 4
  3074. Select all revisions dated \fId\fR or earlier.
  3075. .SP
  3076. .IP "" 2
  3077. \fB\fId\fB<\fR
  3078. .IP "" 4
  3079. .IP "" 2
  3080. \fB>\fId\fB\fR
  3081. .IP "" 4
  3082. Select all revisions dated \fId\fR or later.
  3083. .SP
  3084. .IP "" 2
  3085. \fB\fId\fB\fR
  3086. .IP "" 4
  3087. Select the single, latest revision dated \fId\fR or
  3088. earlier.
  3089. .SP
  3090. The \fB>\fR or \fB<\fR characters may be followed by
  3091. \fB=\fR to indicate an inclusive range rather than an
  3092. exclusive one.
  3093. .SP
  3094. Note that the separator is a semicolon (;).
  3095. .SP
  3096. .IP "" 0
  3097. \fB-h\fR
  3098. .IP "" 2
  3099. Print only the name of the \fBrcs\fR file, name
  3100. of the file in the working directory, head,
  3101. default branch, access list, locks, symbolic names, and
  3102. suffix.
  3103. .SP
  3104. .IP "" 0
  3105. \fB-l\fR
  3106. .IP "" 2
  3107. Local; run only in current working directory. (Default
  3108. is to run recursively).
  3109. .SP
  3110. .IP "" 0
  3111. \fB-N\fR
  3112. .IP "" 2
  3113. Do not print the list of tags for this file. This
  3114. option can be very useful when your site uses a lot of
  3115. tags, so rather than "more"\(aqing over 3 pages of tag
  3116. information, the log information is presented without
  3117. tags at all.
  3118. .SP
  3119. .IP "" 0
  3120. \fB-n\fR
  3121. .IP "" 2
  3122. Print the list of tags for this file. This option can
  3123. be very useful when your \fB.cvsrc\fR file has a
  3124. \fBlog -N\fR entry as a way to get a full list of all
  3125. of the tags.
  3126. .SP
  3127. .IP "" 0
  3128. \fB-R\fR
  3129. .IP "" 2
  3130. Print only the name of the \fBrcs\fR file.
  3131. .SP
  3132. .IP "" 0
  3133. \fB-r\fIrevisions\fB\fR
  3134. .IP "" 2
  3135. Print information about revisions given in the
  3136. comma-separated list \fIrevisions\fR of revisions and
  3137. ranges. The following table explains the available
  3138. range formats:
  3139. .SP
  3140. .IP "" 2
  3141. \fB\fIrev1\fB:\fIrev2\fB\fR
  3142. .IP "" 4
  3143. Revisions \fIrev1\fR to \fIrev2\fR (which must be on
  3144. the same branch).
  3145. .SP
  3146. .IP "" 2
  3147. \fB\fIrev1\fB::\fIrev2\fB\fR
  3148. .IP "" 4
  3149. The same, but excluding \fIrev1\fR.
  3150. .SP
  3151. .IP "" 2
  3152. \fB:\fIrev\fB\fR
  3153. .IP "" 4
  3154. .IP "" 2
  3155. \fB::\fIrev\fB\fR
  3156. .IP "" 4
  3157. Revisions from the beginning of the branch up to
  3158. and including \fIrev\fR.
  3159. .SP
  3160. .IP "" 2
  3161. \fB\fIrev\fB:\fR
  3162. .IP "" 4
  3163. Revisions starting with \fIrev\fR to the end of the
  3164. branch containing \fIrev\fR.
  3165. .SP
  3166. .IP "" 2
  3167. \fB\fIrev\fB::\fR
  3168. .IP "" 4
  3169. Revisions starting just after \fIrev\fR to the end of the
  3170. branch containing \fIrev\fR.
  3171. .SP
  3172. .IP "" 2
  3173. \fB\fIbranch\fB\fR
  3174. .IP "" 4
  3175. An argument that is a branch means all revisions on
  3176. that branch.
  3177. .SP
  3178. .IP "" 2
  3179. \fB\fIbranch1\fB:\fIbranch2\fB\fR
  3180. .IP "" 4
  3181. .IP "" 2
  3182. \fB\fIbranch1\fB::\fIbranch2\fB\fR
  3183. .IP "" 4
  3184. A range of branches means all revisions
  3185. on the branches in that range.
  3186. .SP
  3187. .IP "" 2
  3188. \fB\fIbranch\fB.\fR
  3189. .IP "" 4
  3190. The latest revision in \fIbranch\fR.
  3191. .SP
  3192. A bare \fB-r\fR with no revisions means the latest
  3193. revision on the default branch, normally the trunk.
  3194. There can be no space between the \fB-r\fR option and
  3195. its argument.
  3196. .SP
  3197. .IP "" 0
  3198. \fB-S\fR
  3199. .IP "" 2
  3200. Suppress the header if no revisions are selected.
  3201. .SP
  3202. .IP "" 0
  3203. \fB-s \fIstates\fB\fR
  3204. .IP "" 2
  3205. Print information about revisions whose state
  3206. attributes match one of the states given in the
  3207. comma-separated list \fIstates\fR. Individual states may
  3208. be any text string, though \fBcvs\fR commonly only uses two
  3209. states, \fBExp\fR and \fBdead\fR. See `admin options\(aq in the CVS manual
  3210. for more information.
  3211. .SP
  3212. .IP "" 0
  3213. \fB-t\fR
  3214. .IP "" 2
  3215. Print the same as \fB-h\fR, plus the descriptive text.
  3216. .SP
  3217. .IP "" 0
  3218. \fB-w\fIlogins\fB\fR
  3219. .IP "" 2
  3220. Print information about revisions checked in by users
  3221. with login names appearing in the comma-separated list
  3222. \fIlogins\fR. If \fIlogins\fR is omitted, the user\(aqs
  3223. login is assumed. There can be no space between the
  3224. \fB-w\fR option and its argument.
  3225. .SP
  3226. \fBlog\fR prints the intersection of the revisions
  3227. selected with the options \fB-d\fR, \fB-s\fR, and
  3228. \fB-w\fR, intersected with the union of the revisions
  3229. selected by \fB-b\fR and \fB-r\fR.
  3230. .SP
  3231. .SH "log examples"
  3232. .SP
  3233. Contributed examples are gratefully accepted.
  3234. .SP
  3235. .SH "rdiff"
  3236. .SS "\(aqpatch\(aq format diffs between releases"
  3237. .IX "rdiff (subcommand)"
  3238. .SP
  3239. .IP "\(bu" 2
  3240. rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules\&...
  3241. .IP "\(bu" 2
  3242. Requires: repository.
  3243. .IP "\(bu" 2
  3244. Changes: nothing.
  3245. .IP "\(bu" 2
  3246. Synonym: patch
  3247. .SP
  3248. Builds a Larry Wall format patch(1) file between two
  3249. releases, that can be fed directly into the \fBpatch\fR
  3250. program to bring an old release up-to-date with the new
  3251. release. (This is one of the few \fBcvs\fR commands that
  3252. operates directly from the repository, and doesn\(aqt
  3253. require a prior checkout.) The diff output is sent to
  3254. the standard output device.
  3255. .SP
  3256. You can specify (using the standard \fB-r\fR and
  3257. \fB-D\fR options) any combination of one or two
  3258. revisions or dates. If only one revision or date is
  3259. specified, the patch file reflects differences between
  3260. that revision or date and the current head revisions in
  3261. the \fBrcs\fR file.
  3262. .SP
  3263. Note that if the software release affected is contained
  3264. in more than one directory, then it may be necessary to
  3265. specify the \fB-p\fR option to the \fBpatch\fR command when
  3266. patching the old sources, so that \fBpatch\fR is able to find
  3267. the files that are located in other directories.
  3268. .SP
  3269. .SH "rdiff options"
  3270. .SP
  3271. These standard options are supported by \fBrdiff\fR
  3272. (see node `Common options\(aq in the CVS manual for a complete description of
  3273. them):
  3274. .SP
  3275. .IP "" 0
  3276. \fB-D \fIdate\fB\fR
  3277. .IP "" 2
  3278. Use the most recent revision no later than \fIdate\fR.
  3279. .SP
  3280. .IP "" 0
  3281. \fB-f\fR
  3282. .IP "" 2
  3283. If no matching revision is found, retrieve the most
  3284. recent revision (instead of ignoring the file).
  3285. .SP
  3286. .IP "" 0
  3287. \fB-k \fIkflag\fB\fR
  3288. .IP "" 2
  3289. Process keywords according to \fIkflag\fR. See
  3290. `Keyword substitution\(aq in the CVS manual.
  3291. .SP
  3292. .IP "" 0
  3293. \fB-l\fR
  3294. .IP "" 2
  3295. Local; don\(aqt descend subdirectories.
  3296. .SP
  3297. .IP "" 0
  3298. \fB-R\fR
  3299. .IP "" 2
  3300. Examine directories recursively. This option is on by default.
  3301. .SP
  3302. .IP "" 0
  3303. \fB-r \fItag\fB\fR
  3304. .IP "" 2
  3305. Use revision \fItag\fR.
  3306. .SP
  3307. In addition to the above, these options are available:
  3308. .SP
  3309. .IP "" 0
  3310. \fB-c\fR
  3311. .IP "" 2
  3312. Use the context diff format. This is the default format.
  3313. .SP
  3314. .IP "" 0
  3315. \fB-s\fR
  3316. .IP "" 2
  3317. Create a summary change report instead of a patch. The
  3318. summary includes information about files that were
  3319. changed or added between the releases. It is sent to
  3320. the standard output device. This is useful for finding
  3321. out, for example, which files have changed between two
  3322. dates or revisions.
  3323. .SP
  3324. .IP "" 0
  3325. \fB-t\fR
  3326. .IP "" 2
  3327. A diff of the top two revisions is sent to the standard
  3328. output device. This is most useful for seeing what the
  3329. last change to a file was.
  3330. .SP
  3331. .IP "" 0
  3332. \fB-u\fR
  3333. .IP "" 2
  3334. Use the unidiff format for the context diffs.
  3335. Remember that old versions
  3336. of the \fBpatch\fR program can\(aqt handle the unidiff
  3337. format, so if you plan to post this patch to the net
  3338. you should probably not use \fB-u\fR.
  3339. .SP
  3340. .IP "" 0
  3341. \fB-V \fIvn\fB\fR
  3342. .IP "" 2
  3343. Expand keywords according to the rules current in
  3344. \fBrcs\fR version \fIvn\fR (the expansion format changed with
  3345. \fBrcs\fR version 5). Note that this option is no
  3346. longer accepted. \fBcvs\fR will always expand keywords the
  3347. way that \fBrcs\fR version 5 does.
  3348. .SP
  3349. .SH "rdiff examples"
  3350. .SP
  3351. Suppose you receive mail from \fRfoo@example.net\fR asking for an
  3352. update from release 1.2 to 1.4 of the tc compiler. You
  3353. have no such patches on hand, but with \fBcvs\fR that can
  3354. easily be fixed with a command such as this:
  3355. .SP
  3356. .PD 0
  3357. .SP
  3358. .IP "" 2
  3359. $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \\
  3360. .IP "" 2
  3361. > Mail -s \(aqThe patches you asked for\(aq foo@example.net
  3362. .PD
  3363. .IP "" 0
  3364. .SP
  3365. Suppose you have made release 1.3, and forked a branch
  3366. called \fBR_1_3fix\fR for bug fixes. \fBR_1_3_1\fR
  3367. corresponds to release 1.3.1, which was made some time
  3368. ago. Now, you want to see how much development has been
  3369. done on the branch. This command can be used:
  3370. .SP
  3371. .PD 0
  3372. .SP
  3373. .IP "" 2
  3374. $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
  3375. .IP "" 2
  3376. cvs rdiff: Diffing module-name
  3377. .IP "" 2
  3378. File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
  3379. .IP "" 2
  3380. File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
  3381. .IP "" 2
  3382. File bar.h,v changed from revision 1.29.2.1 to 1.2
  3383. .PD
  3384. .IP "" 0
  3385. .SP
  3386. .SH "release"
  3387. .SS "Indicate that a Module is no longer in use"
  3388. .IX "release (subcommand)"
  3389. .SP
  3390. .IP "\(bu" 2
  3391. release [-d] directories\&...
  3392. .IP "\(bu" 2
  3393. Requires: Working directory.
  3394. .IP "\(bu" 2
  3395. Changes: Working directory, history log.
  3396. .SP
  3397. This command is meant to safely cancel the effect of
  3398. \fBcvs checkout\fR. Since \fBcvs\fR doesn\(aqt lock files, it
  3399. isn\(aqt strictly necessary to use this command. You can
  3400. always simply delete your working directory, if you
  3401. like; but you risk losing changes you may have
  3402. forgotten, and you leave no trace in the \fBcvs\fR history
  3403. file (see node `history file\(aq in the CVS manual) that you\(aqve abandoned your
  3404. checkout.
  3405. .SP
  3406. Use \fBcvs release\fR to avoid these problems. This
  3407. command checks that no uncommitted changes are
  3408. present; that you are executing it from immediately
  3409. above a \fBcvs\fR working directory; and that the repository
  3410. recorded for your files is the same as the repository
  3411. defined in the module database.
  3412. .SP
  3413. If all these conditions are true, \fBcvs release\fR
  3414. leaves a record of its execution (attesting to your
  3415. intentionally abandoning your checkout) in the \fBcvs\fR
  3416. history log.
  3417. .SP
  3418. .SH "release options"
  3419. .SP
  3420. The \fBrelease\fR command supports one command option:
  3421. .SP
  3422. .IP "" 0
  3423. \fB-d\fR
  3424. .IP "" 2
  3425. Delete your working copy of the file if the release
  3426. succeeds. If this flag is not given your files will
  3427. remain in your working directory.
  3428. .SP
  3429. \fBWARNING: The \fBrelease\fB command deletes
  3430. all directories and files recursively. This
  3431. has the very serious side-effect that any directory
  3432. created inside checked-out sources, and not added to
  3433. the repository (using the \fBadd\fB command;
  3434. see node `Adding files\(aq in the CVS manual) will be silently deleted\(emeven
  3435. if it is non-empty!\fR
  3436. .SP
  3437. .SH "release output"
  3438. .SP
  3439. Before \fBrelease\fR releases your sources it will
  3440. print a one-line message for any file that is not
  3441. up-to-date.
  3442. .SP
  3443. .IP "" 0
  3444. \fBU \fIfile\fB\fR
  3445. .IP "" 2
  3446. .IP "" 0
  3447. \fBP \fIfile\fB\fR
  3448. .IP "" 2
  3449. There exists a newer revision of this file in the
  3450. repository, and you have not modified your local copy
  3451. of the file (\fBU\fR and \fBP\fR mean the same thing).
  3452. .SP
  3453. .IP "" 0
  3454. \fBA \fIfile\fB\fR
  3455. .IP "" 2
  3456. The file has been added to your private copy of the
  3457. sources, but has not yet been committed to the
  3458. repository. If you delete your copy of the sources
  3459. this file will be lost.
  3460. .SP
  3461. .IP "" 0
  3462. \fBR \fIfile\fB\fR
  3463. .IP "" 2
  3464. The file has been removed from your private copy of the
  3465. sources, but has not yet been removed from the
  3466. repository, since you have not yet committed the
  3467. removal. See `commit\(aq in the CVS manual.
  3468. .SP
  3469. .IP "" 0
  3470. \fBM \fIfile\fB\fR
  3471. .IP "" 2
  3472. The file is modified in your working directory. There
  3473. might also be a newer revision inside the repository.
  3474. .SP
  3475. .IP "" 0
  3476. \fB? \fIfile\fB\fR
  3477. .IP "" 2
  3478. \fIfile\fR is in your working directory, but does not
  3479. correspond to anything in the source repository, and is
  3480. not in the list of files for \fBcvs\fR to ignore (see the
  3481. description of the \fB-I\fR option, and
  3482. see node `cvsignore\(aq in the CVS manual). If you remove your working
  3483. sources, this file will be lost.
  3484. .SP
  3485. .SH "release examples"
  3486. .SP
  3487. Release the \fBtc\fR directory, and delete your local working copy
  3488. of the files.
  3489. .SP
  3490. .PD 0
  3491. .SP
  3492. .IP "" 2
  3493. $ cd \&.. # \fRYou must stand immediately above the\fR
  3494. .IP "" 2
  3495. # \fRsources when you issue \fBcvs release\fR.\fR
  3496. .IP "" 2
  3497. $ cvs release -d tc
  3498. .IP "" 2
  3499. You have [0] altered files in this repository.
  3500. .IP "" 2
  3501. Are you sure you want to release (and delete) directory \`tc\(aq: y
  3502. .IP "" 2
  3503. $
  3504. .PD
  3505. .IP "" 0
  3506. .SP
  3507. .SH "remove"
  3508. .SS "Remove files from active use"
  3509. .IX "remove (subcommand)"
  3510. .SP
  3511. .IP "\(bu" 2
  3512. Synopsis: remove [-flR] [files...]
  3513. .IP "\(bu" 2
  3514. Requires: repository, working directory.
  3515. .IP "\(bu" 2
  3516. Changes: working directory.
  3517. .SP
  3518. The \fBremove\fR command is used to remove unwanted
  3519. files from active use. The user normally deletes the
  3520. files from the working directory prior to invocation
  3521. of the \fBremove\fR command. Only the working
  3522. directory is updated. Changes to the repository are
  3523. not made until the \fBcommit\fR command is run.
  3524. .SP
  3525. The \fBremove\fR command does not delete files from
  3526. from the repository. \fBcvs\fR keeps all historical
  3527. data in the repository so that it is possible to
  3528. reconstruct previous states of the projects under
  3529. revision control.
  3530. .SP
  3531. To undo \fBcvs\fR \fBremove\fR or to resurrect files
  3532. that were previously removed, see node `add\(aq in the CVS manual.
  3533. .SP
  3534. .SH "remove options"
  3535. .SP
  3536. These standard options are supported by \fBremove\fR
  3537. (see node `Common options\(aq in the CVS manual for a complete description of
  3538. them):
  3539. .SP
  3540. .IP "" 0
  3541. \fB-l\fR
  3542. .IP "" 2
  3543. Local; run only in current working directory. See `Recursive behavior\(aq in the CVS manual.
  3544. .SP
  3545. .IP "" 0
  3546. \fB-R\fR
  3547. .IP "" 2
  3548. Process directories recursively. See `Recursive behavior\(aq in the CVS manual.
  3549. .SP
  3550. .SP
  3551. In addition, these options are also supported:
  3552. .SP
  3553. .IP "" 0
  3554. \fB-f\fR
  3555. .IP "" 2
  3556. Note that this is not the standard behavior of
  3557. the \fB-f\fR option as defined in `Common options\(aq in the CVS manual.
  3558. .SP
  3559. Delete files before removing them.
  3560. .SP
  3561. Entire directory hierarchies are easily removed
  3562. using \fB-f\fR, but take note that it is not as
  3563. easy to resurrect directory hierarchies as it is
  3564. to remove them.
  3565. .SP
  3566. .SP
  3567. .SH "remove examples"
  3568. .SP
  3569. .SS "Removing a file"
  3570. .SP
  3571. .PD 0
  3572. .SP
  3573. .IP "" 2
  3574. $ cvs remove remove.me
  3575. .IP "" 2
  3576. cvs remove: file \`remove.me\(aq still in working directory
  3577. .IP "" 2
  3578. cvs remove: 1 file exists; remove it first
  3579. .IP "" 2
  3580. $ rm -f remove.me
  3581. .IP "" 2
  3582. $ cvs remove remove.me
  3583. .IP "" 2
  3584. cvs remove: scheduling \`remove.me\(aq for removal
  3585. .IP "" 2
  3586. cvs remove: use \(aqcvs commit\(aq to remove this file permanently
  3587. .SP
  3588. .IP "" 2
  3589. $ ls remove.it
  3590. .IP "" 2
  3591. remove.it
  3592. .IP "" 2
  3593. $ cvs remove -f remove.it
  3594. .IP "" 2
  3595. cvs remove: scheduling \`remove.it\(aq for removal
  3596. .IP "" 2
  3597. cvs remove: use \(aqcvs commit\(aq to remove this file permanently
  3598. .PD
  3599. .IP "" 0
  3600. .SP
  3601. .SS "Removing entire directories"
  3602. .SP
  3603. .PD 0
  3604. .IP "" 2
  3605. $ tree -d a
  3606. .IP "" 2
  3607. a
  3608. .IP "" 2
  3609. |-- CVS
  3610. .IP "" 2
  3611. \`-- b
  3612. .IP "" 2
  3613. \`-- CVS
  3614. .SP
  3615. .IP "" 2
  3616. 3 directories
  3617. .IP "" 2
  3618. $ cvs remove -f a
  3619. .IP "" 2
  3620. cvs remove: Removing a
  3621. .IP "" 2
  3622. cvs remove: Removing a/b
  3623. .IP "" 2
  3624. cvs remove: scheduling \`a/b/c\(aq for removal
  3625. .IP "" 2
  3626. cvs remove: use \(aqcvs commit\(aq to remove this file permanently
  3627. .PD
  3628. .IP "" 0
  3629. .SP
  3630. .SH "update"
  3631. .SS "Bring work tree in sync with repository"
  3632. .IX "update (subcommand)"
  3633. .SP
  3634. .IP "\(bu" 2
  3635. update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files\&...
  3636. .IP "\(bu" 2
  3637. Requires: repository, working directory.
  3638. .IP "\(bu" 2
  3639. Changes: working directory.
  3640. .SP
  3641. After you\(aqve run checkout to create your private copy
  3642. of source from the common repository, other developers
  3643. will continue changing the central source. From time
  3644. to time, when it is convenient in your development
  3645. process, you can use the \fBupdate\fR command from
  3646. within your working directory to reconcile your work
  3647. with any revisions applied to the source repository
  3648. since your last checkout or update.
  3649. .SP
  3650. .SH "update options"
  3651. .SP
  3652. These standard options are available with \fBupdate\fR
  3653. (see node `Common options\(aq in the CVS manual for a complete description of
  3654. them):
  3655. .SP
  3656. .IP "" 0
  3657. \fB-D date\fR
  3658. .IP "" 2
  3659. Use the most recent revision no later than \fIdate\fR.
  3660. This option is sticky, and implies \fB-P\fR.
  3661. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates.
  3662. .SP
  3663. .IP "" 0
  3664. \fB-f\fR
  3665. .IP "" 2
  3666. Only useful with the \fB-D \fIdate\fB\fR or \fB-r
  3667. \fItag\fB\fR flags. If no matching revision is found,
  3668. retrieve the most recent revision (instead of ignoring
  3669. the file).
  3670. .SP
  3671. .IP "" 0
  3672. \fB-k \fIkflag\fB\fR
  3673. .IP "" 2
  3674. Process keywords according to \fIkflag\fR. See
  3675. `Keyword substitution\(aq in the CVS manual.
  3676. This option is sticky; future updates of
  3677. this file in this working directory will use the same
  3678. \fIkflag\fR. The \fBstatus\fR command can be viewed
  3679. to see the sticky options. See `Invoking CVS\(aq in the CVS manual for
  3680. more information on the \fBstatus\fR command.
  3681. .SP
  3682. .IP "" 0
  3683. \fB-l\fR
  3684. .IP "" 2
  3685. Local; run only in current working directory. See `Recursive behavior\(aq in the CVS manual.
  3686. .SP
  3687. .IP "" 0
  3688. \fB-P\fR
  3689. .IP "" 2
  3690. Prune empty directories. See `Moving directories\(aq in the CVS manual.
  3691. .SP
  3692. .IP "" 0
  3693. \fB-p\fR
  3694. .IP "" 2
  3695. Pipe files to the standard output.
  3696. .SP
  3697. .IP "" 0
  3698. \fB-R\fR
  3699. .IP "" 2
  3700. Update directories recursively (default). See `Recursive
  3701. behavior\(aq in the CVS manual.
  3702. .SP
  3703. .IP "" 0
  3704. \fB-r rev\fR
  3705. .IP "" 2
  3706. Retrieve revision/tag \fIrev\fR. This option is sticky,
  3707. and implies \fB-P\fR.
  3708. See `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates.
  3709. .SP
  3710. These special options are also available with
  3711. \fBupdate\fR.
  3712. .SP
  3713. .IP "" 0
  3714. \fB-A\fR
  3715. .IP "" 2
  3716. Reset any sticky tags, dates, or \fB-k\fR options.
  3717. Does not reset sticky \fB-k\fR options on modified files.
  3718. See `Sticky tags\(aq in the CVS manual for more information on sticky tags/dates.
  3719. .SP
  3720. .IP "" 0
  3721. \fB-C\fR
  3722. .IP "" 2
  3723. Overwrite locally modified files with clean copies from
  3724. the repository (the modified file is saved in
  3725. \fB.#\fIfile\fB.\fIrevision\fB\fR, however).
  3726. .SP
  3727. .IP "" 0
  3728. \fB-d\fR
  3729. .IP "" 2
  3730. Create any directories that exist in the repository if
  3731. they\(aqre missing from the working directory. Normally,
  3732. \fBupdate\fR acts only on directories and files that
  3733. were already enrolled in your working directory.
  3734. .SP
  3735. This is useful for updating directories that were
  3736. created in the repository since the initial checkout;
  3737. but it has an unfortunate side effect. If you
  3738. deliberately avoided certain directories in the
  3739. repository when you created your working directory
  3740. (either through use of a module name or by listing
  3741. explicitly the files and directories you wanted on the
  3742. command line), then updating with \fB-d\fR will create
  3743. those directories, which may not be what you want.
  3744. .SP
  3745. .IP "" 0
  3746. \fB-I \fIname\fB\fR
  3747. .IP "" 2
  3748. Ignore files whose names match \fIname\fR (in your
  3749. working directory) during the update. You can specify
  3750. \fB-I\fR more than once on the command line to specify
  3751. several files to ignore. Use \fB-I !\fR to avoid
  3752. ignoring any files at all. See `cvsignore\(aq in the CVS manual for other
  3753. ways to make \fBcvs\fR ignore some files.
  3754. .SP
  3755. .IP "" 0
  3756. \fB-W\fIspec\fB\fR
  3757. .IP "" 2
  3758. Specify file names that should be filtered during
  3759. update. You can use this option repeatedly.
  3760. .SP
  3761. \fIspec\fR can be a file name pattern of the same type
  3762. that you can specify in the \fB.cvswrappers\fR
  3763. file. See `Wrappers\(aq in the CVS manual.
  3764. .SP
  3765. .IP "" 0
  3766. \fB-j\fIrevision\fB\fR
  3767. .IP "" 2
  3768. With two \fB-j\fR options, merge changes from the
  3769. revision specified with the first \fB-j\fR option to
  3770. the revision specified with the second \fBj\fR option,
  3771. into the working directory.
  3772. .SP
  3773. With one \fB-j\fR option, merge changes from the
  3774. ancestor revision to the revision specified with the
  3775. \fB-j\fR option, into the working directory. The
  3776. ancestor revision is the common ancestor of the
  3777. revision which the working directory is based on, and
  3778. the revision specified in the \fB-j\fR option.
  3779. .SP
  3780. Note that using a single \fB-j \fItagname\fB\fR option rather than
  3781. \fB-j \fIbranchname\fB\fR to merge changes from a branch will
  3782. often not remove files which were removed on the branch.
  3783. See `Merging adds and removals\(aq in the CVS manual for more information.
  3784. .SP
  3785. In addition, each \fB-j\fR option can contain an optional
  3786. date specification which, when used with branches, can
  3787. limit the chosen revision to one within a specific
  3788. date. An optional date is specified by adding a colon
  3789. (:) to the tag:
  3790. \fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR.
  3791. .SP
  3792. See `Branching and merging\(aq in the CVS manual.
  3793. .SP
  3794. .SP
  3795. .SH "update output"
  3796. .SP
  3797. \fBupdate\fR and \fBcheckout\fR keep you informed of
  3798. their progress by printing a line for each file, preceded
  3799. by one character indicating the status of the file:
  3800. .SP
  3801. .IP "" 0
  3802. \fBU \fIfile\fB\fR
  3803. .IP "" 2
  3804. The file was brought up to date with respect to the
  3805. repository. This is done for any file that exists in
  3806. the repository but not in your working directory, and for files
  3807. that you haven\(aqt changed but are not the most recent
  3808. versions available in the repository.
  3809. .SP
  3810. .IP "" 0
  3811. \fBP \fIfile\fB\fR
  3812. .IP "" 2
  3813. Like \fBU\fR, but the \fBcvs\fR server sends a patch instead of an entire
  3814. file. This accomplishes the same thing as \fBU\fR using less bandwidth.
  3815. .SP
  3816. .IP "" 0
  3817. \fBA \fIfile\fB\fR
  3818. .IP "" 2
  3819. The file has been added to your private copy of the
  3820. sources, and will be added to the source repository
  3821. when you run \fBcommit\fR on the file. This is a
  3822. reminder to you that the file needs to be committed.
  3823. .SP
  3824. .IP "" 0
  3825. \fBR \fIfile\fB\fR
  3826. .IP "" 2
  3827. The file has been removed from your private copy of the
  3828. sources, and will be removed from the source repository
  3829. when you run \fBcommit\fR on the file. This is a
  3830. reminder to you that the file needs to be committed.
  3831. .SP
  3832. .IP "" 0
  3833. \fBM \fIfile\fB\fR
  3834. .IP "" 2
  3835. The file is modified in your working directory.
  3836. .SP
  3837. \fBM\fR can indicate one of two states for a file
  3838. you\(aqre working on: either there were no modifications
  3839. to the same file in the repository, so that your file
  3840. remains as you last saw it; or there were modifications
  3841. in the repository as well as in your copy, but they
  3842. were merged successfully, without conflict, in your
  3843. working directory.
  3844. .SP
  3845. \fBcvs\fR will print some messages if it merges your work,
  3846. and a backup copy of your working file (as it looked
  3847. before you ran \fBupdate\fR) will be made. The exact
  3848. name of that file is printed while \fBupdate\fR runs.
  3849. .SP
  3850. .IP "" 0
  3851. \fBC \fIfile\fB\fR
  3852. .IP "" 2
  3853. .IX "\&.# files"
  3854. .IX "__ files (VMS)"
  3855. A conflict was detected while trying to merge your
  3856. changes to \fIfile\fR with changes from the source
  3857. repository. \fIfile\fR (the copy in your working
  3858. directory) is now the result of attempting to merge
  3859. the two revisions; an unmodified copy of your file
  3860. is also in your working directory, with the name
  3861. \fB.#\fIfile\fB.\fIrevision\fB\fR where \fIrevision\fR
  3862. is the revision that your modified file started
  3863. from. Resolve the conflict as described in
  3864. `Conflicts example\(aq in the CVS manual.
  3865. (Note that some systems automatically purge
  3866. files that begin with \fB.#\fR if they have not been
  3867. accessed for a few days. If you intend to keep a copy
  3868. of your original file, it is a very good idea to rename
  3869. it.) Under \fBvms\fR, the file name starts with
  3870. \fB__\fR rather than \fB.#\fR.
  3871. .SP
  3872. .IP "" 0
  3873. \fB? \fIfile\fB\fR
  3874. .IP "" 2
  3875. \fIfile\fR is in your working directory, but does not
  3876. correspond to anything in the source repository, and is
  3877. not in the list of files for \fBcvs\fR to ignore (see the
  3878. description of the \fB-I\fR option, and
  3879. see node `cvsignore\(aq in the CVS manual).
  3880. .SH "AUTHORS"
  3881. .TP
  3882. Dick Grune
  3883. Original author of the
  3884. .B cvs
  3885. shell script version posted to
  3886. .B comp.sources.unix
  3887. in the volume6 release of December, 1986.
  3888. Credited with much of the
  3889. .B cvs
  3890. conflict resolution algorithms.
  3891. .TP
  3892. Brian Berliner
  3893. Coder and designer of the
  3894. .B cvs
  3895. program itself in April, 1989, based on the original work done by Dick.
  3896. .TP
  3897. Jeff Polk
  3898. Helped Brian with the design of the
  3899. .B cvs
  3900. module and vendor branch support and author of the
  3901. .BR checkin ( 1 )
  3902. shell script (the ancestor of \fBcvs import\fP).
  3903. .TP
  3904. Larry Jones, Derek R. Price, and Mark D. Baushke
  3905. Have helped maintain
  3906. .B cvs
  3907. for many years.
  3908. .TP
  3909. And many others too numerous to mention here.
  3910. .SH "SEE ALSO"
  3911. The most comprehensive manual for CVS is
  3912. Version Management with CVS by Per Cederqvist et al. Depending on
  3913. your system, you may be able to get it with the
  3914. .B info CVS
  3915. command or it may be available as cvs.pdf (Portable Document Format),
  3916. cvs.ps (PostScript), cvs.texinfo (Texinfo source), or cvs.html.
  3917. .SP
  3918. For CVS updates, more information on documentation, software related
  3919. to CVS, development of CVS, and more, see:
  3920. .in +1i
  3921. .SP
  3922. .PD 0
  3923. .IP "" 4
  3924. .B http://cvs.nongnu.org
  3925. .in -1i
  3926. .SP
  3927. .BR ci ( 1 ),
  3928. .BR co ( 1 ),
  3929. .BR cvs ( 5 ),
  3930. .BR cvsbug ( 8 ),
  3931. .BR diff ( 1 ),
  3932. .BR grep ( 1 ),
  3933. .BR patch ( 1 ),
  3934. .BR rcs ( 1 ),
  3935. .BR rcsdiff ( 1 ),
  3936. .BR rcsmerge ( 1 ),
  3937. .BR rlog ( 1 ).