# HG changeset patch # User Anton Shestakov # Date 1590733743 -28800 # Node ID b34af5087714e0995ae0ce2e698338879582ee46 # Parent e320a84b65c109b9b97219a981db4c90c9992279 compat: compatibility for mergestate being a separate module in 5.5 diff -r e320a84b65c1 -r b34af5087714 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Tue Jul 21 12:52:52 2020 +0800 +++ b/hgext3rd/evolve/compat.py Fri May 29 14:29:03 2020 +0800 @@ -12,6 +12,7 @@ from mercurial import ( context, copies, + merge as mergemod, obsolete, pycompat, registrar, @@ -35,6 +36,13 @@ 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, ) diff -r e320a84b65c1 -r b34af5087714 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Tue Jul 21 12:52:52 2020 +0800 +++ b/hgext3rd/evolve/evolvecmd.py Fri May 29 14:29:03 2020 +0800 @@ -1981,7 +1981,7 @@ 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'):