Patchwork D5357: rebase: abort in-mem rebase if there's a dirty merge state

login
register
mail settings
Submitter phabricator
Date Dec. 3, 2018, 8:09 p.m.
Message ID <3b837e9d90078a4348e8d81b63d7774f@localhost.localdomain>
Download mbox | patch
Permalink /patch/36931/
State Not Applicable
Headers show

Comments

phabricator - Dec. 3, 2018, 8:09 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6f679f25fd4d: rebase: abort in-mem rebase if there&#039;s a dirty merge state (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5357?vs=12677&id=12682

REVISION DETAIL
  https://phab.mercurial-scm.org/D5357

AFFECTED FILES
  hgext/rebase.py
  tests/test-rebase-inmemory.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

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', '')}