annotate tests/test-evolve-abort-contentdiv.t @ 3773:958dad74e877

tests: add tests for testing --abort while content-divergence resolution This patch adds a new test file with a very basic test of `--abort` on an interrupted evolve which was resolving content-divergence. Upcoming patches will add more rigourous tests.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 24 May 2018 02:02:11 +0530
parents
children 63d6d024dfb2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3773
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
1 Tests for the --abort flag for `hg evolve` command while content-divergence resolution
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
2 ======================================================================================
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
3
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
4 The `--abort` flag aborts the interuppted evolve by undoing all the work which
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
5 was done during resolution i.e. stripping new changesets created, moving
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
6 bookmarks back, moving working directory back.
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
7
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
8 This test contains cases when `hg evolve` is doing content-divergence resolution.
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
9
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
10 Setup
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
11 =====
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
12
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
13 $ cat >> $HGRCPATH <<EOF
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
14 > [phases]
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
15 > publish = False
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
16 > [alias]
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
17 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
18 > [extensions]
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
19 > EOF
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
20 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
21
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
22 $ hg init abortrepo
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
23 $ cd abortrepo
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
24 $ echo ".*\.orig" > .hgignore
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
25 $ hg add .hgignore
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
26 $ hg ci -m "added hgignore"
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
27 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
28
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
29 $ hg glog
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
30 @ 4:c41c793e0ef1 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
31 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
32 o 3:ca1b80f7960a added c
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
33 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
34 o 2:b1661037fa25 added b
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
35 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
36 o 1:c7586e2a9264 added a
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
37 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
38 o 0:8fa14d15e168 added hgignore
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
39 () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
40
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
41 Creating content divergence, resolution of which will lead to conflicts
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
42 -----------------------------------------------------------------------
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
43
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
44 $ echo bar > d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
45 $ hg amend
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
46
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
47 $ hg up c41c793e0ef1 --hidden
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
49 updated to hidden changeset c41c793e0ef1
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
50 (hidden revision 'c41c793e0ef1' was rewritten as: e49523854bc8)
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
51 working directory parent is obsolete! (c41c793e0ef1)
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
52 (use 'hg evolve' to update to its successor: e49523854bc8)
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
53
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
54 $ echo foobar > d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
55 $ hg amend
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
56 2 new content-divergent changesets
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
57 $ hg glog --hidden
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
58 @ 6:9c1631e352d9 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
59 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
60 | * 5:e49523854bc8 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
61 |/ () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
62 | x 4:c41c793e0ef1 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
63 |/ () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
64 o 3:ca1b80f7960a added c
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
65 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
66 o 2:b1661037fa25 added b
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
67 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
68 o 1:c7586e2a9264 added a
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
69 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
70 o 0:8fa14d15e168 added hgignore
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
71 () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
72
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
73 $ hg evolve --content-divergent
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
74 merge:[6] added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
75 with: [5] added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
76 base: [4] added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
77 merging "other" content-divergent changeset 'e49523854bc8'
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
78 merging d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
79 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
80 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
81 abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
82 [255]
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
83
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
84 $ hg evolve --abort
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
85 evolve aborted
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
86 working directory is now at 9c1631e352d9
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
87
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
88 $ hg glog --hidden
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
89 @ 6:9c1631e352d9 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
90 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
91 | * 5:e49523854bc8 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
92 |/ () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
93 | x 4:c41c793e0ef1 added d
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
94 |/ () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
95 o 3:ca1b80f7960a added c
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
96 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
97 o 2:b1661037fa25 added b
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
98 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
99 o 1:c7586e2a9264 added a
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
100 | () draft
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
101 o 0:8fa14d15e168 added hgignore
958dad74e877 tests: add tests for testing --abort while content-divergence resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
102 () draft