[PATCH 2 of 2 V4] repoview: discard filtered changelog if index isn't shared with unfiltered
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Sun Feb 14 12:20:40 EST 2016
At Mon, 15 Feb 2016 00:00:12 +0900,
Yuya Nishihara wrote:
>
> On Sun, 14 Feb 2016 01:39:03 +0900, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1455381235 -32400
> > # Sun Feb 14 01:33:55 2016 +0900
> > # Node ID 8ffe33c0a67bdd0a1fdf6c5c6e3c17946717c122
> > # Parent 4f589e36e0a5879f243cf958ea2e03f24c204670
> > repoview: discard filtered changelog if index isn't shared with unfiltered
>
> Looks good to me and confirmed the test does crash without this change.
> I want a review by Pierre-Yves. Can you take a look?
>
> > --- a/mercurial/repoview.py
> > +++ b/mercurial/repoview.py
> > @@ -315,7 +315,8 @@ class repoview(object):
> > revs = filterrevs(unfi, self.filtername)
> > cl = self._clcache
> > newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed)
> > - if cl is not None and newkey != self._clcachekey:
> > + if (cl is not None and
> > + (cl.index is not unfiindex or newkey != self._clcachekey)):
>
> This is tricky. I want to add a comment that says
>
> # if cl.index is not unfiindex, unfi.changelog cache would be
> # recreated and our clcache refers to garbage object
>
> Does it make sense?
It'll be useful for source readers in the future :-)
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list