Commit 77f3e81e authored by Anton Shestakov's avatar Anton Shestakov
Browse files

compat: compatibility for mergestate being a separate module in 5.5

parent f464b29898e3
Pipeline #6582 passed with stage
in 9 minutes and 46 seconds
......@@ -12,6 +12,7 @@ import contextlib
from mercurial import (
context,
copies,
merge as mergemod,
obsolete,
pycompat,
registrar,
......@@ -35,6 +36,13 @@ try:
except (AttributeError, ImportError):
dirs = util.dirs # pytype: disable=module-attr
# hg <= 5.4 (b7808443ed6a)
try:
from mercurial import mergestate as mergestatemod
mergestate = mergestatemod.mergestate
except (AttributeError, ImportError):
mergestate = mergemod.mergestate # pytype: disable=module-attr
from . import (
exthelper,
)
......
......@@ -1977,7 +1977,7 @@ def hgabortevolve(ui, repo):
def continueevolve(ui, repo, evolvestate):
"""logic for handling of `hg evolve --continue`"""
ms = merge.mergestate.read(repo)
ms = compat.mergestate.read(repo)
mergeutil.checkunresolved(ms)
if (evolvestate[b'command'] == b'next'
or evolvestate[b'category'] == b'orphan'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment