Bug 25379 - Cvs Tasks doesn't handle wildcards, so why not add a fileset
Summary: Cvs Tasks doesn't handle wildcards, so why not add a fileset
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.0
Hardware: All other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2003-12-10 02:12 UTC by Filip Hanik
Modified: 2009-07-31 03:52 UTC (History)
0 users



Attachments
add fileset to the CVS task (2.22 KB, patch)
2003-12-10 02:13 UTC, Filip Hanik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Hanik 2003-12-10 02:12:34 UTC
I have a patch where you can specify a fileset in the Cvs task, each filename in
the fileset will be added to the command line, so a 
"cvs add *" can be rewritten as 

"cvs add"
<fileset dir="/my/dir">
   <include name="*.*"/>
</fileset>

I have not added support for recursive directories, since to CVS you have to
specify relative path filenames, I guess I should do 

CvsFileArgument = AbsoluteFilePath - CvsDestination

currently 
CvsFileArgument = FileName

patch is attached
Comment 1 Filip Hanik 2003-12-10 02:13:04 UTC
Created attachment 9477 [details]
add fileset to the CVS task
Comment 2 Antoine Levy-Lambert 2004-02-07 12:25:46 UTC
the attached patch is not good enough, it will not handle the case where the
length of the command line exceeds what the operating system can handle. See
DefaultCompilerAdapter#executeExternalCompile to see how to do this properly (ie
command lines should not exceed a length of 4096.

The changelog task has already nested filesets, but it is broken, because like
your patch it does not check how big the command line gets.

I tried this :

 <cvschangelog dir="c:/dev/asf/ant.head" 
                destfile="changelogant.xml"  >
     <fileset dir="c:/dev/asf/ant.head/src/main">
         <include name="**/*.java"/>
     </fileset>
</cvschangelog>

and it fails with a CreateProcesss IOException !!!


We need an xargs task.

I think the xargs task should extend ExecTask

Then for instance cvs with a fileset could be delegated to xargs, and a lot of
other similar stuff too.