diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -799,6 +799,19 @@ elif repo.currenttransaction() is not None: whynotimm = "rebase run inside a transaction" + # in-memory rebase can be configured not to run if a mergedriver is + # configured; this should be used only if the driver's preprocess() + # scripts might use the working copy. + # + # (Note: Even without this config, IMM will still abort if any files are + # marked by preprocess() to be driver-resolved; however, sometimes the + # preprocess() function itself can't be trusted.) + # + # TODO(phillco): Replace with decorators on the scripts themselves + elif (ui.config('experimental', 'mergedriver') and + ui.configbool('rebase', 'experimental.inmemory.nomergedriver')): + whynotimm = 'mergedriver enabled' + if whynotimm: ui.log("rebase", "disabling IMM because: %s" % whynotimm, why_not_imm=whynotimm)