Show More
@@ -794,29 +794,30 b' def rebase(ui, repo, **opts):' | |||
|
794 | 794 | unresolved conflicts. |
|
795 | 795 | |
|
796 | 796 | """ |
|
797 | opts = pycompat.byteskwargs(opts) | |
|
797 | 798 | inmemory = ui.configbool('rebase', 'experimental.inmemory') |
|
798 |
dryrun = opts.get( |
|
|
799 | dryrun = opts.get('dry_run') | |
|
799 | 800 | if dryrun: |
|
800 |
if opts.get( |
|
|
801 | if opts.get('abort'): | |
|
801 | 802 | raise error.Abort(_('cannot specify both --dry-run and --abort')) |
|
802 |
if opts.get( |
|
|
803 | if opts.get('continue'): | |
|
803 | 804 | raise error.Abort(_('cannot specify both --dry-run and --continue')) |
|
804 | 805 | |
|
805 |
if (opts.get( |
|
|
806 | if (opts.get('continue') or opts.get('abort') or | |
|
806 | 807 | repo.currenttransaction() is not None): |
|
807 | 808 | # in-memory rebase is not compatible with resuming rebases. |
|
808 | 809 | # (Or if it is run within a transaction, since the restart logic can |
|
809 | 810 | # fail the entire transaction.) |
|
810 | 811 | inmemory = False |
|
811 | 812 | |
|
812 |
if opts.get( |
|
|
813 | if opts.get('auto_orphans'): | |
|
813 | 814 | for key in opts: |
|
814 |
if key != |
|
|
815 | if key != 'auto_orphans' and opts.get(key): | |
|
815 | 816 | raise error.Abort(_('--auto-orphans is incompatible with %s') % |
|
816 |
('--' + |
|
|
817 |
userrevs = list(repo.revs(opts.get( |
|
|
818 |
opts[ |
|
|
819 |
opts[ |
|
|
817 | ('--' + key)) | |
|
818 | userrevs = list(repo.revs(opts.get('auto_orphans'))) | |
|
819 | opts['rev'] = [revsetlang.formatspec('%ld and orphan()', userrevs)] | |
|
820 | opts['dest'] = '_destautoorphanrebase(SRC)' | |
|
820 | 821 | |
|
821 | 822 | if dryrun: |
|
822 | 823 | return _dryrunrebase(ui, repo, opts) |
@@ -830,14 +831,13 b' def rebase(ui, repo, **opts):' | |||
|
830 | 831 | except error.InMemoryMergeConflictsError: |
|
831 | 832 | ui.warn(_('hit merge conflicts; re-running rebase without in-memory' |
|
832 | 833 | ' merge\n')) |
|
833 |
_dorebase(ui, repo, { |
|
|
834 | _dorebase(ui, repo, {'abort': True}) | |
|
834 | 835 | return _dorebase(ui, repo, opts, inmemory=False) |
|
835 | 836 | else: |
|
836 | 837 | return _dorebase(ui, repo, opts) |
|
837 | 838 | |
|
838 | 839 | def _dryrunrebase(ui, repo, opts): |
|
839 | rbsrt = rebaseruntime(repo, ui, inmemory=True, | |
|
840 | opts=pycompat.byteskwargs(opts)) | |
|
840 | rbsrt = rebaseruntime(repo, ui, inmemory=True, opts=opts) | |
|
841 | 841 | with repo.wlock(), repo.lock(): |
|
842 | 842 | try: |
|
843 | 843 | overrides = {('rebase', 'singletransaction'): True} |
@@ -856,11 +856,10 b' def _dryrunrebase(ui, repo, opts):' | |||
|
856 | 856 | suppwarns=True) |
|
857 | 857 | |
|
858 | 858 | def _dorebase(ui, repo, opts, inmemory=False): |
|
859 |
rbsrt = rebaseruntime(repo, ui, inmemory, |
|
|
859 | rbsrt = rebaseruntime(repo, ui, inmemory, opts) | |
|
860 | 860 | return _origrebase(ui, repo, opts, rbsrt, inmemory=inmemory) |
|
861 | 861 | |
|
862 | 862 | def _origrebase(ui, repo, opts, rbsrt, inmemory=False, leaveunfinished=False): |
|
863 | opts = pycompat.byteskwargs(opts) | |
|
864 | 863 | with repo.wlock(), repo.lock(): |
|
865 | 864 | # Validate input and define rebasing points |
|
866 | 865 | destf = opts.get('dest', None) |
General Comments 0
You need to be logged in to leave comments.
Login now