diff options
author | André Spiegel <spiegel@gnu.org> | 2000-10-03 11:22:13 +0000 |
---|---|---|
committer | André Spiegel <spiegel@gnu.org> | 2000-10-03 11:22:13 +0000 |
commit | 045e1aa59e4e54967fe86f67dd927331edd6ed3c (patch) | |
tree | f1d0c656139ab79bf9f39faf19ba34bb4805e4a9 /lisp/vc.el | |
parent | 1be1456864f586f71dde26495b8a3ad11568eaa4 (diff) | |
download | emacs-045e1aa59e4e54967fe86f67dd927331edd6ed3c.tar.gz |
(vc-revert-file): New function.
(vc-revert-buffer): Delegate some of the work to it.
Diffstat (limited to 'lisp/vc.el')
-rw-r--r-- | lisp/vc.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index d020162332e..3984c44470a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -5,6 +5,8 @@ ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> +;; $Id$ + ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -2177,14 +2179,20 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action] (set-buffer obuf) ;; Do the reverting (message "Reverting %s..." file) - (with-vc-properties - file - (vc-call revert file) - `((vc-state up-to-date) - (vc-checkout-time ,(nth 5 (file-attributes file))))) - (vc-resynch-buffer file t t) + (vc-revert-file file) (message "Reverting %s...done" file))) +(defun vc-revert-file (file) + "Revert FILE back to the version it was based on." + ;; TODO: With local version caching, this function will get the + ;; base version locally and not from the server. + (with-vc-properties + file + (vc-call revert file) + `((vc-state up-to-date) + (vc-checkout-time ,(nth 5 (file-attributes file))))) + (vc-resynch-buffer file t t)) + ;;;###autoload (defun vc-cancel-version (norevert) "Get rid of most recently checked in version of this file. |