Mercurial > evolve
comparison tests/test-evolve-phase-divergence.t @ 3610:145dab8c60c9
tests: rename test-evolve-bumped to test-evolve-phase-divergence.t
While I was here, I added a heading to test mentioning what the test if for.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 23 Mar 2018 12:44:06 +0530 |
parents | tests/test-evolve-bumped.t@b237c1c6dc19 |
children | a0e322641810 |
comparison
equal
deleted
inserted
replaced
3609:1c8dec54450a | 3610:145dab8c60c9 |
---|---|
1 ** Test for handling of phase divergent changesets by `hg evolve` ** | |
2 ==================================================================== | |
3 | |
4 $ hg init public | |
5 $ cd public | |
6 $ echo a > a | |
7 $ mkcommit() { | |
8 > echo "$1" > "$1" | |
9 > hg add "$1" | |
10 > hg ci -m "add $1" | |
11 > } | |
12 $ hg commit -A -m init | |
13 adding a | |
14 $ cd .. | |
15 | |
16 $ evolvepath=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/ | |
17 $ hg clone -U public private | |
18 $ cd private | |
19 $ cat >> .hg/hgrc <<EOF | |
20 > [extensions] | |
21 > evolve = $evolvepath | |
22 > [ui] | |
23 > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n | |
24 > [phases] | |
25 > publish = false | |
26 > EOF | |
27 $ cd .. | |
28 | |
29 $ cp -a private alice | |
30 $ cp -a private bob | |
31 | |
32 $ cd alice | |
33 $ hg update | |
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
35 $ echo a >> a | |
36 $ hg commit -u alice -m 'modify a' | |
37 $ hg push ../private | |
38 pushing to ../private | |
39 searching for changes | |
40 adding changesets | |
41 adding manifests | |
42 adding file changes | |
43 added 1 changesets with 1 changes to 1 files | |
44 $ hg log -r 'draft()' | |
45 1:4d1169d82e47@default(draft) modify a | |
46 | |
47 $ cd ../bob | |
48 $ hg pull ../private | |
49 pulling from ../private | |
50 searching for changes | |
51 adding changesets | |
52 adding manifests | |
53 adding file changes | |
54 added 1 changesets with 1 changes to 1 files | |
55 new changesets 4d1169d82e47 | |
56 (run 'hg update' to get a working copy) | |
57 $ hg log -r 'draft()' | |
58 1:4d1169d82e47@default(draft) modify a | |
59 $ hg push ../public | |
60 pushing to ../public | |
61 searching for changes | |
62 adding changesets | |
63 adding manifests | |
64 adding file changes | |
65 added 1 changesets with 1 changes to 1 files | |
66 $ hg log -r 'draft()' | |
67 | |
68 $ cd ../alice | |
69 $ hg amend -m 'tweak a' | |
70 $ hg pull ../public | |
71 pulling from ../public | |
72 searching for changes | |
73 no changes found | |
74 1 new phase-divergent changesets | |
75 | |
76 $ hg evolve -a -A --phase-divergent | |
77 recreate:[2] tweak a | |
78 atop:[1] modify a | |
79 computing new diff | |
80 committed as 4d1169d82e47 | |
81 working directory is now at 4d1169d82e47 | |
82 | |
83 Bumped Merge changeset: | |
84 ----------------------- | |
85 | |
86 We currently cannot automatically solve bumped changeset that is the | |
87 product of a merge, we add a test for it. | |
88 | |
89 $ mkcommit _a | |
90 $ hg up .^ | |
91 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
92 $ mkcommit _b | |
93 created new head | |
94 $ mkcommit _c | |
95 $ hg log -G | |
96 @ 5:eeaf70969381@default(draft) add _c | |
97 | | |
98 o 4:6612fc0ddeb6@default(draft) add _b | |
99 | | |
100 | o 3:154ad198ff4a@default(draft) add _a | |
101 |/ | |
102 o 1:4d1169d82e47@default(public) modify a | |
103 | | |
104 o 0:d3873e73d99e@default(public) init | |
105 | |
106 $ hg merge 3 | |
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 (branch merge, don't forget to commit) | |
109 $ hg commit -m "merge" | |
110 $ hg commit --amend -m "New message" | |
111 $ hg phase --public 551127da2a8a --hidden | |
112 1 new phase-divergent changesets | |
113 $ hg log -G | |
114 @ 7:b28e84916d8c@default(draft) New message | |
115 |\ | |
116 +---o 6:551127da2a8a@default(public) merge | |
117 | |/ | |
118 | o 5:eeaf70969381@default(public) add _c | |
119 | | | |
120 | o 4:6612fc0ddeb6@default(public) add _b | |
121 | | | |
122 o | 3:154ad198ff4a@default(public) add _a | |
123 |/ | |
124 o 1:4d1169d82e47@default(public) modify a | |
125 | | |
126 o 0:d3873e73d99e@default(public) init | |
127 | |
128 $ hg evolve --all --phase-divergent | |
129 skipping b28e84916d8c : we do not handle merge yet |