D5357: rebase: abort in-mem rebase if there's a dirty merge state
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Dec 3 17:51:06 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5357
AFFECTED FILES
hgext/rebase.py
tests/test-rebase-inmemory.t
CHANGE DETAILS
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 @@
[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|
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -540,7 +540,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', '')}
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list