--- stephan beal <[EMAIL PROTECTED]> wrote:
> > I didn't say "it's all doable using the Cvs task" -- I said "it's all
> > doable using currently available Ant tasks".  
> 
> You cannot get the error code of a run program using any current (1.4x)
> Ant task without hacking that task. If i am wrong, please show me,
> because i would Love to know how to do it.

Again, I didn't say "tasks available in a released version of Ant" but
rather "currently available Ant tasks".

But even if you couldn't go with 1.5alpha, which has a 'resultproperty'
attr for <exec>, there are still ways to do it -- which way you choose
depends on things like how platform-independent you need to be.

Of course, if you can't go with 1.5alpha, then you can't use the "logic"
tasks from ant-contrib, either, so things will need to be a bit more
roundabout, but it's still all completely doable.

> As you pointed out, he could do a <foreach> and <condition> loop, but he
> cannot get the error codes, so he can't use those as conditions.
> [...]
> It cannot be done with the supplied Ant tasks, using them as-is, because
> you can't get the return values of the executed command. 

Here's an example of you making a pronouncement of what Ant "cannot" do,
and it's just not true -- Ant can.

> A cvs log will kill your build if failonerror is true (poor usage of
> error codes in cvs, imo).

I was never suggesting using the <cvs> task to garner the info about what
needed doing, since there's absolutely no reason to, since he's not doing
anything for real with CVS until he knows what needs doing -- and the way
to find out what needs doing is to use <exec>.

> > Yeah, so? -- who said anything about running 'cvs --help diff'??
> 
> i was just pointing out that cvs returns non-0 error codes in some
> silly places, as in the case of 'cvs diff' (IMO, it should return non-0
> only on failure, as in the case of other C-based app out there.)

I disagree completely -- it should do what 'diff' does, and it does. I
don't always care what the actual diffs are -- I just want to know if
there are any.

> i'm sorry if you feel i was denouncing your solution. i was attempting
> to clarify the point that things involving error codes cannot be done
> using as-supplied tasks (not even <exec> gives you the return value
> anywhere).

Yes, but your clarification is misinformation, so it doesn't clarify, it
muddies. Even if you can't go with the latest <exec>, you can still
capture the rc into 'outputproperty' (or not even bother capturing).

> i'm extremely sorry that i've come across as denouncing what you've
> said, but the statement "can be done with current Ant tasks" is not
> true unless you extend that to mean "can be done with [hacked] 
> current Ant tasks." i would be more than happy to be wrong on this, of 
> course, because i've also needed this functionality.

Then you should be very happy indeed, since you are in fact wrong. :)

Diane

=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

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

Reply via email to