ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: reg: cvs / clearcase task
Date Tue, 26 Mar 2002 21:25:27 GMT
--- stephan beal <stephan@wanderinghorse.net> wrote:
> On Monday 25 March 2002 21:23 pm, Mallampati, Suresh wrote:
> > I have two questions, one regarding source management, and the other
> > regarding ant in general.
> >
> > 1. Can we make CVS / Clearcase tasks accept filesets.
> > 2. Is there a way, I can do the following:
> > 	a. Iterate through a fileset
> 
> i've slated that as my next patch to the Cvs task,

Use the ant-contrib <foreach> task -- it allows for a <fileset>.

> > 	b. For each file, check a condition
> > 	c. Perform a task on the file
> 
> Checking a condition per-file... i can't imagine how that would be 
> accomplished in Ant when using a fileset, at least not when using the 
> existing Condition framework.

Use the ant-contrib <foreach> task -- it runs a target for each item/file
in a list/fileset. The target it runs can do whatever you need it to do,
including <condition>s.

> > FOr ex: Given a src.dir fileset, if a file hasnt been added to source
> > control, or checked in, then add / check in the file..
> 
> That's asking quite a lot, actually. and none of it can be done 100%
> reliably by using only the Cvs tools unless, for example, you capture
> their output and  look for phrases like "nothing known about foo.java".
[...]
> 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.

Diane

=====
(holtdl@yahoo.com)



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

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message