1 \input texinfo @c -*-texinfo-*-
3 @c "@(#)$Name: $:$Id: pcl-cvs.texi,v 1.3 2000/07/03 13:45:58 gerd 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 make and distribute verbatim copies of
39 this manual provided the copyright notice and this permission notice
40 are preserved on all copies.
43 Permission is granted to process this file through Tex and print the
44 results, provided the printed document carries copying permission
45 notice identical to this one except for the removal of this paragraph
46 (this paragraph not being relevant to the printed manual).
49 Permission is granted to copy and distribute modified versions of this
50 manual under the conditions for verbatim copying, provided also that the
51 section entitled ``GNU General Public License'' is included exactly as
52 in the original, and provided that the entire resulting derived work is
53 distributed under the terms of a permission notice identical to this one.
55 Permission is granted to copy and distribute translations of this manual
56 into another language, under the above conditions for modified versions,
57 except that the section entitled ``GNU General Public License'' and
58 this permission notice may be included in translations approved by the
59 Free Software Foundation instead of in the original English.
63 @c The titlepage section does not appear in the Info file.
66 @c The title is printed in a large font.
67 @center @titlefont{User's Guide}
69 @center @titlefont{to}
71 @center @titlefont{PCL-CVS --- The Emacs Front-End to CVS}
78 @center Per Cederqvist
79 @center Stefan Monnier
82 @c The following two commands start the copyright page
83 @c for the printed manual. This will not appear in the Info file.
85 @vskip 0pt plus 1filll
86 Copyright @copyright{} 1991-2000 Free Software Foundation, Inc.
88 Permission is granted to make and distribute verbatim copies of
89 this manual provided the copyright notice and this permission notice
90 are preserved on all copies.
92 Permission is granted to copy and distribute modified versions of this
93 manual under the conditions for verbatim copying, provided also that the
94 section entitled ``GNU General Public License'' is included exactly as
95 in the original, and provided that the entire resulting derived work is
96 distributed under the terms of a permission notice identical to this one.
98 Permission is granted to copy and distribute translations of this manual
99 into another language, under the above conditions for modified versions,
100 except that the section entitled ``GNU General Public License'' and
101 this permission notice may be included in translations approved by the
102 Free Software Foundation instead of in the original English.
105 @c ================================================================
106 @c The real text starts here
107 @c ================================================================
109 @node Top, About PCL-CVS, (dir), (dir)
113 This info manual describes PCL-CVS, the GNU Emacs front-end to CVS. It
114 is nowhere near complete, so you are advised to use @kbd{M-x
115 customize-group RET pcl-cvs RET} and to look at the documentation strings
116 of the various commands and major modes for further information.
117 @c This manual is updated to release 2.5 of PCL-CVS.
121 * About PCL-CVS:: Installation, credits, history, ...
123 * Getting started:: An introduction with a walk-through example.
124 * Buffer contents:: An explanation of the buffer contents.
125 * Selected files:: To which files are commands applied.
126 * Commands:: All commands, grouped by type.
128 * Log Edit Mode:: Major mode to edit log messages.
129 * Log View Mode:: Major mode to browse log changes.
130 * CVS Status Mode:: Major mode to view CVS' status output.
131 * Customization:: How you can tailor PCL-CVS to suit your needs.
132 * Bugs:: Bugs (known and unknown).
134 * Function and Variable Index:: List of functions and variables.
135 * Concept Index:: List of concepts.
136 * Key Index:: List of keystrokes.
139 --- The Detailed Node Listing ---
143 * Contributors:: Contributors to PCL-CVS.
148 * Entering PCL-CVS:: Commands to invoke PCL-CVS
149 * Setting flags:: Setting flags for CVS commands
150 * Updating the buffer::
151 * Movement commands:: How to move up and down in the buffer
152 * Marking files:: How to mark files that other commands
153 will later operate on.
154 * Committing changes:: Checking in your modifications to the
156 * Editing files:: Loading files into Emacs.
157 * Getting info about files:: Display the log and status of files.
158 * Adding and removing files:: Adding and removing files
159 * Undoing changes:: Undoing changes
160 * Removing handled entries:: Uninteresting lines can easily be removed.
161 * Ignoring files:: Telling CVS to ignore generated files.
162 * Viewing differences:: Commands to @samp{diff} different versions.
163 * Invoking Ediff:: Running @samp{ediff} from @samp{*cvs*} buffer.
164 * Updating files:: Updating files that Need-update.
165 * Tagging files:: Tagging files.
166 * Miscellaneous commands:: Miscellaneous commands.
170 * Customizing Faces::
175 @node About PCL-CVS, Getting started, Top, Top
176 @chapter About PCL-CVS
177 @cindex About PCL-CVS
179 PCL-CVS is a front-end to CVS versions 1.9 and later.
180 It concisely shows the present status of a checked out module in an
181 Emacs buffer and provides single-key access to the most frequently used CVS
183 For Emacs users accustomed to VC, PCL-CVS can be thought of as a replacement
184 for VC-dired (@pxref{(emacs)VC Dired Mode}) specifically designed for CVS.
186 PCL-CVS was originally written many years ago by Per Cederqvist who
187 proudly maintained it until January 1996, at which point he released the
188 beta version 2.0b2 and passed on the maintainership to Greg A Woods.
189 Development stayed mostly dormant for a few years during which the
190 version 2.0 never seemed to be able to leave the ``beta'' stage while a
191 separate XEmacs version was slowly splitting away. In late 1998,
192 Stefan Monnier picked up development again, adding some major new
193 functionality and taking over maintenance.
195 As of Emacs-21, PCL-CVS is part of the standard Emacs distribution.
198 * Contributors:: Contributors to PCL-CVS.
202 @node Contributors, Installation, About PCL-CVS, About PCL-CVS
203 @section Contributors to PCL-CVS
207 Contributions to the package are welcome. I have limited time to work
208 on this project, but I will gladly add any code that you contribute to
209 me to this package (@pxref{Bugs}).
211 The following persons have made contributions to PCL-CVS.
215 Brian Berliner wrote CVS, together with some other contributors.
216 Without his work on CVS this package would be useless@dots{}
219 Per Cederqvist wrote most of the otherwise unattributed functions in
220 PCL-CVS as well as all documentation.
223 Inge Wallin (@samp{inge@@lysator.liu.se}) wrote the skeleton to
224 @file{pcl-cvs.texi}, and gave useful comments on it. He also wrote
225 the files @file{elib-node.el} and @file{compile-all.el}. The file
226 @file{cookie.el} was inspired by Inge.@refill
229 Linus Tolke (@samp{linus@@lysator.liu.se}) contributed useful comments
230 on both the functionality and the documentation.@refill
233 Jamie Zawinski (@samp{jwz@@jwz.com}) contributed
234 @file{pcl-cvs-lucid.el}, which was later renamed to
235 @file{pcl-cvs-xemacs.el}.@refill
238 Leif Lonnblad contributed RCVS support. (Since superceded by the new
242 Jim Blandy (@samp{jimb@@cyclic.com}) contributed hooks to automatically
243 guess CVS log entries from ChangeLog contents; and initial support of
244 the new Cygnus / Cyclic remote CVS; as well as various sundry bug fixes
248 Jim Kingdon (@samp{kingdon@@cyclic.com}) contributed lots of fixes to
249 the build and install procedure.
252 Greg A. Woods (@samp{woods@@weird.com}) contributed code to implement
253 the use of per-file diff buffers; and vendor join diffs with emerge and
254 ediff; as well as various and sundry bug fixes and cleanups.
257 Greg Klanderman (@samp{greg.klanderman@@alum.mit.edu}) implemented
258 toggling of marked files; setting of CVS command flags via prefix
259 arguments; updated the XEmacs support; updated the manual; and fixed
263 Stefan Monnier (@samp{monnier@@cs.yale.edu}) added a slew of other
264 features and introduced even more new bugs. If there's any bug left,
265 you can be sure it's his.
268 Masatake YAMATO (@samp{masata-y@@is.aist-nara.ac.jp}) graciously
269 contributed the cvstree code to display a tree of tags which was later
270 superseded by the new cvs-status-mode.
274 Apart from these, a lot of people have sent us suggestions, ideas,
275 requests, bug reports and encouragement. Thanks a lot! Without you
276 there would be no new releases of PCL-CVS.
279 @node Installation, , Contributors, About PCL-CVS
280 @section Installation
283 As mentioned above, PCL-CVS comes preinstalled since Emacs-21.
284 If you're using Emacs 20, you can download an older version of PCL-CVS
285 from @url{ftp://flint.cs.yale.edu/pub/monnier/pcl-cvs}. That version
286 also works on XEmacs.
288 If you are running XEmacs 21.0 or later, PCL-CVS is available in
289 pre-compiled package form. Please refer to the XEmacs manual for
290 instructions regarding package selection and installation. Currently,
291 that PCL-CVS package also requires you to have installed the xemacs-base,
292 elib, and dired packages.
294 If you have @TeX{} installed at your site, you can make a typeset manual
295 from @file{pcl-cvs.texi}.
299 Run @TeX{} by typing @samp{texi2dvi pcl-cvs.texi}.
301 Convert the resulting device independent file @file{pcl-cvs.dvi} to a
302 form which your printer can output and print it. If you have a
303 postscript printer there is a program, @code{dvi2ps}, which does. There
304 is also a program which comes together with @TeX{}, @code{dvips}, which
309 @node Getting started, Buffer contents, About PCL-CVS, Top
310 @chapter Getting started
314 This document assumes that you know what CVS is, and that you at least
315 know the fundamental concepts of CVS. If that is not the case you
316 should read the man page for CVS.
318 PCL-CVS is only useful once you have checked out a module. So before
319 you invoke it you must have a copy of a module somewhere in the file
322 You can invoke PCL-CVS by typing @kbd{M-x cvs-examine RET}.
323 You can also invoke it via the menubar, under Tools.
324 Or if you prefer, you can also invoke PCL-CVS by simply visiting the
325 CVS administrative subdirectory of your module, with a prefix argument.
326 F.ex. @kbd{C-u C-x 5 f ~/my/project/CVS RET}.
328 The function @code{cvs-examine} will ask for a directory. The command
329 @samp{cvs -n update} will be run in that directory. (It should contain
330 files that have been checked out from a CVS archive.) The output from
331 @code{cvs} will be parsed and presented in a table in a buffer called
332 @samp{*cvs*}. It might look something like this:
335 Repository : /usr/CVSroot
337 Working dir: /users/ceder/FOO/test
348 --------------------- End ---------------------
349 -- last cmd: cvs -f -z6 -n update -d -P --
352 In this example, your repository is in @file{/usr/CVSroot} and CVS has
353 been run in the directory @file{/users/ceder/FOO/test}. The three files
354 (@file{bar}, @file{file.txt} and
355 @file{newer}) that are marked with @samp{Need-Update} have been changed
356 by someone else in the CVS repository. Two files (@file{namechange}
357 and @file{sub/ChangeLog}) have been modified locally, and need to be
360 You can move the cursor up and down in the buffer with @kbd{C-n} and
361 @kbd{C-p} or @kbd{n} and @kbd{p}. If you press @kbd{c} on one of the
362 @samp{Modified} files that file will be checked in to the CVS
363 repository. @xref{Committing changes}. You can also press @kbd{O} to
364 update any of the files that are marked @samp{Need-Update}. You can
365 also run @kbd{M-x cvs-update RET} (bound to @kbd{M-u} in the
366 @samp{*cvs*} buffer) to update all the files.@refill
368 You can then press @kbd{=} to easily get a @samp{diff} between your
369 modified file and the base version that you started from or you can
370 press @kbd{l} to get the output from @samp{cvs log}. Many more such
371 commands are available simply by pressing a key (@pxref{Getting info
374 @node Buffer contents, Selected files, Getting started, Top
375 @chapter Buffer contents
376 @cindex Buffer contents
378 The display contains several columns, some of which are optional.
379 They contain, from left to right:
384 Optionally, the head revision of the file. This is the latest version
385 found in the repository. It might also contain (instead of the head
386 revision) a sub status which typically gives further information about
387 how we got to the current state, for example @samp{patched},
391 An asterisk when the file is @dfn{marked} (@pxref{Selected
395 The actual status of the file wrt to the repository. @xref{Buffer
396 contents}, for more information.@refill
399 Optionally, the base revision of the file. This is the version
400 which the copy in your working directory is based upon.
407 The @samp{file status} field can have the following values:
412 The file is modified in your working directory, and there was no
413 modification to the same file in the repository. This status can have
414 the following substatus:
419 The file was modified in your working directory, and there were
420 modifications in the repository as well, but they were merged
421 successfully, without conflict, in your working directory.@refill
426 A conflict was detected while trying to merge your changes to @var{file}
427 with changes from the repository. @var{file} (the copy in your
428 working directory) is now the output of the @samp{rcsmerge} command on
429 the two versions; an unmodified copy of your file is also in your
430 working directory, with the name @file{.#@var{file}.@var{version}},
431 where @var{version} is the RCS revision that your modified file started
432 from. @xref{Viewing differences}, for more details.@refill
434 A conflict can also come from a disagreement on the existence of the file
435 rather than on its content. This case is indicated by the following
441 The file is locally removed but a new revision has been committed to
442 the repository by someone else.
445 The file is locally added and has also been added to the repository
449 The file is locally modified but someone else has removed it from the
455 The file has been added by you, but it still needs to be checked in to
456 the repository.@refill
459 The file has been removed by you, but it still needs to be checked in to
460 the repository. You can resurrect it by typing @kbd{a} (@pxref{Adding
461 and removing files}).@refill
464 A file that was detected in your directory, but that neither appears in
465 the repository, nor is present on the list of files that CVS should
469 The file is up to date with respect to the version in the repository.
470 This status can have a substatus of:
475 You have just added the file to the repository.@refill
478 The file was brought up to date with respect to the repository. This is
479 done for any file that exists in the repository but not in your source,
480 and for files that you haven't changed but are not the most recent
481 versions available in the repository.@refill
484 The file was brought up to date with respect to the remote repository by
485 way of fetching and applying a patch to the file in your source. This
486 is equivalent to @samp{updated} except that CVS decided to use a hopefully
487 more efficient method.@refill
490 You just committed the file.@refill
495 Either a newer version than the one in your source is available in the
496 repository and you have not modified your checked out version, or the
497 file exists in the repository but not in your source. Use
498 @samp{cvs-mode-update} bound to @kbd{O} to update the file.@refill
501 You have modified the checked out version of the file, and a newer
502 version is available in the repository. A merge will take place when
503 you run a @samp{cvs-update}.
506 The file has been unexpectedly removed from your working directory
507 although it has not been @samp{cvs remove}d.
511 @node Selected files, Commands, Buffer contents, Top
512 @chapter Selected files
513 @cindex Selected files
515 @cindex File selection
519 Many of the commands work on the current set of @dfn{selected} files
520 which can be either the set of marked files (if any file is marked and
521 marks are no ignored) or whichever file or directory the cursor is on.
523 If a directory is selected but the command cannot be applied to a
524 directory, then it will be applied to the set of files under this
525 directory which are in the @samp{*cvs*} buffer.
527 Furthermore, each command only operates on a subset of the selected
528 files, depending on whether or not the command is @dfn{applicable} to
529 each file (based on the file's status). For example,
530 @code{cvs-mode-commit} is not applicable to a file whose status is
531 @samp{Need-Update}. If it should happen that PCL-CVS guesses the
532 applicability wrong, you can override it with the special prefix
533 @code{cvs-mode-force-command} normally bound to @kbd{M-f} (and file a
534 bug report). The applicability rule can be slightly changed with
535 @code{cvs-allow-dir-commit} and @code{cvs-force-dir-tag}.
537 By default, marks are always in effect (you may change this, however, by
538 setting the variable @code{cvs-default-ignore-marks}) except for the
539 commands that @samp{tag} or @samp{diff} a file (which can be changed
540 with the variable @code{cvs-invert-ignore-marks}).
542 In addition, you may use the special prefix @code{cvs-mode-toggle-marks}
543 normally bound to @key{T} to toggle the use of marks for the following
546 This scheme might seem a little complicated, but once one gets used to
547 it, it is quite powerful.
549 For commands to mark and unmark files, see @xref{Marking files}.
551 @node Commands, Log Edit Mode, Selected files, Top
555 This chapter describes all the commands that you can use in PCL-CVS.
558 The nodes in this menu contains explanations about all the commands that
559 you can use in PCL-CVS. They are grouped together by type.
563 * Entering PCL-CVS:: Commands to invoke PCL-CVS
564 * Setting flags:: Setting flags for CVS commands
565 * Updating the buffer::
566 * Movement commands:: How to move up and down in the buffer
567 * Marking files:: How to mark files that other commands
568 will later operate on.
569 * Committing changes:: Checking in your modifications to the
571 * Editing files:: Loading files into Emacs.
572 * Getting info about files:: Display the log and status of files.
573 * Adding and removing files:: Adding and removing files
574 * Undoing changes:: Undoing changes
575 * Removing handled entries:: Uninteresting lines can easily be removed.
576 * Ignoring files:: Telling CVS to ignore generated files.
577 * Viewing differences:: Commands to @samp{diff} different versions.
578 * Invoking Ediff:: Running @samp{ediff} from @samp{*cvs*} buffer.
579 * Updating files:: Updating files that Need-update.
580 * Tagging files:: Tagging files.
581 * Miscellaneous commands:: Miscellaneous commands.
585 @node Entering PCL-CVS, Setting flags, Commands, Commands
586 @section Entering PCL-CVS
591 @findex cvs-mode-delete-lock
592 @cindex Getting the *cvs* buffer
594 Most commands in PCL-CVS require that you have a @samp{*cvs*}
595 buffer. The commands that you use to get one are listed below.
596 For each, a @samp{cvs} process will be run, the output will be parsed by
597 PCL-CVS, and the result will be printed in the @samp{*cvs*} buffer (see
598 @pxref{Buffer contents} for a description of the contents).@refill
603 Run a @samp{cvs update} command. You will be asked for the directory
604 in which the @samp{cvs update} will be run.@refill
606 @item M-x cvs-examine
607 Run a @samp{cvs -n update} command. This is identical to the previous
608 command, except that it will only check what needs to be done but will
609 not change anything. You will be asked for the directory in
610 which the @samp{cvs -n update} will be run.@refill
613 Run a @samp{cvs status} command. You will be asked for the directory
614 in which the @samp{cvs status} will be run.@refill
616 @item M-x cvs-checkout
617 Run a @samp{cvs checkout} command. You will be asked for the directory
618 in which the @samp{cvs update} will be run and the module to be checked
622 @item M-x cvs-quickdir
623 Populate the @samp{*cvs*} buffer by just looking at the @file{CVS/Entries}
624 files. This is very much like @code{cvs-examine} except that it does
625 not access the CVS repository which is a major advantage when the
626 repository is far away. But of course, it will not be able to detect
627 when a file needs to be updated or merged.
633 Those commands are also reachable from the menubar
634 under @samp{Tools->PCL-CVS}. Finally an alternative way is to visit
635 with the CVS administrative subdirectory in your work area with a simple
636 prefix argument. For example @kbd{C-u C-x C-f ~/my/work/CVS RET}. This
637 will by default run @code{cvs-examine} but the specific behavior can be
638 changed with @code{cvs-dired-action} and @code{cvs-dired-use-hook}.
640 By default, the commands above will descend recursively into
641 subdirectories. You can avoid that behavior by including @samp{-l} in
642 the flags for the command. These flags can be set by giving a prefix
643 argument to the command (e.g., by typing
644 @kbd{C-u M-x cvs-update RET -l RET}).
648 @node Setting flags, Updating the buffer, Entering PCL-CVS, Commands
649 @section Setting flags for CVS commands
650 @cindex Special prefix
652 This section describes the convention used by nearly all PCL-CVS
653 commands for setting optional flags sent to CVS. A single @kbd{C-u}
654 prefix argument is used to cause the command to prompt for flags to be
655 used for the current invocation of the command only. Two @kbd{C-u} prefix
656 arguments are used to prompt for flags which will be set permanently, for the
657 current invocation and all that follow, until the flags are changed, or
658 unless temporary flags are set which override them.
660 Perhaps an example or two is in order. Say you are about to add a
661 binary file to the repository, and want to specify the flags @samp{-kb}
662 to @samp{cvs add}. You can type @kbd{C-u a -kb RET}, enter the
663 description, and the file will be added. Subsequent adds will use the
664 previously prevailing flags.
666 As a second example, say you are about to perform a diff and want to see
667 the result in unified diff format, i.e. you'd like to pass the flag
668 @samp{-u} to both @samp{cvs diff} and @samp{diff}. You'd also like all
669 subsequent diffs to use this flag. You can type @kbd{C-u C-u = -u RET}
670 and the diff will be performed, and the default flags will be set to
671 @code{("-u")}. You can of course override this flag for a single diff
672 by using a single @kbd{C-u} prefix argument.
674 Additionally to this, some commands can take @dfn{special prefix} arguments.
675 These work as follows: when called with a @kbd{C-u} prefix, the user is
676 prompted for a new value of the special prefix and the special prefix is
677 activated for the next command. When called without the @kbd{C-u}
678 prefix, the special prefix is re-activated (with the same value as last
679 time) for the next command. Calling the prefix command again when it's
680 already activated deactivates it. Calling it with the @kbd{C-u C-u}
681 prefix activates it for all subsequent commands until you deactivate it
682 explicitly. The special prefixes are:
687 Toggles whether or not marks will be active in the next command.@refill
690 Provide the next command with a branch (can be any version
691 specifier) to work on.@refill
694 Secondary branch argument. Only meaningful if `b' is also used.
695 It can be used to provide a second branch argument to
696 @code{cvs-mode-diff} or to @code{cvs-mode-update}.
699 Forces the next command to apply to every selected file rather than only
700 to the ones PCL-CVS thinks are relevant.
704 @node Updating the buffer, Movement commands, Setting flags, Commands
705 @section Updating the @samp{*cvs*} buffer
709 @findex cvs-mode-update
710 @findex cvs-mode-examine
711 @findex cvs-mode-status
713 The following commands can be used from within the @samp{*cvs*} buffer
714 to update the display:
719 This runs the command @samp{cvs-update}.@refill
722 This runs the command @samp{cvs-examine}.@refill
725 This runs the command @samp{cvs-status}.@refill
729 Additionally to the above commands which operate on the whole module,
730 you can run the equivalent CVS command on just a subset of the
731 files/directories with
736 Runs @code{cvs-mode-update} on the selected files. When run on the
737 top level directory, this is equivalent to @kbd{M-u}.@refill
740 Runs @code{cvs-mode-examine} on the selected files. When run on the
741 top level directory, this is equivalent to @kbd{M-e}.@refill
744 Runs @code{cvs-mode-status} on the selected files. When run on the
745 top level directory, this is equivalent to @kbd{M-s} except that
746 CVS output will be shown in a @samp{*cvs-info*} buffer that will be
747 put in @samp{cvs-status-mode}.@refill
752 @node Movement commands, Marking files, Updating the buffer, Commands
753 @section Movement Commands
754 @cindex Movement Commands
755 @findex cvs-mode-next-line
756 @findex cvs-mode-previous-line
757 @kindex SPC - Move down one file
758 @kindex n - Move down one file
759 @kindex p - Move up one file
761 You can use most normal Emacs commands to move forward and backward in
762 the buffer. Some keys are rebound to functions that take advantage of
763 the fact that the buffer is a PCL-CVS buffer:
769 These keys move the cursor one file forward, towards the end of the
770 buffer (@code{cvs-mode-next-line}).@refill
773 This key move one file backward, towards the beginning of the buffer
774 (@code{cvs-mode-previous-line}).
778 @node Marking files, Committing changes, Movement commands, Commands
779 @section Marking files
780 @cindex Selecting files (commands to mark files)
781 @cindex Marking files
782 @kindex m - marking a file
783 @kindex M - marking all files
784 @kindex u - unmark a file
785 @kindex ESC DEL - unmark all files
786 @kindex DEL - unmark previous file
787 @kindex % - mark files matching regexp
788 @kindex T - toggle marks
789 @findex cvs-mode-mark
790 @findex cvs-mode-unmark
791 @findex cvs-mode-mark-all-files
792 @findex cvs-mode-unmark-all-files
793 @findex cvs-mode-unmark-up
794 @findex cvs-mode-mark-matching-files
795 @findex cvs-mode-toggle-marks
797 PCL-CVS works on a set of @dfn{selected files} (@pxref{Selected files}).
798 You can mark and unmark files with these commands:
802 This marks the file that the cursor is positioned on. If the cursor is
803 positioned on a directory all files in that directory will be marked.
804 (@code{cvs-mode-mark}).@refill
807 Unmark the file that the cursor is positioned on. If the cursor is on a
808 directory, all files in that directory will be unmarked.
809 (@code{cvs-mode-unmark}).@refill
812 Mark @emph{all} files in the buffer (@code{cvs-mode-mark-all-files}).
815 Unmark @emph{all} files (@code{cvs-mode-unmark-all-files}).
818 Unmark the file on the previous line, and move point to that line
819 (@code{cvs-mode-unmark-up}).
822 Mark all files matching a regular expression
823 (@code{cvs-mode-mark-matching-files}).
826 Toggle use of marks for the next command (@code{cvs-mode-toggle-marks}).
830 @node Committing changes, Editing files, Marking files, Commands
831 @section Committing changes
832 @cindex Committing changes
834 @findex cvs-mode-commit
835 @findex cvs-mode-commit-setup
836 @kindex c - commit files
837 @kindex C - commit files with ChangeLog message
838 @vindex cvs-auto-revert (variable)
839 @cindex Commit buffer
841 @cindex Erasing commit message
842 @cindex Reverting buffers after commit
844 Committing changes basically works as follows:
848 After having selected the files you want to commit, you type either
849 @kbd{c} or @kbd{C} which brings up a special buffer
850 @samp{*cvs-commit*}.@refill
853 You type in the log message describing the changes you're about to
854 commit (@pxref{Log Edit Mode}).@refill
857 When you're happy with it, you type @kbd{C-c C-c} to do the actual
862 There's no hidden state, so you can abort the process or pick it up
865 The set of files actually committed is really decided only during the
866 very last step, which is mixed blessing. It allows you to go back and
867 change your mind about which files to commit, but it also means that you
868 might inadvertently change the set of selected files. To reduce the
869 risk of error, @kbd{C-c C-c} will ask for confirmation if the set of
870 selected files has changed between the first step and the last. You can
871 change this last detail with @code{log-edit-confirm}.
873 As for the difference between @kbd{c} (i.e. @code{cvs-mode-commit}) and
874 @kbd{C} (i.e. @code{cvs-mode-commit-setup}) is that the first gets you
875 straight to @samp{*cvs-commit*} without erasing it or changing anything
876 to its content, while the second will first erase @samp{*cvs-commit*}
877 and try to initialize it with a sane default (it will do that by either
878 using a template provided by the CVS administrator or by extracting a
879 relevant log message from a ChangeLog file).
881 If you are editing the files in your Emacs an automatic
882 @samp{revert-buffer} will be performed. (If the file contains
883 @samp{$@asis{Id}$} keywords @samp{cvs commit} will write a new file with
884 the new values substituted. The auto-revert makes sure that you get
885 them into your buffer). The revert will not occur if you have modified
886 your buffer, or if @samp{cvs-auto-revert} is set to
890 @node Editing files, Getting info about files, Committing changes, Commands
891 @section Editing files
892 @cindex Editing files
893 @cindex Finding files
894 @cindex Loading files
896 @cindex Invoking dired
897 @findex cvs-mode-find-file
898 @findex cvs-mode-find-file-other-window
899 @findex cvs-mode-add-change-log-entry-other-window
900 @kindex f - find file or directory
901 @kindex o - find file in other window
902 @kindex A - add ChangeLog entry
904 There are currently three commands that can be used to find a file (that
905 is, load it into a buffer and start editing it there). These commands
906 work on the line that the cursor is situated at. They always ignore any marked
911 Find the file that the cursor points to. Run @samp{dired}
913 (@pxref{Dired,,,Emacs})
915 if the cursor points to a directory (@code{cvs-mode-find-file}).@refill
918 Like @kbd{f}, but use another window
919 (@code{cvs-mode-find-file-other-window}).@refill
922 Invoke @samp{add-change-log-entry-other-window} to edit a
923 @samp{ChangeLog} file. The @samp{ChangeLog} will be found in the
924 directory or a parent of the directory of the file the cursor points to.
925 (@code{cvs-mode-add-change-log-entry-other-window}).@refill
929 @node Getting info about files, Adding and removing files, Editing files, Commands
930 @section Getting info about files
931 @cindex Status (cvs command)
932 @cindex Log (RCS/cvs command)
933 @cindex Getting status
934 @kindex l - run @samp{cvs log}
935 @kindex s - run @samp{cvs status}
937 @findex cvs-mode-status
941 Call the command @code{cvs-mode-log} which runs @samp{cvs log} on all
942 selected files, and show the result in a temporary @samp{*cvs-info*}
943 buffer (@pxref{Log View Mode}).
946 Call the command @code{cvs-mode-status} which runs @samp{cvs status} on
947 all selected files, and show the result in a temporary @samp{*cvs-info*}
948 buffer (@pxref{CVS Status Mode}).
952 @node Adding and removing files, Undoing changes, Getting info about files, Commands
953 @section Adding and removing files
955 @cindex Removing files
956 @cindex Resurrecting files
957 @cindex Deleting files
958 @cindex Putting files under CVS control
959 @kindex a - add a file
960 @kindex r - remove a file
962 @findex cvs-mode-remove-file
964 The following commands are available to make it easy to add and remove
965 files from the CVS repository.
969 Add all selected files. This command can be used on @samp{Unknown}
970 files (@pxref{Buffer contents}). The status of the file will change to
971 @samp{Added}, and you will have to use @kbd{c} (@samp{cvs-mode-commit},
972 @pxref{Committing changes}) to really add the file to the
975 This command can also be used on @samp{Removed} files (before you commit
976 them) to resurrect them.
978 The command that is run is @code{cvs-mode-add}.
981 This command removes the selected files (after prompting for
982 confirmation). The files are @samp{rm}ed from your directory and
983 (unless the status was @samp{Unknown}; @pxref{Buffer contents}) they will
984 also be @samp{cvs remove}d. If the files were @samp{Unknown} they will
985 disappear from the buffer. Otherwise their status will change to
986 @samp{Removed}, and you must use @kbd{c} (@samp{cvs-mode-commit},
987 @pxref{Committing changes}) to commit the removal.@refill
989 The command that is run is @code{cvs-mode-remove-file}.
993 @node Undoing changes, Removing handled entries, Adding and removing files, Commands
994 @section Undoing changes
996 @cindex Flush changes
997 @kindex U - undo changes
998 @findex cvs-mode-undo-local-changes
1002 If you have modified a file, and for some reason decide that you don't
1003 want to keep the changes, you can undo them with this command. It works
1004 by removing your working copy of the file and then getting the latest
1005 version from the repository (@code{cvs-mode-undo-local-changes}.
1009 @node Removing handled entries, Ignoring files, Undoing changes, Commands
1010 @section Removing handled entries
1011 @cindex Expunging uninteresting entries
1012 @cindex Uninteresting entries, getting rid of them
1013 @cindex Getting rid of uninteresting lines
1014 @cindex Removing uninteresting (processed) lines
1015 @cindex Handled lines, removing them
1016 @kindex x - remove processed entries
1017 @kindex C-k - remove selected entries
1018 @findex cvs-mode-remove-handled
1019 @findex cvs-mode-acknowledge
1020 @findex cvs-mode-ignore
1024 This command allows you to remove all entries that you have processed.
1025 More specifically, the lines for @samp{Up-to-date} files (@pxref{Buffer
1026 contents} are removed from the buffer. If a directory becomes empty the heading
1027 for that directory is also removed. This makes it easier to get an
1028 overview of what needs to be done.
1030 The command is called @code{cvs-mode-remove-handled}. If
1031 @samp{cvs-auto-remove-handled} is set to non-@code{nil} this will
1032 automatically be performed after every commit.@refill
1035 This command can be used for lines that @samp{cvs-mode-remove-handled} would
1036 not delete, but that you want to delete (@code{cvs-mode-acknowledge}).
1040 @node Ignoring files, Viewing differences, Removing handled entries, Commands
1041 @section Ignoring files
1042 @kindex i - ignoring files
1043 @findex cvs-mode-ignore
1047 Arrange so that CVS will ignore the selected files. The file names are
1048 added to the @file{.cvsignore} file in the corresponding directory. If
1049 the @file{.cvsignore} doesn't exist it will be created.
1051 The @file{.cvsignore} file should normally be added to the repository,
1052 but you could ignore it also if you like it better that way.
1054 This runs @code{cvs-mode-ignore}.
1057 @node Viewing differences, Invoking Ediff, Ignoring files, Commands
1058 @section Viewing differences
1060 @cindex Invoking ediff
1061 @cindex Conflicts, how to resolve them
1062 @cindex Viewing differences
1063 @kindex d= - run @samp{cvs diff}
1064 @kindex = - run @samp{cvs diff}
1065 @kindex dh - diff against head of repository
1066 @kindex dv - diff against vendor branch
1067 @findex cvs-mode-diff
1068 @findex cvs-mode-diff-backup
1069 @findex cvs-mode-diff-head
1070 @findex cvs-mode-diff-vendor
1071 @vindex cvs-invert-ignore-marks
1076 Display a @samp{cvs diff} between the selected files and the version
1077 that they are based on. (@code{cvs-mode-diff}).@refill
1080 If CVS finds a conflict while merging two versions of a file (during a
1081 @samp{cvs update}, @pxref{Updating the buffer}) it will save the
1082 original file in a file called @file{.#@var{FILE}.@var{VERSION}} where
1083 @var{FILE} is the name of the file, and @var{VERSION} is the revision
1084 number that your file was based on.@refill
1086 With the @kbd{b} command you can run a @samp{diff} on the files
1087 @file{.#@var{FILE}.@var{VERSION}} and @file{@var{FILE}}.@refill
1090 Display a @samp{cvs diff} between the selected files and the head
1091 revision in the repository (the most recent version on the current
1092 branch). (@code{cvs-mode-diff-head}).@refill
1095 Display a @samp{cvs diff} between the selected files and the head
1096 revision of the vendor branch in the repository.
1097 (@code{cvs-mode-diff-vendor}).@refill
1101 By default, @samp{diff} commands ignore the marks. This can be changed
1102 with @code{cvs-invert-ignore-marks}.
1104 @node Invoking Ediff, Updating files, Viewing differences, Commands
1105 @section Running ediff
1107 @cindex Invoking ediff
1108 @cindex Viewing differences
1109 @cindex Conflicts, resolving
1110 @cindex Resolving conflicts
1111 @kindex e - invoke @samp{ediff}
1112 @findex cvs-mode-idiff
1113 @findex cvs-mode-imerge
1117 This command uses ediff (or emerge depending on
1118 @samp{cvs-idiff-imerge-handlers}) to allow you to view diffs.
1119 If a prefix argument is given, PCL-CVS will prompt for a revision against
1120 which the diff should be made, else the default will be to use the BASE
1124 This command use ediff (or emerge, see above) to allow you to do an
1125 interactive 3-way merge.
1127 @strong{Note:} When the file status is @samp{Conflict},
1128 CVS has already performed a merge. The resulting file is not used in
1129 any way if you use this command. If you use the @kbd{q} command inside
1130 @samp{ediff} (to successfully terminate a merge) the file that CVS
1131 created will be overwritten.@refill
1135 @node Updating files, Tagging files, Invoking Ediff, Commands
1136 @section Updating files
1137 @findex cvs-mode-update
1138 @cindex Updating files
1139 @kindex O - update files
1143 Update all selected files with status @samp{Need-update} by running
1144 @samp{cvs update} on them. (@code{cvs-mode-update}).
1148 @node Tagging files, Miscellaneous commands, Updating files, Commands
1149 @section Tagging files
1150 @findex cvs-mode-tag
1151 @findex cvs-mode-untag
1153 @cindex Tagging files
1154 @kindex M-t - repository tag files
1155 @kindex t - tag files
1156 @vindex cvs-invert-ignore-marks
1157 @vindex cvs-force-dir-tag
1161 Tag all selected files by running @samp{cvs tag} on
1162 them. (@code{cvs-mode-tag}). It's usually preferable to tag directories
1163 at a time. Rather than selecting all files (which too often doesn't
1164 select all files but only the few that are displayed), clear the
1165 selection with @kbd{M-DEL} (@code{cvs-mode-unmark-all-files}), position
1166 the cursor on the directory you want to tag and hit @kbd{t}.
1170 By default, @samp{tag} commands ignore the marks. This can be changed
1171 with @code{cvs-invert-ignore-marks}. Also by default @samp{tag} can
1172 only be applied to directories, see @code{cvs-force-dir-tag} if you want
1173 to change this behavior.
1176 @node Miscellaneous commands, , Tagging files, Commands
1177 @section Miscellaneous commands
1178 @findex cvs-mode-byte-compile-files
1179 @cindex Recompiling elisp files
1180 @cindex Byte compilation
1181 @findex cvs-mode-delete-lock
1182 @cindex Getting rid of lock files
1184 @kindex q - quit PCL-CVS
1185 @findex cvs-mode-quit
1193 @item M-x cvs-mode-byte-compile-files
1194 Byte compile all selected files that end in .el.
1196 @item M-x cvs-mode-delete-lock
1197 This command deletes the lock files that
1198 the *cvs* buffer informs you about. You should normally never have to
1199 use this command since CVS tries very carefully to always remove the
1202 You can only use this command when a message in the *cvs* buffer tells
1203 you so. You should wait a while before using this command in case
1204 someone else is running a cvs command.
1206 Also note that this only works if the repository is local.
1210 Show a summary of common command key bindings in the echo
1211 area. (@code{cvs-help}).
1214 Quit PCL-CVS, killing the @samp{*cvs*} buffer. (@code{cvs-mode-quit}).
1218 @node Log Edit Mode, Log View Mode, Commands, Top
1219 @chapter Editing a Log Message
1221 @node Log View Mode, CVS Status Mode, Log Edit Mode, Top
1222 @chapter Browsing a Log of Changes
1224 @node CVS Status Mode, Customization, Log View Mode, Top
1225 @chapter Viewing CVS' Status output
1227 @node Customization, Bugs, CVS Status Mode, Top
1228 @chapter Customization
1229 @vindex log-edit-changelog-full-paragraphs (variable)
1230 @vindex cvs-auto-remove-handled (variable)
1231 @vindex cvs-auto-remove-directories (variable)
1232 @vindex cvs-update-prog-output-skip-regexp (variable)
1233 @vindex cvs-cvsroot (variable)
1234 @vindex cvs-auto-revert (variable)
1235 @vindex log-edit-require-final-newline (variable)
1236 @vindex cvs-sort-ignore-file (variable)
1237 @cindex Customization
1238 @cindex Variables, list of all
1239 @cindex Erasing the input buffer
1240 @cindex Context diff, how to get
1241 @cindex Unidiff, how to get
1242 @cindex Automatically remove handled files
1243 @cindex -u option in modules file
1244 @cindex Modules file (-u option)
1245 @cindex Update program (-u option in modules file)
1246 @cindex Reverting buffers after commit
1247 @cindex Require final newline
1248 @cindex Automatically inserting newline
1249 @cindex Commit message, inserting newline
1250 @cindex Sorting the .cvsignore file
1251 @cindex .cvsignore file, sorting
1252 @cindex Automatically sorting .cvsignore
1254 If you have an idea about any customization that would be handy but
1255 isn't present in this list, please tell me!
1256 For info on how to reach me, see @xref{Bugs}.@refill
1259 @item cvs-auto-remove-handled
1260 If this variable is set to any non-@code{nil} value
1261 @samp{cvs-mode-remove-handled} will be called every time you check in
1262 files, after the check-in is ready. @xref{Removing handled
1265 @item cvs-auto-remove-directories
1266 If this variable is set to any non-@code{nil} value, directories that do
1267 not contain any files to be checked in will not be listed in the
1268 @samp{*cvs*} buffer.@refill
1270 @item cvs-auto-revert
1271 If this variable is set to any non-@samp{nil} value any buffers you have
1272 that visit a file that is committed will be automatically reverted.
1273 This variable defaults to @samp{t}. @xref{Committing changes}.@refill
1275 @item cvs-update-prog-output-skip-regexp
1276 The @samp{-u} flag in the @file{modules} file can be used to run a command
1277 whenever a @samp{cvs update} is performed (see cvs(5)). This regexp
1278 is used to search for the last line in that output. It is normally set
1279 to @samp{"$"}. That setting is only correct if the command outputs
1280 nothing. Note that PCL-CVS will get very confused if the command
1281 outputs @emph{anything} to @samp{stderr}.
1284 This variable can be set to override @samp{CVSROOT}. It should be a
1285 string. If it is set then every time a cvs command is run it will be
1286 called as @samp{cvs -d @var{cvs-cvsroot}@dots{}} This can be useful if
1287 your site has several repositories.
1289 @item log-edit-require-final-newline
1290 When you enter a log message in the @samp{*cvs-commit-message*} buffer
1291 PCL-CVS will normally automatically insert a trailing newline, unless
1292 there already is one. This behavior can be controlled via
1293 @samp{cvs-commit-buffer-require-final-newline}. If it is @samp{t} (the
1294 default behavior), a newline will always be appended. If it is
1295 @samp{nil}, newlines will never be appended. Any other value causes
1296 PCL-CVS to ask the user whenever there is no trailing newline in the
1297 commit message buffer.
1299 @item log-edit-changelog-full-paragraphs
1300 If this variable is non-@code{nil}, include full ChangeLog paragraphs in
1301 the CVS log created by @samp{cvs-mode-changelog-commit}.
1302 This may be set in the local variables section of a ChangeLog, to
1303 indicate the policy for that ChangeLog.
1305 A ChangeLog paragraph is a bunch of log text containing no blank lines;
1306 a paragraph usually describes a set of changes with a single purpose,
1307 but perhaps spanning several functions in several files. Changes in
1308 different paragraphs are unrelated.
1310 You could argue that the CVS log entry for a file should contain the
1311 full ChangeLog paragraph mentioning the change to the file, even though
1312 it may mention other files, because that gives you the full context you
1313 need to understand the change. This is the behavior you get when this
1314 variable is set to t, the default.
1316 On the other hand, you could argue that the CVS log entry for a change
1317 should contain only the text for the changes which occurred in that
1318 file, because the CVS log is per-file. This is the behavior you get
1319 when this variable is set to nil.
1321 @item cvs-sort-ignore-file
1322 If this variable is set to any non-@samp{nil} value the
1323 @file{.cvsignore} will always be sorted whenever you use
1324 @samp{cvs-mode-ignore} to add a file to it. This option is on by
1331 * Customizing Faces::
1334 @node Customizing Faces, , Customization, Customization
1335 @section Customizing Faces
1336 @vindex cvs-header-face (face)
1337 @vindex cvs-filename-face (face)
1338 @vindex cvs-unknown-face (face)
1339 @vindex cvs-handled-face (face)
1340 @vindex cvs-need-action-face (face)
1341 @vindex cvs-marked-face (face)
1343 The Emacs lisp file @file{pcl-cvs-xemacs.el} included with PCL-CVS adds
1344 a few extra features for XEmacs, including menus, mouse bindings, and
1345 fontification the the @samp{*cvs*} buffer. The faces defined for
1346 fontification are listed below:
1350 @item cvs-header-face
1351 This face is used to highlight directory changes.
1353 @item cvs-filename-face
1354 This face is used to highlight file names.
1356 @item cvs-unknown-face
1357 This face is used to highlight the status of files which are UNKNOWN.
1359 @item cvs-handled-face
1360 This face is used to highlight the status of files which are handled and
1361 need no further action.
1363 @item cvs-need-action-face
1364 This face is used to highlight the status of files which still need action.
1366 @item cvs-marked-face
1367 This face is used to highlight the marked file indicator (@samp{*}).
1372 @node Bugs, Function and Variable Index, Customization, Top
1373 @chapter Bugs (known and unknown)
1374 @cindex Reporting bugs and ideas
1375 @cindex Bugs, how to report them
1376 @cindex Author, how to reach
1377 @cindex Email to the author
1381 @cindex Problems, list of common
1383 If you find a bug or misfeature, don't hesitate to tell us! Send email
1384 to @samp{bugs-gnu-emacs@@gnu.org} which gatewayed to the newsgroup
1385 @samp{gnu.emacs.bugs}. Feature requests should also be sent there. We
1386 prefer discussing one thing at a time. If you find several unrelated
1387 bugs, please report them separately. If you are running PCL-CVS under
1388 XEmacs, you should also send a copy of bug reports to
1389 @samp{xemacs-beta@@xemacs.org}.
1391 If you have problems using PCL-CVS or other questions,
1392 @samp{help-gnu-emacs@@gnu.org} also gatewayed to @samp{gnu.emacs.help}
1393 is a good place to get help as well as @samp{cvs-info@@gnu.org}
1394 yet again gatewayed to @samp{gnu.cvs.help}.
1396 If you have ideas for improvements, or if you have written some
1397 extensions to this package, we would like to hear from you. We hope that
1398 you find this package useful!
1400 Below is a partial list of currently known problems with PCL-CVS version
1404 @item Unexpected output from CVS
1405 Unexpected output from CVS may confuse PCL-CVS. It will create
1406 warning messages in the *cvs* buffer alerting you to any parse errors.
1407 If you get these messages, please send a bug report to the email
1408 addresses listed above. Include the contents of the *cvs* buffer, the
1409 output of the CVS process (which should be found in the *cvs-tmp* Emacs
1410 buffer), and the versions of Emacs, PCL-CVS and CVS you are using.
1414 @node Function and Variable Index, Concept Index, Bugs, Top
1415 @unnumbered Function and Variable Index
1419 @node Concept Index, Key Index, Function and Variable Index, Top
1420 @unnumbered Concept Index
1424 @node Key Index, , Concept Index, Top
1425 @unnumbered Key Index
1429 @setchapternewpage odd