Show More
@@ -830,7 +830,8 b' def _origrebase(ui, repo, **opts):' | |||
|
830 | 830 | else: |
|
831 | 831 | destmap = _definedestmap(ui, repo, destf, srcf, basef, revf, |
|
832 | 832 | destspace=destspace, |
|
833 |
|
|
|
833 | opts=opts) | |
|
834 | rbsrt.inmemory = opts['inmemory'] | |
|
834 | 835 | retcode = rbsrt._preparenewrebase(destmap) |
|
835 | 836 | if retcode is not None: |
|
836 | 837 | return retcode |
@@ -850,7 +851,7 b' def _origrebase(ui, repo, **opts):' | |||
|
850 | 851 | rbsrt._finishrebase() |
|
851 | 852 | |
|
852 | 853 | def _definedestmap(ui, repo, destf=None, srcf=None, basef=None, revf=None, |
|
853 |
destspace=None, |
|
|
854 | destspace=None, opts=None): | |
|
854 | 855 | """use revisions argument to define destmap {srcrev: destrev}""" |
|
855 | 856 | if revf is None: |
|
856 | 857 | revf = [] |
@@ -864,7 +865,7 b' def _definedestmap(ui, repo, destf=None,' | |||
|
864 | 865 | if revf and srcf: |
|
865 | 866 | raise error.Abort(_('cannot specify both a revision and a source')) |
|
866 | 867 | |
|
867 | if not inmemory: | |
|
868 | if not opts['inmemory']: | |
|
868 | 869 | cmdutil.checkunfinished(repo) |
|
869 | 870 | cmdutil.bailifchanged(repo) |
|
870 | 871 | |
@@ -939,6 +940,22 b' def _definedestmap(ui, repo, destf=None,' | |||
|
939 | 940 | ui.status(_('nothing to rebase from %s to %s\n') % |
|
940 | 941 | ('+'.join(str(repo[r]) for r in base), dest)) |
|
941 | 942 | return None |
|
943 | # If rebasing the working copy parent, force in-memory merge to be off. | |
|
944 | # | |
|
945 | # This is because the extra work of checking out the newly rebased commit | |
|
946 | # outweights the benefits of rebasing in-memory, and executing an extra | |
|
947 | # update command adds a bit of overhead, so better to just do it on disk. In | |
|
948 | # all other cases leave it on. | |
|
949 | # | |
|
950 | # Note that there are cases where this isn't true -- e.g., rebasing large | |
|
951 | # stacks that include the WCP. However, I'm not yet sure where the cutoff | |
|
952 | # is. | |
|
953 | rebasingwcp = repo['.'].rev() in rebaseset | |
|
954 | if opts['inmemory'] and rebasingwcp: | |
|
955 | opts['inmemory'] = False | |
|
956 | # Check these since we did not before. | |
|
957 | cmdutil.checkunfinished(repo) | |
|
958 | cmdutil.bailifchanged(repo) | |
|
942 | 959 | |
|
943 | 960 | if not destf: |
|
944 | 961 | dest = repo[_destrebase(repo, rebaseset, destspace=destspace)] |
General Comments 0
You need to be logged in to leave comments.
Login now