diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-08-28 17:48:15 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-08-28 17:48:15 +0000 |
commit | 9f8951d1c0d8a66830553f9d64be4df9e86cbaeb (patch) | |
tree | e4bd2fee5870e3b45c03032ab2e976b33b978c00 /lisp | |
parent | 051ade662c4bf2d35ca0542b4f662d236c89ee1e (diff) | |
download | emacs-9f8951d1c0d8a66830553f9d64be4df9e86cbaeb.tar.gz |
(vc-workfile-unchanged-p): Revert last change.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/vc-hooks.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 6b90fa1381f..2a7875caa67 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -559,13 +559,16 @@ and does not employ any heuristic at all." "Return non-nil if FILE has not changed since the last checkout." (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) (lastmod (nth 5 (file-attributes file)))) - (or (and checkout-time - ;; Tramp and Ange-FTP return this when they don't know the time. - (not (equal lastmod '(0 0))) - (equal checkout-time lastmod)) - (let ((unchanged (vc-call workfile-unchanged-p file))) - (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) - unchanged)))) + ;; This is a shortcut for determining when the workfile is + ;; unchanged. It can fail under some circumstances; see the + ;; discussion in bug#694. + (if (and checkout-time + ;; Tramp and Ange-FTP return this when they don't know the time. + (not (equal lastmod '(0 0)))) + (equal checkout-time lastmod) + (let ((unchanged (vc-call workfile-unchanged-p file))) + (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) + unchanged)))) (defun vc-default-workfile-unchanged-p (backend file) "Check if FILE is unchanged by diffing against the master version. |