diff options
Diffstat (limited to 'lisp/vc')
40 files changed, 136 insertions, 126 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 9170d7b9424..be7bba54378 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1,6 +1,6 @@ ;;; add-log.el --- change log maintenance commands for Emacs -;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2011 +;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2012 ;; Free Software Foundation, Inc. ;; Maintainer: FSF diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 4c63e48a3fc..14612c95b22 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -1,6 +1,6 @@ ;;; compare-w.el --- compare text between windows for Emacs -;; Copyright (C) 1986, 1989, 1993, 1997, 2001-2011 +;; Copyright (C) 1986, 1989, 1993, 1997, 2001-2012 ;; Free Software Foundation, Inc. ;; Maintainer: FSF diff --git a/lisp/vc/cvs-status.el b/lisp/vc/cvs-status.el index 3444b230e8d..a80197486a2 100644 --- a/lisp/vc/cvs-status.el +++ b/lisp/vc/cvs-status.el @@ -1,6 +1,6 @@ ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8; lexical-binding: t -*- -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs cvs status tree vc tools diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 8f4b59f9e53..7de9d17e3f7 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1,6 +1,6 @@ ;;; diff-mode.el --- a mode for viewing/editing context diffs -*- lexical-binding: t -*- -;; Copyright (C) 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: convenience patch diff vc diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index fd24558da6a..05208894356 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -1,6 +1,6 @@ ;;; diff.el --- run `diff' -;; Copyright (C) 1992, 1994, 1996, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1996, 2001-2012 Free Software Foundation, Inc. ;; Author: Frank Bresz ;; (according to authors.el) diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index 85ec49885bd..37b7fce6f32 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -1,6 +1,6 @@ ;;; ediff-diff.el --- diff-related utilities -;; Copyright (C) 1994-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index ee7837b29a3..8d0f9dd5562 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -1,6 +1,6 @@ ;;; ediff-help.el --- Code related to the contents of Ediff help buffers -;; Copyright (C) 1996-2011 Free Software Foundation, Inc. +;; Copyright (C) 1996-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-hook.el b/lisp/vc/ediff-hook.el index 7598cfdba51..a91c53fb115 100644 --- a/lisp/vc/ediff-hook.el +++ b/lisp/vc/ediff-hook.el @@ -1,6 +1,6 @@ ;;; ediff-hook.el --- setup for Ediff's menus and autoloads -;; Copyright (C) 1995-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index d3db66a9e2a..806be855909 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1,6 +1,6 @@ ;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff -;; Copyright (C) 1994-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index a584d0791ff..9b817b2fbc1 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -1,6 +1,6 @@ ;;; ediff-merg.el --- merging utilities -;; Copyright (C) 1994-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index ce7818d5ef4..9e6f5769c8f 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1,6 +1,6 @@ ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff -;; Copyright (C) 1995-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index ef273c610fe..def450373cf 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -1,6 +1,6 @@ ;;; ediff-ptch.el --- Ediff's patch support -;; Copyright (C) 1996-2011 Free Software Foundation, Inc. +;; Copyright (C) 1996-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -373,7 +373,7 @@ other files, enter /dev/null (concat actual-dir (cdr proposed-file-names))))) )) ediff-patch-map) - ;; Check for the existing files in each pair and discard the nonexisting + ;; Check for the existing files in each pair and discard the nonexistent ;; ones. If both exist, ask the user. (mapcar (lambda (session-info) (let* ((file1 (car (ediff-get-session-objA-name session-info))) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index b1c6e367ef7..87740cdc75a 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1,6 +1,6 @@ ;;; ediff-util.el --- the core commands and utilities of ediff -;; Copyright (C) 1994-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-vers.el b/lisp/vc/ediff-vers.el index 804e62a2933..195b177bbc9 100644 --- a/lisp/vc/ediff-vers.el +++ b/lisp/vc/ediff-vers.el @@ -1,6 +1,6 @@ ;;; ediff-vers.el --- version control interface to Ediff -;; Copyright (C) 1995-1997, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 2001-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 9bf75fa7f55..83098fcb0c7 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -1,6 +1,6 @@ ;;; ediff-wind.el --- window manipulation utilities -;; Copyright (C) 1994-1997, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 2000-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 464fdc0a589..4d6afa96d64 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1,6 +1,6 @@ ;;; ediff.el --- a comprehensive visual interface to diff & patch -;; Copyright (C) 1994-2011 Free Software Foundation, Inc. +;; Copyright (C) 1994-2012 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Created: February 2, 1994 diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index 3ba5bcdb90a..bc4b0725c4e 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el @@ -1754,7 +1754,7 @@ to the left margin, if they are in windows." ;; If there are min-lines lines above and below the region, then don't do ;; anything. ;; If not, recenter the region to make it so. -;; If that isn't possible, remove context lines balancedly from top and bottom +;; If that isn't possible, remove context lines evenly from top and bottom ;; so the entire region shows. ;; If that isn't possible, show the top of the region. ;; BEG must be at the beginning of a line. diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index f57429c76c7..54d548c09da 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -1,6 +1,6 @@ ;;; log-edit.el --- Major mode for editing CVS commit messages -*- lexical-binding: t -*- -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs cvs commit log vc diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index d8c6384934e..849954f2cf8 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -1,6 +1,6 @@ ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output -*- lexical-binding: t -*- -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: rcs, sccs, cvs, log, vc, tools diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el index 477cd472289..80a01f58531 100644 --- a/lisp/vc/pcvs-defs.el +++ b/lisp/vc/pcvs-defs.el @@ -1,6 +1,6 @@ ;;; pcvs-defs.el --- variable definitions for PCL-CVS -;; Copyright (C) 1991-2011 Free Software Foundation, Inc. +;; Copyright (C) 1991-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el index 3fd6cd40299..4f8c114d721 100644 --- a/lisp/vc/pcvs-info.el +++ b/lisp/vc/pcvs-info.el @@ -1,6 +1,6 @@ ;;; pcvs-info.el --- internal representation of a fileinfo entry -;; Copyright (C) 1991-2011 Free Software Foundation, Inc. +;; Copyright (C) 1991-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el index 43292ed14e4..a588c735ce7 100644 --- a/lisp/vc/pcvs-parse.el +++ b/lisp/vc/pcvs-parse.el @@ -1,6 +1,6 @@ ;;; pcvs-parse.el --- the CVS output parser -;; Copyright (C) 1991-2011 Free Software Foundation, Inc. +;; Copyright (C) 1991-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs @@ -423,7 +423,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." (cvs-match "restoring \\(.*\\) from backup file .*$" (path 1)))) t) - ;; Is it a succesful merge? + ;; Is it a successful merge? ;; Figure out result of merging (ie, was there a conflict?) (let ((qfile (regexp-quote path))) (cvs-or diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el index ea739ea726a..b300247e552 100644 --- a/lisp/vc/pcvs-util.el +++ b/lisp/vc/pcvs-util.el @@ -1,6 +1,6 @@ ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- -;; Copyright (C) 1991-2011 Free Software Foundation, Inc. +;; Copyright (C) 1991-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 9a8be04fc38..1066ebc7f81 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -1,6 +1,6 @@ ;;; pcvs.el --- a front-end to CVS -;; Copyright (C) 1991-2011 Free Software Foundation, Inc. +;; Copyright (C) 1991-2012 Free Software Foundation, Inc. ;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com ;; (Per Cederqvist) ceder@lysator.liu.se diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 64c4b04fb65..870246103a6 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1,6 +1,6 @@ ;;; smerge-mode.el --- Minor mode to resolve diff3 conflicts -*- lexical-binding: t -*- -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: vc, tools, revision control, merge, diff3, cvs, conflict diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index b6ecc4c1d75..a1dd807d828 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -1,6 +1,6 @@ ;;; vc-annotate.el --- VC Annotate Support -;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2012 Free Software Foundation, Inc. ;; Author: Martin Lorentzson <emwson@emw.ericsson.se> ;; Maintainer: FSF diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el index a20a49a4c39..7502bc28c5f 100644 --- a/lisp/vc/vc-arch.el +++ b/lisp/vc/vc-arch.el @@ -1,6 +1,6 @@ ;;; vc-arch.el --- VC backend for the Arch version-control system -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier <monnier@gnu.org> diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index c5c0ce73b3a..e64f05130a3 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -1,6 +1,6 @@ ;;; vc-bzr.el --- VC backend for the bzr revision control system -;; Copyright (C) 2006-2011 Free Software Foundation, Inc. +;; Copyright (C) 2006-2012 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Riccardo Murri <riccardo.murri@gmail.com> @@ -764,7 +764,10 @@ REV non-nil gets an error." (defun vc-bzr-rename-file (old new) "Rename file from OLD to NEW using `bzr mv'." - (vc-bzr-command "mv" nil 0 new old)) + (setq old (expand-file-name old)) + (setq new (expand-file-name new)) + (vc-bzr-command "mv" nil 0 new old) + (message "Renamed %s => %s" old new)) (defvar vc-bzr-annotation-table nil "Internal use.") diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 7d6c3caf7ff..720df27f442 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -1,6 +1,6 @@ ;;; vc-cvs.el --- non-resident support for CVS version-control -;; Copyright (C) 1995, 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -319,7 +319,7 @@ its parents." (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) (error "%s is not a valid symbolic tag name" rev) - ;; If the input revison is a valid symbolic tag name, we create it + ;; If the input revision is a valid symbolic tag name, we create it ;; as a branch, commit and switch to it. (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 27db4b57dc9..6f9a6d6b7df 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -1,6 +1,6 @@ ;;; vc-dav.el --- vc.el support for WebDAV -;; Copyright (C) 2001, 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2004-2012 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Maintainer: Bill Perry <wmperry@gnu.org> diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index d4b631a1d1b..33611b4eafd 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1,6 +1,6 @@ ;;; vc-dir.el --- Directory status display under VC -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; Author: Dan Nicolaescu <dann@ics.uci.edu> ;; Keywords: vc tools @@ -534,57 +534,71 @@ If a prefix argument is given, move by that many lines." (save-excursion (goto-char (region-beginning)) (while (<= (line-number-at-pos) lastl) - (funcall mark-unmark-function)))) + (condition-case nil + (funcall mark-unmark-function) + ;; `vc-dir-mark-file' signals an error if we try marking + ;; a directory containing marked files in its tree, or a + ;; file in a marked directory tree. Just continue. + (error (vc-dir-next-line 1)))))) (funcall mark-unmark-function))) (defun vc-dir-parent-marked-p (arg) - ;; Return nil if none of the parent directories of arg is marked. + ;; Non-nil iff a parent directory of arg is marked. + ;; Return value, if non-nil is the `ewoc-data' for the marked parent. (let* ((argdir (vc-dir-node-directory arg)) (arglen (length argdir)) (crt arg) - data dir) + (found nil)) ;; Go through the predecessors, checking if any directory that is ;; a parent is marked. - (while (setq crt (ewoc-prev vc-ewoc crt)) - (setq data (ewoc-data crt)) - (setq dir (vc-dir-node-directory crt)) - (when (and (vc-dir-fileinfo->directory data) - (vc-string-prefix-p dir argdir)) - (when (vc-dir-fileinfo->marked data) - (error "Cannot mark `%s', parent directory `%s' marked" - (vc-dir-fileinfo->name (ewoc-data arg)) - (vc-dir-fileinfo->name data))))) - nil)) + (while (and (null found) + (setq crt (ewoc-prev vc-ewoc crt))) + (let ((data (ewoc-data crt)) + (dir (vc-dir-node-directory crt))) + (and (vc-dir-fileinfo->directory data) + (vc-string-prefix-p dir argdir) + (vc-dir-fileinfo->marked data) + (setq found data)))) + found)) (defun vc-dir-children-marked-p (arg) - ;; Return nil if none of the children of arg is marked. + ;; Non-nil iff a child of ARG is marked. + ;; Return value, if non-nil, is the `ewoc-data' for the marked child. (let* ((argdir-re (concat "\\`" (regexp-quote (vc-dir-node-directory arg)))) (is-child t) (crt arg) - data dir) - (while (and is-child (setq crt (ewoc-next vc-ewoc crt))) - (setq data (ewoc-data crt)) - (setq dir (vc-dir-node-directory crt)) - (if (string-match argdir-re dir) - (when (vc-dir-fileinfo->marked data) - (error "Cannot mark `%s', child `%s' marked" - (vc-dir-fileinfo->name (ewoc-data arg)) - (vc-dir-fileinfo->name data))) - ;; We are done, we got to an entry that is not a child of `arg'. - (setq is-child nil))) - nil)) + (found nil)) + (while (and is-child + (null found) + (setq crt (ewoc-next vc-ewoc crt))) + (let ((data (ewoc-data crt)) + (dir (vc-dir-node-directory crt))) + (if (string-match argdir-re dir) + (if (vc-dir-fileinfo->marked data) + (setq found data)) + ;; We are done, we got to an entry that is not a child of `arg'. + (setq is-child nil)))) + found)) (defun vc-dir-mark-file (&optional arg) ;; Mark ARG or the current file and move to the next line. (let* ((crt (or arg (ewoc-locate vc-ewoc))) (file (ewoc-data crt)) - (isdir (vc-dir-fileinfo->directory file))) - (when (or (and isdir (not (vc-dir-children-marked-p crt))) - (and (not isdir) (not (vc-dir-parent-marked-p crt)))) - (setf (vc-dir-fileinfo->marked file) t) - (ewoc-invalidate vc-ewoc crt) - (unless (or arg (mouse-event-p last-command-event)) - (vc-dir-next-line 1))))) + (isdir (vc-dir-fileinfo->directory file)) + ;; Forbid marking a directory containing marked files in its + ;; tree, or a file in a marked directory tree. + (conflict (if isdir + (vc-dir-children-marked-p crt) + (vc-dir-parent-marked-p crt)))) + (when conflict + (error (if isdir + "File `%s' in this directory is already marked" + "Parent directory `%s' is already marked") + (vc-dir-fileinfo->name conflict))) + (setf (vc-dir-fileinfo->marked file) t) + (ewoc-invalidate vc-ewoc crt) + (unless (or arg (mouse-event-p last-command-event)) + (vc-dir-next-line 1)))) (defun vc-dir-mark () "Mark the current file or all files in the region. @@ -621,19 +635,19 @@ share the same state." (setf (vc-dir-fileinfo->marked filearg) t) t)) vc-ewoc)) - (let ((data (ewoc-data (ewoc-locate vc-ewoc)))) + (let* ((crt (ewoc-locate vc-ewoc)) + (data (ewoc-data crt))) (if (vc-dir-fileinfo->directory data) ;; It's a directory, mark child files. - (let ((crt (ewoc-locate vc-ewoc))) - (unless (vc-dir-children-marked-p crt) - (while (setq crt (ewoc-next vc-ewoc crt)) - (let ((crt-data (ewoc-data crt))) - (unless (vc-dir-fileinfo->directory crt-data) - (setf (vc-dir-fileinfo->marked crt-data) t) - (ewoc-invalidate vc-ewoc crt)))))) + (let (crt-data) + (while (and (setq crt (ewoc-next vc-ewoc crt)) + (setq crt-data (ewoc-data crt)) + (not (vc-dir-fileinfo->directory crt-data))) + (setf (vc-dir-fileinfo->marked crt-data) t) + (ewoc-invalidate vc-ewoc crt))) ;; It's a file - (let ((state (vc-dir-fileinfo->state data)) - (crt (ewoc-nth vc-ewoc 0))) + (let ((state (vc-dir-fileinfo->state data))) + (setq crt (ewoc-nth vc-ewoc 0)) (while crt (let ((crt-data (ewoc-data crt))) (when (and (not (vc-dir-fileinfo->marked crt-data)) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 7fe727bd179..ec1b127dd19 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -1,6 +1,6 @@ ;;; vc-dispatcher.el -- generic command-dispatcher facility. -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Eric S. Raymond <esr@thyrsus.com> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index e9cbeeeb40a..2715fdd142d 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1,6 +1,6 @@ ;;; vc-git.el --- VC backend for the git version control system -;; Copyright (C) 2006-2011 Free Software Foundation, Inc. +;; Copyright (C) 2006-2012 Free Software Foundation, Inc. ;; Author: Alexandre Julliard <julliard@winehq.org> ;; Keywords: vc tools diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 0516abbf024..30c91ad3111 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1,6 +1,6 @@ ;;; vc-hg.el --- VC backend for the mercurial version control system -;; Copyright (C) 2006-2011 Free Software Foundation, Inc. +;; Copyright (C) 2006-2012 Free Software Foundation, Inc. ;; Author: Ivan Kanis ;; Keywords: vc tools @@ -216,7 +216,7 @@ highlighting the Log View buffer." ((eq state ?R) 'removed) ((eq state ?!) 'missing) ((eq state ??) 'unregistered) - ((eq state ?C) 'up-to-date) ;; Older mercurials use this + ((eq state ?C) 'up-to-date) ;; Older mercurial versions use this. (t 'up-to-date))))))) (defun vc-hg-working-revision (file) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 148f6cde930..5e60666f56a 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -1,6 +1,6 @@ ;;; vc-hooks.el --- resident support for version-control -;; Copyright (C) 1992-1996, 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -114,9 +114,9 @@ Otherwise, not displayed." :group 'vc) (defcustom vc-keep-workfiles t - "If non-nil, don't delete working files after registering changes. -If the back-end is CVS, workfiles are always kept, regardless of the -value of this flag." + "Whether to keep work files on disk after commits, on a locking VCS. +This variable has no effect on modern merging-based version +control systems." :type 'boolean :group 'vc) diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index f49ad09b5d7..d0727d9c0dc 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -1,6 +1,6 @@ ;;; vc-mtn.el --- VC backend for Monotone -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: vc @@ -193,7 +193,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (unless contents-done (vc-mtn-command nil 0 file "revert"))) -;; (defun vc-mtn-roolback (files) +;; (defun vc-mtn-rollback (files) ;; ) (defun vc-mtn-print-log (files buffer &optional shortlog start-revision limit) diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 39c583b8a0d..f9248d5a954 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -1,6 +1,6 @@ ;;; vc-rcs.el --- support for RCS version-control -;; Copyright (C) 1992-2011 Free Software Foundation, Inc. +;; Copyright (C) 1992-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 0ee75e1c24a..26e7b020b46 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -1,6 +1,6 @@ ;;; vc-sccs.el --- support for SCCS version-control -;; Copyright (C) 1992-2011 Free Software Foundation, Inc. +;; Copyright (C) 1992-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index d014c4da135..b8a6a326ec1 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -1,6 +1,6 @@ ;;; vc-svn.el --- non-resident support for Subversion version-control -;; Copyright (C) 2003-2011 Free Software Foundation, Inc. +;; Copyright (C) 2003-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier <monnier@gnu.org> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index eea1a992094..6b15af4adf4 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1,6 +1,6 @@ ;;; vc.el --- drive a version-control system from within Emacs -;; Copyright (C) 1992-1998, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -951,13 +951,13 @@ Within directories, only files already under version control are noticed." (defun vc-deduce-fileset (&optional observer allow-unregistered state-model-only-files) "Deduce a set of files and a backend to which to apply an operation. - Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). -If we're in VC-dir mode, the fileset is the list of marked files. -Otherwise, if we're looking at a buffer visiting a version-controlled file, -the fileset is a singleton containing this file. -If none of these conditions is met, but ALLOW_UNREGISTERED is on and the -visited file is not registered, return a singleton fileset containing it. + +If we're in VC-dir mode, FILESET is the list of marked files. +Otherwise, if in a buffer visiting a version-controlled file, +FILESET is a single-file fileset containing that file. +Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file +is unregistered, FILESET is a single-file fileset containing it. Otherwise, throw an error. STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs @@ -1048,34 +1048,27 @@ current buffer." ;;;###autoload (defun vc-next-action (verbose) "Do the next logical version control operation on the current fileset. -This requires that all files in the fileset be in the same state. - -For locking systems: - If every file is not already registered, this registers each for version -control. - If every file is registered and not locked by anyone, this checks out -a writable and locked file of each ready for editing. - If every file is checked out and locked by the calling user, this -first checks to see if each file has changed since checkout. If not, -it performs a revert on that file. - If every file has been changed, this pops up a buffer for entry -of a log message; when the message has been entered, it checks in the -resulting changes along with the log message as change commentary. If -the variable `vc-keep-workfiles' is non-nil (which is its default), a -read-only copy of each changed file is left in place afterwards. - If the affected file is registered and locked by someone else, you are -given the option to steal the lock(s). - -For merging systems: - If every file is not already registered, this registers each one for version -control. This does an add, but not a commit. - If every file is added but not committed, each one is committed. - If every working file is changed, but the corresponding repository file is -unchanged, this pops up a buffer for entry of a log message; when the -message has been entered, it checks in the resulting changes along -with the logmessage as change commentary. A writable file is retained. - If the repository file is changed, you are asked if you want to -merge in the changes into your working copy." +This requires that all files in the current VC fileset be in the +same state. If not, signal an error. + +For merging-based version control systems: + If every file in the VC fileset is not registered for version + control, register the fileset (but don't commit). + If every work file in the VC fileset is added or changed, pop + up a *vc-log* buffer to commit the fileset. + For a centralized version control system, if any work file in + the VC fileset is out of date, offer to update the fileset. + +For old-style locking-based version control systems, like RCS: + If every file is not registered, register the file(s). + If every file is registered and unlocked, check out (lock) + the file(s) for editing. + If every file is locked by you and has changes, pop up a + *vc-log* buffer to check in the changes. If the variable + `vc-keep-workfiles' is non-nil (the default), leave a + read-only copy of each changed file after checking in. + If every file is locked by you and unchanged, unlock them. + If every file is locked by someone else, offer to steal the lock." (interactive "P") (let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files)) (backend (car vc-fileset)) |
