comparison lisp/vc.el @ 94289:82466e0389bb

(vc-next-action): Look at more than the first file to determine the state.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 23 Apr 2008 04:05:26 +0000
parents 9f1f284d17b3
children d27d80ade7b7
comparison
equal deleted inserted replaced
94288:f2134121363a 94289:82466e0389bb
1578 If the repository file is changed, you are asked if you want to 1578 If the repository file is changed, you are asked if you want to
1579 merge in the changes into your working copy." 1579 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.
1589 (unless (file-directory-p file) 1599 (unless (file-directory-p file)
1590 (unless (vc-compatible-state (vc-state file) state) 1600 (unless (vc-compatible-state (vc-state file) state)