summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2003-01-19 06:51:23 +0000
committerAndré Spiegel <spiegel@gnu.org>2003-01-19 06:51:23 +0000
commit5ee63c3030fffb6eafd2cd555d51ef15046ee4fb (patch)
tree483099255bbfed2851161644e5976ae2ce95ef7b
parent9bbe02a2ce5fa3a29fbd7b32f7f985683dc7b678 (diff)
downloademacs-5ee63c3030fffb6eafd2cd555d51ef15046ee4fb.tar.gz
(vc-cvs-checkout): Handle t argument for REV.
-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 404cf269d72..5de582df2e6 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -337,8 +337,9 @@ REV is the revision to check out into WORKFILE."
(apply 'vc-do-command
(current-buffer) 0 "cvs" file
"-Q" ; suppress diagnostic output
- "update"
- (and rev (not (string= rev ""))
+ "update"
+ (and (stringp rev)
+ (not (string= rev ""))
(concat "-r" rev))
"-p"
switches)))
@@ -355,26 +356,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-do-command nil 0 "cvs" 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-do-command nil 0 "cvs" 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-do-command nil 0 "cvs" 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-do-command nil 0 "cvs" 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)))))