Red Hat Bugzilla – Bug 34491
cvs bug in client/server cvs co -d option
Last modified: 2007-04-18 12:32:31 EDT
The '-d' option to 'cvs co' does not work if used to checkout via the
This switch is used to give the name of the directory that should be used
to checkout to (besides from the fact that the path will be shortened, if
one checks out only one module and does not specify '-N')
Steps to Reproduce:
server: has repository /projects/work with module myprg
$ mkdir /tmp/test ; cd /tmp/test
$ cvs -d :pserver:user@server:/projects/work cluster co -d . myprg
Actual Results: response is:
cvs server: existing repository /projects/work does not match
cvs server: ignoring module myprg
Expected Results: On the server, the repository can be reached using
:local: method, and everything works fine, then.
Additional Information: Bug remains with rawhide cvs-1.11-3.
As a workaround, one can create 'CVS' subdir with files 'CVS/Root' and
fill in manually the correct values, then touch 'CVS/Entries' and do a 'cvs
instead of checkout.
In cvs-1.11.17-2 from FC 2 the bug is still present.
Additional note: the -d option works if a named subdir is specified
$ cvs -d :pserver:user@server:/projects/work co -d foo myprg
What is not possible is to checkout to the cwd using "-d .". This
still shows the behaviour reported initially.
PS: Please ignore/delete the word 'cluster' in the sample cmdline of
the initial bugreport :-)
Why do you want to use "-d ."?
Funny question. This bug report is several years old, and I don't
remember my exact reasons anymore :-)
The co command creates a directory to checkout to. Default is the name
of the module that gets checked out, and -d overrides that. It seemed
naturally to me that "-d ." would omit the directory creation step and
use the cwd instead.
While such behaviour is not really needed (using svn these days
anyway), the error message is very misleading.
So, at least, this special case should be caught and a message like
"'-d .' not supported" should be emitted instead of trying to pass a
wrong path to the server.