Mercurial > emacs
comparison lisp/vc.el @ 33634:c97a649b1987
Undo prev change.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Mon, 20 Nov 2000 14:01:35 +0000 |
parents | d00c8e827c5b |
children | 9dcb897992b9 |
comparison
equal
deleted
inserted
replaced
33633:b87e05421579 | 33634:c97a649b1987 |
---|---|
822 (if (or vc-suppress-confirm | 822 (if (or vc-suppress-confirm |
823 (y-or-n-p (format "Buffer %s modified; save it? " (buffer-name)))) | 823 (y-or-n-p (format "Buffer %s modified; save it? " (buffer-name)))) |
824 (save-buffer) | 824 (save-buffer) |
825 (unless not-urgent | 825 (unless not-urgent |
826 (error "Aborted"))))) | 826 (error "Aborted"))))) |
827 | |
828 (defun vc-workfile-unchanged-p (file) | |
829 "Has FILE changed since last checkout?" | |
830 (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) | |
831 (lastmod (nth 5 (file-attributes file)))) | |
832 (if checkout-time | |
833 (equal checkout-time lastmod) | |
834 (let ((unchanged (vc-call workfile-unchanged-p file))) | |
835 (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) | |
836 unchanged)))) | |
837 | |
838 (defun vc-default-workfile-unchanged-p (file) | |
839 "Default check whether FILE is unchanged: diff against master version." | |
840 (zerop (vc-call diff file (vc-workfile-version file)))) | |
827 | 841 |
828 (defun vc-recompute-state (file) | 842 (defun vc-recompute-state (file) |
829 "Force a recomputation of the version control state of FILE. | 843 "Force a recomputation of the version control state of FILE. |
830 The state is computed using the exact, and possibly expensive | 844 The state is computed using the exact, and possibly expensive |
831 function `vc-BACKEND-state', not the heuristic." | 845 function `vc-BACKEND-state', not the heuristic." |