diff options
| author | Dan Nicolaescu | 2008-04-23 04:05:26 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-04-23 04:05:26 +0000 |
| commit | adc3afb0a7df93e3469da99dcee527369e8cf777 (patch) | |
| tree | 1bbf0e7bda8549b99fa4b1125b34a0d477b5c18a | |
| parent | 32b3f9e3b814967adaef1ea6bc88dd65767ccf88 (diff) | |
| download | emacs-adc3afb0a7df93e3469da99dcee527369e8cf777.tar.gz emacs-adc3afb0a7df93e3469da99dcee527369e8cf777.zip | |
(vc-next-action): Look at more than the first file to
determine the state.
| -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 @@ | |||
| 1 | 2008-04-23 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * vc.el (vc-next-action): Look at more than the first file to | ||
| 4 | determine the state. | ||
| 5 | |||
| 1 | 2008-04-23 Glenn Morris <rgm@gnu.org> | 6 | 2008-04-23 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * dframe.el (dframe-have-timer-flag): Drop support for Emacs without | 8 | * 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." | |||
| 1580 | (interactive "P") | 1580 | (interactive "P") |
| 1581 | (let* ((vc-fileset (vc-deduce-fileset nil t)) | 1581 | (let* ((vc-fileset (vc-deduce-fileset nil t)) |
| 1582 | (files (cdr vc-fileset)) | 1582 | (files (cdr vc-fileset)) |
| 1583 | (state (vc-state (car files))) | 1583 | state |
| 1584 | (model (vc-checkout-model (car files))) | 1584 | model |
| 1585 | revision) | 1585 | revision) |
| 1586 | ;; Check if there's at least one file present, and get `state' and | ||
| 1587 | ;; `model' from it. | ||
| 1588 | ;;FIXME: do something about the case when only directories are | ||
| 1589 | ;; present, or `files' is nil. | ||
| 1590 | (dolist (file files) | ||
| 1591 | (unless (file-directory-p file) | ||
| 1592 | (setq model (vc-checkout-model (car files))) | ||
| 1593 | (setq state (vc-state file)) | ||
| 1594 | (return))) | ||
| 1595 | |||
| 1586 | ;; Verify that the fileset is homogeneous | 1596 | ;; Verify that the fileset is homogeneous |
| 1587 | (dolist (file (cdr files)) | 1597 | (dolist (file (cdr files)) |
| 1588 | ;; Ignore directories, they are compatible with anything. | 1598 | ;; Ignore directories, they are compatible with anything. |