diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -67,6 +67,14 @@ cmdtable = {} command = registrar.command(cmdtable) + +configtable = {} +configitem = registrar.configitem(configtable) +configitem( + b'devel', + b'rebase.force-in-memory-merge', + default=False, +) # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should # be specifying the version(s) of Mercurial they are tested with, or @@ -1112,6 +1120,8 @@ with ui.configoverride(overrides, b'rebase'): return _dorebase(ui, repo, action, opts, inmemory=inmemory) except error.InMemoryMergeConflictsError: + if ui.configbool(b'devel', b'rebase.force-in-memory-merge'): + raise ui.warn( _( b'hit merge conflicts; re-running rebase without in-memory' diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t --- a/tests/test-copies-in-changeset.t +++ b/tests/test-copies-in-changeset.t @@ -345,7 +345,10 @@ $ hg co -q 0 $ hg mv a b $ hg ci -qm 'rename a to b' - $ hg rebase -d 1 --config rebase.experimental.inmemory=yes +Not only do we want this to run in-memory, it shouldn't fall back to +on-disk merge (no conflicts), so we force it to be in-memory +with no fallback. + $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes rebasing 2:* tip "rename a to b" (glob) merging a and b to b saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)