From: Eli Zaretskii Date: Wed, 19 Nov 2014 18:33:17 +0000 (+0200) Subject: Fix VC documentation related to switching branches. X-Git-Tag: emacs-24.4.90~197 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2fa082c00315801f0215685aa6032179615d2b55;p=emacs.git Fix VC documentation related to switching branches. lisp/vc/vc.el (vc-retrieve-tag): Doc fix. doc/emacs/maintaining.texi (Switching Branches): Mention "C-x v r". Correct commands for switching branches in various VCSs. --- diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 84722b2d45f..a72c2a8915c 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2014-11-19 Eli Zaretskii + + * maintaining.texi (Switching Branches): Mention "C-x v r". + Correct commands for switching branches in various VCSs. + 2014-11-16 Tassilo Horn * misc.texi (DocView Slicing): Describe how to slice with the diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e066c491ac5..fef3cdea529 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1317,11 +1317,18 @@ implemented, and these differences cannot be entirely concealed by VC. 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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54df183c92a..306882eaca9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-11-19 Eli Zaretskii + + * vc/vc.el (vc-retrieve-tag): Doc fix. + 2014-11-17 Eli Zaretskii * vc/vc-bzr.el (vc-bzr-print-log, vc-bzr-expanded-log-entry): diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 4a536900eb3..0f4d7893b5f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2135,8 +2135,12 @@ checked out in that new branch." ;;;###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)."