manifest: move manifestctx creation into manifestlog.get()
authorDurham Goode <durham@fb.com>
Thu, 17 Nov 2016 15:31:19 -0800
changeset 30443 4e1eab73c53d
parent 30442 41a8106789ca
child 30444 b1ce25a40826
manifest: move manifestctx creation into manifestlog.get() Most manifestctx creation already happened in manifestlog.get(), but there was one spot in the manifestctx class itself that created an instance manually. This patch makes that one instance go through the manifestlog. This means extensions can just wrap manifestlog.get() and it will cover all manifestctx creations. It also means this code path now hits the manifestlog cache.
mercurial/manifest.py
--- a/mercurial/manifest.py	Fri Nov 11 01:10:07 2016 -0800
+++ b/mercurial/manifest.py	Thu Nov 17 15:31:19 2016 -0800
@@ -1418,7 +1418,7 @@
         if revlog._usemanifestv2:
             # Need to perform a slow delta
             r0 = revlog.deltaparent(revlog.rev(self._node))
-            m0 = manifestctx(self._repo, revlog.node(r0)).read()
+            m0 = self._repo.manifestlog[revlog.node(r0)].read()
             m1 = self.read()
             md = manifestdict()
             for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).iteritems():