Show More
@@ -1,79 +1,164 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > [phases] |
|
5 | 5 | > publish=False |
|
6 | 6 | > [merge] |
|
7 | 7 | > EOF |
|
8 | 8 | |
|
9 | 9 | $ hg init repo |
|
10 | 10 | $ cd repo |
|
11 | 11 | $ echo a > a |
|
12 | 12 | $ echo b > b |
|
13 | 13 | $ hg commit -qAm ab |
|
14 | 14 | $ echo c >> a |
|
15 | 15 | $ echo c >> b |
|
16 | 16 | $ hg commit -qAm c |
|
17 | 17 | $ hg up -q ".^" |
|
18 | 18 | $ echo d >> a |
|
19 | 19 | $ echo d >> b |
|
20 | 20 | $ hg commit -qAm d |
|
21 | 21 | |
|
22 | 22 | Testing on-failure=continue |
|
23 | 23 | $ echo on-failure=continue >> $HGRCPATH |
|
24 | 24 | $ hg rebase -s 1 -d 2 --tool false |
|
25 | 25 | rebasing 1:1f28a51c3c9b "c" |
|
26 | 26 | merging a |
|
27 | 27 | merging b |
|
28 | 28 | merging a failed! |
|
29 | 29 | merging b failed! |
|
30 | 30 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
31 | 31 | [1] |
|
32 | 32 | |
|
33 | 33 | $ hg resolve --list |
|
34 | 34 | U a |
|
35 | 35 | U b |
|
36 | 36 | |
|
37 | 37 | $ hg rebase --abort |
|
38 | 38 | rebase aborted |
|
39 | 39 | |
|
40 | 40 | Testing on-failure=halt |
|
41 | 41 | $ echo on-failure=halt >> $HGRCPATH |
|
42 | 42 | $ hg rebase -s 1 -d 2 --tool false |
|
43 | 43 | rebasing 1:1f28a51c3c9b "c" |
|
44 | 44 | merging a |
|
45 | 45 | merging b |
|
46 | 46 | merging a failed! |
|
47 | 47 | merge halted after failed merge (see hg resolve) |
|
48 | 48 | [1] |
|
49 | 49 | |
|
50 | 50 | $ hg resolve --list |
|
51 | 51 | U a |
|
52 | 52 | U b |
|
53 | 53 | |
|
54 | 54 | $ hg rebase --abort |
|
55 | 55 | rebase aborted |
|
56 | 56 | |
|
57 | 57 | Testing on-failure=prompt |
|
58 | $ echo on-failure=prompt >> $HGRCPATH | |
|
59 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool false --config ui.interactive=1 | |
|
58 | $ cat <<EOS >> $HGRCPATH | |
|
59 | > [merge] | |
|
60 | > on-failure=prompt | |
|
61 | > [ui] | |
|
62 | > interactive=1 | |
|
63 | > EOS | |
|
64 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool false | |
|
60 | 65 | > y |
|
61 | 66 | > n |
|
62 | 67 | > EOS |
|
63 | 68 | rebasing 1:1f28a51c3c9b "c" |
|
64 | 69 | merging a |
|
65 | 70 | merging b |
|
66 | 71 | merging a failed! |
|
67 | 72 | continue merge operation (yn)? y |
|
68 | 73 | merging b failed! |
|
69 | 74 | continue merge operation (yn)? n |
|
70 | 75 | merge halted after failed merge (see hg resolve) |
|
71 | 76 | [1] |
|
72 | 77 | |
|
73 | 78 | $ hg resolve --list |
|
74 | 79 | U a |
|
75 | 80 | U b |
|
76 | 81 | |
|
77 | 82 | $ hg rebase --abort |
|
78 | 83 | rebase aborted |
|
79 | 84 | |
|
85 | Check that successful tool with failed post-check halts the merge | |
|
86 | $ cat <<EOS >> $HGRCPATH | |
|
87 | > [merge-tools] | |
|
88 | > true.check=changed | |
|
89 | > EOS | |
|
90 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool true | |
|
91 | > y | |
|
92 | > n | |
|
93 | > n | |
|
94 | > EOS | |
|
95 | rebasing 1:1f28a51c3c9b "c" | |
|
96 | merging a | |
|
97 | merging b | |
|
98 | output file a appears unchanged | |
|
99 | was merge successful (yn)? y | |
|
100 | output file b appears unchanged | |
|
101 | was merge successful (yn)? n | |
|
102 | merging b failed! | |
|
103 | continue merge operation (yn)? n | |
|
104 | merge halted after failed merge (see hg resolve) | |
|
105 | [1] | |
|
106 | ||
|
107 | $ hg resolve --list | |
|
108 | R a | |
|
109 | U b | |
|
110 | ||
|
111 | $ hg rebase --abort | |
|
112 | rebase aborted | |
|
113 | ||
|
114 | Check that conflicts with conflict check also halts the merge | |
|
115 | $ cat <<EOS >> $HGRCPATH | |
|
116 | > [merge-tools] | |
|
117 | > true.check=conflicts | |
|
118 | > true.premerge=keep | |
|
119 | > [merge] | |
|
120 | > on-failure=halt | |
|
121 | > EOS | |
|
122 | $ hg rebase -s 1 -d 2 --tool true | |
|
123 | rebasing 1:1f28a51c3c9b "c" | |
|
124 | merging a | |
|
125 | merging b | |
|
126 | merging a failed! | |
|
127 | merge halted after failed merge (see hg resolve) | |
|
128 | [1] | |
|
129 | ||
|
130 | $ hg resolve --list | |
|
131 | U a | |
|
132 | U b | |
|
133 | ||
|
134 | $ hg rebase --abort | |
|
135 | rebase aborted | |
|
136 | ||
|
137 | Check that always-prompt also can halt the merge | |
|
138 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool true --config merge-tools.true.check=prompt | |
|
139 | > y | |
|
140 | > n | |
|
141 | > EOS | |
|
142 | rebasing 1:1f28a51c3c9b "c" | |
|
143 | merging a | |
|
144 | merging b | |
|
145 | was merge of 'a' successful (yn)? y | |
|
146 | was merge of 'b' successful (yn)? n | |
|
147 | merging b failed! | |
|
148 | merge halted after failed merge (see hg resolve) | |
|
149 | [1] | |
|
150 | ||
|
151 | $ hg resolve --list | |
|
152 | R a | |
|
153 | U b | |
|
154 | ||
|
155 | $ hg rebase --abort | |
|
156 | rebase aborted | |
|
157 | ||
|
158 | Check that successful tool otherwise allows the merge to continue | |
|
159 | $ hg rebase -s 1 -d 2 --tool echo --keep --config merge-tools.echo.premerge=keep | |
|
160 | rebasing 1:1f28a51c3c9b "c" | |
|
161 | merging a | |
|
162 | merging b | |
|
163 | $TESTTMP/repo/a *a~base* *a~other* (glob) | |
|
164 | $TESTTMP/repo/b *b~base* *b~other* (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now