# HG changeset patch # User Martin von Zweigbergk # Date 2018-12-03 17:36:40 # Node ID 6f679f25fd4d5a3e209a45058fc60ed294fdab59 # Parent f07d4f94f0989781f279b4b70ad501bed81cd430 rebase: abort in-mem rebase if there's a dirty merge state In-memory merge uses the on-disk merge state, so we should not allow it run in-memory merge when the merge state is not clean. We should probably not use the on-disk merge state when running in-memory merge, but chaning that is not suitable for the stable branch. Differential Revision: https://phab.mercurial-scm.org/D5357 diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -540,7 +540,7 @@ class rebaseruntime(object): 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', '')} diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t --- a/tests/test-rebase-inmemory.t +++ b/tests/test-rebase-inmemory.t @@ -463,17 +463,12 @@ Retrying without in-memory merge won't l [1] $ hg resolve -l U e -BROKEN: these should not say "created no changes to commit" $ hg rebase -s 2 -d 7 rebasing 2:177f92b77385 "c" - note: rebase of 2:177f92b77385 created no changes to commit - rebasing 3:055a42cdd887 "d" - note: rebase of 3:055a42cdd887 created no changes to commit - rebasing 4:e860deea161a "e" - note: rebase of 4:e860deea161a created no changes to commit - saved backup bundle to $TESTTMP/repo1/repo3-merge-state/.hg/strip-backup/177f92b77385-4da7ba9e-rebase.hg -BROKEN: merge state lost + abort: outstanding merge conflicts + [255] $ hg resolve -l + U e ========================== Test for --confirm option|