khanchi97 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY Before this patch it is easy for another hg to interrupt the dryrun. This patch make sure that dryrun will complete without any interruption. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3854 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 @@ -818,22 +818,20 @@ opts[r'dest'] = '_destautoorphanrebase(SRC)' if dryrun: - leaveunfinished = True - inmemory = True rbsrt = rebaseruntime(repo, ui, inmemory, opts) - try: - overrides = {('rebase', 'singletransaction'): True} - with ui.configoverride(overrides, 'rebase'): - _origrebase(ui, repo, inmemory=True, rbsrt=rbsrt, - leaveunfinished=leaveunfinished, **opts) - except error.InMemoryMergeConflictsError: - ui.status(_('hit a merge conflict\n')) - return 1 - else: - ui.status(_('there will be no conflict, you can rebase\n')) - return 0 - finally: - with repo.wlock(), repo.lock(): + 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) + except error.InMemoryMergeConflictsError: + ui.status(_('hit a merge conflict\n')) + return 1 + else: + ui.status(_('there will be no conflict, you can rebase\n')) + return 0 + finally: rbsrt._prepareabortorcontinue(isabort=True) elif inmemory: try: 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