[PATCH 1 of 4] match: make _fileroots a @propertycache and rename it to _fileset

Martin von Zweigbergk martinvonz at google.com
Fri May 19 11:37:06 EDT 2017


On Fri, May 19, 2017 at 7:32 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> On Thu, 18 May 2017 11:03:43 -0700, Martin von Zweigbergk via Mercurial-devel wrote:
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz at google.com>
>> # Date 1495123477 25200
>> #      Thu May 18 09:04:37 2017 -0700
>> # Node ID 48275b23f01283fdf1ae6e630c2c63660528edfc
>> # Parent  0d6b3572ad924103128bb9cd296000fc6fd821ef
>> match: make _fileroots a @propertycache and rename it to _fileset
>
> Looks good overall. Queued, thanks.
>
>> @@ -399,7 +402,6 @@
>>                  return matcher.visitdir(self._path)
>>              return matcher.visitdir(self._path + "/" + dir)
>>          self.visitdir = visitdir
>> -        self._fileroots = set(self._files)
>
> This change should be fine as self._fileset is never be cached in __init__().

Even if it were, this would overwrite it (which is what this was meant
to do), no?

Anyway, I plan on dropping these few lines in a later patch, either
just sacrificing what the feature this code was for or rewriting it in
a better way (I'm not sure yet). I have another 20-30 matcher patches
coming up.


More information about the Mercurial-devel mailing list