Mercurial > evolve
changeset 6640:7169272b1b90
evolve: remove compatibility for memmerge not being available in hg 5.5
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 26 Oct 2023 14:50:20 -0300 |
parents | 6518a3b951dc |
children | 995c6163e97b |
files | hgext3rd/evolve/evolvecmd.py hgext3rd/evolve/rewriteutil.py |
diffstat | 2 files changed, 0 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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()