Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 79975 invoked from network); 2 Mar 2005 23:27:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Mar 2005 23:27:43 -0000 Received: (qmail 21619 invoked by uid 500); 2 Mar 2005 23:27:42 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 21575 invoked by uid 500); 2 Mar 2005 23:27:41 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 21562 invoked by uid 99); 2 Mar 2005 23:27:41 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of antoine@gmx.de designates 213.165.64.20 as permitted sender) Received: from imap.gmx.net (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 02 Mar 2005 15:27:41 -0800 Received: (qmail invoked by alias); 02 Mar 2005 23:27:37 -0000 Received: from p5080ECB4.dip0.t-ipconnect.de (EHLO [127.0.0.1]) (80.128.236.180) by mail.gmx.net (mp001) with SMTP; 03 Mar 2005 00:27:37 +0100 X-Authenticated: #22961642 Message-ID: <42264BD6.9000301@gmx.de> Date: Thu, 03 Mar 2005 00:27:18 +0100 From: Antoine Levy-Lambert User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant DirectoryScanner.java References: <20050302224354.63398.qmail@minotaur.apache.org> In-Reply-To: <20050302224354.63398.qmail@minotaur.apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello Matt and others, 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. Not sure whether this change does exactly that. I am not sure exactly what the semantics of isDeeper are ? Cheers, Antoine mbenson@apache.org wrote: >mbenson 2005/03/02 14:43:54 > > Modified: src/main/org/apache/tools/ant DirectoryScanner.java > Log: > Stop scanning directories where we match the directory but know based > on the pattern that we will never match any of its contents. >.... > /** > + * Verify that a pattern specifies files deeper > + * than the level of the specified file. > + * @param pattern the pattern to check. > + * @param name the name to check. > + * @return whether the pattern is deeper than the name. > + * @since Ant 1.6.3 > + */ > + private boolean isDeeper(String pattern, String name) { > + Vector p = SelectorUtils.tokenizePath(pattern); > + Vector n = SelectorUtils.tokenizePath(name); > + return p.contains("**") || p.size() > n.size(); > + } > + > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org