[PATCH] Fixed issue 884: Build products not ignored until .hgignore touched

Greg Ward greg-hg at gerg.ca
Tue Jul 6 11:00:03 CDT 2010


On Mon, Jul 5, 2010 at 8:11 PM, Nicolas Dumazet <nicdumz at gmail.com> wrote:
> 2010/7/6 Renato Cunha <renatoc at gmail.com>:
>> # HG changeset patch
>> # User Renato Cunha <renatoc at gmail.com>
>> # Date 1278366378 10800
>> # Node ID 186e2352fb57a1edbb6a4f9ae4e3e6c304873bb0
>> # Parent  c57cfff6f7b8c55637c05b169ab0d08474f0e513
>> Fixed issue 884: Build products not ignored until .hgignore touched
>
> nitpick: You are probably expected to prefix the commit message by
> "inotify: " here.

And there's a standard way to say which bug you're fixing.  I think you want

  inotify: ignorable files not ignored until .hgignore touched (issue884)

>> diff --git a/hgext/inotify/server.py b/hgext/inotify/server.py
>> --- a/hgext/inotify/server.py
>> +++ b/hgext/inotify/server.py
>> @@ -213,7 +213,7 @@
>>             if time != int(st_mtime):
>>                 return 'l'
>>             return 'n'
>> -        if type_ == '?' and self.dirstate._ignore(fn):
>> +        if type_ == '?' and self.dirstate._dirignore(fn):
>>             return 'i'
>>         return type_
>
> At first, I was very confused by this fix.
> I mean. As far as I can tell, in this context we are SURE that fn is a
> file, and not a directory.
> It hence looks strange to check _dirignore on this file.
>
> But you are right, in the sense that ignore patterns should match each
> component of the path.
> This fix looks good, kudos to you :)

If Nicolas did not understand the fix at first, it might deserve a
brief comment.

Greg


More information about the Mercurial-devel mailing list