Patchwork D8558: fileset: get mergestate via context

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

AFFECTED FILES
  mercurial/fileset.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -16,7 +16,6 @@ 
     error,
     filesetlang,
     match as matchmod,
-    mergestate as mergestatemod,
     pycompat,
     registrar,
     scmutil,
@@ -245,7 +244,7 @@ 
     getargs(x, 0, 0, _(b"resolved takes no arguments"))
     if mctx.ctx.rev() is not None:
         return mctx.never()
-    ms = mergestatemod.mergestate.read(mctx.ctx.repo())
+    ms = mctx.ctx.mergestate()
     return mctx.predicate(
         lambda f: f in ms and ms[f] == b'r', predrepr=b'resolved'
     )
@@ -259,7 +258,7 @@ 
     getargs(x, 0, 0, _(b"unresolved takes no arguments"))
     if mctx.ctx.rev() is not None:
         return mctx.never()
-    ms = mergestatemod.mergestate.read(mctx.ctx.repo())
+    ms = mctx.ctx.mergestate()
     return mctx.predicate(
         lambda f: f in ms and ms[f] == b'u', predrepr=b'unresolved'
     )