Patchwork D9193: commit: pass mergestate into `_process_files` instead of re-reading it

login
register
mail settings
Submitter phabricator
Date Oct. 10, 2020, 8:41 a.m.
Message ID <differential-rev-PHID-DREV-45dddoxcocxiv3acwm7y-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47430/
State Superseded
Headers show

Comments

phabricator - Oct. 10, 2020, 8:41 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9193

AFFECTED FILES
  mercurial/commit.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -131,7 +131,7 @@ 
         mn = p1.manifestnode()
         files = metadata.ChangingFiles()
     else:
-        mn, files = _process_files(tr, ctx, error=error)
+        mn, files = _process_files(tr, ctx, ms, error=error)
 
     if origctx and origctx.manifestnode() == mn:
         origfiles = origctx.files()
@@ -165,7 +165,7 @@ 
     return salvaged
 
 
-def _process_files(tr, ctx, error=False):
+def _process_files(tr, ctx, ms, error=False):
     repo = ctx.repo()
     p1 = ctx.p1()
     p2 = ctx.p2()
@@ -179,7 +179,6 @@ 
     m = mctx.read()
     m1 = m1ctx.read()
     m2 = m2ctx.read()
-    ms = mergestate.mergestate.read(repo)
 
     files = metadata.ChangingFiles()