On Tuesday 26 March 2002 22:25 pm, Diane Holt wrote:
> --- stephan beal <[EMAIL PROTECTED]> wrote:
> > One of Cvs's problems is that it also doesn't give a non-0 error code on
> > some  commands which (IMO), should. For example, 'cvs status foo' does
> > not fail if  foo does not exist (it should, IMO), so the Java code has
> > no way of knowing it failed (and if it failed, WHAT exactly failed?).
>
> But 'cvs log' does give you a return code of 1. And 'cvs diff' returns 0
> for no diffs, 1 for diffs. So it's all doable using currently available
> Ant tasks.

Nope. How does the user get the return code for cvs without actually coding a 
task with it's one Execute/Commandline objects? He can't get it via the Cvs 
task object because it provides no way of passing the return code back to the 
user of the object (or even a subclass of the Cvs task). The only way a user 
has access to that value is to edit the Cvs task code (ant 1.4.1, at least, 
though i'm 98% sure it's the same in the Cvs version).

And a return value of 1 will kill your build if you do it in the wrong place 
(and 'failonerror' is not in the 1.4.1 docs, remember, so many people don't 
know about it for the Cvs task). 'cvs --help diff' also returns 1, which i 
find completely bogus: it gives me the help for the diff command, which is 
exactly what i asked it to do. Though i understand and agree with 'cvs 
--help' returning 1, because this is what is run when you pass bad command 
line parms to cvs.


----- stephan
Generic Unix Computer Guy
[EMAIL PROTECTED] - http://www.einsurance.de
Office: +49 (89) �552 92 862 Handy: �+49 (179) 211 97 67
"...control is a degree of inhibition, and a system which is perfectly
inhibited is completely frozen." -- Alan W. Watts

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to