# HG changeset patch # User Anton Shestakov # Date 1615287010 -28800 # Node ID 82040a455e71caf61be1e2468322b4ca74df16cb # Parent 524eb673ac52f5aa88127be040f7041cc85aeb10 evolve: check if in-memory is supported on a good enough level for evolve diff -r 524eb673ac52 -r 82040a455e71 CHANGELOG --- a/CHANGELOG Tue Feb 02 00:05:19 2021 +0530 +++ b/CHANGELOG Tue Mar 09 18:50:10 2021 +0800 @@ -5,7 +5,7 @@ -------------------- * evolve: add a experimental.evolution.in-memory config for running evolve - in memory + in memory (hg >= 5.6) * evolve: improve content-divergence resolution that involves parent changes * evolve: preserve wdir parent when using `hg evolve --stop` * obslog: clarify the command name in the help, diff -r 524eb673ac52 -r 82040a455e71 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Tue Feb 02 00:05:19 2021 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Tue Mar 09 18:50:10 2021 +0800 @@ -918,6 +918,13 @@ 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