;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-rcs.el,v 1.31 2002/11/13 12:38:20 spiegel Exp $
+;; $Id: vc-rcs.el,v 1.34 2003/01/03 15:27:35 spiegel Exp $
;; This file is part of GNU Emacs.
default-branch)
(setq rev default-branch)
(setq switches (cons "-f" switches)))
+ (if (and (not rev) old-version)
+ (setq rev (vc-branch-part old-version)))
(apply 'vc-do-command nil 0 "ci" (vc-name file)
;; if available, use the secure check-in option
(and (vc-rcs-release-p "5.6.4") "-j")
;; 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
(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.