Patchwork D8552: fix: use context to fetch mergestate instead of loading it directly

login
register
mail settings
Submitter phabricator
Date May 18, 2020, 10:07 p.m.
Message ID <differential-rev-PHID-DREV-fyt6oa7dljrb4ey34kkr-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46339/
State New
Headers show

Comments

phabricator - May 18, 2020, 10:07 p.m.
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




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

Patch

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(