Mercurial > emacs
changeset 33634:c97a649b1987
Undo prev change.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Mon, 20 Nov 2000 14:01:35 +0000 |
parents | b87e05421579 |
children | 6242368d9e4c |
files | lisp/vc-hooks.el lisp/vc.el |
diffstat | 2 files changed, 16 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vc-hooks.el Mon Nov 20 13:58:45 2000 +0000 +++ b/lisp/vc-hooks.el Mon Nov 20 14:01:35 2000 +0000 @@ -365,26 +365,14 @@ and does not employ any heuristic at all." (vc-call-backend backend 'state file)) -(defun vc-workfile-unchanged-p (file) - "Has FILE changed since last checkout?" - (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) - (lastmod (nth 5 (file-attributes file)))) - (if checkout-time - (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 (file) - "Default check whether FILE is unchanged: diff against master version." - (zerop (vc-call diff file (vc-workfile-version file)))) - (defun vc-workfile-version (file) "Return version level of the current workfile FILE." (or (vc-file-getprop file 'vc-workfile-version) (vc-file-setprop file 'vc-workfile-version (vc-call workfile-version file)))) +;;; actual version-control code starts here + (defun vc-default-registered (backend file) "Check if FILE is registered in BACKEND using vc-BACKEND-master-templates." (let ((sym (vc-make-backend-sym backend 'master-templates)))
--- a/lisp/vc.el Mon Nov 20 13:58:45 2000 +0000 +++ b/lisp/vc.el Mon Nov 20 14:01:35 2000 +0000 @@ -825,6 +825,20 @@ (unless not-urgent (error "Aborted"))))) +(defun vc-workfile-unchanged-p (file) + "Has FILE changed since last checkout?" + (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) + (lastmod (nth 5 (file-attributes file)))) + (if checkout-time + (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 (file) + "Default check whether FILE is unchanged: diff against master version." + (zerop (vc-call diff file (vc-workfile-version file)))) + (defun vc-recompute-state (file) "Force a recomputation of the version control state of FILE. The state is computed using the exact, and possibly expensive