Mercurial > hg
changeset 40789:8ff910b21eef stable
tests: show that in-mem rebase falling back loses state
Both working copy changes and the merge state is lost when in-memory
rebase falls back to on-disk mode.
Differential Revision: https://phab.mercurial-scm.org/D5355
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 30 Nov 2018 15:08:43 -0800 |
parents | 41f0529b5112 |
children | f07d4f94f098 |
files | tests/test-rebase-inmemory.t |
diffstat | 1 files changed, 54 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-rebase-inmemory.t Mon Dec 03 21:45:15 2018 +0900 +++ b/tests/test-rebase-inmemory.t Fri Nov 30 15:08:43 2018 -0800 @@ -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|