]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-next-action): Look at more than the first file to
authorDan Nicolaescu <dann@ics.uci.edu>
Wed, 23 Apr 2008 04:05:26 +0000 (04:05 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Wed, 23 Apr 2008 04:05:26 +0000 (04:05 +0000)
determine the state.

lisp/ChangeLog
lisp/vc.el

index 2db6ee907c0075be25cefe8e614e380ac19e4166..f3cb9acb665c5ebe5897a4c23467ceb7c831d3ca 100644 (file)
@@ -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
index f38edaea03a6c05063a4181c46ede4cc90f29a8b..88aedf2df32045d30875c8d60417fec9d1724838 100644 (file)
@@ -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.