khanchi97 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY To avoid more number of indented blocks and make it easier to add additional functionality in dryrun, extracted as a function. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3855 AFFECTED FILES hgext/rebase.py CHANGE DETAILS 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) To: khanchi97, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel