summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2004-03-21 15:44:39 +0000
committerAndré Spiegel <spiegel@gnu.org>2004-03-21 15:44:39 +0000
commit7f149224deb6d478ca9718db8f36fea692c282b2 (patch)
treedfb5b7a43082ea41f32a73fdad94afec6878ee6d /lisp/vc-hooks.el
parentac9ff2091ca29123d241e03c41fdc6f97f7c079d (diff)
downloademacs-7f149224deb6d478ca9718db8f36fea692c282b2.tar.gz
(vc-default-workfile-unchanged-p): If the implementation supports it,
let diff output go to *vc*, not *vc-diff*, since this is an internal call.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 1354d442e26..d0c444d2d91 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -6,7 +6,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-hooks.el,v 1.160 2003/09/01 15:45:17 miles Exp $
+;; $Id: vc-hooks.el,v 1.161 2004/03/15 03:53:05 monnier Exp $
;; This file is part of GNU Emacs.
@@ -463,8 +463,15 @@ and does not employ any heuristic at all."
(defun vc-default-workfile-unchanged-p (backend file)
"Check if FILE is unchanged by diffing against the master version.
Return non-nil if FILE is unchanged."
- ;; If rev1 is nil, `diff' uses the current workfile version.
- (zerop (vc-call diff file)))
+ (let ((diff-args-length
+ (length (cadr (symbol-function
+ (vc-find-backend-function backend 'diff))))))
+ (zerop (if (> diff-args-length 4)
+ ;; If the implementation supports it, let the output
+ ;; go to *vc*, not *vc-diff*, since this is an internal call.
+ (vc-call diff file nil nil "*vc*")
+ ;; for backward compatibility
+ (vc-call diff file)))))
(defun vc-workfile-version (file)
"Return the version level of the current workfile FILE.