[Request] [+ ] D8558: fileset: get mergestate via context
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Mon May 18 22:10:14 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/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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200518/813a03fd/attachment-0001.html>
More information about the Mercurial-patches
mailing list