ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial

32.1.3 Basic Editing under Version Control

Most VC commands operate on VC filesets. A VC fileset is a collection of one or more files that a VC operation acts on. When you type VC commands in a buffer visiting a version-controlled file, the VC fileset is simply that one file. When you type them in a VC Directory buffer, and some files in it are marked, the VC fileset consists of the marked files (see VC Directory Mode).

The principal VC command is an all-purpose command, C-x v v (vc-next-action), that performs either registration, locking, merging or a check-in (depending on the situation) on the current VC fileset. You can use C-x v v in a file-visiting buffer or in a VC Directory buffer.

C-x v v
Perform the appropriate next version control operation on the VC fileset.

The precise action of C-x v v depends on the state of the VC fileset, and whether the version control system uses locking or merging. This is described in detail in the subsequent sections.

VC filesets are the way that VC mode bridges the gap between file-based and changeset-based version control systems. They are, essentially, a way to pass multiple file arguments as a group to version control commands. For example, on Subversion, a checkin with a multi-file VC fileset becomes a joint commit, as though you had typed svn commit with those file arguments at the shell command line. All files in a VC fileset must be under the same version control system; if they are not, Emacs signals an error when you attempt to execute a command on the fileset.

VC filesets are distinct from the “named filesets” used for viewing and visiting files in functional groups (see Filesets). Unlike named filesets, VC filesets are not named and don't persist across sessions.

blog comments powered by Disqus