Skip to content
Snippets Groups Projects
Commit 24a32dea authored by Augie Fackler's avatar Augie Fackler
Browse files

rebase: add a config knob for forcing in-memory rebasing

Use it in a test case where we know the rebase should proceed without
incident in-memory, so we can see tracebacks rather than
fallbacks. This makes it easier to try and debug when things are
broken.

Differential Revision: https://phab.mercurial-scm.org/D8623
parent dfca8497
No related branches found
No related tags found
1 merge request!72ci: hook network-io tests into the pipeline
......@@ -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'
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment