1This is cvs.info, produced by Makeinfo version 3.12f from ./cvs.texinfo. 2 3START-INFO-DIR-ENTRY 4* CVS: (cvs). Concurrent Versions System 5END-INFO-DIR-ENTRY 6 7 Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994 8Free Software Foundation, Inc. 9 10 Permission is granted to make and distribute verbatim copies of this 11manual provided the copyright notice and this permission notice are 12preserved on all copies. 13 14 Permission is granted to copy and distribute modified versions of 15this manual under the conditions for verbatim copying, provided also 16that the entire resulting derived work is distributed under the terms 17of a permission notice identical to this one. 18 19 Permission is granted to copy and distribute translations of this 20manual into another language, under the above conditions for modified 21versions, except that this permission notice may be stated in a 22translation approved by the Free Software Foundation. 23 24 25File: cvs.info, Node: checkout options, Next: checkout examples, Up: checkout 26 27checkout options 28---------------- 29 30 These standard options are supported by `checkout' (*note Common 31options::., for a complete description of them): 32 33`-D DATE' 34 Use the most recent revision no later than DATE. This option is 35 sticky, and implies `-P'. See *Note Sticky tags::, for more 36 information on sticky tags/dates. 37 38`-f' 39 Only useful with the `-D DATE' or `-r TAG' flags. If no matching 40 revision is found, retrieve the most recent revision (instead of 41 ignoring the file). 42 43`-k KFLAG' 44 Process keywords according to KFLAG. See *Note Keyword 45 substitution::. This option is sticky; future updates of this 46 file in this working directory will use the same KFLAG. The 47 `status' command can be viewed to see the sticky options. See 48 *Note Invoking CVS::, for more information on the `status' command. 49 50`-l' 51 Local; run only in current working directory. 52 53`-n' 54 Do not run any checkout program (as specified with the `-o' option 55 in the modules file; *note modules::.). 56 57`-P' 58 Prune empty directories. See *Note Moving directories::. 59 60`-p' 61 Pipe files to the standard output. 62 63`-R' 64 Checkout directories recursively. This option is on by default. 65 66`-r TAG' 67 Use revision TAG. This option is sticky, and implies `-P'. See 68 *Note Sticky tags::, for more information on sticky tags/dates. 69 70 In addition to those, you can use these special command options with 71`checkout': 72 73`-A' 74 Reset any sticky tags, dates, or `-k' options. See *Note Sticky 75 tags::, for more information on sticky tags/dates. 76 77`-c' 78 Copy the module file, sorted, to the standard output, instead of 79 creating or modifying any files or directories in your working 80 directory. 81 82`-d DIR' 83 Create a directory called DIR for the working files, instead of 84 using the module name. In general, using this flag is equivalent 85 to using `mkdir DIR; cd DIR' followed by the checkout command 86 without the `-d' flag. 87 88 There is an important exception, however. It is very convenient 89 when checking out a single item to have the output appear in a 90 directory that doesn't contain empty intermediate directories. In 91 this case _only_, CVS tries to "shorten" pathnames to avoid those 92 empty directories. 93 94 For example, given a module `foo' that contains the file `bar.c', 95 the command `cvs co -d dir foo' will create directory `dir' and 96 place `bar.c' inside. Similarly, given a module `bar' which has 97 subdirectory `baz' wherein there is a file `quux.c', the command 98 `cvs -d dir co bar/baz' will create directory `dir' and place 99 `quux.c' inside. 100 101 Using the `-N' flag will defeat this behavior. Given the same 102 module definitions above, `cvs co -N -d dir foo' will create 103 directories `dir/foo' and place `bar.c' inside, while `cvs co -N -d 104 dir bar/baz' will create directories `dir/bar/baz' and place 105 `quux.c' inside. 106 107`-j TAG' 108 With two `-j' options, merge changes from the revision specified 109 with the first `-j' option to the revision specified with the 110 second `j' option, into the working directory. 111 112 With one `-j' option, merge changes from the ancestor revision to 113 the revision specified with the `-j' option, into the working 114 directory. The ancestor revision is the common ancestor of the 115 revision which the working directory is based on, and the revision 116 specified in the `-j' option. 117 118 In addition, each -j option can contain an optional date 119 specification which, when used with branches, can limit the chosen 120 revision to one within a specific date. An optional date is 121 specified by adding a colon (:) to the tag: 122 `-jSYMBOLIC_TAG:DATE_SPECIFIER'. 123 124 *Note Branching and merging::. 125 126`-N' 127 Only useful together with `-d DIR'. With this option, CVS will 128 not "shorten" module paths in your working directory when you 129 check out a single module. See the `-d' flag for examples and a 130 discussion. 131 132`-s' 133 Like `-c', but include the status of all modules, and sort it by 134 the status string. *Note modules::, for info about the `-s' 135 option that is used inside the modules file to set the module 136 status. 137 138 139File: cvs.info, Node: checkout examples, Prev: checkout options, Up: checkout 140 141checkout examples 142----------------- 143 144 Get a copy of the module `tc': 145 146 $ cvs checkout tc 147 148 Get a copy of the module `tc' as it looked one day ago: 149 150 $ cvs checkout -D yesterday tc 151 152 153File: cvs.info, Node: commit, Next: diff, Prev: checkout, Up: CVS commands 154 155commit--Check files into the repository 156======================================= 157 158 * Synopsis: commit [-lnRf] [-m 'log_message' | -F file] [-r 159 revision] [files...] 160 161 * Requires: working directory, repository. 162 163 * Changes: repository. 164 165 * Synonym: ci 166 167 Use `commit' when you want to incorporate changes from your working 168source files into the source repository. 169 170 If you don't specify particular files to commit, all of the files in 171your working current directory are examined. `commit' is careful to 172change in the repository only those files that you have really changed. 173By default (or if you explicitly specify the `-R' option), files in 174subdirectories are also examined and committed if they have changed; 175you can use the `-l' option to limit `commit' to the current directory 176only. 177 178 `commit' verifies that the selected files are up to date with the 179current revisions in the source repository; it will notify you, and 180exit without committing, if any of the specified files must be made 181current first with `update' (*note update::.). `commit' does not call 182the `update' command for you, but rather leaves that for you to do when 183the time is right. 184 185 When all is well, an editor is invoked to allow you to enter a log 186message that will be written to one or more logging programs (*note 187modules::., and *note loginfo::.) and placed in the RCS file inside the 188repository. This log message can be retrieved with the `log' command; 189see *Note log::. You can specify the log message on the command line 190with the `-m MESSAGE' option, and thus avoid the editor invocation, or 191use the `-F FILE' option to specify that the argument file contains the 192log message. 193 194* Menu: 195 196* commit options:: commit options 197* commit examples:: commit examples 198 199 200File: cvs.info, Node: commit options, Next: commit examples, Up: commit 201 202commit options 203-------------- 204 205 These standard options are supported by `commit' (*note Common 206options::., for a complete description of them): 207 208`-l' 209 Local; run only in current working directory. 210 211`-n' 212 Do not run any module program. 213 214`-R' 215 Commit directories recursively. This is on by default. 216 217`-r REVISION' 218 Commit to REVISION. REVISION must be either a branch, or a 219 revision on the main trunk that is higher than any existing 220 revision number (*note Assigning revisions::.). You cannot commit 221 to a specific revision on a branch. 222 223 `commit' also supports these options: 224 225`-F FILE' 226 Read the log message from FILE, instead of invoking an editor. 227 228`-f' 229 Note that this is not the standard behavior of the `-f' option as 230 defined in *Note Common options::. 231 232 Force CVS to commit a new revision even if you haven't made any 233 changes to the file. If the current revision of FILE is 1.7, then 234 the following two commands are equivalent: 235 236 $ cvs commit -f FILE 237 $ cvs commit -r 1.8 FILE 238 239 The `-f' option disables recursion (i.e., it implies `-l'). To 240 force CVS to commit a new revision for all files in all 241 subdirectories, you must use `-f -R'. 242 243`-m MESSAGE' 244 Use MESSAGE as the log message, instead of invoking an editor. 245 246 247File: cvs.info, Node: commit examples, Prev: commit options, Up: commit 248 249commit examples 250--------------- 251 252Committing to a branch 253...................... 254 255 You can commit to a branch revision (one that has an even number of 256dots) with the `-r' option. To create a branch revision, use the `-b' 257option of the `rtag' or `tag' commands (*note Branching and 258merging::.). Then, either `checkout' or `update' can be used to base 259your sources on the newly created branch. From that point on, all 260`commit' changes made within these working sources will be 261automatically added to a branch revision, thereby not disturbing 262main-line development in any way. For example, if you had to create a 263patch to the 1.2 version of the product, even though the 2.0 version is 264already under development, you might do: 265 266 $ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module 267 $ cvs checkout -r FCS1_2_Patch product_module 268 $ cd product_module 269 [[ hack away ]] 270 $ cvs commit 271 272This works automatically since the `-r' option is sticky. 273 274Creating the branch after editing 275................................. 276 277 Say you have been working on some extremely experimental software, 278based on whatever revision you happened to checkout last week. If 279others in your group would like to work on this software with you, but 280without disturbing main-line development, you could commit your change 281to a new branch. Others can then checkout your experimental stuff and 282utilize the full benefit of CVS conflict resolution. The scenario might 283look like: 284 285 [[ hacked sources are present ]] 286 $ cvs tag -b EXPR1 287 $ cvs update -r EXPR1 288 $ cvs commit 289 290 The `update' command will make the `-r EXPR1' option sticky on all 291files. Note that your changes to the files will never be removed by the 292`update' command. The `commit' will automatically commit to the 293correct branch, because the `-r' is sticky. You could also do like 294this: 295 296 [[ hacked sources are present ]] 297 $ cvs tag -b EXPR1 298 $ cvs commit -r EXPR1 299 300but then, only those files that were changed by you will have the `-r 301EXPR1' sticky flag. If you hack away, and commit without specifying 302the `-r EXPR1' flag, some files may accidentally end up on the main 303trunk. 304 305 To work with you on the experimental change, others would simply do 306 307 $ cvs checkout -r EXPR1 whatever_module 308 309 310File: cvs.info, Node: diff, Next: export, Prev: commit, Up: CVS commands 311 312diff--Show differences between revisions 313======================================== 314 315 * Synopsis: diff [-lR] [format_options] [[-r rev1 | -D date1] [-r 316 rev2 | -D date2]] [files...] 317 318 * Requires: working directory, repository. 319 320 * Changes: nothing. 321 322 The `diff' command is used to compare different revisions of files. 323The default action is to compare your working files with the revisions 324they were based on, and report any differences that are found. 325 326 If any file names are given, only those files are compared. If any 327directories are given, all files under them will be compared. 328 329 The exit status for diff is different than for other CVS commands; 330for details *Note Exit status::. 331 332* Menu: 333 334* diff options:: diff options 335* diff examples:: diff examples 336 337 338File: cvs.info, Node: diff options, Next: diff examples, Up: diff 339 340diff options 341------------ 342 343 These standard options are supported by `diff' (*note Common 344options::., for a complete description of them): 345 346`-D DATE' 347 Use the most recent revision no later than DATE. See `-r' for how 348 this affects the comparison. 349 350`-k KFLAG' 351 Process keywords according to KFLAG. See *Note Keyword 352 substitution::. 353 354`-l' 355 Local; run only in current working directory. 356 357`-R' 358 Examine directories recursively. This option is on by default. 359 360`-r TAG' 361 Compare with revision TAG. Zero, one or two `-r' options can be 362 present. With no `-r' option, the working file will be compared 363 with the revision it was based on. With one `-r', that revision 364 will be compared to your current working file. With two `-r' 365 options those two revisions will be compared (and your working 366 file will not affect the outcome in any way). 367 368 One or both `-r' options can be replaced by a `-D DATE' option, 369 described above. 370 371 The following options specify the format of the output. They have 372the same meaning as in GNU diff. 373 374 -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 375 --binary 376 --brief 377 --changed-group-format=ARG 378 -c 379 -C NLINES 380 --context[=LINES] 381 -e --ed 382 -t --expand-tabs 383 -f --forward-ed 384 --horizon-lines=ARG 385 --ifdef=ARG 386 -w --ignore-all-space 387 -B --ignore-blank-lines 388 -i --ignore-case 389 -I REGEXP 390 --ignore-matching-lines=REGEXP 391 -h 392 -b --ignore-space-change 393 -T --initial-tab 394 -L LABEL 395 --label=LABEL 396 --left-column 397 -d --minimal 398 -N --new-file 399 --new-line-format=ARG 400 --old-line-format=ARG 401 --paginate 402 -n --rcs 403 -s --report-identical-files 404 -p 405 --show-c-function 406 -y --side-by-side 407 -F REGEXP 408 --show-function-line=REGEXP 409 -H --speed-large-files 410 --suppress-common-lines 411 -a --text 412 --unchanged-group-format=ARG 413 -u 414 -U NLINES 415 --unified[=LINES] 416 -V ARG 417 -W COLUMNS 418 --width=COLUMNS 419 420 421File: cvs.info, Node: diff examples, Prev: diff options, Up: diff 422 423diff examples 424------------- 425 426 The following line produces a Unidiff (`-u' flag) between revision 4271.14 and 1.19 of `backend.c'. Due to the `-kk' flag no keywords are 428substituted, so differences that only depend on keyword substitution 429are ignored. 430 431 $ cvs diff -kk -u -r 1.14 -r 1.19 backend.c 432 433 Suppose the experimental branch EXPR1 was based on a set of files 434tagged RELEASE_1_0. To see what has happened on that branch, the 435following can be used: 436 437 $ cvs diff -r RELEASE_1_0 -r EXPR1 438 439 A command like this can be used to produce a context diff between 440two releases: 441 442 $ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs 443 444 If you are maintaining ChangeLogs, a command like the following just 445before you commit your changes may help you write the ChangeLog entry. 446All local modifications that have not yet been committed will be 447printed. 448 449 $ cvs diff -u | less 450 451 452File: cvs.info, Node: export, Next: history, Prev: diff, Up: CVS commands 453 454export--Export sources from CVS, similar to checkout 455==================================================== 456 457 * Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] 458 module... 459 460 * Requires: repository. 461 462 * Changes: current directory. 463 464 This command is a variant of `checkout'; use it when you want a copy 465of the source for module without the CVS administrative directories. 466For example, you might use `export' to prepare source for shipment 467off-site. This command requires that you specify a date or tag (with 468`-D' or `-r'), so that you can count on reproducing the source you ship 469to others. 470 471 One often would like to use `-kv' with `cvs export'. This causes 472any keywords to be expanded such that an import done at some other site 473will not lose the keyword revision information. But be aware that 474doesn't handle an export containing binary files correctly. Also be 475aware that after having used `-kv', one can no longer use the `ident' 476command (which is part of the RCS suite--see ident(1)) which looks for 477keyword strings. If you want to be able to use `ident' you must not 478use `-kv'. 479 480* Menu: 481 482* export options:: export options 483 484 485File: cvs.info, Node: export options, Up: export 486 487export options 488-------------- 489 490 These standard options are supported by `export' (*note Common 491options::., for a complete description of them): 492 493`-D DATE' 494 Use the most recent revision no later than DATE. 495 496`-f' 497 If no matching revision is found, retrieve the most recent 498 revision (instead of ignoring the file). 499 500`-l' 501 Local; run only in current working directory. 502 503`-n' 504 Do not run any checkout program. 505 506`-R' 507 Export directories recursively. This is on by default. 508 509`-r TAG' 510 Use revision TAG. 511 512 In addition, these options (that are common to `checkout' and 513`export') are also supported: 514 515`-d DIR' 516 Create a directory called DIR for the working files, instead of 517 using the module name. *Note checkout options::, for complete 518 details on how CVS handles this flag. 519 520`-k SUBST' 521 Set keyword expansion mode (*note Substitution modes::.). 522 523`-N' 524 Only useful together with `-d DIR'. *Note checkout options::, for 525 complete details on how CVS handles this flag. 526 527 528File: cvs.info, Node: history, Next: import, Prev: export, Up: CVS commands 529 530history--Show status of files and users 531======================================= 532 533 * Synopsis: history [-report] [-flags] [-options args] [files...] 534 535 * Requires: the file `$CVSROOT/CVSROOT/history' 536 537 * Changes: nothing. 538 539 CVS can keep a history file that tracks each use of the `checkout', 540`commit', `rtag', `update', and `release' commands. You can use 541`history' to display this information in various formats. 542 543 Logging must be enabled by creating the file 544`$CVSROOT/CVSROOT/history'. 545 546 *Warning:* `history' uses `-f', `-l', `-n', and `-p' in ways that 547conflict with the normal use inside CVS (*note Common options::.). 548 549* Menu: 550 551* history options:: history options 552 553 554File: cvs.info, Node: history options, Up: history 555 556history options 557--------------- 558 559 Several options (shown above as `-report') control what kind of 560report is generated: 561 562`-c' 563 Report on each time commit was used (i.e., each time the 564 repository was modified). 565 566`-e' 567 Everything (all record types). Equivalent to specifying `-x' with 568 all record types. Of course, `-e' will also include record types 569 which are added in a future version of CVS; if you are writing a 570 script which can only handle certain record types, you'll want to 571 specify `-x'. 572 573`-m MODULE' 574 Report on a particular module. (You can meaningfully use `-m' 575 more than once on the command line.) 576 577`-o' 578 Report on checked-out modules. 579 580`-T' 581 Report on all tags. 582 583`-x TYPE' 584 Extract a particular set of record types TYPE from the CVS 585 history. The types are indicated by single letters, which you may 586 specify in combination. 587 588 Certain commands have a single record type: 589 590 `F' 591 release 592 593 `O' 594 checkout 595 596 `E' 597 export 598 599 `T' 600 rtag 601 602 One of four record types may result from an update: 603 604 `C' 605 A merge was necessary but collisions were detected (requiring 606 manual merging). 607 608 `G' 609 A merge was necessary and it succeeded. 610 611 `U' 612 A working file was copied from the repository. 613 614 `W' 615 The working copy of a file was deleted during update (because 616 it was gone from the repository). 617 618 One of three record types results from commit: 619 620 `A' 621 A file was added for the first time. 622 623 `M' 624 A file was modified. 625 626 `R' 627 A file was removed. 628 629 The options shown as `-flags' constrain or expand the report without 630requiring option arguments: 631 632`-a' 633 Show data for all users (the default is to show data only for the 634 user executing `history'). 635 636`-l' 637 Show last modification only. 638 639`-w' 640 Show only the records for modifications done from the same working 641 directory where `history' is executing. 642 643 The options shown as `-options ARGS' constrain the report based on 644an argument: 645 646`-b STR' 647 Show data back to a record containing the string STR in either 648 the module name, the file name, or the repository path. 649 650`-D DATE' 651 Show data since DATE. This is slightly different from the normal 652 use of `-D DATE', which selects the newest revision older than 653 DATE. 654 655`-p REPOSITORY' 656 Show data for a particular source repository (you can specify 657 several `-p' options on the same command line). 658 659`-r REV' 660 Show records referring to revisions since the revision or tag 661 named REV appears in individual RCS files. Each RCS file is 662 searched for the revision or tag. 663 664`-t TAG' 665 Show records since tag TAG was last added to the history file. 666 This differs from the `-r' flag above in that it reads only the 667 history file, not the RCS files, and is much faster. 668 669`-u NAME' 670 Show records for user NAME. 671 672 673File: cvs.info, Node: import, Next: log, Prev: history, Up: CVS commands 674 675import--Import sources into CVS, using vendor branches 676====================================================== 677 678 * Synopsis: import [-options] repository vendortag releasetag... 679 680 * Requires: Repository, source distribution directory. 681 682 * Changes: repository. 683 684 Use `import' to incorporate an entire source distribution from an 685outside source (e.g., a source vendor) into your source repository 686directory. You can use this command both for initial creation of a 687repository, and for wholesale updates to the module from the outside 688source. *Note Tracking sources::, for a discussion on this subject. 689 690 The REPOSITORY argument gives a directory name (or a path to a 691directory) under the CVS root directory for repositories; if the 692directory did not exist, import creates it. 693 694 When you use import for updates to source that has been modified in 695your source repository (since a prior import), it will notify you of 696any files that conflict in the two branches of development; use 697`checkout -j' to reconcile the differences, as import instructs you to 698do. 699 700 If CVS decides a file should be ignored (*note cvsignore::.), it 701does not import it and prints `I ' followed by the filename (*note 702import output::., for a complete description of the output). 703 704 If the file `$CVSROOT/CVSROOT/cvswrappers' exists, any file whose 705names match the specifications in that file will be treated as packages 706and the appropriate filtering will be performed on the file/directory 707before being imported. *Note Wrappers::. 708 709 The outside source is saved in a first-level branch, by default 7101.1.1. Updates are leaves of this branch; for example, files from the 711first imported collection of source will be revision 1.1.1.1, then 712files from the first imported update will be revision 1.1.1.2, and so 713on. 714 715 At least three arguments are required. REPOSITORY is needed to 716identify the collection of source. VENDORTAG is a tag for the entire 717branch (e.g., for 1.1.1). You must also specify at least one 718RELEASETAG to identify the files at the leaves created each time you 719execute `import'. 720 721 Note that `import' does _not_ change the directory in which you 722invoke it. In particular, it does not set up that directory as a CVS 723working directory; if you want to work with the sources import them 724first and then check them out into a different directory (*note Getting 725the source::.). 726 727* Menu: 728 729* import options:: import options 730* import output:: import output 731* import examples:: import examples 732 733 734File: cvs.info, Node: import options, Next: import output, Up: import 735 736import options 737-------------- 738 739 This standard option is supported by `import' (*note Common 740options::., for a complete description): 741 742`-m MESSAGE' 743 Use MESSAGE as log information, instead of invoking an editor. 744 745 There are the following additional special options. 746 747`-b BRANCH' 748 See *Note Multiple vendor branches::. 749 750`-k SUBST' 751 Indicate the keyword expansion mode desired. This setting will 752 apply to all files created during the import, but not to any files 753 that previously existed in the repository. See *Note Substitution 754 modes::, for a list of valid `-k' settings. 755 756`-I NAME' 757 Specify file names that should be ignored during import. You can 758 use this option repeatedly. To avoid ignoring any files at all 759 (even those ignored by default), specify `-I !'. 760 761 NAME can be a file name pattern of the same type that you can 762 specify in the `.cvsignore' file. *Note cvsignore::. 763 764`-W SPEC' 765 Specify file names that should be filtered during import. You can 766 use this option repeatedly. 767 768 SPEC can be a file name pattern of the same type that you can 769 specify in the `.cvswrappers' file. *Note Wrappers::. 770 771 772File: cvs.info, Node: import output, Next: import examples, Prev: import options, Up: import 773 774import output 775------------- 776 777 `import' keeps you informed of its progress by printing a line for 778each file, preceded by one character indicating the status of the file: 779 780`U FILE' 781 The file already exists in the repository and has not been locally 782 modified; a new revision has been created (if necessary). 783 784`N FILE' 785 The file is a new file which has been added to the repository. 786 787`C FILE' 788 The file already exists in the repository but has been locally 789 modified; you will have to merge the changes. 790 791`I FILE' 792 The file is being ignored (*note cvsignore::.). 793 794`L FILE' 795 The file is a symbolic link; `cvs import' ignores symbolic links. 796 People periodically suggest that this behavior should be changed, 797 but if there is a consensus on what it should be changed to, it 798 doesn't seem to be apparent. (Various options in the `modules' 799 file can be used to recreate symbolic links on checkout, update, 800 etc.; *note modules::..) 801 802 803File: cvs.info, Node: import examples, Prev: import output, Up: import 804 805import examples 806--------------- 807 808 See *Note Tracking sources::, and *Note From files::. 809 810 811File: cvs.info, Node: log, Next: rdiff, Prev: import, Up: CVS commands 812 813log--Print out log information for files 814======================================== 815 816 * Synopsis: log [options] [files...] 817 818 * Requires: repository, working directory. 819 820 * Changes: nothing. 821 822 Display log information for files. `log' used to call the RCS 823utility `rlog'. Although this is no longer true in the current 824sources, this history determines the format of the output and the 825options, which are not quite in the style of the other CVS commands. 826 827 The output includes the location of the RCS file, the "head" 828revision (the latest revision on the trunk), all symbolic names (tags) 829and some other things. For each revision, the revision number, the 830author, the number of lines added/deleted and the log message are 831printed. All times are displayed in Coordinated Universal Time (UTC). 832(Other parts of CVS print times in the local timezone). 833 834 *Warning:* `log' uses `-R' in a way that conflicts with the normal 835use inside CVS (*note Common options::.). 836 837* Menu: 838 839* log options:: log options 840* log examples:: log examples 841 842 843File: cvs.info, Node: log options, Next: log examples, Up: log 844 845log options 846----------- 847 848 By default, `log' prints all information that is available. All 849other options restrict the output. 850 851`-b' 852 Print information about the revisions on the default branch, 853 normally the highest branch on the trunk. 854 855`-d DATES' 856 Print information about revisions with a checkin date/time in the 857 range given by the semicolon-separated list of dates. The date 858 formats accepted are those accepted by the `-D' option to many 859 other CVS commands (*note Common options::.). Dates can be 860 combined into ranges as follows: 861 862 `D1<D2' 863 `D2>D1' 864 Select the revisions that were deposited between D1 and D2. 865 866 `<D' 867 `D>' 868 Select all revisions dated D or earlier. 869 870 `D<' 871 `>D' 872 Select all revisions dated D or later. 873 874 `D' 875 Select the single, latest revision dated D or earlier. 876 877 The `>' or `<' characters may be followed by `=' to indicate an 878 inclusive range rather than an exclusive one. 879 880 Note that the separator is a semicolon (;). 881 882`-h' 883 Print only the name of the RCS file, name of the file in the 884 working directory, head, default branch, access list, locks, 885 symbolic names, and suffix. 886 887`-l' 888 Local; run only in current working directory. (Default is to run 889 recursively). 890 891`-N' 892 Do not print the list of tags for this file. This option can be 893 very useful when your site uses a lot of tags, so rather than 894 "more"'ing over 3 pages of tag information, the log information is 895 presented without tags at all. 896 897`-R' 898 Print only the name of the RCS file. 899 900`-rREVISIONS' 901 Print information about revisions given in the comma-separated 902 list REVISIONS of revisions and ranges. The following table 903 explains the available range formats: 904 905 `REV1:REV2' 906 Revisions REV1 to REV2 (which must be on the same branch). 907 908 `:REV' 909 Revisions from the beginning of the branch up to and 910 including REV. 911 912 `REV:' 913 Revisions starting with REV to the end of the branch 914 containing REV. 915 916 `BRANCH' 917 An argument that is a branch means all revisions on that 918 branch. 919 920 `BRANCH1:BRANCH2' 921 A range of branches means all revisions on the branches in 922 that range. 923 924 `BRANCH.' 925 The latest revision in BRANCH. 926 927 A bare `-r' with no revisions means the latest revision on the 928 default branch, normally the trunk. There can be no space between 929 the `-r' option and its argument. 930 931`-s STATES' 932 Print information about revisions whose state attributes match one 933 of the states given in the comma-separated list STATES. 934 935`-t' 936 Print the same as `-h', plus the descriptive text. 937 938`-wLOGINS' 939 Print information about revisions checked in by users with login 940 names appearing in the comma-separated list LOGINS. If LOGINS is 941 omitted, the user's login is assumed. There can be no space 942 between the `-w' option and its argument. 943 944 `log' prints the intersection of the revisions selected with the 945options `-d', `-s', and `-w', intersected with the union of the 946revisions selected by `-b' and `-r'. 947 948 949File: cvs.info, Node: log examples, Prev: log options, Up: log 950 951log examples 952------------ 953 954 Contributed examples are gratefully accepted. 955 956 957File: cvs.info, Node: rdiff, Next: release, Prev: log, Up: CVS commands 958 959rdiff--'patch' format diffs between releases 960============================================ 961 962 * rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules... 963 964 * Requires: repository. 965 966 * Changes: nothing. 967 968 * Synonym: patch 969 970 Builds a Larry Wall format patch(1) file between two releases, that 971can be fed directly into the `patch' program to bring an old release 972up-to-date with the new release. (This is one of the few CVS commands 973that operates directly from the repository, and doesn't require a prior 974checkout.) The diff output is sent to the standard output device. 975 976 You can specify (using the standard `-r' and `-D' options) any 977combination of one or two revisions or dates. If only one revision or 978date is specified, the patch file reflects differences between that 979revision or date and the current head revisions in the RCS file. 980 981 Note that if the software release affected is contained in more than 982one directory, then it may be necessary to specify the `-p' option to 983the `patch' command when patching the old sources, so that `patch' is 984able to find the files that are located in other directories. 985 986* Menu: 987 988* rdiff options:: rdiff options 989* rdiff examples:: rdiff examples 990 991 992File: cvs.info, Node: rdiff options, Next: rdiff examples, Up: rdiff 993 994rdiff options 995------------- 996 997 These standard options are supported by `rdiff' (*note Common 998options::., for a complete description of them): 999 1000`-D DATE' 1001 Use the most recent revision no later than DATE. 1002 1003`-f' 1004 If no matching revision is found, retrieve the most recent 1005 revision (instead of ignoring the file). 1006 1007`-l' 1008 Local; don't descend subdirectories. 1009 1010`-R' 1011 Examine directories recursively. This option is on by default. 1012 1013`-r TAG' 1014 Use revision TAG. 1015 1016 In addition to the above, these options are available: 1017 1018`-c' 1019 Use the context diff format. This is the default format. 1020 1021`-s' 1022 Create a summary change report instead of a patch. The summary 1023 includes information about files that were changed or added 1024 between the releases. It is sent to the standard output device. 1025 This is useful for finding out, for example, which files have 1026 changed between two dates or revisions. 1027 1028`-t' 1029 A diff of the top two revisions is sent to the standard output 1030 device. This is most useful for seeing what the last change to a 1031 file was. 1032 1033`-u' 1034 Use the unidiff format for the context diffs. Remember that old 1035 versions of the `patch' program can't handle the unidiff format, 1036 so if you plan to post this patch to the net you should probably 1037 not use `-u'. 1038 1039`-V VN' 1040 Expand keywords according to the rules current in RCS version VN 1041 (the expansion format changed with RCS version 5). Note that this 1042 option is no longer accepted. CVS will always expand keywords the 1043 way that RCS version 5 does. 1044 1045 1046File: cvs.info, Node: rdiff examples, Prev: rdiff options, Up: rdiff 1047 1048rdiff examples 1049-------------- 1050 1051 Suppose you receive mail from foo@example.net asking for an update 1052from release 1.2 to 1.4 of the tc compiler. You have no such patches 1053on hand, but with CVS that can easily be fixed with a command such as 1054this: 1055 1056 $ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \ 1057 $$ Mail -s 'The patches you asked for' foo@example.net 1058 1059 Suppose you have made release 1.3, and forked a branch called 1060`R_1_3fix' for bugfixes. `R_1_3_1' corresponds to release 1.3.1, which 1061was made some time ago. Now, you want to see how much development has 1062been done on the branch. This command can be used: 1063 1064 $ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name 1065 cvs rdiff: Diffing module-name 1066 File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6 1067 File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4 1068 File bar.h,v changed from revision 1.29.2.1 to 1.2 1069 1070 1071File: cvs.info, Node: release, Next: update, Prev: rdiff, Up: CVS commands 1072 1073release--Indicate that a Module is no longer in use 1074=================================================== 1075 1076 * release [-d] directories... 1077 1078 * Requires: Working directory. 1079 1080 * Changes: Working directory, history log. 1081 1082 This command is meant to safely cancel the effect of `cvs checkout'. 1083Since CVS doesn't lock files, it isn't strictly necessary to use this 1084command. You can always simply delete your working directory, if you 1085like; but you risk losing changes you may have forgotten, and you leave 1086no trace in the CVS history file (*note history file::.) that you've 1087abandoned your checkout. 1088 1089 Use `cvs release' to avoid these problems. This command checks that 1090no uncommitted changes are present; that you are executing it from 1091immediately above a CVS working directory; and that the repository 1092recorded for your files is the same as the repository defined in the 1093module database. 1094 1095 If all these conditions are true, `cvs release' leaves a record of 1096its execution (attesting to your intentionally abandoning your 1097checkout) in the CVS history log. 1098 1099* Menu: 1100 1101* release options:: release options 1102* release output:: release output 1103* release examples:: release examples 1104 1105 1106File: cvs.info, Node: release options, Next: release output, Up: release 1107 1108release options 1109--------------- 1110 1111 The `release' command supports one command option: 1112 1113`-d' 1114 Delete your working copy of the file if the release succeeds. If 1115 this flag is not given your files will remain in your working 1116 directory. 1117 1118 *Warning:* The `release' command deletes all directories and 1119 files recursively. This has the very serious side-effect that any 1120 directory that you have created inside your checked-out sources, 1121 and not added to the repository (using the `add' command; *note 1122 Adding files::.) will be silently deleted--even if it is non-empty! 1123 1124 1125File: cvs.info, Node: release output, Next: release examples, Prev: release options, Up: release 1126 1127release output 1128-------------- 1129 1130 Before `release' releases your sources it will print a one-line 1131message for any file that is not up-to-date. 1132 1133 *Warning:* Any new directories that you have created, but not added 1134to the CVS directory hierarchy with the `add' command (*note Adding 1135files::.) will be silently ignored (and deleted, if `-d' is specified), 1136even if they contain files. 1137 1138`U FILE' 1139`P FILE' 1140 There exists a newer revision of this file in the repository, and 1141 you have not modified your local copy of the file (`U' and `P' 1142 mean the same thing). 1143 1144`A FILE' 1145 The file has been added to your private copy of the sources, but 1146 has not yet been committed to the repository. If you delete your 1147 copy of the sources this file will be lost. 1148 1149`R FILE' 1150 The file has been removed from your private copy of the sources, 1151 but has not yet been removed from the repository, since you have 1152 not yet committed the removal. *Note commit::. 1153 1154`M FILE' 1155 The file is modified in your working directory. There might also 1156 be a newer revision inside the repository. 1157 1158`? FILE' 1159 FILE is in your working directory, but does not correspond to 1160 anything in the source repository, and is not in the list of files 1161 for CVS to ignore (see the description of the `-I' option, and 1162 *note cvsignore::.). If you remove your working sources, this 1163 file will be lost. 1164 1165 1166File: cvs.info, Node: release examples, Prev: release output, Up: release 1167 1168release examples 1169---------------- 1170 1171 Release the `tc' directory, and delete your local working copy of 1172the files. 1173 1174 $ cd .. # You must stand immediately above the 1175 # sources when you issue `cvs release'. 1176 $ cvs release -d tc 1177 You have [0] altered files in this repository. 1178 Are you sure you want to release (and delete) directory `tc': y 1179 $ 1180 1181 1182File: cvs.info, Node: update, Prev: release, Up: CVS commands 1183 1184update--Bring work tree in sync with repository 1185=============================================== 1186 1187 * update [-AdflPpR] [-d] [-r tag|-D date] files... 1188 1189 * Requires: repository, working directory. 1190 1191 * Changes: working directory. 1192 1193 After you've run checkout to create your private copy of source from 1194the common repository, other developers will continue changing the 1195central source. From time to time, when it is convenient in your 1196development process, you can use the `update' command from within your 1197working directory to reconcile your work with any revisions applied to 1198the source repository since your last checkout or update. 1199 1200* Menu: 1201 1202* update options:: update options 1203* update output:: update output 1204 1205 1206File: cvs.info, Node: update options, Next: update output, Up: update 1207 1208update options 1209-------------- 1210 1211 These standard options are available with `update' (*note Common 1212options::., for a complete description of them): 1213 1214`-D date' 1215 Use the most recent revision no later than DATE. This option is 1216 sticky, and implies `-P'. See *Note Sticky tags::, for more 1217 information on sticky tags/dates. 1218 1219`-f' 1220 Only useful with the `-D DATE' or `-r TAG' flags. If no matching 1221 revision is found, retrieve the most recent revision (instead of 1222 ignoring the file). 1223 1224`-k KFLAG' 1225 Process keywords according to KFLAG. See *Note Keyword 1226 substitution::. This option is sticky; future updates of this 1227 file in this working directory will use the same KFLAG. The 1228 `status' command can be viewed to see the sticky options. See 1229 *Note Invoking CVS::, for more information on the `status' command. 1230 1231`-l' 1232 Local; run only in current working directory. *Note Recursive 1233 behavior::. 1234 1235`-P' 1236 Prune empty directories. See *Note Moving directories::. 1237 1238`-p' 1239 Pipe files to the standard output. 1240 1241`-R' 1242 Update directories recursively (default). *Note Recursive 1243 behavior::. 1244 1245`-r rev' 1246 Retrieve revision/tag REV. This option is sticky, and implies 1247 `-P'. See *Note Sticky tags::, for more information on sticky 1248 tags/dates. 1249 1250 These special options are also available with `update'. 1251 1252`-A' 1253 Reset any sticky tags, dates, or `-k' options. See *Note Sticky 1254 tags::, for more information on sticky tags/dates. 1255 1256`-d' 1257 Create any directories that exist in the repository if they're 1258 missing from the working directory. Normally, `update' acts only 1259 on directories and files that were already enrolled in your 1260 working directory. 1261 1262 This is useful for updating directories that were created in the 1263 repository since the initial checkout; but it has an unfortunate 1264 side effect. If you deliberately avoided certain directories in 1265 the repository when you created your working directory (either 1266 through use of a module name or by listing explicitly the files 1267 and directories you wanted on the command line), then updating 1268 with `-d' will create those directories, which may not be what you 1269 want. 1270 1271`-I NAME' 1272 Ignore files whose names match NAME (in your working directory) 1273 during the update. You can specify `-I' more than once on the 1274 command line to specify several files to ignore. Use `-I !' to 1275 avoid ignoring any files at all. *Note cvsignore::, for other 1276 ways to make CVS ignore some files. 1277 1278`-WSPEC' 1279 Specify file names that should be filtered during update. You can 1280 use this option repeatedly. 1281 1282 SPEC can be a file name pattern of the same type that you can 1283 specify in the `.cvswrappers' file. *Note Wrappers::. 1284 1285`-jREVISION' 1286 With two `-j' options, merge changes from the revision specified 1287 with the first `-j' option to the revision specified with the 1288 second `j' option, into the working directory. 1289 1290 With one `-j' option, merge changes from the ancestor revision to 1291 the revision specified with the `-j' option, into the working 1292 directory. The ancestor revision is the common ancestor of the 1293 revision which the working directory is based on, and the revision 1294 specified in the `-j' option. 1295 1296 In addition, each `-j' option can contain an optional date 1297 specification which, when used with branches, can limit the chosen 1298 revision to one within a specific date. An optional date is 1299 specified by adding a colon (:) to the tag: 1300 `-jSYMBOLIC_TAG:DATE_SPECIFIER'. 1301 1302 *Note Branching and merging::. 1303 1304 1305File: cvs.info, Node: update output, Prev: update options, Up: update 1306 1307update output 1308------------- 1309 1310 `update' and `checkout' keep you informed of their progress by 1311printing a line for each file, preceded by one character indicating the 1312status of the file: 1313 1314`U FILE' 1315 The file was brought up to date with respect to the repository. 1316 This is done for any file that exists in the repository but not in 1317 your source, and for files that you haven't changed but are not 1318 the most recent versions available in the repository. 1319 1320`P FILE' 1321 Like `U', but the CVS server sends a patch instead of an entire 1322 file. These two things accomplish the same thing. 1323 1324`A FILE' 1325 The file has been added to your private copy of the sources, and 1326 will be added to the source repository when you run `commit' on 1327 the file. This is a reminder to you that the file needs to be 1328 committed. 1329 1330`R FILE' 1331 The file has been removed from your private copy of the sources, 1332 and will be removed from the source repository when you run 1333 `commit' on the file. This is a reminder to you that the file 1334 needs to be committed. 1335 1336`M FILE' 1337 The file is modified in your working directory. 1338 1339 `M' can indicate one of two states for a file you're working on: 1340 either there were no modifications to the same file in the 1341 repository, so that your file remains as you last saw it; or there 1342 were modifications in the repository as well as in your copy, but 1343 they were merged successfully, without conflict, in your working 1344 directory. 1345 1346 CVS will print some messages if it merges your work, and a backup 1347 copy of your working file (as it looked before you ran `update') 1348 will be made. The exact name of that file is printed while 1349 `update' runs. 1350 1351`C FILE' 1352 A conflict was detected while trying to merge your changes to FILE 1353 with changes from the source repository. FILE (the copy in your 1354 working directory) is now the result of attempting to merge the 1355 two revisions; an unmodified copy of your file is also in your 1356 working directory, with the name `.#FILE.REVISION' where REVISION 1357 is the revision that your modified file started from. Resolve the 1358 conflict as described in *Note Conflicts example::. (Note that 1359 some systems automatically purge files that begin with `.#' if 1360 they have not been accessed for a few days. If you intend to keep 1361 a copy of your original file, it is a very good idea to rename 1362 it.) Under VMS, the file name starts with `__' rather than `.#'. 1363 1364`? FILE' 1365 FILE is in your working directory, but does not correspond to 1366 anything in the source repository, and is not in the list of files 1367 for CVS to ignore (see the description of the `-I' option, and 1368 *note cvsignore::.). 1369 1370