comparison tests/test-evolve-stop-contentdiv.t @ 3761:777c29ac02bf

content-div: add test showing `--stop` works during interrupted resolution This patch adds a test showing that the --stop flag of `hg evolve` works well during interrupted content-divergence resolution. The --stop flag now works with all the three different type of instability resolution very well and we should advertise it more.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 22 May 2018 21:33:50 +0530
parents
children 7b33a6ed0539
comparison
equal deleted inserted replaced
3760:88601e1cd5d8 3761:777c29ac02bf
1 Tests for the --stop flag for `hg evolve` command while resolving content-divergence
2 ==================================================================================
3
4 The `--stop` flag stops the interrupted evolution and delete the state file so
5 user can do other things and comeback and do evolution later on
6
7 This is testing cases when `hg evolve` command is doing content-divergence resolution.
8
9 Setup
10 =====
11
12 $ cat >> $HGRCPATH <<EOF
13 > [alias]
14 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
15 > [extensions]
16 > EOF
17 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
18
19 $ hg init stoprepo
20 $ cd stoprepo
21 $ echo ".*\.orig" > .hgignore
22 $ hg add .hgignore
23 $ hg ci -m "added hgignore"
24 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
25
26 $ hg glog
27 @ 4:c41c793e0ef1 added d
28 | () draft
29 o 3:ca1b80f7960a added c
30 | () draft
31 o 2:b1661037fa25 added b
32 | () draft
33 o 1:c7586e2a9264 added a
34 | () draft
35 o 0:8fa14d15e168 added hgignore
36 () draft
37
38 Creating content divergence, resolution of which will lead to conflicts
39 -----------------------------------------------------------------------
40
41 $ echo bar > d
42 $ hg amend
43
44 $ hg up c41c793e0ef1 --hidden
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 updated to hidden changeset c41c793e0ef1
47 (hidden revision 'c41c793e0ef1' was rewritten as: e49523854bc8)
48 working directory parent is obsolete! (c41c793e0ef1)
49 (use 'hg evolve' to update to its successor: e49523854bc8)
50
51 $ echo foobar > d
52 $ hg amend
53 2 new content-divergent changesets
54 $ hg glog --hidden
55 @ 6:9c1631e352d9 added d
56 | () draft
57 | * 5:e49523854bc8 added d
58 |/ () draft
59 | x 4:c41c793e0ef1 added d
60 |/ () draft
61 o 3:ca1b80f7960a added c
62 | () draft
63 o 2:b1661037fa25 added b
64 | () draft
65 o 1:c7586e2a9264 added a
66 | () draft
67 o 0:8fa14d15e168 added hgignore
68 () draft
69
70 $ hg evolve --content-divergent
71 merge:[6] added d
72 with: [5] added d
73 base: [4] added d
74 merging "other" content-divergent changeset 'e49523854bc8'
75 merging d
76 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
77 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
78 abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
79 [255]
80
81 $ hg evolve --stop
82 stopped the interrupted evolve
83 working directory is now at 9c1631e352d9
84
85 $ hg glog --hidden
86 @ 6:9c1631e352d9 added d
87 | () draft
88 | * 5:e49523854bc8 added d
89 |/ () draft
90 | x 4:c41c793e0ef1 added d
91 |/ () draft
92 o 3:ca1b80f7960a added c
93 | () draft
94 o 2:b1661037fa25 added b
95 | () draft
96 o 1:c7586e2a9264 added a
97 | () draft
98 o 0:8fa14d15e168 added hgignore
99 () draft