1 \input texinfo @c -*-texinfo-*-
3 @c "@(#)$Name: $:$Id: pcl-cvs.texi,v 1.6 2000/10/07 19:15:54 eliz Exp $"
5 @c Documentation for the GNU Emacs CVS mode.
6 @c Copyright (C) 1991-2000 Free Software Foundation, Inc.
8 @c This file is part of GNU Emacs
10 @c GNU Emacs is free software; you can redistribute it and/or modify
11 @c it under the terms of the GNU General Public License as published by
12 @c the Free Software Foundation; either version 2 of the License,
13 @c or (at your option) any later version.
15 @c GNU Emacs is distributed in the hope that it will be useful,
16 @c but WITHOUT ANY WARRANTY; without even the implied warranty of
17 @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 @c GNU General Public License for more details.
20 @c You should have received a copy of the GNU General Public License
21 @c along with pcl-cvs; see the file COPYING. If not, write to
22 @c the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
25 @setfilename ../info/pcl-cvs
26 @settitle PCL-CVS - Emacs Front-End to CVS
31 * PCL-CVS: (pcl-cvs). Emacs front-end to CVS.
36 Copyright @copyright{} 1991-2000 Free Software Foundation, Inc.
38 Permission is granted to copy, distribute and/or modify this document
39 under the terms of the GNU Free Documentation License, Version 1.1 or
40 any later version published by the Free Software Foundation; with the
41 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
42 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
43 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
44 license is included in the section entitled ``GNU Free Documentation
45 License'' in the Emacs manual.
47 This document is part of a collection distributed under the GNU Free
48 Documentation License. If you want to distribute this document
49 separately from the collection, you can do so by adding a copy of the
50 license to the document, as described in section 6 of the license.
52 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
53 this GNU Manual, like GNU software. Copies published by the Free
54 Software Foundation raise funds for GNU development.''
58 @c The titlepage section does not appear in the Info file.
61 @c The title is printed in a large font.
62 @center @titlefont{User's Guide}
64 @center @titlefont{to}
66 @center @titlefont{PCL-CVS --- The Emacs Front-End to CVS}
73 @center Per Cederqvist
74 @center Stefan Monnier
77 @c The following two commands start the copyright page
78 @c for the printed manual. This will not appear in the Info file.
80 @vskip 0pt plus 1filll
81 Copyright @copyright{} 1991-2000 Free Software Foundation, Inc.
83 Permission is granted to copy, distribute and/or modify this document
84 under the terms of the GNU Free Documentation License, Version 1.1 or
85 any later version published by the Free Software Foundation; with the
86 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
87 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
88 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
89 license is included in the section entitled ``GNU Free Documentation
90 License'' in the Emacs manual.
92 This document is part of a collection distributed under the GNU Free
93 Documentation License. If you want to distribute this document
94 separately from the collection, you can do so by adding a copy of the
95 license to the document, as described in section 6 of the license.
97 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
98 this GNU Manual, like GNU software. Copies published by the Free
99 Software Foundation raise funds for GNU development.''
102 @c ================================================================
103 @c The real text starts here
104 @c ================================================================
106 @node Top, About PCL-CVS, (dir), (dir)
110 This info manual describes PCL-CVS, the GNU Emacs front-end to CVS. It
111 is nowhere near complete, so you are advised to use @kbd{M-x
112 customize-group RET pcl-cvs RET} and to look at the documentation strings
113 of the various commands and major modes for further information.
114 @c This manual is updated to release 2.5 of PCL-CVS.
118 * About PCL-CVS:: Installation, credits, history, ...
120 * Getting started:: An introduction with a walk-through example.
121 * Buffer contents:: An explanation of the buffer contents.
122 * Selected files:: To which files are commands applied.
123 * Commands:: All commands, grouped by type.
125 * Log Edit Mode:: Major mode to edit log messages.
126 * Log View Mode:: Major mode to browse log changes.
127 * CVS Status Mode:: Major mode to view CVS' status output.
128 * Customization:: How you can tailor PCL-CVS to suit your needs.
129 * Bugs:: Bugs (known and unknown).
131 * Function and Variable Index:: List of functions and variables.
132 * Concept Index:: List of concepts.
133 * Key Index:: List of keystrokes.
136 --- The Detailed Node Listing ---
140 * Contributors:: Contributors to PCL-CVS.
145 * Entering PCL-CVS:: Commands to invoke PCL-CVS
146 * Setting flags:: Setting flags for CVS commands
147 * Updating the buffer::
148 * Movement commands:: How to move up and down in the buffer
149 * Marking files:: How to mark files that other commands
150 will later operate on.
151 * Committing changes:: Checking in your modifications to the
153 * Editing files:: Loading files into Emacs.
154 * Getting info about files:: Display the log and status of files.
155 * Adding and removing files:: Adding and removing files
156 * Undoing changes:: Undoing changes
157 * Removing handled entries:: Uninteresting lines can easily be removed.
158 * Ignoring files:: Telling CVS to ignore generated files.
159 * Viewing differences:: Commands to @samp{diff} different versions.
160 * Invoking Ediff:: Running @samp{ediff} from @samp{*cvs*} buffer.
161 * Updating files:: Updating files that Need-update.
162 * Tagging files:: Tagging files.
163 * Miscellaneous commands:: Miscellaneous commands.
167 * Customizing Faces::
172 @node About PCL-CVS, Getting started, Top, Top
173 @chapter About PCL-CVS
174 @cindex About PCL-CVS
176 PCL-CVS is a front-end to CVS versions 1.9 and later.
177 It concisely shows the present status of a checked out module in an
178 Emacs buffer and provides single-key access to the most frequently used CVS
180 For Emacs users accustomed to VC, PCL-CVS can be thought of as a replacement
181 for VC-dired (@pxref{(emacs)VC Dired Mode}) specifically designed for CVS.
183 PCL-CVS was originally written many years ago by Per Cederqvist who
184 proudly maintained it until January 1996, at which point he released the
185 beta version 2.0b2 and passed on the maintainership to Greg A Woods.
186 Development stayed mostly dormant for a few years during which the
187 version 2.0 never seemed to be able to leave the ``beta'' stage while a
188 separate XEmacs version was slowly splitting away. In late 1998,
189 Stefan Monnier picked up development again, adding some major new
190 functionality and taking over maintenance.
192 As of Emacs-21, PCL-CVS is part of the standard Emacs distribution.
195 * Contributors:: Contributors to PCL-CVS.
199 @node Contributors, Installation, About PCL-CVS, About PCL-CVS
200 @section Contributors to PCL-CVS
204 Contributions to the package are welcome. I have limited time to work
205 on this project, but I will gladly add any code that you contribute to
206 me to this package (@pxref{Bugs}).
208 The following persons have made contributions to PCL-CVS.
212 Brian Berliner wrote CVS, together with some other contributors.
213 Without his work on CVS this package would be useless@dots{}
216 Per Cederqvist wrote most of the otherwise unattributed functions in
217 PCL-CVS as well as all documentation.
220 Inge Wallin (@samp{inge@@lysator.liu.se}) wrote the skeleton to
221 @file{pcl-cvs.texi}, and gave useful comments on it. He also wrote
222 the files @file{elib-node.el} and @file{compile-all.el}. The file
223 @file{cookie.el} was inspired by Inge.@refill
226 Linus Tolke (@samp{linus@@lysator.liu.se}) contributed useful comments
227 on both the functionality and the documentation.@refill
230 Jamie Zawinski (@samp{jwz@@jwz.com}) contributed
231 @file{pcl-cvs-lucid.el}, which was later renamed to
232 @file{pcl-cvs-xemacs.el}.@refill
235 Leif Lonnblad contributed RCVS support. (Since superceded by the new
239 Jim Blandy (@samp{jimb@@cyclic.com}) contributed hooks to automatically
240 guess CVS log entries from ChangeLog contents; and initial support of
241 the new Cygnus / Cyclic remote CVS; as well as various sundry bug fixes
245 Jim Kingdon (@samp{kingdon@@cyclic.com}) contributed lots of fixes to
246 the build and install procedure.
249 Greg A. Woods (@samp{woods@@weird.com}) contributed code to implement
250 the use of per-file diff buffers; and vendor join diffs with emerge and
251 ediff; as well as various and sundry bug fixes and cleanups.
254 Greg Klanderman (@samp{greg.klanderman@@alum.mit.edu}) implemented
255 toggling of marked files; setting of CVS command flags via prefix
256 arguments; updated the XEmacs support; updated the manual; and fixed
260 Stefan Monnier (@samp{monnier@@cs.yale.edu}) added a slew of other
261 features and introduced even more new bugs. If there's any bug left,
262 you can be sure it's his.
265 Masatake YAMATO (@samp{masata-y@@is.aist-nara.ac.jp}) graciously
266 contributed the cvstree code to display a tree of tags which was later
267 superseded by the new cvs-status-mode.
271 Apart from these, a lot of people have sent us suggestions, ideas,
272 requests, bug reports and encouragement. Thanks a lot! Without you
273 there would be no new releases of PCL-CVS.
276 @node Installation, , Contributors, About PCL-CVS
277 @section Installation
280 As mentioned above, PCL-CVS comes preinstalled since Emacs-21.
281 If you're using Emacs 20, you can download an older version of PCL-CVS
282 from @url{ftp://flint.cs.yale.edu/pub/monnier/pcl-cvs}. That version
283 also works on XEmacs.
285 If you are running XEmacs 21.0 or later, PCL-CVS is available in
286 pre-compiled package form. Please refer to the XEmacs manual for
287 instructions regarding package selection and installation. Currently,
288 that PCL-CVS package also requires you to have installed the xemacs-base,
289 elib, and dired packages.
291 If you have @TeX{} installed at your site, you can make a typeset manual
292 from @file{pcl-cvs.texi}.
296 Run @TeX{} by typing @samp{texi2dvi pcl-cvs.texi}.
298 Convert the resulting device independent file @file{pcl-cvs.dvi} to a
299 form which your printer can output and print it. If you have a
300 postscript printer there is a program, @code{dvi2ps}, which does. There
301 is also a program which comes together with @TeX{}, @code{dvips}, which
306 @node Getting started, Buffer contents, About PCL-CVS, Top
307 @chapter Getting started
311 This document assumes that you know what CVS is, and that you at least
312 know the fundamental concepts of CVS. If that is not the case you
313 should read the man page for CVS.
315 PCL-CVS is only useful once you have checked out a module. So before
316 you invoke it you must have a copy of a module somewhere in the file
319 You can invoke PCL-CVS by typing @kbd{M-x cvs-examine RET}.
320 You can also invoke it via the menubar, under Tools.
321 Or if you prefer, you can also invoke PCL-CVS by simply visiting the
322 CVS administrative subdirectory of your module, with a prefix argument.
323 F.ex. @kbd{C-u C-x 5 f ~/my/project/CVS RET}.
325 The function @code{cvs-examine} will ask for a directory. The command
326 @samp{cvs -n update} will be run in that directory. (It should contain
327 files that have been checked out from a CVS archive.) The output from
328 @code{cvs} will be parsed and presented in a table in a buffer called
329 @samp{*cvs*}. It might look something like this:
332 Repository : /usr/CVSroot
334 Working dir: /users/ceder/FOO/test
345 --------------------- End ---------------------
346 -- last cmd: cvs -f -z6 -n update -d -P --
349 In this example, your repository is in @file{/usr/CVSroot} and CVS has
350 been run in the directory @file{/users/ceder/FOO/test}. The three files
351 (@file{bar}, @file{file.txt} and
352 @file{newer}) that are marked with @samp{Need-Update} have been changed
353 by someone else in the CVS repository. Two files (@file{namechange}
354 and @file{sub/ChangeLog}) have been modified locally, and need to be
357 You can move the cursor up and down in the buffer with @kbd{C-n} and
358 @kbd{C-p} or @kbd{n} and @kbd{p}. If you press @kbd{c} on one of the
359 @samp{Modified} files that file will be checked in to the CVS
360 repository. @xref{Committing changes}. You can also press @kbd{O} to
361 update any of the files that are marked @samp{Need-Update}. You can
362 also run @kbd{M-x cvs-update RET} (bound to @kbd{M-u} in the
363 @samp{*cvs*} buffer) to update all the files.@refill
365 You can then press @kbd{=} to easily get a @samp{diff} between your
366 modified file and the base version that you started from or you can
367 press @kbd{l} to get the output from @samp{cvs log}. Many more such
368 commands are available simply by pressing a key (@pxref{Getting info
371 @node Buffer contents, Selected files, Getting started, Top
372 @chapter Buffer contents
373 @cindex Buffer contents
375 The display contains several columns, some of which are optional.
376 They contain, from left to right:
381 Optionally, the head revision of the file. This is the latest version
382 found in the repository. It might also contain (instead of the head
383 revision) a sub status which typically gives further information about
384 how we got to the current state, for example @samp{patched},
388 An asterisk when the file is @dfn{marked} (@pxref{Selected
392 The actual status of the file wrt to the repository. @xref{Buffer
393 contents}, for more information.@refill
396 Optionally, the base revision of the file. This is the version
397 which the copy in your working directory is based upon.
404 The @samp{file status} field can have the following values:
409 The file is modified in your working directory, and there was no
410 modification to the same file in the repository. This status can have
411 the following substatus:
416 The file was modified in your working directory, and there were
417 modifications in the repository as well, but they were merged
418 successfully, without conflict, in your working directory.@refill
423 A conflict was detected while trying to merge your changes to @var{file}
424 with changes from the repository. @var{file} (the copy in your
425 working directory) is now the output of the @samp{rcsmerge} command on
426 the two versions; an unmodified copy of your file is also in your
427 working directory, with the name @file{.#@var{file}.@var{version}},
428 where @var{version} is the RCS revision that your modified file started
429 from. @xref{Viewing differences}, for more details.@refill
431 A conflict can also come from a disagreement on the existence of the file
432 rather than on its content. This case is indicated by the following
438 The file is locally removed but a new revision has been committed to
439 the repository by someone else.
442 The file is locally added and has also been added to the repository
446 The file is locally modified but someone else has removed it from the
452 The file has been added by you, but it still needs to be checked in to
453 the repository.@refill
456 The file has been removed by you, but it still needs to be checked in to
457 the repository. You can resurrect it by typing @kbd{a} (@pxref{Adding
458 and removing files}).@refill
461 A file that was detected in your directory, but that neither appears in
462 the repository, nor is present on the list of files that CVS should
466 The file is up to date with respect to the version in the repository.
467 This status can have a substatus of:
472 You have just added the file to the repository.@refill
475 The file was brought up to date with respect to the repository. This is
476 done for any file that exists in the repository but not in your source,
477 and for files that you haven't changed but are not the most recent
478 versions available in the repository.@refill
481 The file was brought up to date with respect to the remote repository by
482 way of fetching and applying a patch to the file in your source. This
483 is equivalent to @samp{updated} except that CVS decided to use a hopefully
484 more efficient method.@refill
487 You just committed the file.@refill
492 Either a newer version than the one in your source is available in the
493 repository and you have not modified your checked out version, or the
494 file exists in the repository but not in your source. Use
495 @samp{cvs-mode-update} bound to @kbd{O} to update the file.@refill
498 You have modified the checked out version of the file, and a newer
499 version is available in the repository. A merge will take place when
500 you run a @samp{cvs-update}.
503 The file has been unexpectedly removed from your working directory
504 although it has not been @samp{cvs remove}d.
508 @node Selected files, Commands, Buffer contents, Top
509 @chapter Selected files
510 @cindex Selected files
512 @cindex File selection
516 Many of the commands work on the current set of @dfn{selected} files
517 which can be either the set of marked files (if any file is marked and
518 marks are no ignored) or whichever file or directory the cursor is on.
520 If a directory is selected but the command cannot be applied to a
521 directory, then it will be applied to the set of files under this
522 directory which are in the @samp{*cvs*} buffer.
524 Furthermore, each command only operates on a subset of the selected
525 files, depending on whether or not the command is @dfn{applicable} to
526 each file (based on the file's status). For example,
527 @code{cvs-mode-commit} is not applicable to a file whose status is
528 @samp{Need-Update}. If it should happen that PCL-CVS guesses the
529 applicability wrong, you can override it with the special prefix
530 @code{cvs-mode-force-command} normally bound to @kbd{M-f} (and file a
531 bug report). The applicability rule can be slightly changed with
532 @code{cvs-allow-dir-commit} and @code{cvs-force-dir-tag}.
534 By default, marks are always in effect (you may change this, however, by
535 setting the variable @code{cvs-default-ignore-marks}) except for the
536 commands that @samp{tag} or @samp{diff} a file (which can be changed
537 with the variable @code{cvs-invert-ignore-marks}).
539 In addition, you may use the special prefix @code{cvs-mode-toggle-marks}
540 normally bound to @key{T} to toggle the use of marks for the following
543 This scheme might seem a little complicated, but once one gets used to
544 it, it is quite powerful.
546 For commands to mark and unmark files, see @xref{Marking files}.
548 @node Commands, Log Edit Mode, Selected files, Top
552 This chapter describes all the commands that you can use in PCL-CVS.
555 The nodes in this menu contains explanations about all the commands that
556 you can use in PCL-CVS. They are grouped together by type.
560 * Entering PCL-CVS:: Commands to invoke PCL-CVS
561 * Setting flags:: Setting flags for CVS commands
562 * Updating the buffer::
563 * Movement commands:: How to move up and down in the buffer
564 * Marking files:: How to mark files that other commands
565 will later operate on.
566 * Committing changes:: Checking in your modifications to the
568 * Editing files:: Loading files into Emacs.
569 * Getting info about files:: Display the log and status of files.
570 * Adding and removing files:: Adding and removing files
571 * Undoing changes:: Undoing changes
572 * Removing handled entries:: Uninteresting lines can easily be removed.
573 * Ignoring files:: Telling CVS to ignore generated files.
574 * Viewing differences:: Commands to @samp{diff} different versions.
575 * Invoking Ediff:: Running @samp{ediff} from @samp{*cvs*} buffer.
576 * Updating files:: Updating files that Need-update.
577 * Tagging files:: Tagging files.
578 * Miscellaneous commands:: Miscellaneous commands.
582 @node Entering PCL-CVS, Setting flags, Commands, Commands
583 @section Entering PCL-CVS
589 @cindex Creating the *cvs* buffer
591 Most commands in PCL-CVS require that you have a @samp{*cvs*}
592 buffer. The commands that you use to get one are listed below.
593 For each, a @samp{cvs} process will be run, the output will be parsed by
594 PCL-CVS, and the result will be printed in the @samp{*cvs*} buffer (see
595 @pxref{Buffer contents} for a description of the contents).
600 Run a @samp{cvs update} command. You will be asked for the directory
601 in which the @samp{cvs update} will be run.
603 @item M-x cvs-examine
604 Run a @samp{cvs -n update} command. This is identical to the previous
605 command, except that it will only check what needs to be done but will
606 not change anything. You will be asked for the directory in
607 which the @samp{cvs -n update} will be run.
610 Run a @samp{cvs status} command. You will be asked for the directory
611 in which the @samp{cvs status} will be run.
613 @item M-x cvs-checkout
614 Run a @samp{cvs checkout} command. You will be asked for the directory
615 in which the @samp{cvs update} will be run and the module to be checked
618 @item M-x cvs-quickdir
619 Populate the @samp{*cvs*} buffer by just looking at the @file{CVS/Entries}
620 files. This is very much like @code{cvs-examine} except that it does
621 not access the CVS repository which is a major advantage when the
622 repository is far away. But of course, it will not be able to detect
623 when a file needs to be updated or merged.
628 those commands are also reachable from the menubar
629 under @samp{Tools->PCL-CVS}. Finally an alternative way is to visit
630 the CVS administrative subdirectory in your work area with a simple
631 prefix argument. For example @kbd{C-u C-x C-f ~/my/work/CVS RET}. This
632 will by default run @code{cvs-quickdir} but the specific behavior can be
633 changed with @code{cvs-dired-action} and @code{cvs-dired-use-hook}.
635 By default, the commands above will descend recursively into
636 subdirectories. You can avoid that behavior by including @samp{-l} in
637 the flags for the command. These flags can be set by giving a prefix
638 argument to the command (e.g., by typing
639 @kbd{C-u M-x cvs-update RET -l RET}).
642 @node Setting flags, Updating the buffer, Entering PCL-CVS, Commands
643 @section Setting flags for CVS commands
644 @cindex Special prefix
646 This section describes the convention used by nearly all PCL-CVS
647 commands for setting optional flags sent to CVS. A single @kbd{C-u}
648 prefix argument is used to cause the command to prompt for flags to be
649 used for the current invocation of the command only. Two @kbd{C-u} prefix
650 arguments are used to prompt for flags which will be set permanently, for the
651 current invocation and all that follow, until the flags are changed, or
652 unless temporary flags are set which override them.
654 Perhaps an example or two is in order. Say you are about to add a
655 binary file to the repository, and want to specify the flags @samp{-kb}
656 to @samp{cvs add}. You can type @kbd{C-u a -kb RET}, enter the
657 description, and the file will be added. Subsequent adds will use the
658 previously prevailing flags.
660 As a second example, say you are about to perform a diff and want to see
661 the result in unified diff format, i.e. you'd like to pass the flag
662 @samp{-u} to both @samp{cvs diff} and @samp{diff}. You'd also like all
663 subsequent diffs to use this flag. You can type @kbd{C-u C-u = -u RET}
664 and the diff will be performed, and the default flags will be set to
665 @code{("-u")}. You can of course override this flag for a single diff
666 by using a single @kbd{C-u} prefix argument.
668 Additionally to this, some commands can take @dfn{special prefix} arguments.
669 These work as follows: when called with a @kbd{C-u} prefix, the user is
670 prompted for a new value of the special prefix and the special prefix is
671 activated for the next command. When called without the @kbd{C-u}
672 prefix, the special prefix is re-activated (with the same value as last
673 time) for the next command. Calling the prefix command again when it's
674 already activated deactivates it. Calling it with the @kbd{C-u C-u}
675 prefix activates it for all subsequent commands until you deactivate it
676 explicitly. The special prefixes are:
681 Toggles whether or not marks will be active in the next command.@refill
684 Provide the next command with a branch (can be any version
685 specifier) to work on.@refill
688 Secondary branch argument. Only meaningful if `b' is also used.
689 It can be used to provide a second branch argument to
690 @code{cvs-mode-diff} or to @code{cvs-mode-update}.
693 Forces the next command to apply to every selected file rather than only
694 to the ones PCL-CVS thinks are relevant.
698 @node Updating the buffer, Movement commands, Setting flags, Commands
699 @section Updating the @samp{*cvs*} buffer
703 @findex cvs-mode-update
704 @findex cvs-mode-examine
705 @findex cvs-mode-status
707 The following commands can be used from within the @samp{*cvs*} buffer
708 to update the display:
713 This runs the command @samp{cvs-update}.@refill
716 This runs the command @samp{cvs-examine}.@refill
719 This runs the command @samp{cvs-status}.@refill
723 Additionally to the above commands which operate on the whole module,
724 you can run the equivalent CVS command on just a subset of the
725 files/directories with
730 Runs @code{cvs-mode-update} on the selected files. When run on the
731 top level directory, this is equivalent to @kbd{M-u}.@refill
734 Runs @code{cvs-mode-examine} on the selected files. When run on the
735 top level directory, this is equivalent to @kbd{M-e}.@refill
738 Runs @code{cvs-mode-status} on the selected files. When run on the
739 top level directory, this is equivalent to @kbd{M-s} except that
740 CVS output will be shown in a @samp{*cvs-info*} buffer that will be
741 put in @samp{cvs-status-mode}.@refill
746 @node Movement commands, Marking files, Updating the buffer, Commands
747 @section Movement Commands
748 @cindex Movement Commands
749 @findex cvs-mode-next-line
750 @findex cvs-mode-previous-line
751 @kindex SPC - Move down one file
752 @kindex n - Move down one file
753 @kindex p - Move up one file
755 You can use most normal Emacs commands to move forward and backward in
756 the buffer. Some keys are rebound to functions that take advantage of
757 the fact that the buffer is a PCL-CVS buffer:
763 These keys move the cursor one file forward, towards the end of the
764 buffer (@code{cvs-mode-next-line}).@refill
767 This key move one file backward, towards the beginning of the buffer
768 (@code{cvs-mode-previous-line}).
772 @node Marking files, Committing changes, Movement commands, Commands
773 @section Marking files
774 @cindex Selecting files (commands to mark files)
775 @cindex Marking files
776 @kindex m - marking a file
777 @kindex M - marking all files
778 @kindex u - unmark a file
779 @kindex ESC DEL - unmark all files
780 @kindex DEL - unmark previous file
781 @kindex % - mark files matching regexp
782 @kindex T - toggle marks
783 @findex cvs-mode-mark
784 @findex cvs-mode-unmark
785 @findex cvs-mode-mark-all-files
786 @findex cvs-mode-unmark-all-files
787 @findex cvs-mode-unmark-up
788 @findex cvs-mode-mark-matching-files
789 @findex cvs-mode-toggle-marks
791 PCL-CVS works on a set of @dfn{selected files} (@pxref{Selected files}).
792 You can mark and unmark files with these commands:
796 This marks the file that the cursor is positioned on. If the cursor is
797 positioned on a directory all files in that directory will be marked.
798 (@code{cvs-mode-mark}).@refill
801 Unmark the file that the cursor is positioned on. If the cursor is on a
802 directory, all files in that directory will be unmarked.
803 (@code{cvs-mode-unmark}).@refill
806 Mark @emph{all} files in the buffer (@code{cvs-mode-mark-all-files}).
809 Unmark @emph{all} files (@code{cvs-mode-unmark-all-files}).
812 Unmark the file on the previous line, and move point to that line
813 (@code{cvs-mode-unmark-up}).
816 Mark all files matching a regular expression
817 (@code{cvs-mode-mark-matching-files}).
820 Toggle use of marks for the next command (@code{cvs-mode-toggle-marks}).
824 @node Committing changes, Editing files, Marking files, Commands
825 @section Committing changes
826 @cindex Committing changes
828 @findex cvs-mode-commit
829 @findex cvs-mode-commit-setup
830 @kindex c - commit files
831 @kindex C - commit files with ChangeLog message
832 @vindex cvs-auto-revert (variable)
833 @cindex Commit buffer
835 @cindex Erasing commit message
836 @cindex Reverting buffers after commit
838 Committing changes basically works as follows:
842 After having selected the files you want to commit, you type either
843 @kbd{c} or @kbd{C} which brings up a special buffer
844 @samp{*cvs-commit*}.@refill
847 You type in the log message describing the changes you're about to
848 commit (@pxref{Log Edit Mode}).@refill
851 When you're happy with it, you type @kbd{C-c C-c} to do the actual
856 There's no hidden state, so you can abort the process or pick it up
859 The set of files actually committed is really decided only during the
860 very last step, which is mixed blessing. It allows you to go back and
861 change your mind about which files to commit, but it also means that you
862 might inadvertently change the set of selected files. To reduce the
863 risk of error, @kbd{C-c C-c} will ask for confirmation if the set of
864 selected files has changed between the first step and the last. You can
865 change this last detail with @code{log-edit-confirm}.
867 As for the difference between @kbd{c} (i.e. @code{cvs-mode-commit}) and
868 @kbd{C} (i.e. @code{cvs-mode-commit-setup}) is that the first gets you
869 straight to @samp{*cvs-commit*} without erasing it or changing anything
870 to its content, while the second will first erase @samp{*cvs-commit*}
871 and try to initialize it with a sane default (it will do that by either
872 using a template provided by the CVS administrator or by extracting a
873 relevant log message from a ChangeLog file).
875 If you are editing the files in your Emacs an automatic
876 @samp{revert-buffer} will be performed. (If the file contains
877 @samp{$@asis{Id}$} keywords @samp{cvs commit} will write a new file with
878 the new values substituted. The auto-revert makes sure that you get
879 them into your buffer). The revert will not occur if you have modified
880 your buffer, or if @samp{cvs-auto-revert} is set to
884 @node Editing files, Getting info about files, Committing changes, Commands
885 @section Editing files
886 @cindex Editing files
887 @cindex Finding files
888 @cindex Loading files
890 @cindex Invoking dired
891 @findex cvs-mode-find-file
892 @findex cvs-mode-find-file-other-window
893 @findex cvs-mode-add-change-log-entry-other-window
894 @kindex f - find file or directory
895 @kindex o - find file in other window
896 @kindex A - add ChangeLog entry
898 There are currently three commands that can be used to find a file (that
899 is, load it into a buffer and start editing it there). These commands
900 work on the line that the cursor is situated at. They always ignore any marked
905 Find the file that the cursor points to. Run @samp{dired}
907 (@pxref{Dired,,,Emacs})
909 if the cursor points to a directory (@code{cvs-mode-find-file}).@refill
912 Like @kbd{f}, but use another window
913 (@code{cvs-mode-find-file-other-window}).@refill
916 Invoke @samp{add-change-log-entry-other-window} to edit a
917 @samp{ChangeLog} file. The @samp{ChangeLog} will be found in the
918 directory or a parent of the directory of the file the cursor points to.
919 (@code{cvs-mode-add-change-log-entry-other-window}).@refill
923 @node Getting info about files, Adding and removing files, Editing files, Commands
924 @section Getting info about files
925 @cindex Status (cvs command)
926 @cindex Log (RCS/cvs command)
927 @cindex Getting status
928 @kindex l - run @samp{cvs log}
929 @kindex s - run @samp{cvs status}
931 @findex cvs-mode-status
935 Call the command @code{cvs-mode-log} which runs @samp{cvs log} on all
936 selected files, and show the result in a temporary @samp{*cvs-info*}
937 buffer (@pxref{Log View Mode}).
940 Call the command @code{cvs-mode-status} which runs @samp{cvs status} on
941 all selected files, and show the result in a temporary @samp{*cvs-info*}
942 buffer (@pxref{CVS Status Mode}).
946 @node Adding and removing files, Undoing changes, Getting info about files, Commands
947 @section Adding and removing files
949 @cindex Removing files
950 @cindex Resurrecting files
951 @cindex Deleting files
952 @cindex Putting files under CVS control
953 @kindex a - add a file
954 @kindex r - remove a file
956 @findex cvs-mode-remove-file
958 The following commands are available to make it easy to add and remove
959 files from the CVS repository.
963 Add all selected files. This command can be used on @samp{Unknown}
964 files (@pxref{Buffer contents}). The status of the file will change to
965 @samp{Added}, and you will have to use @kbd{c} (@samp{cvs-mode-commit},
966 @pxref{Committing changes}) to really add the file to the
969 This command can also be used on @samp{Removed} files (before you commit
970 them) to resurrect them.
972 The command that is run is @code{cvs-mode-add}.
975 This command removes the selected files (after prompting for
976 confirmation). The files are @samp{rm}ed from your directory and
977 (unless the status was @samp{Unknown}; @pxref{Buffer contents}) they will
978 also be @samp{cvs remove}d. If the files were @samp{Unknown} they will
979 disappear from the buffer. Otherwise their status will change to
980 @samp{Removed}, and you must use @kbd{c} (@samp{cvs-mode-commit},
981 @pxref{Committing changes}) to commit the removal.@refill
983 The command that is run is @code{cvs-mode-remove-file}.
987 @node Undoing changes, Removing handled entries, Adding and removing files, Commands
988 @section Undoing changes
990 @cindex Flush changes
991 @kindex U - undo changes
992 @findex cvs-mode-undo-local-changes
996 If you have modified a file, and for some reason decide that you don't
997 want to keep the changes, you can undo them with this command. It works
998 by removing your working copy of the file and then getting the latest
999 version from the repository (@code{cvs-mode-undo-local-changes}.
1003 @node Removing handled entries, Ignoring files, Undoing changes, Commands
1004 @section Removing handled entries
1005 @cindex Expunging uninteresting entries
1006 @cindex Uninteresting entries, getting rid of them
1007 @cindex Getting rid of uninteresting lines
1008 @cindex Removing uninteresting (processed) lines
1009 @cindex Handled lines, removing them
1010 @kindex x - remove processed entries
1011 @kindex C-k - remove selected entries
1012 @findex cvs-mode-remove-handled
1013 @findex cvs-mode-acknowledge
1014 @findex cvs-mode-ignore
1018 This command allows you to remove all entries that you have processed.
1019 More specifically, the lines for @samp{Up-to-date} files (@pxref{Buffer
1020 contents} are removed from the buffer. If a directory becomes empty the heading
1021 for that directory is also removed. This makes it easier to get an
1022 overview of what needs to be done.
1024 The command is called @code{cvs-mode-remove-handled}. If
1025 @samp{cvs-auto-remove-handled} is set to non-@code{nil} this will
1026 automatically be performed after every commit.@refill
1029 This command can be used for lines that @samp{cvs-mode-remove-handled} would
1030 not delete, but that you want to delete (@code{cvs-mode-acknowledge}).
1034 @node Ignoring files, Viewing differences, Removing handled entries, Commands
1035 @section Ignoring files
1036 @kindex i - ignoring files
1037 @findex cvs-mode-ignore
1041 Arrange so that CVS will ignore the selected files. The file names are
1042 added to the @file{.cvsignore} file in the corresponding directory. If
1043 the @file{.cvsignore} doesn't exist it will be created.
1045 The @file{.cvsignore} file should normally be added to the repository,
1046 but you could ignore it also if you like it better that way.
1048 This runs @code{cvs-mode-ignore}.
1051 @node Viewing differences, Invoking Ediff, Ignoring files, Commands
1052 @section Viewing differences
1054 @cindex Invoking ediff
1055 @cindex Conflicts, how to resolve them
1056 @cindex Viewing differences
1057 @kindex d= - run @samp{cvs diff}
1058 @kindex = - run @samp{cvs diff}
1059 @kindex dh - diff against head of repository
1060 @kindex dv - diff against vendor branch
1061 @findex cvs-mode-diff
1062 @findex cvs-mode-diff-backup
1063 @findex cvs-mode-diff-head
1064 @findex cvs-mode-diff-vendor
1065 @vindex cvs-invert-ignore-marks
1070 Display a @samp{cvs diff} between the selected files and the version
1071 that they are based on. (@code{cvs-mode-diff}).@refill
1074 If CVS finds a conflict while merging two versions of a file (during a
1075 @samp{cvs update}, @pxref{Updating the buffer}) it will save the
1076 original file in a file called @file{.#@var{FILE}.@var{VERSION}} where
1077 @var{FILE} is the name of the file, and @var{VERSION} is the revision
1078 number that your file was based on.@refill
1080 With the @kbd{b} command you can run a @samp{diff} on the files
1081 @file{.#@var{FILE}.@var{VERSION}} and @file{@var{FILE}}.@refill
1084 Display a @samp{cvs diff} between the selected files and the head
1085 revision in the repository (the most recent version on the current
1086 branch). (@code{cvs-mode-diff-head}).@refill
1089 Display a @samp{cvs diff} between the selected files and the head
1090 revision of the vendor branch in the repository.
1091 (@code{cvs-mode-diff-vendor}).@refill
1095 By default, @samp{diff} commands ignore the marks. This can be changed
1096 with @code{cvs-invert-ignore-marks}.
1098 @node Invoking Ediff, Updating files, Viewing differences, Commands
1099 @section Running ediff
1101 @cindex Invoking ediff
1102 @cindex Viewing differences
1103 @cindex Conflicts, resolving
1104 @cindex Resolving conflicts
1105 @kindex e - invoke @samp{ediff}
1106 @findex cvs-mode-idiff
1107 @findex cvs-mode-imerge
1111 This command uses ediff (or emerge depending on
1112 @samp{cvs-idiff-imerge-handlers}) to allow you to view diffs.
1113 If a prefix argument is given, PCL-CVS will prompt for a revision against
1114 which the diff should be made, else the default will be to use the BASE
1118 This command use ediff (or emerge, see above) to allow you to do an
1119 interactive 3-way merge.
1121 @strong{Note:} When the file status is @samp{Conflict},
1122 CVS has already performed a merge. The resulting file is not used in
1123 any way if you use this command. If you use the @kbd{q} command inside
1124 @samp{ediff} (to successfully terminate a merge) the file that CVS
1125 created will be overwritten.@refill
1129 @node Updating files, Tagging files, Invoking Ediff, Commands
1130 @section Updating files
1131 @findex cvs-mode-update
1132 @cindex Updating files
1133 @kindex O - update files
1137 Update all selected files with status @samp{Need-update} by running
1138 @samp{cvs update} on them. (@code{cvs-mode-update}).
1142 @node Tagging files, Miscellaneous commands, Updating files, Commands
1143 @section Tagging files
1144 @findex cvs-mode-tag
1145 @findex cvs-mode-untag
1147 @cindex Tagging files
1148 @kindex M-t - repository tag files
1149 @kindex t - tag files
1150 @vindex cvs-invert-ignore-marks
1151 @vindex cvs-force-dir-tag
1155 Tag all selected files by running @samp{cvs tag} on
1156 them. (@code{cvs-mode-tag}). It's usually preferable to tag directories
1157 at a time. Rather than selecting all files (which too often doesn't
1158 select all files but only the few that are displayed), clear the
1159 selection with @kbd{M-DEL} (@code{cvs-mode-unmark-all-files}), position
1160 the cursor on the directory you want to tag and hit @kbd{t}.
1164 By default, @samp{tag} commands ignore the marks. This can be changed
1165 with @code{cvs-invert-ignore-marks}. Also by default @samp{tag} can
1166 only be applied to directories, see @code{cvs-force-dir-tag} if you want
1167 to change this behavior.
1170 @node Miscellaneous commands, , Tagging files, Commands
1171 @section Miscellaneous commands
1172 @findex cvs-mode-byte-compile-files
1173 @cindex Recompiling elisp files
1174 @cindex Byte compilation
1175 @findex cvs-mode-delete-lock
1176 @cindex Getting rid of lock files
1178 @kindex q - quit PCL-CVS
1179 @findex cvs-mode-quit
1187 @item M-x cvs-mode-byte-compile-files
1188 Byte compile all selected files that end in .el.
1190 @item M-x cvs-mode-delete-lock
1191 This command deletes the lock files that
1192 the *cvs* buffer informs you about. You should normally never have to
1193 use this command since CVS tries very carefully to always remove the
1196 You can only use this command when a message in the *cvs* buffer tells
1197 you so. You should wait a while before using this command in case
1198 someone else is running a cvs command.
1200 Also note that this only works if the repository is local.
1204 Show a summary of common command key bindings in the echo
1205 area. (@code{cvs-help}).
1208 Quit PCL-CVS, killing the @samp{*cvs*} buffer. (@code{cvs-mode-quit}).
1212 @node Log Edit Mode, Log View Mode, Commands, Top
1213 @chapter Editing a Log Message
1215 @node Log View Mode, CVS Status Mode, Log Edit Mode, Top
1216 @chapter Browsing a Log of Changes
1218 @node CVS Status Mode, Customization, Log View Mode, Top
1219 @chapter Viewing CVS' Status output
1221 @node Customization, Bugs, CVS Status Mode, Top
1222 @chapter Customization
1223 @vindex log-edit-changelog-full-paragraphs (variable)
1224 @vindex cvs-auto-remove-handled (variable)
1225 @vindex cvs-auto-remove-directories (variable)
1226 @vindex cvs-update-prog-output-skip-regexp (variable)
1227 @vindex cvs-cvsroot (variable)
1228 @vindex cvs-auto-revert (variable)
1229 @vindex log-edit-require-final-newline (variable)
1230 @vindex cvs-sort-ignore-file (variable)
1231 @cindex Customization
1232 @cindex Variables, list of all
1233 @cindex Erasing the input buffer
1234 @cindex Context diff, how to get
1235 @cindex Unidiff, how to get
1236 @cindex Automatically remove handled files
1237 @cindex -u option in modules file
1238 @cindex Modules file (-u option)
1239 @cindex Update program (-u option in modules file)
1240 @cindex Reverting buffers after commit
1241 @cindex Require final newline
1242 @cindex Automatically inserting newline
1243 @cindex Commit message, inserting newline
1244 @cindex Sorting the .cvsignore file
1245 @cindex .cvsignore file, sorting
1246 @cindex Automatically sorting .cvsignore
1248 If you have an idea about any customization that would be handy but
1249 isn't present in this list, please tell me!
1250 For info on how to reach me, see @xref{Bugs}.@refill
1253 @item cvs-auto-remove-handled
1254 If this variable is set to any non-@code{nil} value
1255 @samp{cvs-mode-remove-handled} will be called every time you check in
1256 files, after the check-in is ready. @xref{Removing handled
1259 @item cvs-auto-remove-directories
1260 If this variable is set to any non-@code{nil} value, directories that do
1261 not contain any files to be checked in will not be listed in the
1262 @samp{*cvs*} buffer.@refill
1264 @item cvs-auto-revert
1265 If this variable is set to any non-@samp{nil} value any buffers you have
1266 that visit a file that is committed will be automatically reverted.
1267 This variable defaults to @samp{t}. @xref{Committing changes}.@refill
1269 @item cvs-update-prog-output-skip-regexp
1270 The @samp{-u} flag in the @file{modules} file can be used to run a command
1271 whenever a @samp{cvs update} is performed (see cvs(5)). This regexp
1272 is used to search for the last line in that output. It is normally set
1273 to @samp{"$"}. That setting is only correct if the command outputs
1274 nothing. Note that PCL-CVS will get very confused if the command
1275 outputs @emph{anything} to @samp{stderr}.
1278 This variable can be set to override @samp{CVSROOT}. It should be a
1279 string. If it is set then every time a cvs command is run it will be
1280 called as @samp{cvs -d @var{cvs-cvsroot}@dots{}} This can be useful if
1281 your site has several repositories.
1283 @item log-edit-require-final-newline
1284 When you enter a log message in the @samp{*cvs-commit-message*} buffer
1285 PCL-CVS will normally automatically insert a trailing newline, unless
1286 there already is one. This behavior can be controlled via
1287 @samp{cvs-commit-buffer-require-final-newline}. If it is @samp{t} (the
1288 default behavior), a newline will always be appended. If it is
1289 @samp{nil}, newlines will never be appended. Any other value causes
1290 PCL-CVS to ask the user whenever there is no trailing newline in the
1291 commit message buffer.
1293 @item log-edit-changelog-full-paragraphs
1294 If this variable is non-@code{nil}, include full ChangeLog paragraphs in
1295 the CVS log created by @samp{cvs-mode-changelog-commit}.
1296 This may be set in the local variables section of a ChangeLog, to
1297 indicate the policy for that ChangeLog.
1299 A ChangeLog paragraph is a bunch of log text containing no blank lines;
1300 a paragraph usually describes a set of changes with a single purpose,
1301 but perhaps spanning several functions in several files. Changes in
1302 different paragraphs are unrelated.
1304 You could argue that the CVS log entry for a file should contain the
1305 full ChangeLog paragraph mentioning the change to the file, even though
1306 it may mention other files, because that gives you the full context you
1307 need to understand the change. This is the behavior you get when this
1308 variable is set to t, the default.
1310 On the other hand, you could argue that the CVS log entry for a change
1311 should contain only the text for the changes which occurred in that
1312 file, because the CVS log is per-file. This is the behavior you get
1313 when this variable is set to nil.
1315 @item cvs-sort-ignore-file
1316 If this variable is set to any non-@samp{nil} value the
1317 @file{.cvsignore} will always be sorted whenever you use
1318 @samp{cvs-mode-ignore} to add a file to it. This option is on by
1325 * Customizing Faces::
1328 @node Customizing Faces, , Customization, Customization
1329 @section Customizing Faces
1330 @vindex cvs-header-face (face)
1331 @vindex cvs-filename-face (face)
1332 @vindex cvs-unknown-face (face)
1333 @vindex cvs-handled-face (face)
1334 @vindex cvs-need-action-face (face)
1335 @vindex cvs-marked-face (face)
1337 The Emacs lisp file @file{pcl-cvs-xemacs.el} included with PCL-CVS adds
1338 a few extra features for XEmacs, including menus, mouse bindings, and
1339 fontification the the @samp{*cvs*} buffer. The faces defined for
1340 fontification are listed below:
1344 @item cvs-header-face
1345 This face is used to highlight directory changes.
1347 @item cvs-filename-face
1348 This face is used to highlight file names.
1350 @item cvs-unknown-face
1351 This face is used to highlight the status of files which are UNKNOWN.
1353 @item cvs-handled-face
1354 This face is used to highlight the status of files which are handled and
1355 need no further action.
1357 @item cvs-need-action-face
1358 This face is used to highlight the status of files which still need action.
1360 @item cvs-marked-face
1361 This face is used to highlight the marked file indicator (@samp{*}).
1366 @node Bugs, Function and Variable Index, Customization, Top
1367 @chapter Bugs (known and unknown)
1368 @cindex Reporting bugs and ideas
1369 @cindex Bugs, how to report them
1370 @cindex Author, how to reach
1371 @cindex Email to the author
1375 @cindex Problems, list of common
1377 If you find a bug or misfeature, don't hesitate to tell us! Send email
1378 to @samp{bugs-gnu-emacs@@gnu.org} which gatewayed to the newsgroup
1379 @samp{gnu.emacs.bugs}. Feature requests should also be sent there. We
1380 prefer discussing one thing at a time. If you find several unrelated
1381 bugs, please report them separately. If you are running PCL-CVS under
1382 XEmacs, you should also send a copy of bug reports to
1383 @samp{xemacs-beta@@xemacs.org}.
1385 If you have problems using PCL-CVS or other questions,
1386 @samp{help-gnu-emacs@@gnu.org} also gatewayed to @samp{gnu.emacs.help}
1387 is a good place to get help as well as @samp{cvs-info@@gnu.org}
1388 yet again gatewayed to @samp{gnu.cvs.help}.
1390 If you have ideas for improvements, or if you have written some
1391 extensions to this package, we would like to hear from you. We hope that
1392 you find this package useful!
1394 Below is a partial list of currently known problems with PCL-CVS version
1398 @item Unexpected output from CVS
1399 Unexpected output from CVS may confuse PCL-CVS. It will create
1400 warning messages in the *cvs* buffer alerting you to any parse errors.
1401 If you get these messages, please send a bug report to the email
1402 addresses listed above. Include the contents of the *cvs* buffer, the
1403 output of the CVS process (which should be found in the *cvs-tmp* Emacs
1404 buffer), and the versions of Emacs, PCL-CVS and CVS you are using.
1408 @node Function and Variable Index, Concept Index, Bugs, Top
1409 @unnumbered Function and Variable Index
1413 @node Concept Index, Key Index, Function and Variable Index, Top
1414 @unnumbered Concept Index
1418 @node Key Index, , Concept Index, Top
1419 @unnumbered Key Index
1423 @setchapternewpage odd