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}:[EMAIL PROTECTED]: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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]