Submitter | phabricator |
---|---|
Date | June 28, 2018, 8:09 p.m. |
Message ID | <differential-rev-PHID-DREV-ej6h52llceh6tukaio25-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/32489/ |
State | Superseded |
Headers | show |
Comments
> if dryrun: > - leaveunfinished = True > - inmemory = True > rbsrt = rebaseruntime(repo, ui, inmemory, opts) Perhaps this is wrong. inmemory should be set to True, right?
yuja added a comment. > if dryrun: > > - leaveunfinished = True > - inmemory = True rbsrt = rebaseruntime(repo, ui, inmemory, opts) Perhaps this is wrong. inmemory should be set to True, right? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3854 To: khanchi97, #hg-reviewers Cc: yuja, mercurial-devel
khanchi97 added a comment. In https://phab.mercurial-scm.org/D3854#60248, @yuja wrote: > > if dryrun: > > > > - leaveunfinished = True > > - inmemory = True rbsrt = rebaseruntime(repo, ui, inmemory, opts) > > Perhaps this is wrong. inmemory should be set to True, right? Oops! REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3854 To: khanchi97, #hg-reviewers Cc: yuja, mercurial-devel
Patch
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: