hgext/rebase.py
changeset 35320 d901a88891fe
parent 35319 228916ca12b5
child 35332 03bec089e105
equal deleted inserted replaced
35319:228916ca12b5 35320:d901a88891fe
   757 
   757 
   758     Returns 0 on success, 1 if nothing to rebase or there are
   758     Returns 0 on success, 1 if nothing to rebase or there are
   759     unresolved conflicts.
   759     unresolved conflicts.
   760 
   760 
   761     """
   761     """
       
   762     if opts.get('continue') or opts.get('abort'):
       
   763         # in-memory rebase is not compatible with resuming rebases.
       
   764         opts['inmemory'] = False
       
   765 
       
   766     if opts.get('inmemory', False):
       
   767         try:
       
   768             # in-memory merge doesn't support conflicts, so if we hit any, abort
       
   769             # and re-run as an on-disk merge.
       
   770             return _origrebase(ui, repo, **opts)
       
   771         except error.InMemoryMergeConflictsError:
       
   772             ui.warn(_('hit merge conflicts; re-running rebase without in-memory'
       
   773                       ' merge\n'))
       
   774             _origrebase(ui, repo, **{'abort': True})
       
   775             opts['inmemory'] = False
       
   776             return _origrebase(ui, repo, **opts)
       
   777     else:
       
   778         return _origrebase(ui, repo, **opts)
       
   779 
       
   780 def _origrebase(ui, repo, **opts):
   762     opts = pycompat.byteskwargs(opts)
   781     opts = pycompat.byteskwargs(opts)
   763     if 'inmemory' not in opts:
   782     if 'inmemory' not in opts:
   764         opts['inmemory'] = False
   783         opts['inmemory'] = False
   765     rbsrt = rebaseruntime(repo, ui, opts)
   784     rbsrt = rebaseruntime(repo, ui, opts)
   766 
   785