Patchwork D8563: localrepo: get mergestate via context

login
register
mail settings
Submitter phabricator
Date May 18, 2020, 10:10 p.m.
Message ID <differential-rev-PHID-DREV-dlvvm357fkxd5mdjjcve-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46354/
State New
Headers show

Comments

phabricator - May 18, 2020, 10:10 p.m.
durin42 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/D8563

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2466,7 +2466,7 @@ 
                 ui.status(
                     _(b'working directory now based on revision %d\n') % parents
                 )
-            mergestatemod.mergestate.clean(self, self[b'.'].node())
+            self[None].mergestate(clean=True)
 
         # TODO: if we know which new heads may result from this rollback, pass
         # them to destroy(), which will prevent the branchhead cache from being
@@ -2865,7 +2865,7 @@ 
                 fparent2 = nullid
             elif not fparentancestors:
                 # TODO: this whole if-else might be simplified much more
-                ms = mergestatemod.mergestate.read(self)
+                ms = self[None].mergestate()
                 if (
                     fname in ms
                     and ms[fname] == mergestatemod.MERGE_RECORD_MERGED_OTHER
@@ -2966,7 +2966,7 @@ 
                 self, status, text, user, date, extra
             )
 
-            ms = mergestatemod.mergestate.read(self)
+            ms = self[None].mergestate()
             mergeutil.checkunresolved(ms)
 
             # internal config: ui.allowemptycommit