diff options
| author | André Spiegel | 2003-01-03 15:27:35 +0000 |
|---|---|---|
| committer | André Spiegel | 2003-01-03 15:27:35 +0000 |
| commit | 4837cfbdd26fb45eabfe216ea57081035c695068 (patch) | |
| tree | d318fe2094e63171089e9e03f1ecd59ab7651cf1 | |
| parent | ad9de65b54ae93c104f9f4750d4ec76de61fa91a (diff) | |
| download | emacs-4837cfbdd26fb45eabfe216ea57081035c695068.tar.gz emacs-4837cfbdd26fb45eabfe216ea57081035c695068.zip | |
(vc-rcs-revert): Unlock only if the user does have the lock.
| -rw-r--r-- | lisp/vc-rcs.el | 5 |
1 files changed, 3 insertions, 2 deletions
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 @@ | |||
| 5 | ;; Author: FSF (see vc.el for full credits) | 5 | ;; Author: FSF (see vc.el for full credits) |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 7 | 7 | ||
| 8 | ;; $Id: vc-rcs.el,v 1.32 2002/12/26 14:06:33 spiegel Exp $ | 8 | ;; $Id: vc-rcs.el,v 1.33 2002/12/26 14:38:20 spiegel Exp $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -439,7 +439,8 @@ whether to remove it." | |||
| 439 | (defun vc-rcs-revert (file &optional contents-done) | 439 | (defun vc-rcs-revert (file &optional contents-done) |
| 440 | "Revert FILE to the version it was based on." | 440 | "Revert FILE to the version it was based on." |
| 441 | (vc-do-command nil 0 "co" (vc-name file) "-f" | 441 | (vc-do-command nil 0 "co" (vc-name file) "-f" |
| 442 | (concat "-u" (vc-workfile-version file)))) | 442 | (concat (if (eq (vc-state file) 'edited) "-u" "-r") |
| 443 | (vc-workfile-version file)))) | ||
| 443 | 444 | ||
| 444 | (defun vc-rcs-cancel-version (file editable) | 445 | (defun vc-rcs-cancel-version (file editable) |
| 445 | "Undo the most recent checkin of FILE. | 446 | "Undo the most recent checkin of FILE. |