Show More
@@ -819,31 +819,31 b' def rebase(ui, repo, **opts):' | |||||
819 | opts[r'dest'] = '_destautoorphanrebase(SRC)' |
|
819 | opts[r'dest'] = '_destautoorphanrebase(SRC)' | |
820 |
|
820 | |||
821 | if dryrun: |
|
821 | if dryrun: | |
822 |
return _dryrunrebase(ui, repo, |
|
822 | return _dryrunrebase(ui, repo, opts) | |
823 | elif inmemory: |
|
823 | elif inmemory: | |
824 | try: |
|
824 | try: | |
825 | # in-memory merge doesn't support conflicts, so if we hit any, abort |
|
825 | # in-memory merge doesn't support conflicts, so if we hit any, abort | |
826 | # and re-run as an on-disk merge. |
|
826 | # and re-run as an on-disk merge. | |
827 | overrides = {('rebase', 'singletransaction'): True} |
|
827 | overrides = {('rebase', 'singletransaction'): True} | |
828 | with ui.configoverride(overrides, 'rebase'): |
|
828 | with ui.configoverride(overrides, 'rebase'): | |
829 |
return _dorebase(ui, repo, inmemory=inmemory |
|
829 | return _dorebase(ui, repo, opts, inmemory=inmemory) | |
830 | except error.InMemoryMergeConflictsError: |
|
830 | except error.InMemoryMergeConflictsError: | |
831 | ui.warn(_('hit merge conflicts; re-running rebase without in-memory' |
|
831 | ui.warn(_('hit merge conflicts; re-running rebase without in-memory' | |
832 | ' merge\n')) |
|
832 | ' merge\n')) | |
833 |
_dorebase(ui, repo, abort |
|
833 | _dorebase(ui, repo, {r'abort': True}) | |
834 |
return _dorebase(ui, repo, inmemory=False |
|
834 | return _dorebase(ui, repo, opts, inmemory=False) | |
835 | else: |
|
835 | else: | |
836 |
return _dorebase(ui, repo, |
|
836 | return _dorebase(ui, repo, opts) | |
837 |
|
837 | |||
838 |
def _dryrunrebase(ui, repo, |
|
838 | def _dryrunrebase(ui, repo, opts): | |
839 | rbsrt = rebaseruntime(repo, ui, inmemory=True, |
|
839 | rbsrt = rebaseruntime(repo, ui, inmemory=True, | |
840 | opts=pycompat.byteskwargs(opts)) |
|
840 | opts=pycompat.byteskwargs(opts)) | |
841 | with repo.wlock(), repo.lock(): |
|
841 | with repo.wlock(), repo.lock(): | |
842 | try: |
|
842 | try: | |
843 | overrides = {('rebase', 'singletransaction'): True} |
|
843 | overrides = {('rebase', 'singletransaction'): True} | |
844 | with ui.configoverride(overrides, 'rebase'): |
|
844 | with ui.configoverride(overrides, 'rebase'): | |
845 | _origrebase(ui, repo, rbsrt, inmemory=True, |
|
845 | _origrebase(ui, repo, opts, rbsrt, inmemory=True, | |
846 |
leaveunfinished=True |
|
846 | leaveunfinished=True) | |
847 | except error.InMemoryMergeConflictsError: |
|
847 | except error.InMemoryMergeConflictsError: | |
848 | ui.status(_('hit a merge conflict\n')) |
|
848 | ui.status(_('hit a merge conflict\n')) | |
849 | return 1 |
|
849 | return 1 | |
@@ -855,11 +855,11 b' def _dryrunrebase(ui, repo, **opts):' | |||||
855 | rbsrt._prepareabortorcontinue(isabort=True, backup=False, |
|
855 | rbsrt._prepareabortorcontinue(isabort=True, backup=False, | |
856 | suppwarns=True) |
|
856 | suppwarns=True) | |
857 |
|
857 | |||
858 |
def _dorebase(ui, repo, inmemory=False |
|
858 | def _dorebase(ui, repo, opts, inmemory=False): | |
859 | rbsrt = rebaseruntime(repo, ui, inmemory, pycompat.byteskwargs(opts)) |
|
859 | rbsrt = rebaseruntime(repo, ui, inmemory, pycompat.byteskwargs(opts)) | |
860 |
return _origrebase(ui, repo, rbsrt, inmemory=inmemory |
|
860 | return _origrebase(ui, repo, opts, rbsrt, inmemory=inmemory) | |
861 |
|
861 | |||
862 |
def _origrebase(ui, repo, rbsrt, inmemory=False, leaveunfinished=False |
|
862 | def _origrebase(ui, repo, opts, rbsrt, inmemory=False, leaveunfinished=False): | |
863 | opts = pycompat.byteskwargs(opts) |
|
863 | opts = pycompat.byteskwargs(opts) | |
864 | with repo.wlock(), repo.lock(): |
|
864 | with repo.wlock(), repo.lock(): | |
865 | # Validate input and define rebasing points |
|
865 | # Validate input and define rebasing points |
General Comments 0
You need to be logged in to leave comments.
Login now