After short consideration, I suppose the following rules apply (and should be documented):

If a pattern is not rooted, it implicitly applies only to files and directories gathered from non-rooted include patterns and only to the segment of the path after the base directory segment.  For instance, if the base directory is "C:\cvs\foo\bar\" and the pattern is "**/CVS/**", the pattern will only be tested against the filenames relative to the C:\cvs\foo\bar directory.  C:\cvs\foo\bar\xxx\x.cs will be tested as "xxx\x.cs" against the pattern ".*/CVS/.*".  Note that the this rule will disable "**/CVS/**" checking in absolutely-specified paths (do we allow check this now?).  One question: how do patterns specified using ".." work?

* Note: "frompath" patterns could be a special case of the above where the base directory is set to each of the path elements and searched as above.

If a pattern is rooted, it is tested against the entire path string.  If the full pattern path happens to correspond to the base directory, it may apply to files beneath the base directory.

We should probably document the "defaultincludes" boolean flag as well.  ;)

Matthew Mastracci wrote:
Managed to reproduce this issue by building on a different drive with the path "Z:\cvs\nant\..."

Looks like the "**/CVS/**" pattern is matching the \cvs\ bit in the pathname.  There's an implicit rule in NAnt that the include/exclude patterns only apply to the part of the path added after the base directory.  The old (and currently correct) behavior is to test the pattern appended to the root path:

^Z:\cvs\nant\(some wildcard pattern)$

The new behaviour optimized this to just

(some wildcard pattern)

Of course, this new behaviour will break anything under a "cvs/" directory.  What should happen in this following case with the implicit "**/CVS/**" rule?  Is this even valid?

<fileset basedir="C:\extra-build">
  <includes name="C:\cvs\nant\**\*.cs" />
  <includes name="*.cs" />
</fileset>

Matt.

Gert Driesen wrote:
----- Original Message -----
From: "Ian MacLean" <[EMAIL PROTECTED]>
To: "Matthew Mastracci" <[EMAIL PROTECTED]>
Cc: "Gert Driesen" <[EMAIL PROTECTED]>
Sent: Friday, July 09, 2004 4:12 AM
Subject: Re: Fw: [nant-dev] current cvs build failure


  
Matthew Mastracci wrote:

    
Strange - I had the same issue while I was developing (turned out that
the DirectoryScanner was busted), but the fix for that was checked in.


      
Where was the fix ? Maybe its manifesting itself in another way on my
machine setup
    

I can reproduce it here too. For now, I've reverted DirectoryScanner.cs back
to 1.33.

Gert

  


begin:vcard
fn:Matthew Mastracci
n:Mastracci;Matthew
org:aclaro Softworks, inc.
adr:;;1900 a - 11 St. SE;Calgary;Alberta;T2H 3G2;Canada
email;internet:[EMAIL PROTECTED]
title:Software Developer
tel;work:(403) 299-6612
x-mozilla-html:FALSE
url:http://www.aclaro.com
version:2.1
end:vcard

Reply via email to