# HG changeset patch # User Andr Spiegel # Date 999018179 0 # Node ID 60cf6aee9fd1a42230fd1abaab980f4522a90a67 # Parent 902cb976fed2df01f3703bc9d9c40913232c044f (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. diff -r 902cb976fed2 -r 60cf6aee9fd1 lisp/vc.el --- 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 -;; $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))