diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -821,10 +821,7 @@ rbsrt = rebaseruntime(repo, ui, inmemory, opts) with repo.wlock(), repo.lock(): try: - overrides = {('rebase', 'singletransaction'): True} - with ui.configoverride(overrides, 'rebase'): - _origrebase(ui, repo, inmemory=True, rbsrt=rbsrt, - leaveunfinished=True, **opts) + _dryrunrebase(ui, repo, rbsrt, **opts) except error.InMemoryMergeConflictsError: ui.status(_('hit a merge conflict\n')) return 1 @@ -848,6 +845,12 @@ else: return _origrebase(ui, repo, **opts) +def _dryrunrebase(ui, repo, rbsrt, **opts): + overrides = {('rebase', 'singletransaction'): True} + with ui.configoverride(overrides, 'rebase'): + return _origrebase(ui, repo, inmemory=True, rbsrt=rbsrt, + leaveunfinished=True, **opts) + def _origrebase(ui, repo, inmemory=False, leaveunfinished=False, rbsrt=None, **opts): opts = pycompat.byteskwargs(opts)