hgext/rebase.py
changeset 40819 cb372d09d30a
parent 40650 ea84c2b286a2
parent 40791 6f679f25fd4d
child 40856 c8eb8d1fc6cf
--- a/hgext/rebase.py	Thu Nov 29 09:13:13 2018 +0000
+++ b/hgext/rebase.py	Tue Dec 04 17:13:01 2018 -0500
@@ -542,7 +542,7 @@
             p1, p2, base = defineparents(repo, rev, self.destmap,
                                          self.state, self.skipped,
                                          self.obsoletenotrebased)
-            if len(repo[None].parents()) == 2:
+            if not self.inmemory and len(repo[None].parents()) == 2:
                 repo.ui.debug('resuming interrupted rebase\n')
             else:
                 overrides = {('ui', 'forcemerge'): opts.get('tool', '')}
@@ -867,7 +867,11 @@
         except error.InMemoryMergeConflictsError:
             ui.warn(_('hit merge conflicts; re-running rebase without in-memory'
                       ' merge\n'))
-            _dorebase(ui, repo, action='abort', opts={})
+            # TODO: Make in-memory merge not use the on-disk merge state, so
+            # we don't have to clean it here
+            mergemod.mergestate.clean(repo)
+            clearstatus(repo)
+            clearcollapsemsg(repo)
             return _dorebase(ui, repo, action, opts, inmemory=False)
     else:
         return _dorebase(ui, repo, action, opts)