]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-rcs.el
(sgml-font-lock-keywords-2): Add flag to merge with existing fontification.
[gnu-emacs] / lisp / vc-rcs.el
index 3bcb3c8038a230b89446657fbce52267f08d3a21..23686006ac5b3b93f9f4695dd5d4eb4413548448 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 
-;; $Id: vc-rcs.el,v 1.32 2002/12/26 14:06:33 spiegel Exp $
+;; $Id: vc-rcs.el,v 1.34 2003/01/03 15:27:35 spiegel Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -413,7 +413,7 @@ whether to remove it."
                                        ;; use current workfile version
                                        workrev
                                      ;; REV is t ...
-                                     (if (vc-branch-p workrev)
+                                     (if (not (vc-trunk-p workrev))
                                          ;; ... go to head of current branch
                                          (vc-branch-part workrev)
                                        ;; ... go to head of trunk
@@ -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.