commitctx: explicitly pass `manifest` to _commit_manifest
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 29 Jul 2020 15:40:13 +0200
changeset 45247 e15416c95b25
parent 45246 b1f2659c1c34
child 45248 4cde23ba076e
commitctx: explicitly pass `manifest` to _commit_manifest As pointed out by Yuya Nishihara.
mercurial/commit.py
--- a/mercurial/commit.py	Thu Jul 30 16:58:38 2020 +0100
+++ b/mercurial/commit.py	Wed Jul 29 15:40:13 2020 +0200
@@ -206,7 +206,7 @@
     touched.extend(removed)
 
     files = touched
-    mn = _commit_manifest(tr, linkrev, ctx, mctx, files, added, drop)
+    mn = _commit_manifest(tr, linkrev, ctx, mctx, m, files, added, drop)
 
     return mn, files, filesadded, removed
 
@@ -347,7 +347,7 @@
     return fnode, touched
 
 
-def _commit_manifest(tr, linkrev, ctx, mctx, files, added, drop):
+def _commit_manifest(tr, linkrev, ctx, mctx, manifest, files, added, drop):
     """make a new manifest entry (or reuse a new one)
 
     given an initialised manifest context and precomputed list of
@@ -370,8 +370,6 @@
 
     m1 = m1ctx.read()
 
-    manifest = mctx.read()
-
     if not files:
         # if no "files" actually changed in terms of the changelog,
         # try hard to detect unmodified manifest entry so that the