diff lisp/vc.el @ 32093:5c36fa51ee96

(vc-revert-file): New function. (vc-revert-buffer): Delegate some of the work to it.
author André Spiegel <spiegel@gnu.org>
date Tue, 03 Oct 2000 11:22:13 +0000
parents 4b577e4fc758
children adf341c172af
line wrap: on
line diff
--- a/lisp/vc.el	Tue Oct 03 07:06:41 2000 +0000
+++ b/lisp/vc.el	Tue Oct 03 11:22:13 2000 +0000
@@ -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 @@
     (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.