Show More
@@ -825,14 +825,14 b' def rebase(ui, repo, **opts):' | |||||
825 | # and re-run as an on-disk merge. |
|
825 | # and re-run as an on-disk merge. | |
826 | overrides = {('rebase', 'singletransaction'): True} |
|
826 | overrides = {('rebase', 'singletransaction'): True} | |
827 | with ui.configoverride(overrides, 'rebase'): |
|
827 | with ui.configoverride(overrides, 'rebase'): | |
828 |
return _o |
|
828 | return _dorebase(ui, repo, inmemory=inmemory, **opts) | |
829 | except error.InMemoryMergeConflictsError: |
|
829 | except error.InMemoryMergeConflictsError: | |
830 | ui.warn(_('hit merge conflicts; re-running rebase without in-memory' |
|
830 | ui.warn(_('hit merge conflicts; re-running rebase without in-memory' | |
831 | ' merge\n')) |
|
831 | ' merge\n')) | |
832 |
_o |
|
832 | _dorebase(ui, repo, abort=True) | |
833 |
return _o |
|
833 | return _dorebase(ui, repo, inmemory=False, **opts) | |
834 | else: |
|
834 | else: | |
835 |
return _o |
|
835 | return _dorebase(ui, repo, **opts) | |
836 |
|
836 | |||
837 | def _dryrunrebase(ui, repo, **opts): |
|
837 | def _dryrunrebase(ui, repo, **opts): | |
838 | rbsrt = rebaseruntime(repo, ui, inmemory=True, |
|
838 | rbsrt = rebaseruntime(repo, ui, inmemory=True, | |
@@ -841,7 +841,7 b' def _dryrunrebase(ui, repo, **opts):' | |||||
841 | try: |
|
841 | try: | |
842 | overrides = {('rebase', 'singletransaction'): True} |
|
842 | overrides = {('rebase', 'singletransaction'): True} | |
843 | with ui.configoverride(overrides, 'rebase'): |
|
843 | with ui.configoverride(overrides, 'rebase'): | |
844 |
_origrebase(ui, repo, inmemory=True, |
|
844 | _origrebase(ui, repo, rbsrt, inmemory=True, | |
845 | leaveunfinished=True, **opts) |
|
845 | leaveunfinished=True, **opts) | |
846 | except error.InMemoryMergeConflictsError: |
|
846 | except error.InMemoryMergeConflictsError: | |
847 | ui.status(_('hit a merge conflict\n')) |
|
847 | ui.status(_('hit a merge conflict\n')) | |
@@ -852,12 +852,12 b' def _dryrunrebase(ui, repo, **opts):' | |||||
852 | finally: |
|
852 | finally: | |
853 | rbsrt._prepareabortorcontinue(isabort=True) |
|
853 | rbsrt._prepareabortorcontinue(isabort=True) | |
854 |
|
854 | |||
855 |
def _o |
|
855 | def _dorebase(ui, repo, inmemory=False, **opts): | |
856 | **opts): |
|
856 | rbsrt = rebaseruntime(repo, ui, inmemory, pycompat.byteskwargs(opts)) | |
|
857 | return _origrebase(ui, repo, rbsrt, inmemory=inmemory, **opts) | |||
|
858 | ||||
|
859 | def _origrebase(ui, repo, rbsrt, inmemory=False, leaveunfinished=False, **opts): | |||
857 | opts = pycompat.byteskwargs(opts) |
|
860 | opts = pycompat.byteskwargs(opts) | |
858 | if not rbsrt: |
|
|||
859 | rbsrt = rebaseruntime(repo, ui, inmemory, opts) |
|
|||
860 |
|
||||
861 | with repo.wlock(), repo.lock(): |
|
861 | with repo.wlock(), repo.lock(): | |
862 | # Validate input and define rebasing points |
|
862 | # Validate input and define rebasing points | |
863 | destf = opts.get('dest', None) |
|
863 | destf = opts.get('dest', None) |
General Comments 0
You need to be logged in to leave comments.
Login now