LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-24-2008, 12:21 PM   #1
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Rep: Reputation: 15
cvs checkout with Ant


I'm using ant 1.7 and winCVS 1.3. What's wrong with this ant task?



<cvs command="checkout -APR" package="path_to_package_i_want_checked_out" dest="where_i_want_it_to_check_out_to" />


I get CreateProcess error=2

I am using syntax from ant's site: http://ant.apache.org/manual/CoreTasks/cvs.html
I logged into cvs using:

<cvspass cvsroot="my_cvsroot" password="my_password" />

Last edited by ShaqDiesel; 10-24-2008 at 12:23 PM.
 
Old 10-24-2008, 01:19 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
From the link you mentioned, http://ant.apache.org/manual/CoreTasks/cvs.html:
Quote:
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.
 
Old 10-24-2008, 01:58 PM   #3
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Original Poster
Rep: Reputation: 15
C:\Program Files\GNU\WinCvs 1.3\wincvs.exe is in my windows path environment variable(start-->my computer properties--->advanced-->environment variables). I also set it to my session PATH environment variable

If ant can't communicate with cvs, then it would have thrown an exception before checkout, when I tried logging in right?
 
Old 10-24-2008, 02:08 PM   #4
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Original Poster
Rep: Reputation: 15
I noticed that windows doesnt recognize "wincvs.exe" when I enter it on my current directory. I must not be setting my path variable correctly:

1.for OS environment variable: my computer properties-->advanced-->environment variables-->added "C:\Program Files\GNU\WinCVS 1.3\wincvs.exe" to Path system variable

2.for session environment variable: in my current directory on the windows command line: "set Path=C:\Program Files\GNU\WinCVS 1.3\wincvs.exe"

What is the correct way to set my path? Thanks in advance.
 
Old 10-24-2008, 02:26 PM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Dude - did you try to execute "cvs" from a command prompt, like the manual suggested?

"ant" isn't looking for "wincvs.exe" - it's looking for "cvs". And that's fine - you'll often need all of "CVS", "WinCVS/NT", Python and a bunch of other stuff in a typical "CVS" environment for Windows.

"Ant" should work fine. "Ant" from Eclipse or Netbeans should work fine even *without* any separate WinCVS install. And WinCVS should work fine with Ant ... if you have the right components, and set your %PATH% correctly (either session *or* system path is fine - you don't have to be duplicate redundant about it).

PS:
I didn't notice your second post.
You will have several CVS related things in your %PATH%, but this is the most important one on my Windows PC:
"C:\PROGRA~1\cvsnt;"

PPS:
Your path entry is actually:

GOOD:
"C:\Program Files\GNU\WinCVS 1.3;",
and *not*

BAD:
"C:\Program Files\GNU\WinCVS 1.3\wincvs.exe".

Right?

Last edited by paulsm4; 10-24-2008 at 02:30 PM.
 
Old 10-24-2008, 02:30 PM   #6
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Original Poster
Rep: Reputation: 15
I changed the path both "Path" variables to C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe but it still doesn't work.
 
Old 10-24-2008, 02:41 PM   #7
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Original Poster
Rep: Reputation: 15
I fixed it by doing this in windows cmd:

set Path=C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe;C:\Program Files\GNU\WinCvs 1.3\CVSNT\;C:\Program Files\GNU\WinCvs 1.3\CVSNT
 
Old 10-24-2008, 03:51 PM   #8
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
BAD:
Quote:
Path=C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe;C:\Program Files\GNU\WinCvs 1.3\CVSNT\;C:\Program Files\GNU\WinCvs 1.3\CVSNT
GOOD:
Quote:
Path=C:\Program Files\GNU\WinCvs 1.3\CVSNT;
EXPLANATION:
Quote:
Path=
<= "set path" and "path" are equivalent (but *only* for the "special variable" %PATH%)
C:\Program Files\GNU\WinCvs 1.3\CVSNT\cvs.exe;
<= WRONG: you don't put files (like "wincvs.exe") in your path - only directories!
C:\Program Files\GNU\WinCvs 1.3\CVSNT\;
<= GOOD!
C:\Program Files\GNU\WinCvs 1.3\CVSNT
<= WRONG: this is duplicate!
(You can add the trailing slash, or leave it out. Either choice is OK. There are pros/cons either way, but they're basically equivalent)

Last edited by paulsm4; 10-24-2008 at 03:55 PM.
 
Old 10-24-2008, 05:10 PM   #9
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Original Poster
Rep: Reputation: 15
LOL thanks man, you've been really helpful. I appreciate your explanations.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CVS Question - Checkout a specific branch? Zxian Linux - Software 1 06-25-2008 09:06 PM
Problems with lineseparator when doing cvs checkout. noware Linux - Software 3 06-02-2006 04:31 AM
CVS: checkout and module name pacionet Linux - Software 1 05-11-2006 10:19 AM
cvs checkout on slackware 8.1 rolandp Linux - Software 1 06-30-2005 01:20 AM
CVS produces read-only files on checkout gepesz Linux - Software 1 07-01-2004 04:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration