tags:

views:

30

answers:

1

How do I add a new directory into my CVS repository using Ant? From all that I've read, it appears that I have to cd to the parent directory and call the cvs command. How do I do that in Ant? I've seen approaches where an to cd is called in Ant; is that the best approach?

Eg of what I am trying to do: Let's say I have a module Test_Module with directories "A", "B" and "C". Under each of these directories, there are directories for "Jan", "June", "Sept" and I want to create a "Alpha" directory under Test_Module-> C -> Sept.

So, I create a "Alpha" directory on my local system and run the cvs add command from Root and I get the following errror: cvs add: in directory .: cvs [add aborted]: there is no version here; do 'cvs checkout' first

I get the same error when I run this using Ant or from command line.

Now, if I cd to the Test_Module/C/Sept directory and run "cvs add Alpha" it creates the directory and everything is fine. So, how do I do the same in Ant? Are there any ant-contrib tasks that are out there that I could possibly use or even a built-in ant task that I am missing?

Thanks in Advance!!

+1  A: 

did you look at the Ant CVS task?

I haven't used CVS for a while but since it's possible to manage a Subversion repository with Ant, I guess there should be no problem to do it for CVS

Vladimir
Thanks for replying Vladimir! Yes, I looked at the Ant CVS task and it has tasks to call CVS commands etc... however, the issue is that in order to call the "add" command, I need to be in the parent directory. So, my question was, how do I cd from my base directory to the directory where I want to create my new directory.Thanks
ANooBee
according to http://www.network-theory.co.uk/docs/cvsmanual/Addingfiles.html, you can do `cvs add foo/bar/myfile`; this means that you shouldn't need to cd to the `bar` directory.
Vladimir