ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Goktepe <andrewgokt...@gmail.com>
Subject Re: Adding files to CVS with Ant
Date Tue, 07 Feb 2006 12:39:23 GMT
Is the new file in a directory that is also new? The cvs add command is not
recursive; you will need to add any new directories first.

Try doing the add and commit of the same file manually on the command line
and see if you get an error that way too. If so, then this is not a problem
with Ant.

-Andrew

On 2/7/06, Giovanni Mesturini <jo_4_ant@yahoo.it> wrote:
>
> Scenario:
>
> I have to add a file to CVS from client to server
> using an Ant script.
> This is my build.xml:
>
>         ...
>         <property name="cvs-username" value="username" />
>         <property name="cvs-password" value="password" />
>         <property name="cvs-repository"
> value=":
> pserver:${cvs-username}:${cvs-password}@intr-iol-cvs.bancaintesa.it:2402/cvs/cvsnch
> "
> />
>         <property name="cvs-module" value="test-module"/>
>         <property name="cvs-local-dest" value="cvs-local"/>
>         <property name="file-to-be-added"
> value="dummy.java"/>
>         ...
>         <target name="add-file">
>                 <!-- Do a checkout first - IT WORKS -->
>                 <cvs command="checkout" cvsRoot="${cvs-repository}"
> package="${cvs-module}" dest="${cvs-local-dest}"
> error="error.txt" output="output.txt"/>
>                 <!-- Copy the files to be added in the directory
> just checked out - IT WORKS -->
>                 <copy todir="${cvs-local-dest}/${cvs-module}">
>                         <fileset dir=".">
>                                 <include name="${file-to-be-added}"/>
>                         </fileset>
>                 </copy>
>                 <!-- Add the file just copied to repository - IT
> DOES NOT WORK -->
>                 <cvs command="add
> ${cvs-local-dest}/${cvs-module}/${file-to-be-added}"
> cvsRoot="${cvs-repository}" package="${cvs-module}"
> error="error.txt" output="output.txt"/>
>                 <!-- Commit the add - IT DOES NOT WORK -->
>                 <cvs command="commit
> ${cvs-local-dest}/${cvs-module}/${file-to-be-added}"
> cvsRoot="${cvs-repository}" package="${cvs-module}"
> error="error.txt" output="output.txt"/>
>         </target>
>         ...
>
> Ant outputs:
>
>         Buildfile: build.xml
>
>         add-file:
>
>         BUILD SUCCESSFUL
>         Total time: 0 seconds
>
>
> But in "error.txt" file I find this message:
>
>         cvs add: in directory .:
>         cvs [add aborted]: there is no version here; do 'cvs
> checkout' first
>
> ...and nothing is done: the file is missing on rep.
>
> Where I'm doing wrong?
> Thanks
> Jo
>
>
>
> ___________________________________
> Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
> http://it.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message