Patchwork D5355: tests: show that in-mem rebase falling back loses state

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

Comments

phabricator - Dec. 3, 2018, 8:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8ff910b21eef: tests: show that in-mem rebase falling back loses state (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5355?vs=12675&id=12680

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

AFFECTED FILES
  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
@@ -1,5 +1,7 @@ 
 #require symlink execbit
   $ cat << EOF >> $HGRCPATH
+  > [phases]
+  > publish=False
   > [extensions]
   > amend=
   > rebase=
@@ -428,6 +430,58 @@ 
   warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
   unresolved conflicts (see hg resolve, then hg rebase --continue)
   [1]
+  $ hg rebase --abort
+  saved backup bundle to $TESTTMP/repo1/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg
+  rebase aborted
+
+Retrying without in-memory merge won't lose working copy changes
+  $ cd ..
+  $ hg clone repo3 repo3-dirty -q
+  $ cd repo3-dirty
+  $ echo dirty > a
+  $ hg rebase -s 2 -d 7
+  rebasing 2:177f92b77385 "c"
+  rebasing 3:055a42cdd887 "d"
+  rebasing 4:e860deea161a "e"
+  merging e
+  transaction abort!
+  rollback completed
+  hit merge conflicts; re-running rebase without in-memory merge
+  rebase aborted
+  rebasing 2:177f92b77385 "c"
+  rebasing 3:055a42cdd887 "d"
+  rebasing 4:e860deea161a "e"
+  merging e
+  warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
+  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  [1]
+BROKEN: working copy change to "a" was lost
+  $ cat a
+  a
+
+Retrying without in-memory merge won't lose merge state
+  $ cd ..
+  $ hg clone repo3 repo3-merge-state -q
+  $ cd repo3-merge-state
+  $ hg merge 4
+  merging e
+  warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
+  2 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
+  [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
+  $ hg resolve -l
 
 ==========================
 Test for --confirm option|