+2014-11-19 Eli Zaretskii <eliz@gnu.org>
+
+ * maintaining.texi (Switching Branches): Mention "C-x v r".
+ Correct commands for switching branches in various VCSs.
+
2014-11-16 Tassilo Horn <tsdh@gnu.org>
* misc.texi (DocView Slicing): Describe how to slice with the
On some decentralized version control systems, including Bazaar and
Mercurial in its normal mode of operation, each branch has its own
working directory tree, so switching between branches just involves
-switching directories. On Git, switching between branches is done
-using the @command{git branch} command, which changes the contents of
-the working tree itself.
-
- On centralized version control systems, you can switch between
+switching directories. On Git, branches are normally @dfn{co-located}
+in the same directory, and switching between branches is done using
+the @command{git checkout} command, which changes the contents of the
+working tree to match the branch you switch to. Bazaar also supports
+co-located branches, in which case the @command{bzr switch} command
+will switch branches in the current directory. With Subversion, you
+switch to another branch using the @command{svn switch} command.
+
+ The VC command to switch to another branch in the current directory
+is @kbd{C-x v r @var{branch-name} @key{RET}} (@code{vc-retrieve-tag}).
+
+ On centralized version control systems, you can also switch between
branches by typing @kbd{C-u C-x v v} in an up-to-date work file
(@pxref{Advanced C-x v v}), and entering the revision ID for a
revision on another branch. On CVS, for instance, revisions on the
;;;###autoload
(defun vc-retrieve-tag (dir name)
- "Descending recursively from DIR, retrieve the tag called NAME.
-If NAME is empty, it refers to the latest revisions.
+ "For each file in or below DIR, retrieve their tagged version NAME.
+NAME can name a branch, in which case this command will switch to the
+named branch in the directory DIR.
+Interactively, prompt for DIR only for VCS that works at file level;
+otherwise use the default directory of the current buffer.
+If NAME is empty, it refers to the latest revisions of the current branch.
If locking is used for the files in DIR, then there must not be any
locked files at or below DIR (but if NAME is empty, locked files are
allowed and simply skipped)."