Mercurial > emacs
comparison lisp/vc-hooks.el @ 97788:14bced35f912
(vc-workfile-unchanged-p): Revert last change.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 28 Aug 2008 17:48:15 +0000 |
parents | 01cc14db5be2 |
children | 795196147034 |
comparison
equal
deleted
inserted
replaced
97787:fcf87f33baa7 | 97788:14bced35f912 |
---|---|
557 | 557 |
558 (defun vc-workfile-unchanged-p (file) | 558 (defun vc-workfile-unchanged-p (file) |
559 "Return non-nil if FILE has not changed since the last checkout." | 559 "Return non-nil if FILE has not changed since the last checkout." |
560 (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) | 560 (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) |
561 (lastmod (nth 5 (file-attributes file)))) | 561 (lastmod (nth 5 (file-attributes file)))) |
562 (or (and checkout-time | 562 ;; This is a shortcut for determining when the workfile is |
563 ;; Tramp and Ange-FTP return this when they don't know the time. | 563 ;; unchanged. It can fail under some circumstances; see the |
564 (not (equal lastmod '(0 0))) | 564 ;; discussion in bug#694. |
565 (equal checkout-time lastmod)) | 565 (if (and checkout-time |
566 (let ((unchanged (vc-call workfile-unchanged-p file))) | 566 ;; Tramp and Ange-FTP return this when they don't know the time. |
567 (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) | 567 (not (equal lastmod '(0 0)))) |
568 unchanged)))) | 568 (equal checkout-time lastmod) |
569 (let ((unchanged (vc-call workfile-unchanged-p file))) | |
570 (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) | |
571 unchanged)))) | |
569 | 572 |
570 (defun vc-default-workfile-unchanged-p (backend file) | 573 (defun vc-default-workfile-unchanged-p (backend file) |
571 "Check if FILE is unchanged by diffing against the master version. | 574 "Check if FILE is unchanged by diffing against the master version. |
572 Return non-nil if FILE is unchanged." | 575 Return non-nil if FILE is unchanged." |
573 (zerop (condition-case err | 576 (zerop (condition-case err |