##// END OF EJS Templates
rebase: add a config knob for forcing in-memory rebasing...
Augie Fackler -
r47071:24a32dea default
parent child Browse files
Show More
@@ -67,6 +67,14 b" legacystates = {b'-2', b'-3', b'-4', b'-"
67
67
68 cmdtable = {}
68 cmdtable = {}
69 command = registrar.command(cmdtable)
69 command = registrar.command(cmdtable)
70
71 configtable = {}
72 configitem = registrar.configitem(configtable)
73 configitem(
74 b'devel',
75 b'rebase.force-in-memory-merge',
76 default=False,
77 )
70 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
78 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
71 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
79 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
72 # be specifying the version(s) of Mercurial they are tested with, or
80 # be specifying the version(s) of Mercurial they are tested with, or
@@ -1112,6 +1120,8 b' def rebase(ui, repo, **opts):'
1112 with ui.configoverride(overrides, b'rebase'):
1120 with ui.configoverride(overrides, b'rebase'):
1113 return _dorebase(ui, repo, action, opts, inmemory=inmemory)
1121 return _dorebase(ui, repo, action, opts, inmemory=inmemory)
1114 except error.InMemoryMergeConflictsError:
1122 except error.InMemoryMergeConflictsError:
1123 if ui.configbool(b'devel', b'rebase.force-in-memory-merge'):
1124 raise
1115 ui.warn(
1125 ui.warn(
1116 _(
1126 _(
1117 b'hit merge conflicts; re-running rebase without in-memory'
1127 b'hit merge conflicts; re-running rebase without in-memory'
@@ -345,7 +345,10 b' Test rebasing a commit with copy informa'
345 $ hg co -q 0
345 $ hg co -q 0
346 $ hg mv a b
346 $ hg mv a b
347 $ hg ci -qm 'rename a to b'
347 $ hg ci -qm 'rename a to b'
348 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes
348 Not only do we want this to run in-memory, it shouldn't fall back to
349 on-disk merge (no conflicts), so we force it to be in-memory
350 with no fallback.
351 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
349 rebasing 2:* tip "rename a to b" (glob)
352 rebasing 2:* tip "rename a to b" (glob)
350 merging a and b to b
353 merging a and b to b
351 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
354 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
General Comments 0
You need to be logged in to leave comments. Login now