# HG changeset patch # User Dan Nicolaescu # Date 1208923526 0 # Node ID 82466e0389bb373cafa429f8fba75fe21949a59d # Parent f2134121363a0f2f6827c2e471f281e319eb8ee2 (vc-next-action): Look at more than the first file to determine the state. diff -r f2134121363a -r 82466e0389bb lisp/ChangeLog --- a/lisp/ChangeLog Wed Apr 23 03:27:13 2008 +0000 +++ b/lisp/ChangeLog Wed Apr 23 04:05:26 2008 +0000 @@ -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 -r f2134121363a -r 82466e0389bb lisp/vc.el --- a/lisp/vc.el Wed Apr 23 03:27:13 2008 +0000 +++ b/lisp/vc.el Wed Apr 23 04:05:26 2008 +0000 @@ -1580,9 +1580,19 @@ (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.