You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nicolas Girard <gi...@yahoo.fr> on 2001/09/10 17:11:39 UTC

problem with cvs checkout dest="."

Hi,
I'd like to have cvs work just like it does at the command line:
    prompt$ cvs checkout -d . my_module
    cvs checkout: Updating .
    U my_module/src
    U my_module/src/redame.txt
this creates src in .

But with the supposed equivalent in ant:
    --snip-- basedir="." --snip--
    <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"/>
cvs creates the directory ./my_module and checks out everything in it.
I thought it was because basedir contained an absolute path ; unfortunately
<cvs dest="." .../> does the same thing...

Have you experienced the same problem ? I'm afraid not, according to the
archives... :-(
Regards,
Nicolas Girard

___________________________________________________________
Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
Yahoo! Courrier : http://fr.mail.yahoo.com

Re: problem with cvs checkout dest="."

Posted by Nicolas Girard <gi...@yahoo.fr>.
> this sounds to me as if you use the wrong command.
> What u might wanna do is to use 'cvs update -d'
> does that help?
> detlef
No, thanks anyway but I really want to perform a checkout
Regards,
Nicolas

> 
> > Hi,
> > I'd like to have cvs work just like it does at the command line:
> >     prompt$ cvs checkout -d . my_module
> >     cvs checkout: Updating .
> >     U my_module/src
> >     U my_module/src/redame.txt
> > this creates src in .
> > 
> > But with the supposed equivalent in ant:
> >     --snip-- basedir="." --snip--
> >     <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"/>
> > cvs creates the directory ./my_module and checks out everything in it.
> > I thought it was because basedir contained an absolute path ;
> > unfortunately
> > <cvs dest="." .../> does the same thing...
> > 
> > Have you experienced the same problem ? I'm afraid not, according to the
> > archives... :-(
> > Regards,
> > Nicolas Girard
> > 
> > ___________________________________________________________
> > Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
> > Yahoo! Courrier : http://fr.mail.yahoo.com
> >  

___________________________________________________________
Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
Yahoo! Courrier : http://fr.mail.yahoo.com

Re: problem with cvs checkout dest="."

Posted by de...@canoo.com.
this sounds to me as if you use the wrong command.
What u might wanna do is to use 'cvs update -d'

does that help?

detlef
Quoting Nicolas Girard <gi...@yahoo.fr>:

> Hi,
> I'd like to have cvs work just like it does at the command line:
>     prompt$ cvs checkout -d . my_module
>     cvs checkout: Updating .
>     U my_module/src
>     U my_module/src/redame.txt
> this creates src in .
> 
> But with the supposed equivalent in ant:
>     --snip-- basedir="." --snip--
>     <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"/>
> cvs creates the directory ./my_module and checks out everything in it.
> I thought it was because basedir contained an absolute path ;
> unfortunately
> <cvs dest="." .../> does the same thing...
> 
> Have you experienced the same problem ? I'm afraid not, according to the
> archives... :-(
> Regards,
> Nicolas Girard
> 
> ___________________________________________________________
> Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
> Yahoo! Courrier : http://fr.mail.yahoo.com
> 

Re: problem with cvs checkout dest="."

Posted by Daniel Martin <dt...@home.com>.
"Nico Seessle" <ni...@apache.org> writes:

> ----- Original Message -----
> From: "Daniel Martin" <dt...@home.com>
> To: <an...@jakarta.apache.org>
> Sent: Monday, September 10, 2001 7:49 PM
> Subject: Re: problem with cvs checkout dest="."
> 
> 
> > Nicolas Girard <gi...@yahoo.fr> writes:
> >
<SNIP>
> > > But with the supposed equivalent in ant:
> > >     --snip-- basedir="." --snip--
> > >     <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"/>
> >
> > This ant snippet is equivalent to:
> > cd ${basedir} && cvs checkout -d ${cvs.root}
> 
> No. It's equivalent to:
> 
> cd ${basedir} && cvs -d ${cvs.root} checkout my_module

Oh; that's right.  I had forgotten that CVS assigned completely
different meanings to options before and after the command.  What you
said then should work.



Re: problem with cvs checkout dest="."

Posted by Nicolas Girard <gi...@yahoo.fr>.
--- Nico Seessle <ni...@apache.org> wrote :
> From the docs I would guess what Nicolas should use is
>     <cvs cvsRoot="${cvs.root}" dest="${basedir}"
>          package="my_module" command="co -d ${basedir}/>

Oh, okay. Maybe it should be an idea to precise in the doc that dest attribute
mimics the cvs -d option and not the cvs co -d option, which isn't so obvious
since co is the default command performed by <cvs>

As a conclusion, assuming basedir=/home/user/test, the command
  <cvs cvsRoot="${cvs.root}" dest="${basedir}"
       package="my_module" command="co -d ${basedir}/>
extracts my_module stuff in ${basedir}/test. The solution to my problem is also
to write command="co -d ."

Thank you all for your help.
Nicolas

___________________________________________________________
Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
Yahoo! Courrier : http://fr.mail.yahoo.com

Re: problem with cvs checkout dest="."

Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "Daniel Martin" <dt...@home.com>
To: <an...@jakarta.apache.org>
Sent: Monday, September 10, 2001 7:49 PM
Subject: Re: problem with cvs checkout dest="."


> Nicolas Girard <gi...@yahoo.fr> writes:
>
> > Hi,
> > I'd like to have cvs work just like it does at the command line:
> >     prompt$ cvs checkout -d . my_module
> >     cvs checkout: Updating .
> >     U my_module/src
> >     U my_module/src/redame.txt
> > this creates src in .
> >
> > But with the supposed equivalent in ant:
> >     --snip-- basedir="." --snip--
> >     <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"/>
>
> This ant snippet is equivalent to:
> cd ${basedir} && cvs checkout -d ${cvs.root}

No. It's equivalent to:

cd ${basedir} && cvs -d ${cvs.root} checkout my_module

> To do what you say you want, use:
> <cvs cvsRoot="${basedir}" package="my_module"/>

No.

> The -d option to cvs redefines the cvs root, and overrides the
> $CVSROOT environment variable.

C:\>cvs --help-options
CVS global options (specified before the command name) are:
[...]
    -d CVS_root  Overrides $CVSROOT as the root of the CVS tree.
[...]
(Specify the --help option for a list of other help options)

C:\>cvs --help co
Usage:
  cvs checkout [-ANPRcflnps] [-r rev | -D date] [-d dir]
    [-j rev1] [-j rev2] [-k kopt] modules...
[...]
        -d dir  Check out into dir instead of module name.
[...]
(Specify the --help global option for a list of other help options)

=> There are different -d options available with cvs, so you could do a

cvs -d $MYCVSROOT co -d somedir somemodule.

>From the docs I would guess what Nicolas should use is

    <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"
command="co -d ${basedir}/>

Nico



Re: problem with cvs checkout dest="."

Posted by Daniel Martin <dt...@home.com>.
Nicolas Girard <gi...@yahoo.fr> writes:

> Hi,
> I'd like to have cvs work just like it does at the command line:
>     prompt$ cvs checkout -d . my_module
>     cvs checkout: Updating .
>     U my_module/src
>     U my_module/src/redame.txt
> this creates src in .
> 
> But with the supposed equivalent in ant:
>     --snip-- basedir="." --snip--
>     <cvs cvsRoot="${cvs.root}" dest="${basedir}" package="my_module"/>

This ant snippet is equivalent to:
cd ${basedir} && cvs checkout -d ${cvs.root}

To do what you say you want, use:
<cvs cvsRoot="${basedir}" package="my_module"/>

The -d option to cvs redefines the cvs root, and overrides the
$CVSROOT environment variable.