# HG changeset patch # User Anton Shestakov # Date 1698342620 10800 # Node ID 7169272b1b9084f9e0a8e1d04475c4a837979913 # Parent 6518a3b951dcf9953c6342ca276b7640b46f6e1b evolve: remove compatibility for memmerge not being available in hg 5.5 diff -r 6518a3b951dc -r 7169272b1b90 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sun Jan 07 14:27:11 2024 -0300 +++ b/hgext3rd/evolve/evolvecmd.py Thu Oct 26 14:50:20 2023 -0300 @@ -910,13 +910,6 @@ return commitmsg def use_in_memory_merge(repo): - try: - from mercurial import mergestate as mergestatemod - mergestatemod.memmergestate - except (AttributeError, ImportError): - # no in-memory evolve if Mercurial lacks the required code - # hg <= 5.5 (19590b126764) - return False config_value = repo.ui.config(b'experimental', b'evolution.in-memory') if config_value == b'force': return True diff -r 6518a3b951dc -r 7169272b1b90 hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Sun Jan 07 14:27:11 2024 -0300 +++ b/hgext3rd/evolve/rewriteutil.py Thu Oct 26 14:50:20 2023 -0300 @@ -21,7 +21,6 @@ error, hg, lock as lockmod, - mergeutil, node, obsolete, obsutil, @@ -233,28 +232,12 @@ revs = sorted(revs) return repomarks, revs -try: - from mercurial import mergestate - mergestate.memmergestate - hasmemmergestate = True -except (ImportError, AttributeError): - # hg <= 5.5 (19590b126764) - hasmemmergestate = False - def rewrite(repo, old, head, newbases, commitopts): """Return (nodeid, created) where nodeid is the identifier of the changeset generated by the rewrite process, and created is True if nodeid was actually created. If created is False, nodeid references a changeset existing before the rewrite call. """ - # Until there was memmergestate, in-memory would clear the on-disk - # mergestate and use that. We don't want that to happen, so we'll require - # users of old Mercurial versions to run `hg touch` etc without - # mergestate. - if not hasmemmergestate: - ms = compat.mergestate.read(repo) - mergeutil.checkunresolved(ms) - wlock = lock = tr = None try: wlock = repo.wlock()