have you tried the built in <cvschangelog> + the xslt in
style="${ant.home}/etc/changelog.xsl" or
style="${ant.home}/etc/changelog-text.xsl"

it needs a starting tag or branch and will report all files changed
since tag/branch was created


<cvschangelog dir="${basedir}"
                destfile="${cvs.report}${file.separator}changelog.xml"
                tag="${cvs.branch}"
     />
 
   <xslt in="${cvs.report}${file.separator}changelog.xml" 
            out="${cvs.report}${file.separator}changelog.html" 
            style="${ant.home}/etc/changelog.xsl">
          <param name="title" expression="Branch: ${cvs.branch}:
${ant.project.name} ChangeLog"/>
          <param name="module" expression="${ant.project.name}"/>
          <param name="cvsweb" expression="#"/>
     </xslt>


-----Original Message-----
From: Antoine Levy-Lambert [mailto:anto...@gmx.de] 
Sent: Friday, December 31, 2010 10:50 AM
To: Ant Users List
Subject: Re: fileset of cvs changed files

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">
<outputfilterchain> <tokenfilter> <containsregex pattern="^ U "
replace=""/> </tokenfilter> </outputfilterchain> </redirector> </exec>
<fileset dir="somerootdir"> <patternset includesfile="includelist.txt"/>
</fileset>


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

Regards,

Antoine


[1] http://www.cs.utah.edu/dept/old/texinfo/cvs/cvs_toc.html#SEC115

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: user-unsubscr...@ant.apache.org For additional
commands, e-mail: user-h...@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to