[Request] [+ ] D8559: revset: get mergestate via context

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon May 18 22:10:46 UTC 2020


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/D8559

AFFECTED FILES
  mercurial/revset.py

CHANGE DETAILS

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -789,9 +789,8 @@
     "merge" here includes merge conflicts from e.g. 'hg rebase' or 'hg graft'.
     """
     getargs(x, 0, 0, _(b"conflictlocal takes no arguments"))
-    from . import mergestate as mergestatemod
-
-    mergestate = mergestatemod.mergestate.read(repo)
+
+    mergestate = repo[None].mergestate()
     if mergestate.active() and repo.changelog.hasnode(mergestate.local):
         return subset & {repo.changelog.rev(mergestate.local)}
 
@@ -805,9 +804,8 @@
     "merge" here includes merge conflicts from e.g. 'hg rebase' or 'hg graft'.
     """
     getargs(x, 0, 0, _(b"conflictother takes no arguments"))
-    from . import mergestate as mergestatemod
-
-    mergestate = mergestatemod.mergestate.read(repo)
+
+    mergestate = repo[None].mergestate()
     if mergestate.active() and repo.changelog.hasnode(mergestate.other):
         return subset & {repo.changelog.rev(mergestate.other)}
 



To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200518/57fdd8f9/attachment-0001.html>


More information about the Mercurial-patches mailing list