changeset 1417:9e7da169f66e

test-evolve-bumped: add new test case for merge Before this patch we were not testing our warning message for bumped changesets that are the product of a merge. This patch adds a test case for that.
author Laurent Charignon <lcharignon@fb.com>
date Fri, 19 Jun 2015 18:17:57 -0700
parents b8a9d2e8c772
children ed9a8b1ee9bd
files tests/test-evolve-bumped.t
diffstat 1 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-evolve-bumped.t	Fri Jun 19 18:16:31 2015 -0700
+++ b/tests/test-evolve-bumped.t	Fri Jun 19 18:17:57 2015 -0700
@@ -1,6 +1,11 @@
   $ hg init public
   $ cd public
   $ echo a > a
+  $ mkcommit() {
+  >    echo "$1" > "$1"
+  >    hg add "$1"
+  >    hg ci -m "add $1"
+  > }
   $ hg commit -A -m init
   adding a
   $ cd ..
@@ -70,3 +75,51 @@
   computing new diff
   committed as 4d1169d82e47
   working directory is now at 4d1169d82e47
+
+Bumped Merge changeset:
+-----------------------
+
+We currently cannot automatically solve bumped changeset that is the
+product of a merge, we add a test for it.
+
+  $ mkcommit _a
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit _b
+  created new head
+  $ mkcommit _c
+  $ hg log -G
+  @  5:eeaf70969381@default(draft) add _c
+  |
+  o  4:6612fc0ddeb6@default(draft) add _b
+  |
+  | o  3:154ad198ff4a@default(draft) add _a
+  |/
+  o  1:4d1169d82e47@default(public) modify a
+  |
+  o  0:d3873e73d99e@default(public) init
+  
+  $ hg merge 3
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg commit -m "merge"
+  $ hg commit --amend -m "New message"
+  $ hg phase --public 551127da2a8a --hidden
+  1 new bumped changesets
+  $ hg log -G
+  @    7:b28e84916d8c@default(draft) New message
+  |\
+  +---o  6:551127da2a8a@default(public) merge
+  | |/
+  | o  5:eeaf70969381@default(public) add _c
+  | |
+  | o  4:6612fc0ddeb6@default(public) add _b
+  | |
+  o |  3:154ad198ff4a@default(public) add _a
+  |/
+  o  1:4d1169d82e47@default(public) modify a
+  |
+  o  0:d3873e73d99e@default(public) init
+  
+  $ hg evolve --all --bumped
+  skipping b28e84916d8c : we do not handle merge yet