Patchwork D8560: templatekw: get mergestate via context

login
register
mail settings
Submitter phabricator
Date May 18, 2020, 10:10 p.m.
Message ID <differential-rev-PHID-DREV-ohmbclgenxdn5tkeulid-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46346/
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.

REVISION SUMMARY
  Happily, this resolves an import cycle!

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/templatekw.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -419,9 +419,7 @@ 
     else:
         merge_nodes = cache.get(b'merge_nodes')
         if merge_nodes is None:
-            from . import mergestate as mergestatemod
-
-            mergestate = mergestatemod.mergestate.read(repo)
+            mergestate = repo[None].mergestate()
             if mergestate.active():
                 merge_nodes = (mergestate.local, mergestate.other)
             else: