aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2003-05-08 17:45:08 +0000
committerStefan Monnier2003-05-08 17:45:08 +0000
commit2a3897f5cc1626b48ea38b8195afaab80e77e2cd (patch)
tree09f372e1cb300892a4ba26d64c45283129be1f45
parentb4e4e3a832bfe537d4db0a78bf95e17959f0c760 (diff)
downloademacs-2a3897f5cc1626b48ea38b8195afaab80e77e2cd.tar.gz
emacs-2a3897f5cc1626b48ea38b8195afaab80e77e2cd.zip
(vc-default-workfile-unchanged-p): Pass nil
rather than (vc-workfile-version file) to diff.
-rw-r--r--lisp/vc-hooks.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 4f6d421a3b7..f6e39b76f85 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-hooks.el,v 1.148 2003/05/07 17:20:29 monnier Exp $ 8;; $Id: vc-hooks.el,v 1.149 2003/05/07 17:22:28 monnier Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -370,6 +370,12 @@ For registered files, the value returned is one of:
370 with locking; it represents an erroneous condition that 370 with locking; it represents an erroneous condition that
371 should be resolved by the user (vc-next-action will 371 should be resolved by the user (vc-next-action will
372 prompt the user to do it)." 372 prompt the user to do it)."
373 ;; FIXME: New (sub)states needed (?):
374 ;; - `added' (i.e. `edited' but with no base version yet,
375 ;; typically represented by vc-workfile-version = "0")
376 ;; - `conflict' (i.e. `edited' with conflict markers)
377 ;; - `removed'
378 ;; - `copied' and `moved' (might be handled by `removed' and `added')
373 (or (vc-file-getprop file 'vc-state) 379 (or (vc-file-getprop file 'vc-state)
374 (if (vc-backend file) 380 (if (vc-backend file)
375 (vc-file-setprop file 'vc-state 381 (vc-file-setprop file 'vc-state
@@ -398,7 +404,8 @@ and does not employ any heuristic at all."
398(defun vc-default-workfile-unchanged-p (backend file) 404(defun vc-default-workfile-unchanged-p (backend file)
399 "Check if FILE is unchanged by diffing against the master version. 405 "Check if FILE is unchanged by diffing against the master version.
400Return non-nil if FILE is unchanged." 406Return non-nil if FILE is unchanged."
401 (zerop (vc-call diff file (vc-workfile-version file)))) 407 ;; If rev1 is nil, `diff' uses the current workfile version.
408 (zerop (vc-call diff file)))
402 409
403(defun vc-workfile-version (file) 410(defun vc-workfile-version (file)
404 "Return the version level of the current workfile FILE. 411 "Return the version level of the current workfile FILE.
@@ -583,9 +590,9 @@ visiting FILE."
583 ;; If the user is root, and the file is not owner-writable, 590 ;; If the user is root, and the file is not owner-writable,
584 ;; then pretend that we can't write it 591 ;; then pretend that we can't write it
585 ;; even though we can (because root can write anything). 592 ;; even though we can (because root can write anything).
586 ;; This way, even root cannot modify a file that isn't locked. 593 ;; This way, even root cannot modify a file that isn't locked.
587 (and (equal file buffer-file-name) 594 (and (equal file buffer-file-name)
588 (not buffer-read-only) 595 (not buffer-read-only)
589 (zerop (user-real-uid)) 596 (zerop (user-real-uid))
590 (zerop (logand (file-modes buffer-file-name) 128)) 597 (zerop (logand (file-modes buffer-file-name) 128))
591 (setq buffer-read-only t))) 598 (setq buffer-read-only t)))