summaryrefslogtreecommitdiff
path: root/lisp/vc.el
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2001-08-28 17:02:59 +0000
committerAndré Spiegel <spiegel@gnu.org>2001-08-28 17:02:59 +0000
commitbbfc07d3195b13afa78a975091a9dcc1edb92c74 (patch)
tree7f6f2a68a2563026e10e906f519b14e81b646200 /lisp/vc.el
parent33818c6c6b689c547b33032fbbb49ea7c8f82c59 (diff)
downloademacs-bbfc07d3195b13afa78a975091a9dcc1edb92c74.tar.gz
(vc-revert-file): Call the backend even if the FILE's
contents can be reverted locally; pass new arg CONTENTS-DONE down to the backend.
Diffstat (limited to 'lisp/vc.el')
-rw-r--r--lisp/vc.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index a3f3b172358..230b825f8b6 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -5,7 +5,7 @@
;; Author: FSF (see below for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc.el,v 1.304 2001/07/30 18:25:58 spiegel Exp $
+;; $Id: vc.el,v 1.305 2001/08/07 14:48:30 gerd Exp $
;; This file is part of GNU Emacs.
@@ -209,9 +209,12 @@
;; trunk. If optional arg DESTFILE is given, it is an alternate
;; filename to write the contents to.
;;
-;; * revert (file)
+;; * revert (file &optional contents-done)
;;
-;; Revert FILE back to the current workfile version.
+;; Revert FILE back to the current workfile version. If optional
+;; arg CONTENTS-DONE is non-nil, then the contents of FILE have
+;; already been reverted from a version backup, and this function
+;; only needs to update the status of FILE within the backend.
;;
;; - cancel-version (file editable)
;;
@@ -2465,10 +2468,10 @@ return its name; otherwise return nil."
(with-vc-properties
file
(let ((backup-file (vc-version-backup-file file)))
- (if (not backup-file)
- (vc-call revert file)
+ (when backup-file
(copy-file backup-file file 'ok-if-already-exists 'keep-date)
- (vc-delete-automatic-version-backups file)))
+ (vc-delete-automatic-version-backups file))
+ (vc-call revert file backup-file))
`((vc-state . up-to-date)
(vc-checkout-time . ,(nth 5 (file-attributes file)))))
(vc-resynch-buffer file t t))