The nodes in this menu contains explanations about all the commands that you can use in PCL-CVS. They are grouped together by type.
Most commands in PCL-CVS require that you have a `*cvs*' buffer. The commands that you use to get one are listed below. For each, a `cvs' process will be run, the output will be parsed by PCL-CVS, and the result will be printed in the `*cvs*' buffer (see section Buffer contents, for a description of the buffer's contents).
cvs-examine except that it does
not access the CVS repository, which is a major advantage when the
repository is far away. But of course, it will not be able to detect
when a file needs to be updated or merged.
The first four of
those commands are also reachable from the menu bar
under `Tools->PCL-CVS'. Finally, an alternative way is to visit
the CVS administrative subdirectory in your work area with a simple
prefix argument. For example C-u C-x C-f ~/my/work/CVS RET. This
by default runs cvs-quickdir but the specific behavior can be
changed with cvs-dired-action and cvs-dired-use-hook.
By default, the commands above will descend recursively into subdirectories. You can avoid that behavior by including `-l' in the flags for the command. These flags can be set by giving a prefix argument to the command (e.g., by typing C-u M-x cvs-update RET -l RET).
This section describes the convention used by nearly all PCL-CVS commands for setting optional flags sent to CVS. A single C-u prefix argument is used to cause the command to prompt for flags to be used for the current invocation of the command only. Two C-u prefix arguments are used to prompt for flags which will be set permanently, for the current invocation and all that follow, until the flags are changed, or unless temporary flags are set which override them.
Perhaps an example or two is in order. Say you are about to add a binary file to the repository, and want to specify the flags `-kb' to `cvs add'. You can type C-u a -kb RET, enter the description, and the file will be added. Subsequent `cvs add' commands will use the previously prevailing flags.
As a second example, say you are about to perform a diff and want to see
the result in unified diff format, i.e. you'd like to pass the flag
`-u' to both `cvs diff' and `diff'. You'd also like all
subsequent diffs to use this flag. You can type C-u C-u = -u RET
and the diff will be performed, and the default flags will be set to
("-u"). You can of course override this flag for a single diff
by using a single C-u prefix argument.
In addition to this, some commands can take special prefix arguments. These work as follows: When called with a C-u prefix, the user is prompted for a new value of the special prefix and the special prefix is activated for the next command. When called without the C-u prefix, the special prefix is re-activated (with the same value as last time) for the next command. Calling the prefix command again when it's already activated deactivates it. Calling it with the C-u C-u prefix activates it for all subsequent commands until you deactivate it explicitly. The special prefixes are:
cvs-mode-diff or to cvs-mode-update.
The following commands can be used from within the `*cvs*' buffer to update the display:
In addition to the above commands which operate on the whole module, you can run the equivalent CVS command on just a subset of the files/directories with these keys:
cvs-mode-update on the selected files. When run on the
top-level directory, this is equivalent to M-u.
cvs-mode-examine on the selected files. When run on the
top-level directory, this is equivalent to M-e.
cvs-mode-status on the selected files. When run on the
top-level directory, this is equivalent to M-s, except that
CVS output will be shown in a `*cvs-info*' buffer that will be
put in `cvs-status-mode'.You can use most normal Emacs commands to move forward and backward in the buffer. Some keys are rebound to functions that take advantage of the fact that the buffer is a PCL-CVS buffer:
cvs-mode-next-line).
cvs-mode-previous-line).
PCL-CVS works on a set of selected files (see section Selected files). You can mark and unmark files with these commands:
cvs-mode-mark).
cvs-mode-unmark).
cvs-mode-mark-all-files).
cvs-mode-unmark-all-files).
cvs-mode-unmark-up).
cvs-mode-mark-matching-files).
cvs-mode-toggle-marks).
Committing changes basically works as follows:
There's no hidden state, so you can abort the process or pick it up again at any time.
The set of files actually committed is really decided only during the
very last step, which is a mixed blessing. It allows you to go back and
change your mind about which files to commit, but it also means that you
might inadvertently change the set of selected files. To reduce the
risk of error, C-c C-c will ask for confirmation if the set of
selected files has changed between the first step and the last. You can
change this last detail with log-edit-confirm.
As for the difference between c (i.e. cvs-mode-commit) and
C (i.e. cvs-mode-commit-setup) is that the first gets you
straight to `*cvs-commit*' without erasing it or changing anything
to its content, while the second first erases `*cvs-commit*'
and tries to initialize it with a sane default (it does that by either
using a template provided by the CVS administrator or by extracting a
relevant log message from a `ChangeLog' file).
If you are editing the files in your Emacs, an automatic `revert-buffer' will be performed. (If the file contains `$Id$' keywords, `cvs commit' will write a new file with the new values substituted. The auto-revert makes sure that you get them into your buffer). The revert will not occur if you have modified your buffer, or if `cvs-auto-revert' is set to `nil'.
There are currently three commands that can be used to find a file (that is, load it into a buffer and start editing it there). These commands work on the line that the cursor is situated at. They always ignore any marked files.
cvs-mode-find-file). If
the cursor points to a directory, run dired on that directory;
See Info file `emacs', node `Dired'.
cvs-mode-find-file-other-window).
cvs-mode-add-change-log-entry-other-window).cvs-mode-log which runs `cvs log' on all
selected files, and show the result in a temporary buffer
`*cvs-info*' (see section Browsing a Log of Changes).
cvs-mode-status which runs `cvs status' on
all selected files, and show the result in a temporary buffer
`*cvs-info*'.
The following commands are available to make it easy to add fuiles to and remove them from the CVS repository.
cvs-mode-add.
cvs-mode-remove-file.
cvs-mode-undo-local-changes.
cvs-mode-remove-handled. If
`cvs-auto-remove-handled' is set to non-nil, this will
automatically be performed after every commit.
cvs-mode-acknowledge).
cvs-mode-ignore.
cvs-mode-diff).
cvs-mode-diff-head).
cvs-mode-diff-vendor).
By default, `diff' commands ignore the marks. This can be changed
with cvs-invert-ignore-marks.
ediff (or emerge, depending on
`cvs-idiff-imerge-handlers') to allow you to view diffs.
If a prefix argument is given, PCL-CVS will prompt for a revision against
which the diff should be made, else the default will be to use the BASE
revision.
ediff (or emerge, see above) to allow you
to do an interactive 3-way merge.
Note: When the file status is `Conflict',
CVS has already performed a merge. The resulting file is not used in
any way if you use this command. If you use the q command inside
`ediff' (to successfully terminate a merge) the file that CVS
created will be overwritten.cvs-mode-update).
cvs-mode-tag). It's usually preferable to tag a directory
at a time. Rather than selecting all files (which too often doesn't
select all files but only the few that are displayed), clear the
selection with M-DEL (cvs-mode-unmark-all-files), position
the cursor on the directory you want to tag and hit t.
By default, `tag' commands ignore the marks. This can be changed
with cvs-invert-ignore-marks. Also, by default `tag' can
only be applied to directories, see cvs-force-dir-tag if you want
to change this behavior.
cvs command.
Also note that this only works if the repository is local.
cvs-help).
cvs-mode-quit).
Go to the first, previous, next, last section, table of contents.