From adc3afb0a7df93e3469da99dcee527369e8cf777 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 23 Apr 2008 04:05:26 +0000 Subject: [PATCH] (vc-next-action): Look at more than the first file to determine the state. --- lisp/ChangeLog | 5 +++++ 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 + + * vc.el (vc-next-action): Look at more than the first file to + determine the state. + 2008-04-23 Glenn Morris * 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. -- 2.39.5