From: André Spiegel Date: Fri, 3 Jan 2003 15:27:35 +0000 (+0000) Subject: (vc-rcs-revert): Unlock only if the user does have the lock. X-Git-Tag: ttn-vms-21-2-B4~11859 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4837cfbdd26fb45eabfe216ea57081035c695068;p=emacs.git (vc-rcs-revert): Unlock only if the user does have the lock. --- diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index 3bcb3c8038a..ea113275bd9 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-rcs.el,v 1.32 2002/12/26 14:06:33 spiegel Exp $ +;; $Id: vc-rcs.el,v 1.33 2002/12/26 14:38:20 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -439,7 +439,8 @@ whether to remove it." (defun vc-rcs-revert (file &optional contents-done) "Revert FILE to the version it was based on." (vc-do-command nil 0 "co" (vc-name file) "-f" - (concat "-u" (vc-workfile-version file)))) + (concat (if (eq (vc-state file) 'edited) "-u" "-r") + (vc-workfile-version file)))) (defun vc-rcs-cancel-version (file editable) "Undo the most recent checkin of FILE.