diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2008-04-23 04:05:26 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2008-04-23 04:05:26 +0000 |
commit | adc3afb0a7df93e3469da99dcee527369e8cf777 (patch) | |
tree | 1bbf0e7bda8549b99fa4b1125b34a0d477b5c18a /lisp | |
parent | 32b3f9e3b814967adaef1ea6bc88dd65767ccf88 (diff) | |
download | emacs-adc3afb0a7df93e3469da99dcee527369e8cf777.tar.gz emacs-adc3afb0a7df93e3469da99dcee527369e8cf777.tar.bz2 emacs-adc3afb0a7df93e3469da99dcee527369e8cf777.zip |
(vc-next-action): Look at more than the first file to
determine the state.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/vc.el | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2db6ee907c0..f3cb9acb665 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-04-23 Dan Nicolaescu <dann@ics.uci.edu> + + * vc.el (vc-next-action): Look at more than the first file to + determine the state. + 2008-04-23 Glenn Morris <rgm@gnu.org> * dframe.el (dframe-have-timer-flag): Drop support for Emacs without diff --git a/lisp/vc.el b/lisp/vc.el index f38edaea03a..88aedf2df32 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1580,9 +1580,19 @@ merge in the changes into your working copy." (interactive "P") (let* ((vc-fileset (vc-deduce-fileset nil t)) (files (cdr vc-fileset)) - (state (vc-state (car files))) - (model (vc-checkout-model (car files))) + state + model revision) + ;; Check if there's at least one file present, and get `state' and + ;; `model' from it. + ;;FIXME: do something about the case when only directories are + ;; present, or `files' is nil. + (dolist (file files) + (unless (file-directory-p file) + (setq model (vc-checkout-model (car files))) + (setq state (vc-state file)) + (return))) + ;; Verify that the fileset is homogeneous (dolist (file (cdr files)) ;; Ignore directories, they are compatible with anything. |