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

Yuya Nishihara yuya at tcha.org
Fri May 19 12:07:35 EDT 2017


On Fri, 19 May 2017 08:37:06 -0700, Martin von Zweigbergk wrote:
> 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?

Doh, I thought subdirmatcher would call match.__init__() before doing the
hack, (and if match.__init__() accessed to _fileset, set(_files) != _fileset.)
But I was wrong. :)


More information about the Mercurial-devel mailing list