diff options
| author | André Spiegel | 2001-08-28 17:02:59 +0000 |
|---|---|---|
| committer | André Spiegel | 2001-08-28 17:02:59 +0000 |
| commit | bbfc07d3195b13afa78a975091a9dcc1edb92c74 (patch) | |
| tree | 7f6f2a68a2563026e10e906f519b14e81b646200 | |
| parent | 33818c6c6b689c547b33032fbbb49ea7c8f82c59 (diff) | |
| download | emacs-bbfc07d3195b13afa78a975091a9dcc1edb92c74.tar.gz emacs-bbfc07d3195b13afa78a975091a9dcc1edb92c74.zip | |
(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.
| -rw-r--r-- | lisp/vc.el | 15 |
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 @@ | |||
| 5 | ;; Author: FSF (see below for full credits) | 5 | ;; Author: FSF (see below for full credits) |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 7 | 7 | ||
| 8 | ;; $Id: vc.el,v 1.304 2001/07/30 18:25:58 spiegel Exp $ | 8 | ;; $Id: vc.el,v 1.305 2001/08/07 14:48:30 gerd Exp $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -209,9 +209,12 @@ | |||
| 209 | ;; trunk. If optional arg DESTFILE is given, it is an alternate | 209 | ;; trunk. If optional arg DESTFILE is given, it is an alternate |
| 210 | ;; filename to write the contents to. | 210 | ;; filename to write the contents to. |
| 211 | ;; | 211 | ;; |
| 212 | ;; * revert (file) | 212 | ;; * revert (file &optional contents-done) |
| 213 | ;; | 213 | ;; |
| 214 | ;; Revert FILE back to the current workfile version. | 214 | ;; Revert FILE back to the current workfile version. If optional |
| 215 | ;; arg CONTENTS-DONE is non-nil, then the contents of FILE have | ||
| 216 | ;; already been reverted from a version backup, and this function | ||
| 217 | ;; only needs to update the status of FILE within the backend. | ||
| 215 | ;; | 218 | ;; |
| 216 | ;; - cancel-version (file editable) | 219 | ;; - cancel-version (file editable) |
| 217 | ;; | 220 | ;; |
| @@ -2465,10 +2468,10 @@ return its name; otherwise return nil." | |||
| 2465 | (with-vc-properties | 2468 | (with-vc-properties |
| 2466 | file | 2469 | file |
| 2467 | (let ((backup-file (vc-version-backup-file file))) | 2470 | (let ((backup-file (vc-version-backup-file file))) |
| 2468 | (if (not backup-file) | 2471 | (when backup-file |
| 2469 | (vc-call revert file) | ||
| 2470 | (copy-file backup-file file 'ok-if-already-exists 'keep-date) | 2472 | (copy-file backup-file file 'ok-if-already-exists 'keep-date) |
| 2471 | (vc-delete-automatic-version-backups file))) | 2473 | (vc-delete-automatic-version-backups file)) |
| 2474 | (vc-call revert file backup-file)) | ||
| 2472 | `((vc-state . up-to-date) | 2475 | `((vc-state . up-to-date) |
| 2473 | (vc-checkout-time . ,(nth 5 (file-attributes file))))) | 2476 | (vc-checkout-time . ,(nth 5 (file-attributes file))))) |
| 2474 | (vc-resynch-buffer file t t)) | 2477 | (vc-resynch-buffer file t t)) |