Go to the first, previous, next, last section, table of contents.
This chapter describes all the commands that you can use in pcl-cvs.
- 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 4 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.
CVS uses lock files in the repository to ensure the integrity of the
data files in the repository. They might be left behind i.e. if a
workstation crashes in the middle of a CVS operation. CVS outputs a
message when it is waiting for a lock file to go away. Pcl-cvs will
show the same message in the *cvs* buffer, together with instructions
for deleting the lock files. You should normally not have to delete
them manually -- just wait a little while and the problem should fix
itself. But if the lock files doesn't disappear you can delete them
with M-x cvs-delete-lock RET.
- 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-mode-update-no-prompt'.
- G
-
This will run `cvs update' and prompt for a new directory to
update. This runs the command `cvs-update'.
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
).
Pcl-cvs works on a set of selected files (see section 4.2 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-mode-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-mode-unmark
).
- M
-
Mark all files in the buffer (
cvs-mode-mark-all-files
).
- ESC DEL
-
Unmark all files (
cvs-mode-unmark-all-files
).
- DEL
-
Unmark the file on the previous line, and move point to that line
(
cvs-mode-unmark-up
).
- c
-
All files that have a "need to be checked in"-marker (see section 4 Buffer contents) can be checked in with the c command. It checks in all
selected files (see section 4.2 Selected files) (except those who lack the
"ci"-marker - they are ignored). Pressing c causes
cvs-mode-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').
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-after-commit' is set to
`nil'.
- C
-
This is just like `cvs-mode-commit', except that it tries to
provide appropriate default log messages by looking at the
`ChangeLog's in the current directory. The idea is to write your
ChangeLog entries first, and then use this command to commit your
changes. Pressing C causes
cvs-mode-changelog-commit
to be
run.
To select default log text, pcl-cvs:
-
finds the ChangeLogs for the files to be checked in;
-
verifies that the top entry in the ChangeLog is on the current date and
by the current user; if not, no default text is provided;
-
search the ChangeLog entry for paragraphs containing the names of the
files we're checking in; and finally
-
uses those paragraphs as the default log text in the
`*cvs-commit-message*' buffer.
You can then commit the `ChangeLog' file once per day without any
log message.
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-mode-find-file
).
- o
-
Like f, but use another window
(
cvs-mode-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-mode-add-change-log-entry-other-window
).
Both of the following commands can be customized.
See section 6 Customization.
- l
-
Run `cvs log' on all selected files, and show the result in a
temporary buffer (
cvs-mode-log
).
- s
-
Run `cvs status' on all selected files, and show the result in a
temporary buffer (
cvs-mode-status
).
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 4.1 File status). The status of the file will change to
`Added', and you will have to use c (`cvs-mode-commit', see
see section 5.4 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-mode-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 4.1 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-mode-commit',
see section 5.4 Committing changes) to commit the removal.
The command that is run is
cvs-mode-remove-file
.
- U
-
If you have modified a file, and for some reason decide that you don't
want to keep the changes, you can undo them with this command. It works
by removing your working copy of the file and then getting the latest
version from the repository (
cvs-mode-undo-local-changes
.
- x
-
This command allows you to remove all entries that you have processed.
More specifically, the lines for `Updated' files (see section 4.1 File status and files that have been checked in (see section 5.4 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-mode-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-mode-remove-handled' would
not delete, but that you want to delete (
cvs-mode-acknowledge
).
- 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-mode-ignore
.
- d
-
Display a `cvs diff' between the selected files and the RCS version
that they are based on. See section 6 Customization describes how you can send
flags to `cvs diff'. If cvs-diff-ignore-marks is set to a
non-
nil
value or if a prefix argument is given (but not both) any
marked files will not be considered to be selected.
(cvs-mode-diff-cvs
).
- b
-
If CVS finds a conflict while merging two versions of a file (during a
`cvs update', see section 5.1 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 6 Customization. This command only works on files that have
status `Conflict' or `Merged'.
If cvs-diff-ignore-marks is set to a non-
nil
value or if a
prefix argument is given (but not both) any marked files will not be
considered to be selected. (cvs-mode-diff-backup
).
- e
-
This command works
slightly different depending on the version of `ediff' and the file
status.
With modern versions of `ediff', this command invokes
`run-ediff-from-cvs-buffer' on one file.
Note: When the file status is `Merged' or `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.
Older versions of `ediff' use an interface similar to
`emerge'. The function `cvs-old-ediff-interface' is invoked
if the version of `ediff' you have doesn't support
`run-ediff-from-cvs-buffer'. These older versions do not support
merging of revisions.
- `Modified'
-
Run `ediff-files' with your working file as file A, and the latest
revision in the repository as file B.
- `Merged'
-
- `Conflict'
-
Run `ediff-files3' with your working file (as it was prior to your
invocation of `cvs-update') as file A, the latest revision in the
repository as file B, and the revision that you based your local
modifications on as ancestor.
- `Updated'
-
- `Patched'
-
Run `ediff-files' with your working file as file A, and a given
revision in the repository as file B. You are prompted for the revision
to ediff against, and you may specify either a tag name or a numerical
revision number (see section 5.6 Getting info about files).
- E
-
Invoke `emerge' on one file. This command works slightly different
depending on the file status.
- `Modified'
-
Run `emerge-files' with your working file as file A, and the latest
revision in the repository as file B.
- `Merged'
-
- `Conflict'
-
Run `emerge-files-with-ancestor' with your working file (as it was
prior to your invocation of `cvs-update') as file A, the latest
revision in the repository as file B, and the revision that you based
your local modifications on as ancestor.
Note: When the file status is `Merged' or `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
`emerge' (to successfully terminate the merge) the file that CVS
created will be overwritten.
- R
-
If you are editing (or just viewing) a file in a buffer, and that file
is changed by CVS during a `cvs-update', all you have to do is type
R in the *cvs* buffer to read in the new versions of the
files.
All files that are `Updated', `Merged' or in `Conflict'
are reverted from the disk. Any other files are ignored. Only files
that you were already editing are read.
An error is signalled if you have modified the buffer since it was last
changed. (
cvs-mode-revert-updated-buffers
).
- M-x cvs-byte-compile-files
-
Byte compile all selected files that end in .el.
- M-x cvs-delete-lock
-
This command can be used in any buffer, and deletes the lock files that
the *cvs* buffer informs you about. You should normally never have to
use this command since CVS tries very carefully to always remove the
lock files itself.
You can only use this command when a message in the *cvs* buffer tells
you so. You should wait a while before using this command in case
someone else is running a cvs command.
- q
-
Bury the *cvs* buffer. (
bury-buffer
).
Go to the first, previous, next, last section, table of contents.