(Mail and Post): Update documentation for gnus-user-agent.
[bpt/emacs.git] / man / pcl-cvs.texi
CommitLineData
e9f75053 1\input texinfo @c -*-texinfo-*-
e9f75053
SM
2@c %**start of header
3@setfilename ../info/pcl-cvs
c3114036 4@settitle PCL-CVS --- Emacs Front-End to CVS
18f952d5 5@syncodeindex vr fn
e9f75053
SM
6@c %**end of header
7
18f952d5
KB
8@copying
9Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
62eda0e2
GM
101999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
11Foundation, Inc.
e9f75053 12
18f952d5 13@quotation
42664031 14Permission is granted to copy, distribute and/or modify this document
678e7c71 15under the terms of the GNU Free Documentation License, Version 1.2 or
42664031
SM
16any later version published by the Free Software Foundation; with the
17Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
18``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
19Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
20license is included in the section entitled ``GNU Free Documentation
21License'' in the Emacs manual.
22
23This document is part of a collection distributed under the GNU Free
24Documentation License. If you want to distribute this document
25separately from the collection, you can do so by adding a copy of the
26license to the document, as described in section 6 of the license.
27
28(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
29this GNU Manual, like GNU software. Copies published by the Free
30Software Foundation raise funds for GNU development.''
18f952d5
KB
31@end quotation
32@end copying
33
34@dircategory Emacs
35@direntry
36* PCL-CVS: (pcl-cvs). Emacs front-end to CVS.
37@end direntry
e9f75053 38
e9f75053
SM
39@c The titlepage section does not appear in the Info file.
40@titlepage
41@sp 4
42@c The title is printed in a large font.
43@center @titlefont{User's Guide}
44@sp
45@center @titlefont{to}
46@sp
bdb6b1e1 47@center @titlefont{PCL-CVS --- The Emacs Front-End to CVS}
59869d21 48@ignore
e9f75053
SM
49@sp 2
50@center release 2.9
51@c -release-
59869d21 52@end ignore
e9f75053
SM
53@sp 3
54@center Per Cederqvist
55@center Stefan Monnier
56@c -date-
57
58@c The following two commands start the copyright page
59@c for the printed manual. This will not appear in the Info file.
60@page
61@vskip 0pt plus 1filll
18f952d5 62@insertcopying
e9f75053
SM
63@end titlepage
64
65@c ================================================================
66@c The real text starts here
67@c ================================================================
68
69@node Top, About PCL-CVS, (dir), (dir)
18f952d5 70@ifnottex
e9f75053
SM
71@top PCL-CVS
72
11dac025 73This manual describes PCL-CVS, the GNU Emacs front-end to CVS. It
59869d21 74is nowhere near complete, so you are advised to use @kbd{M-x
11dac025 75customize-group RET pcl-cvs @key{RET}} and to look at the documentation strings
59869d21
SM
76of the various commands and major modes for further information.
77@c This manual is updated to release 2.5 of PCL-CVS.
18f952d5 78@end ifnottex
e9f75053
SM
79
80@menu
082760b1 81* About PCL-CVS:: Credits, history, @dots{}
e9f75053
SM
82
83* Getting started:: An introduction with a walk-through example.
84* Buffer contents:: An explanation of the buffer contents.
85* Selected files:: To which files are commands applied.
86* Commands:: All commands, grouped by type.
87
115209ba
DL
88* Log Edit Mode:: Major mode to edit log messages.
89* Log View Mode:: Major mode to browse log changes.
e7610308 90@c * CVS Status Mode:: Major mode to view CVS' status output.
e9f75053
SM
91* Customization:: How you can tailor PCL-CVS to suit your needs.
92* Bugs:: Bugs (known and unknown).
93
94* Function and Variable Index:: List of functions and variables.
95* Concept Index:: List of concepts.
96* Key Index:: List of keystrokes.
97
98@detailmenu
99 --- The Detailed Node Listing ---
100
101About PCL-CVS
102
103* Contributors:: Contributors to PCL-CVS.
e9f75053
SM
104
105Commands
106
107* Entering PCL-CVS:: Commands to invoke PCL-CVS
108* Setting flags:: Setting flags for CVS commands
177c0ea7 109* Updating the buffer::
e9f75053
SM
110* Movement commands:: How to move up and down in the buffer
111* Marking files:: How to mark files that other commands
112 will later operate on.
113* Committing changes:: Checking in your modifications to the
177c0ea7 114 CVS repository.
e9f75053
SM
115* Editing files:: Loading files into Emacs.
116* Getting info about files:: Display the log and status of files.
117* Adding and removing files:: Adding and removing files
118* Undoing changes:: Undoing changes
119* Removing handled entries:: Uninteresting lines can easily be removed.
120* Ignoring files:: Telling CVS to ignore generated files.
121* Viewing differences:: Commands to @samp{diff} different versions.
122* Invoking Ediff:: Running @samp{ediff} from @samp{*cvs*} buffer.
123* Updating files:: Updating files that Need-update.
124* Tagging files:: Tagging files.
125* Miscellaneous commands:: Miscellaneous commands.
126
127Customization
128
177c0ea7 129* Customizing Faces::
e9f75053
SM
130
131@end detailmenu
132@end menu
133
134@node About PCL-CVS, Getting started, Top, Top
135@chapter About PCL-CVS
136@cindex About PCL-CVS
137
138PCL-CVS is a front-end to CVS versions 1.9 and later.
139It concisely shows the present status of a checked out module in an
140Emacs buffer and provides single-key access to the most frequently used CVS
141commands.
142For Emacs users accustomed to VC, PCL-CVS can be thought of as a replacement
11dac025
EZ
143for VC-dired (@pxref{VC Dired Mode, , Dired under VC, emacs, The GNU
144Emacs Manual}) specifically designed for CVS.
e9f75053
SM
145
146PCL-CVS was originally written many years ago by Per Cederqvist who
147proudly maintained it until January 1996, at which point he released the
148beta version 2.0b2 and passed on the maintainership to Greg A Woods.
11dac025 149Development stayed mostly dormant for a few years during which
e9f75053 150version 2.0 never seemed to be able to leave the ``beta'' stage while a
59869d21 151separate XEmacs version was slowly splitting away. In late 1998,
e9f75053 152Stefan Monnier picked up development again, adding some major new
11dac025 153functionality and taking over the maintenance.
e9f75053 154
e9f75053
SM
155@menu
156* Contributors:: Contributors to PCL-CVS.
e9f75053
SM
157@end menu
158
082760b1 159@node Contributors,, About PCL-CVS, About PCL-CVS
e9f75053
SM
160@section Contributors to PCL-CVS
161@cindex Contributors
162@cindex Authors
163
164Contributions to the package are welcome. I have limited time to work
165on this project, but I will gladly add any code that you contribute to
166me to this package (@pxref{Bugs}).
167
168The following persons have made contributions to PCL-CVS.
169
170@itemize @bullet
171@item
172Brian Berliner wrote CVS, together with some other contributors.
173Without his work on CVS this package would be useless@dots{}
174
175@item
176Per Cederqvist wrote most of the otherwise unattributed functions in
11dac025 177PCL-CVS as well as all the documentation.
e9f75053
SM
178
179@item
11dac025 180@email{inge@@lysator.liu.se, Inge Wallin} wrote the skeleton of
e9f75053
SM
181@file{pcl-cvs.texi}, and gave useful comments on it. He also wrote
182the files @file{elib-node.el} and @file{compile-all.el}. The file
183@file{cookie.el} was inspired by Inge.@refill
184
185@item
11dac025 186@email{linus@@lysator.liu.se, Linus Tolke} contributed useful comments
e9f75053
SM
187on both the functionality and the documentation.@refill
188
189@item
11dac025 190@email{jwz@@jwz.com, Jamie Zawinski} contributed
e9f75053
SM
191@file{pcl-cvs-lucid.el}, which was later renamed to
192@file{pcl-cvs-xemacs.el}.@refill
193
194@item
28665d46 195Leif Lonnblad contributed RCVS support (since superseded by the new
11dac025 196remote CVS support).
e9f75053
SM
197
198@item
11dac025
EZ
199@email{jimb@@cyclic.com, Jim Blandy} contributed hooks to automatically
200guess CVS log entries from @file{ChangeLog} contents, and initial support of
201the new Cygnus / Cyclic remote CVS, as well as various sundry bug fixes
e9f75053
SM
202and cleanups.
203
204@item
11dac025
EZ
205@email{kingdon@@cyclic.com, Jim Kingdon} contributed lots of fixes to
206the build and installation procedure.
e9f75053
SM
207
208@item
11dac025
EZ
209@email{woods@@weird.com, Greg A.@: Woods} contributed code to implement
210the use of per-file diff buffers, and vendor join diffs with emerge and
211ediff, as well as various and sundry bug fixes and cleanups.
e9f75053
SM
212
213@item
11dac025
EZ
214@email{greg.klanderman@@alum.mit.edu, Greg Klanderman} implemented
215toggling of marked files, setting of CVS command flags via prefix
216arguments, updated the XEmacs support, updated the manual, and fixed
e9f75053
SM
217numerous bugs.
218
219@item
11dac025 220@email{monnier@@cs.yale.edu, Stefan Monnier} added a slew of other
e9f75053
SM
221features and introduced even more new bugs. If there's any bug left,
222you can be sure it's his.
223
224@item
11dac025
EZ
225@c wordy to avoid an underfull hbox
226@email{masata-y@@is.aist-nara.ac.jp, Masatake YAMATO} made a gracious
227contribution of his cvstree code to display a tree of tags which was later
228superseded by the new @code{cvs-status-mode}.
e9f75053
SM
229@end itemize
230
231Apart from these, a lot of people have sent us suggestions, ideas,
232requests, bug reports and encouragement. Thanks a lot! Without you
233there would be no new releases of PCL-CVS.
234
235
e9f75053
SM
236@node Getting started, Buffer contents, About PCL-CVS, Top
237@chapter Getting started
238@cindex Introduction
239@cindex Example run
11dac025 240@cindex Sample session
e9f75053
SM
241
242This document assumes that you know what CVS is, and that you at least
11dac025
EZ
243know the fundamental concepts of CVS. If that is not the case, you
244should read the CVS documentation. Type @kbd{info -f cvs} or @kbd{man
245cvs}.
e9f75053
SM
246
247PCL-CVS is only useful once you have checked out a module. So before
11dac025 248you invoke it, you must have a copy of a module somewhere in the file
e9f75053
SM
249system.
250
11dac025
EZ
251You can invoke PCL-CVS by typing @kbd{M-x cvs-examine @key{RET}}.
252You can also invoke it via the menu bar, under @samp{Tools}.
253Or, if you prefer, you can also invoke PCL-CVS by simply visiting the
e9f75053 254CVS administrative subdirectory of your module, with a prefix argument.
11dac025
EZ
255For example, to invoke PCL-CVS in a separate frame, type @kbd{C-u C-x 5
256f ~/my/project/CVS @key{RET}}.
e9f75053
SM
257
258The function @code{cvs-examine} will ask for a directory. The command
259@samp{cvs -n update} will be run in that directory. (It should contain
260files that have been checked out from a CVS archive.) The output from
261@code{cvs} will be parsed and presented in a table in a buffer called
262@samp{*cvs*}. It might look something like this:
263
264@example
265Repository : /usr/CVSroot
266Module : test
267Working dir: /users/ceder/FOO/test
268
269
270In directory .:
271 Need-Update bar
272 Need-Update file.txt
273 Modified namechange
274 Need-Update newer
275In directory sub:
276 Modified ChangeLog
277
278--------------------- End ---------------------
279-- last cmd: cvs -f -z6 -n update -d -P --
280@end example
281
282In this example, your repository is in @file{/usr/CVSroot} and CVS has
283been run in the directory @file{/users/ceder/FOO/test}. The three files
177c0ea7 284(@file{bar}, @file{file.txt} and
e9f75053
SM
285@file{newer}) that are marked with @samp{Need-Update} have been changed
286by someone else in the CVS repository. Two files (@file{namechange}
287and @file{sub/ChangeLog}) have been modified locally, and need to be
288checked in.
289
290You can move the cursor up and down in the buffer with @kbd{C-n} and
291@kbd{C-p} or @kbd{n} and @kbd{p}. If you press @kbd{c} on one of the
11dac025 292@samp{Modified} files, that file will be checked in to the CVS
e9f75053
SM
293repository. @xref{Committing changes}. You can also press @kbd{O} to
294update any of the files that are marked @samp{Need-Update}. You can
11dac025 295also run @kbd{M-x cvs-update @key{RET}} (bound to @kbd{M-u} in the
e9f75053
SM
296@samp{*cvs*} buffer) to update all the files.@refill
297
298You can then press @kbd{=} to easily get a @samp{diff} between your
11dac025 299modified file and the base version that you started from, or you can
e9f75053
SM
300press @kbd{l} to get the output from @samp{cvs log}. Many more such
301commands are available simply by pressing a key (@pxref{Getting info
302about files}).
303
304@node Buffer contents, Selected files, Getting started, Top
305@chapter Buffer contents
306@cindex Buffer contents
11dac025 307@cindex @code{*cvs*} buffer contents
e9f75053
SM
308
309The display contains several columns, some of which are optional.
11dac025 310These columns are, from left to right:
e9f75053
SM
311
312@itemize @bullet
313
314@item
315Optionally, the head revision of the file. This is the latest version
316found in the repository. It might also contain (instead of the head
317revision) a sub status which typically gives further information about
318how we got to the current state, for example @samp{patched},
11dac025 319@samp{merged}, @dots{}
e9f75053
SM
320
321@item
322An asterisk when the file is @dfn{marked} (@pxref{Selected
323files}).@refill
324
325@item
11dac025 326The actual status of the file wrt the repository. See below.
e9f75053
SM
327
328@item
329Optionally, the base revision of the file. This is the version
330which the copy in your working directory is based upon.
331
332@item
333The file name.
334
335@end itemize
336
337The @samp{file status} field can have the following values:
338
339@table @samp
e9f75053
SM
340@item Modified
341The file is modified in your working directory, and there was no
342modification to the same file in the repository. This status can have
343the following substatus:
344
345@table @samp
e9f75053
SM
346@item merged
347The file was modified in your working directory, and there were
348modifications in the repository as well, but they were merged
349successfully, without conflict, in your working directory.@refill
e9f75053
SM
350@end table
351
352@item Conflict
353A conflict was detected while trying to merge your changes to @var{file}
354with changes from the repository. @var{file} (the copy in your
11dac025 355working directory) is now the output of the @code{rcsmerge} command on
e9f75053
SM
356the two versions; an unmodified copy of your file is also in your
357working directory, with the name @file{.#@var{file}.@var{version}},
358where @var{version} is the RCS revision that your modified file started
359from. @xref{Viewing differences}, for more details.@refill
360
361A conflict can also come from a disagreement on the existence of the file
362rather than on its content. This case is indicated by the following
363possible substatus:
364
365@table @samp
e9f75053
SM
366@item removed
367The file is locally removed but a new revision has been committed to
368the repository by someone else.
369
370@item added
371The file is locally added and has also been added to the repository
372by someone else.
373
374@item modified
375The file is locally modified but someone else has removed it from the
376repository.
e9f75053
SM
377@end table
378
379@item Added
380The file has been added by you, but it still needs to be checked in to
381the repository.@refill
382
383@item Removed
384The file has been removed by you, but it still needs to be checked in to
385the repository. You can resurrect it by typing @kbd{a} (@pxref{Adding
386and removing files}).@refill
387
388@item Unknown
389A file that was detected in your directory, but that neither appears in
390the repository, nor is present on the list of files that CVS should
391ignore.@refill
392
393@item Up-to-date
394The file is up to date with respect to the version in the repository.
395This status can have a substatus of:
396
397@table @samp
e9f75053
SM
398@item added
399You have just added the file to the repository.@refill
400
401@item updated
402The file was brought up to date with respect to the repository. This is
403done for any file that exists in the repository but not in your source,
404and for files that you haven't changed but are not the most recent
405versions available in the repository.@refill
406
407@item patched
408The file was brought up to date with respect to the remote repository by
409way of fetching and applying a patch to the file in your source. This
410is equivalent to @samp{updated} except that CVS decided to use a hopefully
411more efficient method.@refill
412
413@item committed
414You just committed the file.@refill
e9f75053
SM
415@end table
416
417@item Need-Update
418Either a newer version than the one in your source is available in the
419repository and you have not modified your checked out version, or the
420file exists in the repository but not in your source. Use
421@samp{cvs-mode-update} bound to @kbd{O} to update the file.@refill
422
423@item Need-Merge
424You have modified the checked out version of the file, and a newer
425version is available in the repository. A merge will take place when
426you run a @samp{cvs-update}.
427
428@item Missing
429The file has been unexpectedly removed from your working directory
430although it has not been @samp{cvs remove}d.
e9f75053
SM
431@end table
432
433@node Selected files, Commands, Buffer contents, Top
434@chapter Selected files
435@cindex Selected files
436@cindex Marked files
437@cindex File selection
438@cindex Active files
439@cindex Applicable
440
441Many of the commands work on the current set of @dfn{selected} files
442which can be either the set of marked files (if any file is marked and
9074f5fb 443marks are not ignored) or whichever file or directory the cursor is on.
e9f75053
SM
444
445If a directory is selected but the command cannot be applied to a
446directory, then it will be applied to the set of files under this
447directory which are in the @samp{*cvs*} buffer.
448
11dac025
EZ
449@findex cvs-mode-force-command
450@findex cvs-allow-dir-commit
e9f75053
SM
451Furthermore, each command only operates on a subset of the selected
452files, depending on whether or not the command is @dfn{applicable} to
453each file (based on the file's status). For example,
454@code{cvs-mode-commit} is not applicable to a file whose status is
455@samp{Need-Update}. If it should happen that PCL-CVS guesses the
456applicability wrong, you can override it with the special prefix
457@code{cvs-mode-force-command} normally bound to @kbd{M-f} (and file a
458bug report). The applicability rule can be slightly changed with
459@code{cvs-allow-dir-commit} and @code{cvs-force-dir-tag}.
460
461By default, marks are always in effect (you may change this, however, by
462setting the variable @code{cvs-default-ignore-marks}) except for the
463commands that @samp{tag} or @samp{diff} a file (which can be changed
464with the variable @code{cvs-invert-ignore-marks}).
465
466In addition, you may use the special prefix @code{cvs-mode-toggle-marks}
467normally bound to @key{T} to toggle the use of marks for the following
468command.
469
470This scheme might seem a little complicated, but once one gets used to
471it, it is quite powerful.
472
11dac025 473For commands to mark and unmark files, see @ref{Marking files}.
e9f75053 474
115209ba 475@node Commands, Log Edit Mode, Selected files, Top
e9f75053
SM
476@chapter Commands
477
478@iftex
479This chapter describes all the commands that you can use in PCL-CVS.
480@end iftex
11dac025 481@ifnottex
e9f75053
SM
482The nodes in this menu contains explanations about all the commands that
483you can use in PCL-CVS. They are grouped together by type.
11dac025 484@end ifnottex
e9f75053
SM
485
486@menu
487* Entering PCL-CVS:: Commands to invoke PCL-CVS
488* Setting flags:: Setting flags for CVS commands
177c0ea7 489* Updating the buffer::
e9f75053
SM
490* Movement commands:: How to move up and down in the buffer
491* Marking files:: How to mark files that other commands
492 will later operate on.
493* Committing changes:: Checking in your modifications to the
177c0ea7 494 CVS repository.
e9f75053
SM
495* Editing files:: Loading files into Emacs.
496* Getting info about files:: Display the log and status of files.
497* Adding and removing files:: Adding and removing files
498* Undoing changes:: Undoing changes
499* Removing handled entries:: Uninteresting lines can easily be removed.
500* Ignoring files:: Telling CVS to ignore generated files.
501* Viewing differences:: Commands to @samp{diff} different versions.
502* Invoking Ediff:: Running @samp{ediff} from @samp{*cvs*} buffer.
503* Updating files:: Updating files that Need-update.
504* Tagging files:: Tagging files.
505* Miscellaneous commands:: Miscellaneous commands.
506@end menu
507
508
509@node Entering PCL-CVS, Setting flags, Commands, Commands
510@section Entering PCL-CVS
511@findex cvs-update
512@findex cvs-examine
513@findex cvs-status
514@findex cvs-checkout
42664031
SM
515@findex cvs-quickdir
516@cindex Creating the *cvs* buffer
e9f75053
SM
517
518Most commands in PCL-CVS require that you have a @samp{*cvs*}
519buffer. The commands that you use to get one are listed below.
177c0ea7 520For each, a @samp{cvs} process will be run, the output will be parsed by
e9f75053 521PCL-CVS, and the result will be printed in the @samp{*cvs*} buffer (see
11dac025 522@ref{Buffer contents}, for a description of the buffer's contents).
e9f75053
SM
523
524@table @kbd
e9f75053 525@item M-x cvs-update
177c0ea7 526Run a @samp{cvs update} command. You will be asked for the directory
42664031 527in which the @samp{cvs update} will be run.
e9f75053
SM
528
529@item M-x cvs-examine
530Run a @samp{cvs -n update} command. This is identical to the previous
531command, except that it will only check what needs to be done but will
532not change anything. You will be asked for the directory in
42664031 533which the @samp{cvs -n update} will be run.
e9f75053
SM
534
535@item M-x cvs-status
177c0ea7 536Run a @samp{cvs status} command. You will be asked for the directory
42664031 537in which the @samp{cvs status} will be run.
e9f75053
SM
538
539@item M-x cvs-checkout
540Run a @samp{cvs checkout} command. You will be asked for the directory
541in which the @samp{cvs update} will be run and the module to be checked
42664031 542out.
e9f75053
SM
543
544@item M-x cvs-quickdir
545Populate the @samp{*cvs*} buffer by just looking at the @file{CVS/Entries}
546files. This is very much like @code{cvs-examine} except that it does
11dac025 547not access the CVS repository, which is a major advantage when the
e9f75053
SM
548repository is far away. But of course, it will not be able to detect
549when a file needs to be updated or merged.
e9f75053
SM
550@end table
551
11dac025
EZ
552@findex cvs-dired-action
553@findex cvs-dired-use-hook
42664031 554The first four of
11dac025
EZ
555those commands are also reachable from the menu bar
556under @samp{Tools->PCL-CVS}. Finally, an alternative way is to visit
42664031 557the CVS administrative subdirectory in your work area with a simple
11dac025
EZ
558prefix argument. For example @kbd{C-u C-x C-f ~/my/work/CVS @key{RET}}. This
559by default runs @code{cvs-quickdir} but the specific behavior can be
e9f75053
SM
560changed with @code{cvs-dired-action} and @code{cvs-dired-use-hook}.
561
562By default, the commands above will descend recursively into
563subdirectories. You can avoid that behavior by including @samp{-l} in
564the flags for the command. These flags can be set by giving a prefix
565argument to the command (e.g., by typing
11dac025 566@kbd{C-u M-x cvs-update @key{RET} -l @key{RET}}).
e9f75053
SM
567
568
569@node Setting flags, Updating the buffer, Entering PCL-CVS, Commands
570@section Setting flags for CVS commands
11dac025
EZ
571@cindex Optional switches to CVS
572@cindex Command-line options to CVS
e9f75053
SM
573
574This section describes the convention used by nearly all PCL-CVS
575commands for setting optional flags sent to CVS. A single @kbd{C-u}
576prefix argument is used to cause the command to prompt for flags to be
577used for the current invocation of the command only. Two @kbd{C-u} prefix
578arguments are used to prompt for flags which will be set permanently, for the
579current invocation and all that follow, until the flags are changed, or
580unless temporary flags are set which override them.
581
582Perhaps an example or two is in order. Say you are about to add a
583binary file to the repository, and want to specify the flags @samp{-kb}
cd37168e
SM
584to @samp{cvs add}. You can type @kbd{C-u a -kb @key{RET}},
585and the file will be added. Subsequent @samp{cvs add}
11dac025 586commands will use the previously prevailing flags.
e9f75053
SM
587
588As a second example, say you are about to perform a diff and want to see
589the result in unified diff format, i.e. you'd like to pass the flag
590@samp{-u} to both @samp{cvs diff} and @samp{diff}. You'd also like all
11dac025 591subsequent diffs to use this flag. You can type @kbd{C-u C-u = -u @key{RET}}
e9f75053
SM
592and the diff will be performed, and the default flags will be set to
593@code{("-u")}. You can of course override this flag for a single diff
594by using a single @kbd{C-u} prefix argument.
595
11dac025
EZ
596@cindex Special prefix
597In addition to this, some commands can take @dfn{special prefix} arguments.
598These work as follows: When called with a @kbd{C-u} prefix, the user is
e9f75053
SM
599prompted for a new value of the special prefix and the special prefix is
600activated for the next command. When called without the @kbd{C-u}
601prefix, the special prefix is re-activated (with the same value as last
602time) for the next command. Calling the prefix command again when it's
603already activated deactivates it. Calling it with the @kbd{C-u C-u}
604prefix activates it for all subsequent commands until you deactivate it
605explicitly. The special prefixes are:
606
607@table @kbd
e9f75053
SM
608@item T
609Toggles whether or not marks will be active in the next command.@refill
610
611@item b
612Provide the next command with a branch (can be any version
613specifier) to work on.@refill
614
615@item B
11dac025 616Secondary branch argument. Only meaningful if @kbd{b} is also used.
e9f75053
SM
617It can be used to provide a second branch argument to
618@code{cvs-mode-diff} or to @code{cvs-mode-update}.
619
620@item M-f
621Forces the next command to apply to every selected file rather than only
622to the ones PCL-CVS thinks are relevant.
e9f75053
SM
623@end table
624
625@node Updating the buffer, Movement commands, Setting flags, Commands
626@section Updating the @samp{*cvs*} buffer
627@findex cvs-update
628@findex cvs-examine
629@findex cvs-status
630@findex cvs-mode-update
631@findex cvs-mode-examine
632@findex cvs-mode-status
633
634The following commands can be used from within the @samp{*cvs*} buffer
635to update the display:
636
637@table @kbd
e9f75053 638@item M-u
11dac025 639Runs the command @samp{cvs-update}.@refill
e9f75053
SM
640
641@item M-e
11dac025 642Runs the command @samp{cvs-examine}.@refill
e9f75053
SM
643
644@item M-s
11dac025 645Runs the command @samp{cvs-status}.@refill
e9f75053
SM
646@end table
647
11dac025 648In addition to the above commands which operate on the whole module,
e9f75053 649you can run the equivalent CVS command on just a subset of the
11dac025 650files/directories with these keys:
e9f75053
SM
651
652@table @kbd
e9f75053
SM
653@item O
654Runs @code{cvs-mode-update} on the selected files. When run on the
11dac025 655top-level directory, this is equivalent to @kbd{M-u}.@refill
e9f75053
SM
656
657@item e
658Runs @code{cvs-mode-examine} on the selected files. When run on the
11dac025 659top-level directory, this is equivalent to @kbd{M-e}.@refill
e9f75053 660
11dac025 661@findex cvs-status-mode
e9f75053
SM
662@item s
663Runs @code{cvs-mode-status} on the selected files. When run on the
11dac025 664top-level directory, this is equivalent to @kbd{M-s}, except that
e9f75053
SM
665CVS output will be shown in a @samp{*cvs-info*} buffer that will be
666put in @samp{cvs-status-mode}.@refill
e9f75053
SM
667@end table
668
669
670@node Movement commands, Marking files, Updating the buffer, Commands
671@section Movement Commands
672@cindex Movement Commands
673@findex cvs-mode-next-line
674@findex cvs-mode-previous-line
11dac025
EZ
675@kindex SPC@r{--Move down one file}
676@kindex n@r{--Move down one file}
677@kindex p@r{--Move up one file}
e9f75053
SM
678
679You can use most normal Emacs commands to move forward and backward in
680the buffer. Some keys are rebound to functions that take advantage of
681the fact that the buffer is a PCL-CVS buffer:
682
683
684@table @kbd
11dac025 685@item @key{SPC}
e9f75053
SM
686@itemx n
687These keys move the cursor one file forward, towards the end of the
688buffer (@code{cvs-mode-next-line}).@refill
689
690@itemx p
11dac025 691This key moves one file backward, towards the beginning of the buffer
e9f75053
SM
692(@code{cvs-mode-previous-line}).
693@end table
694
695
696@node Marking files, Committing changes, Movement commands, Commands
697@section Marking files
698@cindex Selecting files (commands to mark files)
699@cindex Marking files
11dac025
EZ
700@kindex m@r{--marking a file}
701@kindex M@r{--marking all files}
702@kindex u@r{--unmark a file}
703@kindex ESC DEL@r{--unmark all files}
704@kindex DEL@r{--unmark previous file}
705@kindex %@r{--mark files matching regexp}
89cda0c5 706@kindex S@r{--mark files in a particular state}
11dac025 707@kindex T@r{--toggle marks}
e9f75053
SM
708@findex cvs-mode-mark
709@findex cvs-mode-unmark
710@findex cvs-mode-mark-all-files
711@findex cvs-mode-unmark-all-files
712@findex cvs-mode-unmark-up
713@findex cvs-mode-mark-matching-files
89cda0c5 714@findex cvs-mode-mark-on-state
e9f75053
SM
715@findex cvs-mode-toggle-marks
716
717PCL-CVS works on a set of @dfn{selected files} (@pxref{Selected files}).
718You can mark and unmark files with these commands:
719
720@table @kbd
721@item m
722This marks the file that the cursor is positioned on. If the cursor is
3dc2d96d 723positioned on a directory all files in that directory are marked
e9f75053
SM
724(@code{cvs-mode-mark}).@refill
725
726@item u
727Unmark the file that the cursor is positioned on. If the cursor is on a
3dc2d96d 728directory, all files in that directory are unmarked
e9f75053
SM
729(@code{cvs-mode-unmark}).@refill
730
731@item M
732Mark @emph{all} files in the buffer (@code{cvs-mode-mark-all-files}).
733
734@item M-@key{DEL}
735Unmark @emph{all} files (@code{cvs-mode-unmark-all-files}).
736
737@item @key{DEL}
738Unmark the file on the previous line, and move point to that line
739(@code{cvs-mode-unmark-up}).
740
89cda0c5 741@item %
e9f75053
SM
742Mark all files matching a regular expression
743(@code{cvs-mode-mark-matching-files}).
744
89cda0c5
SM
745@item S
746Mark all files in a particular state, such as ``Modified'' or
3dc2d96d 747``Removed'' (@code{cvs-mode-mark-on-state}).
89cda0c5
SM
748
749@item T
e9f75053
SM
750Toggle use of marks for the next command (@code{cvs-mode-toggle-marks}).
751@end table
752
753
754@node Committing changes, Editing files, Marking files, Commands
755@section Committing changes
756@cindex Committing changes
e9f75053
SM
757@findex cvs-mode-commit
758@findex cvs-mode-commit-setup
11dac025
EZ
759@kindex c@r{--commit files}
760@kindex C@r{--commit files with @file{ChangeLog} message}
761@vindex cvs-auto-revert@r{ (variable)}
e9f75053
SM
762@cindex Commit buffer
763@cindex Edit buffer
764@cindex Erasing commit message
765@cindex Reverting buffers after commit
766
767Committing changes basically works as follows:
768
769@enumerate
770@item
771After having selected the files you want to commit, you type either
772@kbd{c} or @kbd{C} which brings up a special buffer
773@samp{*cvs-commit*}.@refill
774
775@item
776You type in the log message describing the changes you're about to
115209ba 777commit (@pxref{Log Edit Mode}).
e9f75053
SM
778
779@item
780When you're happy with it, you type @kbd{C-c C-c} to do the actual
781commit.@refill
e9f75053
SM
782@end enumerate
783
784There's no hidden state, so you can abort the process or pick it up
785again at any time.
786
11dac025 787@vindex log-edit-confirm@r{ (variable)}
e9f75053 788The set of files actually committed is really decided only during the
11dac025 789very last step, which is a mixed blessing. It allows you to go back and
e9f75053
SM
790change your mind about which files to commit, but it also means that you
791might inadvertently change the set of selected files. To reduce the
792risk of error, @kbd{C-c C-c} will ask for confirmation if the set of
793selected files has changed between the first step and the last. You can
794change this last detail with @code{log-edit-confirm}.
795
796As for the difference between @kbd{c} (i.e. @code{cvs-mode-commit}) and
797@kbd{C} (i.e. @code{cvs-mode-commit-setup}) is that the first gets you
798straight to @samp{*cvs-commit*} without erasing it or changing anything
11dac025
EZ
799to its content, while the second first erases @samp{*cvs-commit*}
800and tries to initialize it with a sane default (it does that by either
e9f75053 801using a template provided by the CVS administrator or by extracting a
11dac025 802relevant log message from a @file{ChangeLog} file).
e9f75053 803
11dac025 804If you are editing the files in your Emacs, an automatic
e9f75053 805@samp{revert-buffer} will be performed. (If the file contains
11dac025 806@samp{$@asis{Id}$} keywords, @samp{cvs commit} will write a new file with
e9f75053 807the new values substituted. The auto-revert makes sure that you get
3dc2d96d 808them into your buffer.) The revert will not occur if you have modified
e9f75053
SM
809your buffer, or if @samp{cvs-auto-revert} is set to
810@samp{nil}.
811
812
813@node Editing files, Getting info about files, Committing changes, Commands
814@section Editing files
815@cindex Editing files
816@cindex Finding files
817@cindex Loading files
818@cindex Dired
819@cindex Invoking dired
820@findex cvs-mode-find-file
821@findex cvs-mode-find-file-other-window
822@findex cvs-mode-add-change-log-entry-other-window
11dac025
EZ
823@kindex f@r{--find file or directory}
824@kindex o@r{--find file in other window}
825@kindex A@r{--add @file{ChangeLog} entry}
e9f75053
SM
826
827There are currently three commands that can be used to find a file (that
828is, load it into a buffer and start editing it there). These commands
829work on the line that the cursor is situated at. They always ignore any marked
830files.
831
832@table @kbd
833@item f
11dac025
EZ
834Find the file that the cursor points to (@code{cvs-mode-find-file}). If
835the cursor points to a directory, run @code{dired} on that directory;
836@inforef{Dired, , emacs}.
e9f75053
SM
837
838@item o
839Like @kbd{f}, but use another window
840(@code{cvs-mode-find-file-other-window}).@refill
841
842@item A
843Invoke @samp{add-change-log-entry-other-window} to edit a
11dac025
EZ
844@file{ChangeLog} file. The @file{ChangeLog} file will be found in the
845directory of the file the cursor points to, or in a parent of that
3dc2d96d 846directory (@code{cvs-mode-add-change-log-entry-other-window}).@refill
e9f75053
SM
847@end table
848
849
850@node Getting info about files, Adding and removing files, Editing files, Commands
851@section Getting info about files
852@cindex Status (cvs command)
853@cindex Log (RCS/cvs command)
854@cindex Getting status
11dac025
EZ
855@kindex l@r{--run @samp{cvs log}}
856@kindex s@r{--run @samp{cvs status}}
e9f75053
SM
857@findex cvs-mode-log
858@findex cvs-mode-status
859
860@table @kbd
861@item l
862Call the command @code{cvs-mode-log} which runs @samp{cvs log} on all
11dac025 863selected files, and show the result in a temporary buffer
115209ba 864@samp{*cvs-info*} (@pxref{Log View Mode}).
e9f75053
SM
865
866@item s
867Call the command @code{cvs-mode-status} which runs @samp{cvs status} on
11dac025 868all selected files, and show the result in a temporary buffer
e7610308
DL
869@samp{*cvs-info*}.
870@c Fixme: reinstate when node is written:
871@c (@pxref{CVS Status Mode}).
e9f75053
SM
872@end table
873
874
875@node Adding and removing files, Undoing changes, Getting info about files, Commands
876@section Adding and removing files
877@cindex Adding files
878@cindex Removing files
879@cindex Resurrecting files
880@cindex Deleting files
881@cindex Putting files under CVS control
11dac025
EZ
882@kindex a@r{--add a file}
883@kindex r@r{--remove a file}
e9f75053
SM
884@findex cvs-mode-add
885@findex cvs-mode-remove-file
886
a39c2e0d 887The following commands are available to make it easy to add files to
11dac025 888and remove them from the CVS repository.
e9f75053
SM
889
890@table @kbd
891@item a
892Add all selected files. This command can be used on @samp{Unknown}
893files (@pxref{Buffer contents}). The status of the file will change to
11dac025
EZ
894@samp{Added}, and you will have to use @kbd{c} (@samp{cvs-mode-commit}
895@pxref{Committing changes}), to really add the file to the
e9f75053
SM
896repository.@refill
897
898This command can also be used on @samp{Removed} files (before you commit
899them) to resurrect them.
900
901The command that is run is @code{cvs-mode-add}.
902
903@item r
904This command removes the selected files (after prompting for
11dac025 905confirmation). The files are deleted from your directory and
e9f75053 906(unless the status was @samp{Unknown}; @pxref{Buffer contents}) they will
11dac025
EZ
907also be @samp{cvs remove}d. If the files' status was @samp{Unknown}
908they will disappear from the buffer. Otherwise their status will change to
e9f75053
SM
909@samp{Removed}, and you must use @kbd{c} (@samp{cvs-mode-commit},
910@pxref{Committing changes}) to commit the removal.@refill
911
912The command that is run is @code{cvs-mode-remove-file}.
913@end table
914
915
916@node Undoing changes, Removing handled entries, Adding and removing files, Commands
917@section Undoing changes
918@cindex Undo changes
919@cindex Flush changes
11dac025 920@kindex U@r{--undo changes}
e9f75053
SM
921@findex cvs-mode-undo-local-changes
922
923@table @kbd
924@item U
925If you have modified a file, and for some reason decide that you don't
926want to keep the changes, you can undo them with this command. It works
927by removing your working copy of the file and then getting the latest
8bc8d854 928version from the repository (@code{cvs-mode-undo-local-changes}).
e9f75053
SM
929@end table
930
931
932@node Removing handled entries, Ignoring files, Undoing changes, Commands
933@section Removing handled entries
934@cindex Expunging uninteresting entries
935@cindex Uninteresting entries, getting rid of them
936@cindex Getting rid of uninteresting lines
937@cindex Removing uninteresting (processed) lines
938@cindex Handled lines, removing them
11dac025
EZ
939@kindex x@r{--remove processed entries}
940@kindex C-k@r{--remove selected entries}
e9f75053
SM
941@findex cvs-mode-remove-handled
942@findex cvs-mode-acknowledge
943@findex cvs-mode-ignore
944
945@table @kbd
946@item x
947This command allows you to remove all entries that you have processed.
948More specifically, the lines for @samp{Up-to-date} files (@pxref{Buffer
11dac025
EZ
949contents}) are removed from the buffer. If a directory becomes empty
950the heading for that directory is also removed. This makes it easier to
951get an overview of what needs to be done.
e9f75053 952
11dac025
EZ
953@vindex cvs-mode-remove-handled@r{ (variable)}
954@kbd{x} invokes @code{cvs-mode-remove-handled}. If
955@samp{cvs-auto-remove-handled} is set to non-@code{nil}, this will
e9f75053
SM
956automatically be performed after every commit.@refill
957
958@item C-k
959This command can be used for lines that @samp{cvs-mode-remove-handled} would
960not delete, but that you want to delete (@code{cvs-mode-acknowledge}).
961@end table
962
963
964@node Ignoring files, Viewing differences, Removing handled entries, Commands
965@section Ignoring files
11dac025
EZ
966@cindex Ignoring files
967@kindex i@r{--ignoring files}
e9f75053
SM
968@findex cvs-mode-ignore
969
970@table @kbd
971@item i
972Arrange so that CVS will ignore the selected files. The file names are
973added to the @file{.cvsignore} file in the corresponding directory. If
11dac025 974the @file{.cvsignore} file doesn't exist, it will be created.
e9f75053
SM
975
976The @file{.cvsignore} file should normally be added to the repository,
11dac025 977but you could ignore it as well, if you like it better that way.
e9f75053
SM
978
979This runs @code{cvs-mode-ignore}.
980@end table
981
982@node Viewing differences, Invoking Ediff, Ignoring files, Commands
983@section Viewing differences
984@cindex Diff
11dac025 985@cindex Invoking @code{diff}
e9f75053
SM
986@cindex Conflicts, how to resolve them
987@cindex Viewing differences
11dac025
EZ
988@kindex d=@r{--run @samp{cvs diff}}
989@kindex =@r{--run @samp{cvs diff}}
990@kindex db@r{--diff against base version}
991@kindex dh@r{--diff against head of repository}
11e7734a 992@kindex dr@r{--diff between base and head of repository}
11dac025 993@kindex dv@r{--diff against vendor branch}
11e7734a 994@kindex dy@r{--diff against yesterday's head}
e9f75053
SM
995@findex cvs-mode-diff
996@findex cvs-mode-diff-backup
997@findex cvs-mode-diff-head
11e7734a 998@findex cvs-mode-diff-repository
e9f75053 999@findex cvs-mode-diff-vendor
11e7734a 1000@findex cvs-mode-diff-yesterday
11dac025 1001@vindex cvs-invert-ignore-marks@r{ (variable)}
e9f75053
SM
1002
1003@table @kbd
1004@item =
1005@itemx d =
1006Display a @samp{cvs diff} between the selected files and the version
3dc2d96d 1007that they are based on (@code{cvs-mode-diff}).@refill
e9f75053
SM
1008
1009@item d b
1010If CVS finds a conflict while merging two versions of a file (during a
1011@samp{cvs update}, @pxref{Updating the buffer}) it will save the
11dac025
EZ
1012original file in a file called @file{.#@var{file}.@var{version}} where
1013@var{file} is the name of the file, and @var{version} is the revision
1014number that @var{file} was based on.@refill
e9f75053 1015
11dac025
EZ
1016With the @kbd{d b} command you can run a @samp{diff} on the files
1017@file{.#@var{file}.@var{version}} and @file{@var{file}}.@refill
e9f75053
SM
1018
1019@item d h
1020Display a @samp{cvs diff} between the selected files and the head
3dc2d96d
TTN
1021revision (the most recent version on the current
1022branch) in the repository (@code{cvs-mode-diff-head}).@refill
11e7734a
JL
1023
1024@item d r
1025Display a @samp{cvs diff} between the base revision of the selected
1026files and the head revision in the repository. This displays the
1027changes anyone has committed to the repository since you last executed
505c0315
RS
1028a checkout, update or commit operation
1029(@code{cvs-mode-diff-repository}).
e9f75053
SM
1030
1031@item d v
1032Display a @samp{cvs diff} between the selected files and the head
8bc8d854 1033revision of the vendor branch in the repository
e9f75053 1034(@code{cvs-mode-diff-vendor}).@refill
47ce55fe
KS
1035
1036@item d y
1037Display a @samp{cvs diff} between the selected files and yesterday's
8bc8d854 1038head revision in the repository
47ce55fe 1039(@code{cvs-mode-diff-yesterday}).@refill
e9f75053
SM
1040@end table
1041
1042By default, @samp{diff} commands ignore the marks. This can be changed
1043with @code{cvs-invert-ignore-marks}.
1044
1045@node Invoking Ediff, Updating files, Viewing differences, Commands
1046@section Running ediff
1047@cindex Ediff
1048@cindex Invoking ediff
1049@cindex Viewing differences
11dac025 1050@cindex Conflicts, how to resolve them
e9f75053 1051@cindex Resolving conflicts
11dac025 1052@kindex e@r{--invoke @samp{ediff}}
e9f75053
SM
1053@findex cvs-mode-idiff
1054@findex cvs-mode-imerge
1055
1056@table @kbd
11dac025 1057@vindex cvs-idiff-imerge-handlers@r{ (variable)}
e9f75053 1058@item d e
11dac025 1059This uses @code{ediff} (or @code{emerge}, depending on
e9f75053
SM
1060@samp{cvs-idiff-imerge-handlers}) to allow you to view diffs.
1061If a prefix argument is given, PCL-CVS will prompt for a revision against
1062which the diff should be made, else the default will be to use the BASE
1063revision.
1064
11dac025 1065@cindex Merging with @code{ediff} and @code{emerge}
e9f75053 1066@item d E
11dac025
EZ
1067This command use @code{ediff} (or @code{emerge}, see above) to allow you
1068to do an interactive 3-way merge.
e9f75053 1069
bab5541b 1070@strong{Please note:} when the file status is @samp{Conflict},
e9f75053
SM
1071CVS has already performed a merge. The resulting file is not used in
1072any way if you use this command. If you use the @kbd{q} command inside
1073@samp{ediff} (to successfully terminate a merge) the file that CVS
1074created will be overwritten.@refill
e9f75053
SM
1075@end table
1076
1077@node Updating files, Tagging files, Invoking Ediff, Commands
1078@section Updating files
1079@findex cvs-mode-update
1080@cindex Updating files
11dac025 1081@kindex O@r{--update files}
e9f75053
SM
1082
1083@table @kbd
1084@item O
1085Update all selected files with status @samp{Need-update} by running
8bc8d854 1086@samp{cvs update} on them (@code{cvs-mode-update}).
e9f75053
SM
1087@end table
1088
1089
1090@node Tagging files, Miscellaneous commands, Updating files, Commands
1091@section Tagging files
1092@findex cvs-mode-tag
1093@findex cvs-mode-untag
1094@findex cvs-rtag
1095@cindex Tagging files
11dac025
EZ
1096@kindex M-t@r{--repository tag files}
1097@kindex t@r{--tag files}
1098@vindex cvs-invert-ignore-marks@r{ (variable)}
1099@vindex cvs-force-dir-tag@r{ (variable)}
e9f75053
SM
1100
1101@table @kbd
1102@item t
1103Tag all selected files by running @samp{cvs tag} on
11dac025 1104them (@code{cvs-mode-tag}). It's usually preferable to tag a directory
e9f75053
SM
1105at a time. Rather than selecting all files (which too often doesn't
1106select all files but only the few that are displayed), clear the
1107selection with @kbd{M-DEL} (@code{cvs-mode-unmark-all-files}), position
1108the cursor on the directory you want to tag and hit @kbd{t}.
e9f75053
SM
1109@end table
1110
1111By default, @samp{tag} commands ignore the marks. This can be changed
11dac025 1112with @code{cvs-invert-ignore-marks}. Also, by default @samp{tag} can
e9f75053
SM
1113only be applied to directories, see @code{cvs-force-dir-tag} if you want
1114to change this behavior.
1115
1116
1117@node Miscellaneous commands, , Tagging files, Commands
1118@section Miscellaneous commands
1119@findex cvs-mode-byte-compile-files
1120@cindex Recompiling elisp files
1121@cindex Byte compilation
1122@findex cvs-mode-delete-lock
1123@cindex Getting rid of lock files
1124@cindex Lock files
755b72e9
RF
1125@kindex q@r{--bury the PCL-CVS buffer}
1126@findex cvs-bury-buffer
e9f75053
SM
1127@findex cvs-mode-quit
1128@cindex Quitting
11dac025
EZ
1129@kindex h@r{--help}
1130@kindex ?@r{--help}
e9f75053
SM
1131@findex cvs-help
1132@cindex Help
1133
1134@table @kbd
1135@item M-x cvs-mode-byte-compile-files
11dac025 1136Byte compile all selected files that end in @file{.el}.
e9f75053
SM
1137
1138@item M-x cvs-mode-delete-lock
1139This command deletes the lock files that
11dac025
EZ
1140the @samp{*cvs*} buffer informs you about. You should normally never have to
1141use this command, since CVS tries very carefully to always remove the
e9f75053
SM
1142lock files itself.
1143
11dac025 1144You can only use this command when a message in the @samp{*cvs*} buffer tells
e9f75053 1145you so. You should wait a while before using this command in case
11dac025 1146someone else is running a @code{cvs} command.
e9f75053
SM
1147
1148Also note that this only works if the repository is local.
1149
1150@item ?
1151@itemx h
1152Show a summary of common command key bindings in the echo
11dac025 1153area (@code{cvs-help}).
e9f75053
SM
1154
1155@item q
755b72e9
RF
1156Bury the PCL-CVS buffer (@code{cvs-bury-buffer}).
1157
1158@item M-x cvs-mode-quit
1159Quit PCL-CVS, killing the @samp{*cvs*} buffer.
e9f75053
SM
1160@end table
1161
115209ba
DL
1162@node Log Edit Mode, Log View Mode, Commands, Top
1163@chapter Editing a Log Message
1164
1165@cindex Log Edit mode
1166@cindex mode, Log Edit
1167Buffers for entering/editing log messages for changes which are about
1168to be committed are put into Log Edit mode.
1169
1170Sometimes the log buffer contains default text when you enter it,
1171typically the last log message entered. If it does, mark and point
1172are set around the entire contents of the buffer so that it is easy to
1173kill the contents of the buffer with @kbd{C-w}.
1174
1175@findex log-edit-insert-changelog
1176If you work by writing entries in the @file{ChangeLog}
1177(@pxref{(emacs)Change Log}) and then commit the change under revision
1178control, you can generate the Log Edit text from the ChangeLog using
890c3bd4 1179@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for
115209ba
DL
1180entries for the file(s) concerned in the top entry in the ChangeLog
1181and uses those paragraphs as the log text. This text is only inserted
1182if the top entry was made under your user name on the current date.
1183@xref{(emacs)Change Logs and VC}, for the opposite way of
1184working---generating ChangeLog entries from the revision control log.
1185
1186In the Log Edit buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files})
1187shows the list of files to be committed in case you need to check
1188that.
1189
1190When you have finished editing the log message, type @kbd{C-c C-c} to
1191exit the buffer and commit the change.
1192
1193@c Fixme: customization variables
1194
1195@node Log View Mode, Customization, Log Edit Mode, Top
1196@chapter Browsing a Log of Changes
1197
1198@cindex Log View mode
1199@cindex mode, Log View
1200@cindex output, logs
1201
1202@findex cvs-mode-log
1203@findex vc-print-log
1204Log View mode provides a few useful commands for navigating revision
1205control log output. It is used for the output buffers of both
1206@code{cvs-mode-log} and @code{vc-print-log}.
e9f75053 1207
115209ba
DL
1208In this mode, @kbd{n} goes to the next message and @kbd{p} goes to the
1209previous message and @kbd{N} and @kbd{P} go to the next and previous
1210files, respectively, in multi-file output. With a numeric prefix
1211argument, these commands move that many messages of files.
e9f75053 1212
115209ba 1213@c @node CVS Status Mode
e7610308 1214@c @chapter Viewing CVS' Status output
e9f75053 1215
115209ba 1216@node Customization, Bugs, Log View Mode, Top
e9f75053 1217@chapter Customization
11dac025
EZ
1218@vindex log-edit-changelog-full-paragraphs@r{ (variable)}
1219@vindex cvs-auto-remove-handled@r{ (variable)}
1220@vindex cvs-auto-remove-directories@r{ (variable)}
1221@vindex cvs-update-prog-output-skip-regexp@r{ (variable)}
1222@vindex cvs-cvsroot@r{ (variable)}
1223@vindex cvs-auto-revert@r{ (variable)}
1224@vindex log-edit-require-final-newline@r{ (variable)}
1225@vindex cvs-sort-ignore-file@r{ (variable)}
e9f75053
SM
1226@cindex Customization
1227@cindex Variables, list of all
11dac025 1228@cindex Erasing input buffer
e9f75053
SM
1229@cindex Context diff, how to get
1230@cindex Unidiff, how to get
1231@cindex Automatically remove handled files
11dac025
EZ
1232@cindex @samp{-u} option in modules file
1233@cindex Modules file (@samp{-u} option)
1234@cindex Update program (@samp{-u} option in modules file)
e9f75053
SM
1235@cindex Reverting buffers after commit
1236@cindex Require final newline
1237@cindex Automatically inserting newline
1238@cindex Commit message, inserting newline
11dac025
EZ
1239@cindex Sorting @file{.cvsignore} file
1240@cindex @file{.cvsignore} file, sorting
1241@cindex Automatically sorting @file{.cvsignore}
1242@cindex @samp{CVSROOT}, overriding
e9f75053
SM
1243
1244If you have an idea about any customization that would be handy but
8bc8d854
TTN
1245isn't present in this list, please tell us!
1246For info on how to reach us, see @ref{Bugs}.@refill
e9f75053
SM
1247
1248@table @samp
1249@item cvs-auto-remove-handled
11dac025 1250If this variable is set to any non-@code{nil} value,
e9f75053
SM
1251@samp{cvs-mode-remove-handled} will be called every time you check in
1252files, after the check-in is ready. @xref{Removing handled
1253entries}.@refill
1254
1255@item cvs-auto-remove-directories
1256If this variable is set to any non-@code{nil} value, directories that do
1257not contain any files to be checked in will not be listed in the
1258@samp{*cvs*} buffer.@refill
1259
1260@item cvs-auto-revert
1261If this variable is set to any non-@samp{nil} value any buffers you have
1262that visit a file that is committed will be automatically reverted.
1263This variable defaults to @samp{t}. @xref{Committing changes}.@refill
1264
1265@item cvs-update-prog-output-skip-regexp
1266The @samp{-u} flag in the @file{modules} file can be used to run a command
11dac025 1267whenever a @samp{cvs update} is performed (see @code{cvs(5)}). This regexp
e9f75053 1268is used to search for the last line in that output. It is normally set
11dac025 1269to @samp{$}. That setting is only correct if the command outputs
e9f75053 1270nothing. Note that PCL-CVS will get very confused if the command
11dac025 1271outputs @emph{anything} to @code{stderr}.
e9f75053
SM
1272
1273@item cvs-cvsroot
1274This variable can be set to override @samp{CVSROOT}. It should be a
11dac025
EZ
1275string. If it is set, then every time a @code{cvs} command is run, it
1276will be called as @samp{cvs -d @var{cvs-cvsroot}@dots{}}. This can be
1277useful if your site has several repositories.
e9f75053
SM
1278
1279@item log-edit-require-final-newline
11dac025
EZ
1280@c wordy to avoid unhderfull hbox
1281When you enter a log message by typing into the
1282@samp{*cvs-commit-message*} buffer, PCL-CVS normally automatically
1283inserts a trailing newline, unless there already is one. This behavior
1284can be controlled via @samp{cvs-commit-buffer-require-final-newline}.
1285If it is @samp{t} (the default behavior), a newline will always be
1286appended. If it is @samp{nil}, newlines will never be appended. Any
1287other value causes PCL-CVS to ask the user whenever there is no trailing
1288newline in the commit message buffer.
1289
1290@findex cvs-mode-changelog-commit
e9f75053 1291@item log-edit-changelog-full-paragraphs
11dac025 1292If this variable is non-@code{nil}, include full @file{ChangeLog}
177c0ea7 1293paragraphs in the CVS log created by @samp{cvs-mode-changelog-commit}.
11dac025
EZ
1294This may be set in the local variables section of a @file{ChangeLog}
1295file, to indicate the policy for that @file{ChangeLog}.
e9f75053 1296
11dac025
EZ
1297@cindex @file{ChangeLog} paragraphs
1298A @dfn{@file{ChangeLog} paragraph} is a bunch of log text containing no
1299blank lines; a paragraph usually describes a set of changes with a
1300single purpose, but perhaps spanning several functions in several files.
1301Changes in different paragraphs are unrelated.
e9f75053
SM
1302
1303You could argue that the CVS log entry for a file should contain the
11dac025 1304full @file{ChangeLog} paragraph mentioning the change to the file, even though
e9f75053
SM
1305it may mention other files, because that gives you the full context you
1306need to understand the change. This is the behavior you get when this
11dac025 1307variable is set to @code{t}, the default.
e9f75053
SM
1308
1309On the other hand, you could argue that the CVS log entry for a change
1310should contain only the text for the changes which occurred in that
1311file, because the CVS log is per-file. This is the behavior you get
11dac025 1312when this variable is set to @code{nil}.
e9f75053 1313
11dac025 1314@findex cvs-mode-ignore@r{, and @file{.cvsignore} sorting}
e9f75053 1315@item cvs-sort-ignore-file
11dac025
EZ
1316If this variable is set to any non-@samp{nil} value, the
1317@file{.cvsignore} file will always be sorted whenever you use
e9f75053
SM
1318@samp{cvs-mode-ignore} to add a file to it. This option is on by
1319default.
e9f75053
SM
1320@end table
1321
1322
1323@menu
177c0ea7 1324* Customizing Faces::
e9f75053
SM
1325@end menu
1326
1327@node Customizing Faces, , Customization, Customization
1328@section Customizing Faces
5e0de6a2
EZ
1329@vindex cvs-header (face)
1330@vindex cvs-filename (face)
1331@vindex cvs-unknown (face)
1332@vindex cvs-handled (face)
1333@vindex cvs-need-action (face)
1334@vindex cvs-marked (face)
1335@vindex cvs-msg (face)
e9f75053 1336
11dac025 1337PCL-CVS adds a few extra features, including menus, mouse bindings, and
5e0de6a2 1338fontification of the @samp{*cvs*} buffer. The faces defined for
e9f75053
SM
1339fontification are listed below:
1340
1341@table @samp
5e0de6a2 1342@item cvs-header
11dac025 1343used to highlight directory changes.
e9f75053 1344
5e0de6a2
EZ
1345@item cvs-filename
1346Used to highlight file names.
e9f75053 1347
5e0de6a2
EZ
1348@item cvs-unknown
1349Used to highlight the status of files which are @samp{Unknown}.
e9f75053 1350
5e0de6a2
EZ
1351@item cvs-handled
1352Used to highlight the status of files which are handled and
e9f75053
SM
1353need no further action.
1354
5e0de6a2
EZ
1355@item cvs-need-action
1356Used to highlight the status of files which still need action.
e9f75053 1357
5e0de6a2
EZ
1358@item cvs-marked
1359Used to highlight the marked file indicator (@samp{*}).
1360
1361@item cvs-msg
1362Used to highlight CVS messages.
e9f75053
SM
1363@end table
1364
1365
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
1372@cindex Known bugs
1373@cindex Bugs, known
1374@cindex FAQ
1375@cindex Problems, list of common
1376
1377If you find a bug or misfeature, don't hesitate to tell us! Send email
11dac025 1378to @email{bug-gnu-emacs@@gnu.org} which is gatewayed to the newsgroup
e9f75053
SM
1379@samp{gnu.emacs.bugs}. Feature requests should also be sent there. We
1380prefer discussing one thing at a time. If you find several unrelated
1381bugs, please report them separately. If you are running PCL-CVS under
1382XEmacs, you should also send a copy of bug reports to
11dac025 1383@email{xemacs-beta@@xemacs.org}.
e9f75053 1384
11dac025
EZ
1385If you have problems using PCL-CVS or other questions, send them to
1386@email{help-gnu-emacs@@gnu.org}, which is gatewayed to the
1387@samp{gnu.emacs.help} newsgroup. This is a good place to get help, as
1388is @email{cvs-info@@gnu.org}, gatewayed to @samp{gnu.cvs.help}.
e9f75053
SM
1389
1390If you have ideas for improvements, or if you have written some
1391extensions to this package, we would like to hear from you. We hope that
1392you find this package useful!
1393
89cda0c5 1394Below is a partial list of currently known problems with PCL-CVS.
e9f75053
SM
1395
1396@table @asis
1397@item Unexpected output from CVS
1398Unexpected output from CVS may confuse PCL-CVS. It will create
11dac025 1399warning messages in the @samp{*cvs*} buffer alerting you to any parse errors.
e9f75053 1400If you get these messages, please send a bug report to the email
11dac025 1401addresses listed above. Include the contents of the @samp{*cvs*} buffer, the
89cda0c5 1402output of the CVS process (which should be found in the @samp{ *cvs-tmp*}
e9f75053 1403buffer), and the versions of Emacs, PCL-CVS and CVS you are using.
e9f75053
SM
1404@end table
1405
1406@node Function and Variable Index, Concept Index, Bugs, Top
1407@unnumbered Function and Variable Index
1408
11dac025
EZ
1409This is an index of all the functions and variables documented in this
1410manual.
1411
e9f75053
SM
1412@printindex fn
1413
1414@node Concept Index, Key Index, Function and Variable Index, Top
1415@unnumbered Concept Index
1416
11dac025
EZ
1417This is an index of concepts discussed in this manual.
1418
e9f75053
SM
1419@printindex cp
1420
1421@node Key Index, , Concept Index, Top
1422@unnumbered Key Index
1423
11dac025
EZ
1424This index includes an entry for each PCL-CVS key sequence documented in
1425this manual.
1426
e9f75053
SM
1427@printindex ky
1428
1429@setchapternewpage odd
1430@summarycontents
1431@contents
1432@bye
ab5796a9
MB
1433
1434@ignore
1435 arch-tag: 5c7178ce-56fa-40b0-abd7-f4a09758b235
1436@end ignore