D8558: fileset: get mergestate via context

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

D8558: fileset: get mergestate via context

valentin.gatienbaron (Valentin Gatien-Baron)
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

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'
     )



To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel