From bbfc07d3195b13afa78a975091a9dcc1edb92c74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Spiegel?= Date: Tue, 28 Aug 2001 17:02:59 +0000 Subject: [PATCH] (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. --- lisp/vc.el | 15 +++++++++------ 1 file 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 -;; $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)) -- 2.39.5