ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: cvs commit: ant/src/main/org/apache/tools/ant DirectoryScanner.java
Date Thu, 03 Mar 2005 15:01:43 GMT
> From: Matt Benson [mailto:gudnabrsam@yahoo.com]
> --- Antoine Levy-Lambert <antoine@gmx.de> wrote:
> > I had thought about this issue of optimizing pattern
> > scanning.
> > DirectoryScanner used to be written so that if an
> > exclude pattern looks like
> > foo/bar/** scanning stops in foo/bar.
> > Actually if an exclude pattern is like **/Test/**,
> > every time a directory Test is encountered it should
> > not be scanned.
> 
> The exception to that rule is if some other directory
> Test is more explicitly specified as an include; I
> think this is handled as well as can be in
> couldHoldIncluded().

What do you mean Matt? What you just wrote sounds incorrect
to me, and I believe Antoine is correct when he writes that
we should stop scanning when *any* Test directory is seen.

Excludes always win over includes (or selectors), even if the
include is more specific. This is why the selectors are so
helpful, because they provide a more flexible mechanism (at the
expense of scanning optimizations, since we can't easily guess
what to avoid scanning when selectors are involved). --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message