ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: fileset of cvs changed files
Date Fri, 31 Dec 2010 15:50:10 GMT
Hello Mark,

what you can do is run your cvs update using the exec task and use a 
nested filterchain do capture output lines with a "U" [1]
and apply a regular expression to keep only the path of the file, then 
save this output into a file.
The output file should contain a series of file relative paths in order 
to be used as input for the includesfile attribute of a patternset.

Something like that (untested) :

<exec executable="cvs" failonerror="true" dir="somerootdir">
<arg value="update"/>
<redirector output="includelist.txt">
<containsregex pattern="^ U " replace=""/>
<fileset dir="somerootdir">
<patternset includesfile="includelist.txt"/>

Otherwise you can write your own ant task and make this task create 
either a patternset, a fileset, or a resource collection.




On 12/31/2010 8:17 AM, Mark Lybarger wrote:
> i'm using ant to build a project that has been checked out from cvs.  i want
> to run a task that uses a fileset of all files changed from cvs.
> basically, i'm looking to run a source code formatter on the source files
> and only want it to run on files that have changed from the version control.
> thanks,
> -mark-

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message