1 $ cat >> $HGRCPATH <<EOF |
|
2 > [defaults] |
|
3 > amend=-d "0 0" |
|
4 > fold=-d "0 0" |
|
5 > [web] |
|
6 > push_ssl = false |
|
7 > allow_push = * |
|
8 > [phases] |
|
9 > publish = False |
|
10 > [diff] |
|
11 > git = 1 |
|
12 > unified = 0 |
|
13 > [ui] |
|
14 > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n |
|
15 > [extensions] |
|
16 > EOF |
|
17 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
|
18 $ mkcommit() { |
|
19 > echo "$1" > "$1" |
|
20 > hg add "$1" |
|
21 > hg ci -m "add $1" |
|
22 > } |
|
23 |
|
24 $ mkstack() { |
|
25 > # Creates a stack of commit based on $1 with messages from $2, $3 .. |
|
26 > hg update "$1" -C |
|
27 > shift |
|
28 > mkcommits $* |
|
29 > } |
|
30 |
|
31 $ mkcommits() { |
|
32 > for i in $@; do mkcommit $i ; done |
|
33 > } |
|
34 |
|
35 ============================================================================== |
|
36 Test instability resolution for a changeset unstable because its parent |
|
37 is obsolete with one successor |
|
38 ============================================================================== |
|
39 $ hg init test1 |
|
40 $ cd test1 |
|
41 $ mkcommits _a _b _c |
|
42 $ hg up "desc(_b)" |
|
43 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
44 $ hg amend -m "bprime" |
|
45 1 new orphan changesets |
|
46 $ hg log -G |
|
47 @ 3:36050226a9b9@default(draft) bprime |
|
48 | |
|
49 | * 2:102002290587@default(draft) add _c |
|
50 | | |
|
51 | x 1:37445b16603b@default(draft) add _b |
|
52 |/ |
|
53 o 0:135f39f4bd78@default(draft) add _a |
|
54 |
|
55 |
|
56 $ hg evo --all --any --orphan |
|
57 move:[2] add _c |
|
58 atop:[3] bprime |
|
59 working directory is now at fdcf3523a74d |
|
60 $ hg log -G |
|
61 @ 4:fdcf3523a74d@default(draft) add _c |
|
62 | |
|
63 o 3:36050226a9b9@default(draft) bprime |
|
64 | |
|
65 o 0:135f39f4bd78@default(draft) add _a |
|
66 |
|
67 |
|
68 $ cd .. |
|
69 |
|
70 =============================================================================== |
|
71 Test instability resolution for a changeset unstable because its parent |
|
72 is obsolete with multiple successors on one branches but in reverse |
|
73 order (cross-split). |
|
74 ============================================================================== |
|
75 |
|
76 $ hg init test5 |
|
77 $ cd test5 |
|
78 $ mkcommits _a _b _c |
|
79 $ hg up "desc(_a)" |
|
80 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
81 $ mkcommits bprimesplit1 bprimesplit2 |
|
82 created new head |
|
83 $ hg prune "desc(_b)" -s "desc(bprimesplit1) + desc(bprimesplit2)" --split |
|
84 1 changesets pruned |
|
85 1 new orphan changesets |
|
86 $ hg up "desc(_a)" |
|
87 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
88 $ mkcommits bsecondsplit1 bsecondsplit2 |
|
89 created new head |
|
90 $ hg prune "desc(bprimesplit1)" -s "desc(bsecondsplit2)" |
|
91 1 changesets pruned |
|
92 1 new orphan changesets |
|
93 $ hg prune "desc(bprimesplit2)" -s "desc(bsecondsplit1)" |
|
94 1 changesets pruned |
|
95 $ hg log -G |
|
96 @ 6:59b942dbda14@default(draft) add bsecondsplit2 |
|
97 | |
|
98 o 5:8ffdae67d696@default(draft) add bsecondsplit1 |
|
99 | |
|
100 | * 2:102002290587@default(draft) add _c |
|
101 | | |
|
102 | x 1:37445b16603b@default(draft) add _b |
|
103 |/ |
|
104 o 0:135f39f4bd78@default(draft) add _a |
|
105 |
|
106 |
|
107 $ hg evo --all --any --orphan |
|
108 move:[2] add _c |
|
109 atop:[6] add bsecondsplit2 |
|
110 working directory is now at 98e3f21461ff |
|
111 $ hg log -G |
|
112 @ 7:98e3f21461ff@default(draft) add _c |
|
113 | |
|
114 o 6:59b942dbda14@default(draft) add bsecondsplit2 |
|
115 | |
|
116 o 5:8ffdae67d696@default(draft) add bsecondsplit1 |
|
117 | |
|
118 o 0:135f39f4bd78@default(draft) add _a |
|
119 |
|
120 |
|
121 $ cd .. |
|