[Request] [+ ] D8552: fix: use context to fetch mergestate instead of loading it directly

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


durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/fix.py

CHANGE DETAILS

diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -144,7 +144,6 @@
     match as matchmod,
     mdiff,
     merge,
-    mergestate as mergestatemod,
     pycompat,
     registrar,
     rewriteutil,
@@ -427,9 +426,7 @@
     if not (len(revs) == 1 and wdirrev in revs):
         cmdutil.checkunfinished(repo)
         rewriteutil.precheck(repo, revs, b'fix')
-    if wdirrev in revs and list(
-        mergestatemod.mergestate.read(repo).unresolved()
-    ):
+    if wdirrev in revs and list(repo[wdirrev].mergestate().unresolved()):
         raise error.Abort(b'unresolved conflicts', hint=b"use 'hg resolve'")
     if not revs:
         raise error.Abort(



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/cf984877/attachment.html>


More information about the Mercurial-patches mailing list