]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-revert-buffer): Ask for confirmation if file seems up-to-date.
authorAndré Spiegel <spiegel@gnu.org>
Thu, 16 Nov 2000 15:26:37 +0000 (15:26 +0000)
committerAndré Spiegel <spiegel@gnu.org>
Thu, 16 Nov 2000 15:26:37 +0000 (15:26 +0000)
lisp/vc.el

index 26f58b9d6d74457b1c683a5507820ce7bcae2692..ff18a5cb7ce615cf1305151432a33eb8fdea1e3b 100644 (file)
@@ -1,11 +1,11 @@
-;;; vc.el --- drive a version-control system from within Emacs
+;; vc.el --- drive a version-control system from within Emacs
 
 ;; Copyright (C) 1992,93,94,95,96,97,98,2000  Free Software Foundation, Inc.
 
 ;; Author:     FSF (see below for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 
-;; $Id: vc.el,v 1.285 2000/10/27 12:13:19 spiegel Exp $
+;; $Id: vc.el,v 1.286 2000/11/16 13:39:10 spiegel Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -2187,6 +2187,9 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action]
        (vc-suppress-confirm nil)
        (obuf (current-buffer))
        status)
+    (if (vc-up-to-date-p file)
+        (unless (yes-or-no-p "File seems up-to-date.  Revert anyway? ")
+          (error "Revert canceled")))
     (unless (vc-workfile-unchanged-p file)
       ;; vc-diff selects the new window, which is not what we want:
       ;; if the new window is on another frame, that'd require the user
@@ -2800,8 +2803,7 @@ Global user options:
        `vc-keep-workfiles'     Non-nil value prevents workfiles from being
                                deleted when changes are checked in
 
-        `vc-suppress-confirm'  Suppresses some confirmation prompts,
-                               notably for reversions.
+        `vc-suppress-confirm'  Suppresses some confirmation prompts.
 
        vc-BACKEND-header       Which keywords to insert when adding headers
                                with \\[vc-insert-headers].  Defaults to