diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-04-03 21:18:51 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-04-03 21:18:51 +0000 |
commit | 59bb94103aa6a64da5edfe7aaba79fb9fcb1c1ee (patch) | |
tree | d7c429b04461b676c96c7635824bf9f1ccbfbcbd /lisp/pcvs.el | |
parent | 0c0a9c995ce3f99e0bfe7c25936fe825960cfadf (diff) | |
download | emacs-59bb94103aa6a64da5edfe7aaba79fb9fcb1c1ee.tar.gz |
(cvs-checkout): Prompt for cvsroot as well.
Diffstat (limited to 'lisp/pcvs.el')
-rw-r--r-- | lisp/pcvs.el | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 7330960b93e..e7139d9cfba 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -918,23 +918,28 @@ This usually doesn't really work but is a handy initval in a prompt." ;;;; ;;;###autoload -(defun cvs-checkout (modules dir flags) +(defun cvs-checkout (modules dir flags &optional root) "Run a 'cvs checkout MODULES' in DIR. Feed the output to a *cvs* buffer, display it in the current window, and run `cvs-mode' on it. With a prefix argument, prompt for cvs FLAGS to use." (interactive - (list (cvs-string->strings (read-string "Module(s): " (cvs-get-module))) - (read-directory-name "CVS Checkout Directory: " - nil default-directory nil) - (cvs-add-branch-prefix - (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags")))) + (let ((root (cvs-get-cvsroot))) + (if (or (null root) current-prefix-arg) + (setq root (read-string "CVS Root: "))) + (list (cvs-string->strings (read-string "Module(s): " (cvs-get-module))) + (read-directory-name "CVS Checkout Directory: " + nil default-directory nil) + (cvs-add-branch-prefix + (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags")) + root))) (when (eq flags t) (setf flags (cvs-flags-query 'cvs-checkout-flags nil 'noquery))) - (cvs-cmd-do "checkout" (or dir default-directory) - (append flags modules) nil 'new - :noexist t)) + (let ((cvs-cvsroot root)) + (cvs-cmd-do "checkout" (or dir default-directory) + (append flags modules) nil 'new + :noexist t))) (defun-cvs-mode (cvs-mode-checkout . NOARGS) (dir) "Run cvs checkout against the current branch. |