Go to the previous, next section.

Commands

This chapter describes all the commands that you can use in pcl-cvs.

Updating the directory

M-x cvs-update
Run a `cvs update' command. You will be asked for the directory in which the `cvs update' will be run. The output will be parsed by pcl-cvs, and the result printed in the `*cvs*' buffer (see see section Buffer contents for a description of the contents).

By default, `cvs-update' will descend recursively into subdirectories. You can avoid that behavior by giving a prefix argument to it (e.g., by typing C-u M-x cvs-update RET).

All other commands in pcl-cvs requires that you have a `*cvs*' buffer. This is the command that you use to get one.

g
This will run `cvs update' again. It will always use the same buffer that was used with the previous `cvs update'. Give a prefix argument to avoid descending into subdirectories. This runs the command `cvs-update-no-prompt'.

Movement Commands

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:

SPC
C-n
n
These keys move the cursor one file forward, towards the end of the buffer (cookie-next-cookie).

C-p
p
These keys move one file backward, towards the beginning of the buffer (cookie-previous-cookie).

Marking files

Pcl-cvs works on a set of selected files (see section Selected files). You can mark and unmark files with these commands:

m
This marks the file that the cursor is positioned on. If the cursor is positioned on a directory all files in that directory will be marked. (cvs-mark).

u
Unmark the file that the cursor is positioned on. If the cursor is on a directory, all files in that directory will be unmarked. (cvs-unmark).

M
Mark all files in the buffer (cvs-mark-all-files).

U
Unmark all files (cvs-unmark-all-files).

DEL
Unmark the file on the previous line, and move point to that line (cvs-unmark-up).

Committing changes

c
All files that have a "need to be checked in"-marker (see section Buffer contents) can be checked in with the c command. It checks in all selected files (see section Selected files) (except those who lack the "ci"-marker - they are ignored). Pressing c causes cvs-commit to be run.

When you press c you will get a buffer called `*cvs-commit-message*'. Enter the log message for the file(s) in it. When you are ready you should press C-c C-c to actually commit the files (using cvs-edit-done).

Normally the `*cvs-commit-message*' buffer will retain the log message from the previous commit, but if the variable cvs-erase-input-buffer is set to a non-nil value the buffer will be erased. Point and mark will always be located around the entire buffer so that you can easily erase it with C-w (`kill-region').

Editing files

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 ignore any marked files.

f
Find the file that the cursor points to. Run `dired' if the cursor points to a directory (cvs-find-file).

o
Like f, but use another window (cvs-find-file-other-window).

A
Invoke `add-change-log-entry-other-window' to edit a `ChangeLog' file. The `ChangeLog' will be found in the directory of the file the cursor points to. (cvs-add-change-log-entry-other-window).

Getting info about files

Both of the following commands can be customized. See section Customization.

l
Run `cvs log' on all selected files, and show the result in a temporary buffer (cvs-log).

s
Run `cvs status' on all selected files, and show the result in a temporary buffer (cvs-status).

Adding and removing files

The following commands are available to make it easy to add and remove files from the CVS repository.

a
Add all selected files. This command can be used on `Unknown' files (see see section File status). The status of the file will change to `Added', and you will have to use c (`cvs-commit', see see section Committing changes) to really add the file to the repository.

This command can also be used on `Removed' files (before you commit them) to resurrect them.

Selected files that are neither `Unknown' nor `Removed' will be ignored by this command.

The command that is run is cvs-add.

r
This command removes the selected files (after prompting for confirmation). The files are `rm'ed from your directory and (unless the status was `Unknown'; see section File status) they will also be `cvs remove'd. If the files were `Unknown' they will disappear from the buffer. Otherwise their status will change to `Removed', and you must use c (`cvs-commit', see section Committing changes) to commit the removal.

The command that is run is cvs-remove-file.

Removing handled entries

x
This command allows you to remove all entries that you have processed. More specifically, the lines for `Updated' files (see section File status and files that have been checked in (see section Committing changes) are removed from the buffer. If a directory becomes empty the heading for that directory is also removed. This makes it easier to get an overview of what needs to be done.

The command is called cvs-remove-handled. If `cvs-auto-remove-handled' is set to non-`nil' this will automatically be performed after every commit.

C-k
This command can be used for lines that `cvs-remove-handled' would not delete, but that you want to delete (cvs-acknowledge).

Ignoring files

i
Arrange so that CVS will ignore the selected files. The file names are added to the `.cvsignore' file in the corresponding directory. If the `.cvsignore' doesn't exist it will be created.

The `.cvsignore' file should normally be added to the repository, but you could ignore it also if you like it better that way.

This runs cvs-ignore.

Viewing differences

d
Display a `cvs diff' between the selected files and the RCS version that they are based on. See section Customization describes how you can send flags to `cvs diff'. (The function that does the job is cvs-diff-cvs).

b
If CVS finds a conflict while merging two versions of a file (during a `cvs update', see section Updating the directory) it will save the original file in a file called `.#FILE.VERSION' where FILE is the name of the file, and VERSION is the RCS version number that your file was based on.

With the b command you can run a `diff' on the files `.#FILE.VERSION' and `FILE'. You can get a context- or Unidiff by setting `cvs-diff-flags' - see section Customization. This command only works on files that have status `Conflict' or `Merged'. The name of the command is cvs-diff-backup.

Go to the previous, next section.