+@node Remote Repositories
+@subsection Remote Repositories
+@cindex remote repositories (CVS)
+
+ A common way of using CVS is to set up a central CVS repository on
+some Internet host, then have each developer check out a personal
+working copy of the files on his local machine. Committing changes to
+the repository, and picking up changes from other users into one's own
+working area, then works by direct interactions with the CVS server.
+
+ One difficulty is that access to the CVS server is often slow, and
+that developers might need to work off-line as well. VC is designed
+to reduce the amount of network interaction necessary.
+
+@menu
+* Version Backups:: Keeping local copies of repository versions.
+* Local Version Control:: Using another version system for local editing.
+@end menu
+
+@node Version Backups
+@subsubsection Version Backups
+@cindex version backups
+
+@cindex automatic version backups
+ When VC sees that the CVS repository for a file is on a remote
+machine, it automatically makes local backups of unmodified versions
+of the file---@dfn{automatic version backups}. This means that you
+can compare the file to the repository version (@kbd{C-x v =}), or
+revert to that version (@kbd{C-x v u}), without any network
+interactions.
+
+ The local copy of the unmodified file is called a @dfn{version
+backup} to indicate that it corresponds exactly to a version that is
+stored in the repository. Note that version backups are not the same
+as ordinary Emacs backup files (@pxref{Backup}). But they follow a
+similar naming convention.
+
+ For a file that comes from a remote CVS repository, VC makes a
+version backup whenever you save the first changes to the file, and
+removes it after you have committed your modified version to the
+repository. You can disable the making of automatic version backups by
+setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
+
+@cindex manual version backups
+ The name of the automatic version backup for version @var{version}
+of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
+almost the same as the name used by @kbd{C-x v ~} (@pxref{Old
+Versions}), the only difference being the additional dot (@samp{.})
+after the version number. This similarity is intentional, because
+both kinds of files store the same kind of information. The file made
+by @kbd{C-x v ~} acts as a @dfn{manual version backup}.
+
+ All the VC commands that operate on old versions of a file can use
+both kinds of version backups. For instance, @kbd{C-x v ~} uses
+either an automatic or a manual version backup, if possible, to get
+the contents of the version you request. Likewise, @kbd{C-x v =} and
+@kbd{C-x v u} use either an automatic or a manual version backup, if
+one of them exists, to get the contents of a version to compare or
+revert to. If you changed a file outside of Emacs, so that no
+automatic version backup was created for the previous text, you can
+create a manual backup of that version using @kbd{C-x v ~}, and thus
+obtain the benefit of the local copy for Emacs commands.
+
+ The only difference in Emacs's handling of manual and automatic
+version backups, once they exist, is that Emacs deletes automatic
+version backups when you commit to the repository. By contrast,
+manual version backups remain until you delete them.
+
+@node Local Version Control
+@subsubsection Local Version Control
+@cindex local version control
+@cindex local back end (version control)
+
+When you make many changes to a file that comes from a remote
+repository, it can be convenient to have version control on your local
+machine as well. You can then record intermediate versions, revert to
+a previous state, etc., before you actually commit your changes to the
+remote server.
+
+VC lets you do this by putting a file under a second, local version
+control system, so that the file is effectively registered in two
+systems at the same time. For the description here, we will assume
+that the remote system is CVS, and you use RCS locally, although the
+mechanism works with any combination of version control systems
+(@dfn{back ends}).
+
+To make it work with other back ends, you must make sure that the
+``more local'' back end comes before the ``more remote'' back end in
+the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
+default, this variable is set up so that you can use remote CVS and
+local RCS as described here.
+
+To start using local RCS for a file that comes from a remote CVS
+server, you must @emph{register the file in RCS}, by typing @kbd{C-u
+C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
+prefix argument, and specify RCS as the back end.)
+
+You can do this at any time; it does not matter whether you have
+already modified the file with respect to the version in the CVS
+repository. If possible, VC tries to make the RCS master start with
+the unmodified repository version, then checks in any local changes
+as a new version. This works if you have not made any changes yet, or
+if the unmodified repository version exists locally as a version
+backup (@pxref{Version Backups}). If the unmodified version is not
+available locally, the RCS master starts with the modified version;
+the only drawback to this is that you cannot compare your changes
+locally to what is stored in the repository.
+
+The version number of the RCS master is derived from the current CVS
+version, starting a branch from it. For example, if the current CVS
+version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
+the RCS master will be identical to version 1.23 under CVS; your first
+changes are checked in as 1.23.1.1. (If the unmodified file is not
+available locally, VC will check in the modified file twice, both as
+1.23 and 1.23.1.1, to make the revision numbers consistent.)
+
+If you do not use locking under CVS (the default), locking is also
+disabled for RCS, so that editing under RCS works exactly as under
+CVS.
+
+When you are done with local editing, you can commit the final version
+back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
+This initializes the log entry buffer (@pxref{Log Buffer}) to contain
+all the log entries you have recorded in the RCS master; you can edit
+them as you wish, and then commit in CVS by typing @kbd{C-c C-c}. If
+the commit is successful, VC removes the RCS master, so that the file
+is once again registered under CVS only. (The RCS master is not
+actually deleted, just renamed by appending @samp{~} to the name, so
+that you can refer to it later if you wish.)
+
+While using local RCS, you can pick up recent changes from the CVS
+repository into your local file, or commit some of your changes back
+to CVS, without terminating local RCS version control. To do this,
+switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
+
+@table @kbd
+@item C-x v b
+Switch to another back end that the current file is registered
+under (@code{vc-switch-backend}).
+
+@item C-u C-x v b @var{backend} @key{RET}
+Switch to @var{backend} for the current file.
+@end table
+
+@kindex C-x v b
+@findex vc-switch-backend
+@kbd{C-x v b} does not change the buffer contents, or any files; it
+only changes VC's perspective on how to handle the file. Any
+subsequent VC commands for that file will operate on the back end that
+is currently selected.
+
+If the current file is registered in more than one back end, typing
+@kbd{C-x v b} ``cycles'' through all of these back ends. With a
+prefix argument, it asks for the back end to use in the minibuffer.
+
+Thus, if you are using local RCS, and you want to pick up some recent
+changes in the file from remote CVS, first visit the file, then type
+@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
+@key{RET}} to merge the news (@pxref{Merging}). You can then switch
+back to RCS by typing @kbd{C-x v b} again, and continue to edit
+locally.
+
+But if you do this, the revision numbers in the RCS master no longer
+correspond to those of CVS. Technically, this is not a problem, but
+it can become difficult to keep track of what is in the CVS repository
+and what is not. So we suggest that you return from time to time to
+CVS-only operation, using @kbd{C-u C-x v v cvs @key{RET}}.
+