summaryrefslogtreecommitdiff
path: root/lisp/vc-cvs.el
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2002-12-26 14:05:48 +0000
committerAndré Spiegel <spiegel@gnu.org>2002-12-26 14:05:48 +0000
commit83220ab07af2ce70cadcd6467cfc92189c2b1009 (patch)
tree407e62ef80c85dab24764dd05d7a33664964da08 /lisp/vc-cvs.el
parent4279775b92b2622ef107d270deb3019957d0fd29 (diff)
downloademacs-83220ab07af2ce70cadcd6467cfc92189c2b1009.tar.gz
(vc-cvs-checkout): Handle t argument for REV.
Diffstat (limited to 'lisp/vc-cvs.el')
-rw-r--r--lisp/vc-cvs.el45
1 files changed, 23 insertions, 22 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index c6965955059..5da3e5a092a 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-cvs.el,v 1.48 2002/10/11 06:47:49 miles Exp $
+;; $Id: vc-cvs.el,v 1.49 2002/10/17 15:43:48 lektu Exp $
;; This file is part of GNU Emacs.
@@ -421,7 +421,8 @@ REV is the revision to check out into WORKFILE."
(current-buffer) 0 file
"-Q" ; suppress diagnostic output
"update"
- (and rev (not (string= rev ""))
+ (and (stringp rev)
+ (not (string= rev ""))
(concat "-r" rev))
"-p"
switches)))
@@ -438,26 +439,26 @@ REV is the revision to check out into WORKFILE."
(if (and (file-exists-p file) (not rev))
;; If no revision was specified, just make the file writable
;; if necessary (using `cvs-edit' if requested).
- (and editable (not (eq (vc-cvs-checkout-model file) 'implicit))
- (if vc-cvs-use-edit
- (vc-cvs-command nil 0 file "edit")
- (set-file-modes file (logior (file-modes file) 128))
- (if file-buffer (toggle-read-only -1))))
- ;; Check out a particular version (or recreate the file).
- (vc-file-setprop file 'vc-workfile-version nil)
- (apply 'vc-cvs-command nil 0 file
- (and editable
- (or (not (file-exists-p file))
- (not (eq (vc-cvs-checkout-model file)
- 'implicit)))
- "-w")
- "update"
- ;; default for verbose checkout: clear the sticky tag so
- ;; that the actual update will get the head of the trunk
- (if (or (not rev) (string= rev ""))
- "-A"
- (concat "-r" rev))
- switches))))
+ (and editable (not (eq (vc-cvs-checkout-model file) 'implicit))
+ (if vc-cvs-use-edit
+ (vc-cvs-command nil 0 file "edit")
+ (set-file-modes file (logior (file-modes file) 128))
+ (if file-buffer (toggle-read-only -1))))
+ ;; Check out a particular version (or recreate the file).
+ (vc-file-setprop file 'vc-workfile-version nil)
+ (apply 'vc-cvs-command nil 0 file
+ (and editable
+ (or (not (file-exists-p file))
+ (not (eq (vc-cvs-checkout-model file)
+ 'implicit)))
+ "-w")
+ "update"
+ ;; default for verbose checkout: clear the sticky tag so
+ ;; that the actual update will get the head of the trunk
+ (if (or (not rev) (eq rev t) (string= rev ""))
+ "-A"
+ (concat "-r" rev))
+ switches))))
(vc-mode-line file)
(message "Checking out %s...done" filename)))))