Submitter | via Mercurial-devel |
---|---|
Date | May 5, 2017, 9:21 p.m. |
Message ID | <88b8a66e218f79567fc6.1494019308@martinvonz.svl.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/20463/ |
State | Accepted |
Headers | show |
Comments
On 5/5/17 2:21 PM, Martin von Zweigbergk wrote: > # HG changeset patch > # User Martin von Zweigbergk <martinvonz@google.com> > # Date 1494018658 25200 > # Fri May 05 14:10:58 2017 -0700 > # Node ID 88b8a66e218f79567fc6cd3dbace416841456f8c > # Parent b9d97bf96f613dc2dcbfc07c5549151bb0ecb73a > manifest: remove check for non-contexts in _dirmancache > > It looks like the _dirmancache has contained only manifest contexts > since d79c141fdf41 (manifest: remove usages of manifest.read, > 2016-11-10). > > diff --git a/mercurial/manifest.py b/mercurial/manifest.py > --- a/mercurial/manifest.py > +++ b/mercurial/manifest.py > @@ -1340,12 +1340,7 @@ > the revlog > """ > if node in self._dirmancache.get(dir, ()): > - cachemf = self._dirmancache[dir][node] > - # The old manifest may put non-ctx manifests in the cache, so > - # skip those since they don't implement the full api. > - if (isinstance(cachemf, manifestctx) or > - isinstance(cachemf, treemanifestctx)): > - return cachemf > + return self._dirmancache[dir][node] > > if dir: > if self._revlog._treeondisk: > LGTM
On Fri, May 05, 2017 at 02:21:48PM -0700, Martin von Zweigbergk via Mercurial-devel wrote: > # HG changeset patch > # User Martin von Zweigbergk <martinvonz@google.com> > # Date 1494018658 25200 > # Fri May 05 14:10:58 2017 -0700 > # Node ID 88b8a66e218f79567fc6cd3dbace416841456f8c > # Parent b9d97bf96f613dc2dcbfc07c5549151bb0ecb73a > manifest: remove check for non-contexts in _dirmancache queued, thanks
Patch
diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -1340,12 +1340,7 @@ the revlog """ if node in self._dirmancache.get(dir, ()): - cachemf = self._dirmancache[dir][node] - # The old manifest may put non-ctx manifests in the cache, so - # skip those since they don't implement the full api. - if (isinstance(cachemf, manifestctx) or - isinstance(cachemf, treemanifestctx)): - return cachemf + return self._dirmancache[dir][node] if dir: if self._revlog._treeondisk: