changeset 39000:60cf6aee9fd1

(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.
author André Spiegel <spiegel@gnu.org>
date Tue, 28 Aug 2001 17:02:59 +0000
parents 902cb976fed2
children d13c2139752b
files lisp/vc.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc.el	Tue Aug 28 14:48:30 2001 +0000
+++ b/lisp/vc.el	Tue Aug 28 17:02:59 2001 +0000
@@ -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 @@
   (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))