Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant and CVS

 
M Perfickme
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Would some one please help, how do I checkout files from cvs using ant?

Would you please give me step-by-step help to create such a task.

Thank you in advance

N
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to create a new Ant task - Ant has a CVS task built in. It's described in the manual: http://ant.apache.org/manual/index.html.
 
M Perfickme
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry my mistake. Learn something new every day...

However, still need help.

Am doing:
<target name="checkOut" >
<cvs cvsroot=":blah:blah@blah:blah/blah"
command="checkout"
passfile="C:\...\.cvspass"
dest="c:\..."/>
</target>

And am getting back:
checkout error=2

Thank you in advance

N
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, can't help you there, because I've never used it.
 
Robb Sherwin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However, still need help.

Am doing:
<target name="checkOut" >
<cvs cvsroot=":blah:blah@blah:blah/blah"
command="checkout"
passfile="C:\...\.cvspass"
dest="c:\..."/>
</target>

And am getting back:
checkout error=2



I'm getting this in Eclipse as well.

Additionally, when I try to run the exact same build.xml file in a Cygwin window I get an authorization failed error. The exact text is:

authorization failed: server cvs.mycompany.com rejected access to /cvs for user rsherwin


... Has anyone been able to successfully checkout or even perform a diff on code in CVS from the latest version of Ant? I mean, this is the code I'm using in my build.xml file and if it's wrong I'm at a loss to guess what it could be:

 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from ant manual on cvs task

Found by googling "error=2 ant cvs"

Important: This task needs "cvs" on the path. If it isn't, you will get an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working.


I don't have access to cvs tonight and I usually do cvs diff on the command line or use the compare feature in eclipse, so I don't have any advice on that issue beyond what the cvs task documentation describes.
[ July 20, 2005: Message edited by: Carol Enderlin ]
 
Robb Sherwin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Carol. I'll check that out in order to get Eclipse integrated correctly.

As an aside, I went into Cygwin to use Ant and CVS that way and eventually learned that the .cvspass file I was using had a newline at the end of it. That screwed up the password descrambling. Once I eliminated it I no longer got any 'authorization failed' messages.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic