summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-hooks.el
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-12-01 08:24:27 -0500
committerEric S. Raymond <esr@thyrsus.com>2014-12-01 08:24:27 -0500
commitf82f3f1f177c1a9cc2c2236f51acd1be1809ae1f (patch)
tree76163b25a84c8416f7f529b9331778020cb7dc8b /lisp/vc/vc-hooks.el
parent2532d74a5fb5168955aa900f597bf7efc14efb12 (diff)
downloademacs-f82f3f1f177c1a9cc2c2236f51acd1be1809ae1f.tar.gz
emacs-f82f3f1f177c1a9cc2c2236f51acd1be1809ae1f.tar.bz2
emacs-f82f3f1f177c1a9cc2c2236f51acd1be1809ae1f.zip
API simplification: remove vc-workfile-unchanged-p from pubic methods.
* vc/vc.el, vc-hooks.el, and all backends: API simplification; vc-workfile-unchanged-p is no longer a public method (but the RCS and SCCS back ends retain it as a private method used in state computation). This method was redundant with vc-state and usually implemented as a trivial call to same. Fixes the failure mode described in bug#694.
Diffstat (limited to 'lisp/vc/vc-hooks.el')
-rw-r--r--lisp/vc/vc-hooks.el33
1 files changed, 0 insertions, 33 deletions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 3a2ad40ee35..7224aeeb5b3 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -576,39 +576,6 @@ It simply calls the real state computation function `vc-BACKEND-state'
and does not employ any heuristic at all."
(vc-call-backend backend 'state file))
-(defun vc-workfile-unchanged-p (file)
- "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))))
- ;; 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 repository version.
-Return non-nil if FILE is unchanged."
- (zerop (condition-case err
- ;; If the implementation supports it, let the output
- ;; go to *vc*, not *vc-diff*, since this is an internal call.
- (vc-call-backend backend 'diff (list file) nil nil "*vc*")
- (wrong-number-of-arguments
- ;; If this error came from the above call to vc-BACKEND-diff,
- ;; try again without the optional buffer argument (for
- ;; backward compatibility). Otherwise, resignal.
- (if (or (not (eq (cadr err)
- (indirect-function
- (vc-find-backend-function backend 'diff))))
- (not (eq (cl-caddr err) 4)))
- (signal (car err) (cdr err))
- (vc-call-backend backend 'diff (list file)))))))
-
(defun vc-working-revision (file &optional backend)
"Return the repository version from which FILE was checked out.
If FILE is not registered, this function always returns nil."