ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JP Fiset>
Subject Re: AW: Fileset and Custom Fileset in Ant 1.7
Date Wed, 28 Sep 2005 15:55:16 GMT
I believe I do, but if you can prove me wrong, then I'd be delighted to 
go around custom files sets.

I am trying to provide file selectors in svn-ant, which is an ant 
library that support subversion. Subversion keeps track of files that 
are deleted and missing. If I want to write an ant task where all 
missing files are restored, then the classic file set is not sufficient. 
I created a new file set that queries the subversion client for all 
files, regardless of whether they are present on the file system or not. 
Since there are already existing ant tasks based on file sets to perform 
restoring operations, using the custom file set allows re-using the same 
code but with the ability to specify files that are, as far as the file 
system is concerned, non-existent.

I can not see a way around it, since the classic file set can not 
predict files that are not on the file system. I know that creating a 
custom file set that returns paths of non-existing files is a departure 
from what is generally accepted of a file set, however mis-use of the 
custom file set will result in  a task failure. For example:

<svnFileSet id="missingFiles" dir="workingCopy">

<copy todir="x">
    <fileset refid="missingFiles"/>

will fail. But, this weird behaviour is just a nuisance compared to the 
great benefits of something like this:

<svnFileSet id="modifiedFiles" dir="workingCopy">

<copy todir="x">
    <fileset refid="modifiedFiles""/>

Tell me what you think. I am in the development stage for this feature, 
and I have yet to submit the patch to svn-ant. This is a good time to 
influence the design.

JP wrote:
> And you should ensure that you _really_ need a fileset.
> 2 years ago (or so) I wanted to write a new fileset and end on a selector.
> Jan 

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

View raw message