Show More
@@ -1,900 +1,908 | |||||
1 | test merge-tools configuration - mostly exercising filemerge.py |
|
1 | test merge-tools configuration - mostly exercising filemerge.py | |
2 |
|
2 | |||
3 | $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test |
|
3 | $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test | |
4 | $ hg init |
|
4 | $ hg init | |
5 |
|
5 | |||
6 | revision 0 |
|
6 | revision 0 | |
7 |
|
7 | |||
8 | $ echo "revision 0" > f |
|
8 | $ echo "revision 0" > f | |
9 | $ echo "space" >> f |
|
9 | $ echo "space" >> f | |
10 | $ hg commit -Am "revision 0" |
|
10 | $ hg commit -Am "revision 0" | |
11 | adding f |
|
11 | adding f | |
12 |
|
12 | |||
13 | revision 1 |
|
13 | revision 1 | |
14 |
|
14 | |||
15 | $ echo "revision 1" > f |
|
15 | $ echo "revision 1" > f | |
16 | $ echo "space" >> f |
|
16 | $ echo "space" >> f | |
17 | $ hg commit -Am "revision 1" |
|
17 | $ hg commit -Am "revision 1" | |
18 | $ hg update 0 > /dev/null |
|
18 | $ hg update 0 > /dev/null | |
19 |
|
19 | |||
20 | revision 2 |
|
20 | revision 2 | |
21 |
|
21 | |||
22 | $ echo "revision 2" > f |
|
22 | $ echo "revision 2" > f | |
23 | $ echo "space" >> f |
|
23 | $ echo "space" >> f | |
24 | $ hg commit -Am "revision 2" |
|
24 | $ hg commit -Am "revision 2" | |
25 | created new head |
|
25 | created new head | |
26 | $ hg update 0 > /dev/null |
|
26 | $ hg update 0 > /dev/null | |
27 |
|
27 | |||
28 | revision 3 - simple to merge |
|
28 | revision 3 - simple to merge | |
29 |
|
29 | |||
30 | $ echo "revision 3" >> f |
|
30 | $ echo "revision 3" >> f | |
31 | $ hg commit -Am "revision 3" |
|
31 | $ hg commit -Am "revision 3" | |
32 | created new head |
|
32 | created new head | |
|
33 | ||||
|
34 | revision 4 - hard to merge | |||
|
35 | ||||
|
36 | $ hg update 0 > /dev/null | |||
|
37 | $ echo "revision 4" > f | |||
|
38 | $ hg commit -Am "revision 4" | |||
|
39 | created new head | |||
|
40 | ||||
33 | $ echo "[merge-tools]" > .hg/hgrc |
|
41 | $ echo "[merge-tools]" > .hg/hgrc | |
34 |
|
42 | |||
35 | $ beforemerge() { |
|
43 | $ beforemerge() { | |
36 | > cat .hg/hgrc |
|
44 | > cat .hg/hgrc | |
37 | > echo "# hg update -C 1" |
|
45 | > echo "# hg update -C 1" | |
38 | > hg update -C 1 > /dev/null |
|
46 | > hg update -C 1 > /dev/null | |
39 | > } |
|
47 | > } | |
40 | $ aftermerge() { |
|
48 | $ aftermerge() { | |
41 | > echo "# cat f" |
|
49 | > echo "# cat f" | |
42 | > cat f |
|
50 | > cat f | |
43 | > echo "# hg stat" |
|
51 | > echo "# hg stat" | |
44 | > hg stat |
|
52 | > hg stat | |
45 | > rm -f f.orig |
|
53 | > rm -f f.orig | |
46 | > } |
|
54 | > } | |
47 |
|
55 | |||
48 | Tool selection |
|
56 | Tool selection | |
49 |
|
57 | |||
50 | default is internal merge: |
|
58 | default is internal merge: | |
51 |
|
59 | |||
52 | $ beforemerge |
|
60 | $ beforemerge | |
53 | [merge-tools] |
|
61 | [merge-tools] | |
54 | # hg update -C 1 |
|
62 | # hg update -C 1 | |
55 |
|
63 | |||
56 | hg merge -r 2 |
|
64 | hg merge -r 2 | |
57 | override $PATH to ensure hgmerge not visible; use $PYTHON in case we're |
|
65 | override $PATH to ensure hgmerge not visible; use $PYTHON in case we're | |
58 | running from a devel copy, not a temp installation |
|
66 | running from a devel copy, not a temp installation | |
59 |
|
67 | |||
60 | $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 |
|
68 | $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 | |
61 | merging f |
|
69 | merging f | |
62 | warning: conflicts during merge. |
|
70 | warning: conflicts during merge. | |
63 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
71 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
64 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
72 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
65 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
73 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
66 | [1] |
|
74 | [1] | |
67 | $ aftermerge |
|
75 | $ aftermerge | |
68 | # cat f |
|
76 | # cat f | |
69 | <<<<<<< local: ef83787e2614 - test: revision 1 |
|
77 | <<<<<<< local: ef83787e2614 - test: revision 1 | |
70 | revision 1 |
|
78 | revision 1 | |
71 | ======= |
|
79 | ======= | |
72 | revision 2 |
|
80 | revision 2 | |
73 | >>>>>>> other: 0185f4e0cf02 - test: revision 2 |
|
81 | >>>>>>> other: 0185f4e0cf02 - test: revision 2 | |
74 | space |
|
82 | space | |
75 | # hg stat |
|
83 | # hg stat | |
76 | M f |
|
84 | M f | |
77 | ? f.orig |
|
85 | ? f.orig | |
78 |
|
86 | |||
79 | simplest hgrc using false for merge: |
|
87 | simplest hgrc using false for merge: | |
80 |
|
88 | |||
81 | $ echo "false.whatever=" >> .hg/hgrc |
|
89 | $ echo "false.whatever=" >> .hg/hgrc | |
82 | $ beforemerge |
|
90 | $ beforemerge | |
83 | [merge-tools] |
|
91 | [merge-tools] | |
84 | false.whatever= |
|
92 | false.whatever= | |
85 | # hg update -C 1 |
|
93 | # hg update -C 1 | |
86 | $ hg merge -r 2 |
|
94 | $ hg merge -r 2 | |
87 | merging f |
|
95 | merging f | |
88 | merging f failed! |
|
96 | merging f failed! | |
89 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
97 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
90 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
98 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
91 | [1] |
|
99 | [1] | |
92 | $ aftermerge |
|
100 | $ aftermerge | |
93 | # cat f |
|
101 | # cat f | |
94 | revision 1 |
|
102 | revision 1 | |
95 | space |
|
103 | space | |
96 | # hg stat |
|
104 | # hg stat | |
97 | M f |
|
105 | M f | |
98 | ? f.orig |
|
106 | ? f.orig | |
99 |
|
107 | |||
100 | unexecutable file in $PATH shouldn't be found: |
|
108 | unexecutable file in $PATH shouldn't be found: | |
101 |
|
109 | |||
102 | $ touch false |
|
110 | $ touch false | |
103 | $ hg up -qC 1 |
|
111 | $ hg up -qC 1 | |
104 | $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 |
|
112 | $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 | |
105 | merging f |
|
113 | merging f | |
106 | warning: conflicts during merge. |
|
114 | warning: conflicts during merge. | |
107 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
115 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
108 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
116 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
109 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
117 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
110 | [1] |
|
118 | [1] | |
111 | $ rm false |
|
119 | $ rm false | |
112 |
|
120 | |||
113 | executable directory in $PATH shouldn't be found: |
|
121 | executable directory in $PATH shouldn't be found: | |
114 |
|
122 | |||
115 | $ mkdir false |
|
123 | $ mkdir false | |
116 | $ hg up -qC 1 |
|
124 | $ hg up -qC 1 | |
117 | $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 |
|
125 | $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 | |
118 | merging f |
|
126 | merging f | |
119 | warning: conflicts during merge. |
|
127 | warning: conflicts during merge. | |
120 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
128 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
121 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
129 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
122 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
130 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
123 | [1] |
|
131 | [1] | |
124 | $ rmdir false |
|
132 | $ rmdir false | |
125 |
|
133 | |||
126 | true with higher .priority gets precedence: |
|
134 | true with higher .priority gets precedence: | |
127 |
|
135 | |||
128 | $ echo "true.priority=1" >> .hg/hgrc |
|
136 | $ echo "true.priority=1" >> .hg/hgrc | |
129 | $ beforemerge |
|
137 | $ beforemerge | |
130 | [merge-tools] |
|
138 | [merge-tools] | |
131 | false.whatever= |
|
139 | false.whatever= | |
132 | true.priority=1 |
|
140 | true.priority=1 | |
133 | # hg update -C 1 |
|
141 | # hg update -C 1 | |
134 | $ hg merge -r 2 |
|
142 | $ hg merge -r 2 | |
135 | merging f |
|
143 | merging f | |
136 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
144 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
137 | (branch merge, don't forget to commit) |
|
145 | (branch merge, don't forget to commit) | |
138 | $ aftermerge |
|
146 | $ aftermerge | |
139 | # cat f |
|
147 | # cat f | |
140 | revision 1 |
|
148 | revision 1 | |
141 | space |
|
149 | space | |
142 | # hg stat |
|
150 | # hg stat | |
143 | M f |
|
151 | M f | |
144 |
|
152 | |||
145 | unless lowered on command line: |
|
153 | unless lowered on command line: | |
146 |
|
154 | |||
147 | $ beforemerge |
|
155 | $ beforemerge | |
148 | [merge-tools] |
|
156 | [merge-tools] | |
149 | false.whatever= |
|
157 | false.whatever= | |
150 | true.priority=1 |
|
158 | true.priority=1 | |
151 | # hg update -C 1 |
|
159 | # hg update -C 1 | |
152 | $ hg merge -r 2 --config merge-tools.true.priority=-7 |
|
160 | $ hg merge -r 2 --config merge-tools.true.priority=-7 | |
153 | merging f |
|
161 | merging f | |
154 | merging f failed! |
|
162 | merging f failed! | |
155 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
163 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
156 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
164 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
157 | [1] |
|
165 | [1] | |
158 | $ aftermerge |
|
166 | $ aftermerge | |
159 | # cat f |
|
167 | # cat f | |
160 | revision 1 |
|
168 | revision 1 | |
161 | space |
|
169 | space | |
162 | # hg stat |
|
170 | # hg stat | |
163 | M f |
|
171 | M f | |
164 | ? f.orig |
|
172 | ? f.orig | |
165 |
|
173 | |||
166 | or false set higher on command line: |
|
174 | or false set higher on command line: | |
167 |
|
175 | |||
168 | $ beforemerge |
|
176 | $ beforemerge | |
169 | [merge-tools] |
|
177 | [merge-tools] | |
170 | false.whatever= |
|
178 | false.whatever= | |
171 | true.priority=1 |
|
179 | true.priority=1 | |
172 | # hg update -C 1 |
|
180 | # hg update -C 1 | |
173 | $ hg merge -r 2 --config merge-tools.false.priority=117 |
|
181 | $ hg merge -r 2 --config merge-tools.false.priority=117 | |
174 | merging f |
|
182 | merging f | |
175 | merging f failed! |
|
183 | merging f failed! | |
176 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
184 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
177 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
185 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
178 | [1] |
|
186 | [1] | |
179 | $ aftermerge |
|
187 | $ aftermerge | |
180 | # cat f |
|
188 | # cat f | |
181 | revision 1 |
|
189 | revision 1 | |
182 | space |
|
190 | space | |
183 | # hg stat |
|
191 | # hg stat | |
184 | M f |
|
192 | M f | |
185 | ? f.orig |
|
193 | ? f.orig | |
186 |
|
194 | |||
187 | or true.executable not found in PATH: |
|
195 | or true.executable not found in PATH: | |
188 |
|
196 | |||
189 | $ beforemerge |
|
197 | $ beforemerge | |
190 | [merge-tools] |
|
198 | [merge-tools] | |
191 | false.whatever= |
|
199 | false.whatever= | |
192 | true.priority=1 |
|
200 | true.priority=1 | |
193 | # hg update -C 1 |
|
201 | # hg update -C 1 | |
194 | $ hg merge -r 2 --config merge-tools.true.executable=nonexistentmergetool |
|
202 | $ hg merge -r 2 --config merge-tools.true.executable=nonexistentmergetool | |
195 | merging f |
|
203 | merging f | |
196 | merging f failed! |
|
204 | merging f failed! | |
197 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
205 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
198 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
206 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
199 | [1] |
|
207 | [1] | |
200 | $ aftermerge |
|
208 | $ aftermerge | |
201 | # cat f |
|
209 | # cat f | |
202 | revision 1 |
|
210 | revision 1 | |
203 | space |
|
211 | space | |
204 | # hg stat |
|
212 | # hg stat | |
205 | M f |
|
213 | M f | |
206 | ? f.orig |
|
214 | ? f.orig | |
207 |
|
215 | |||
208 | or true.executable with bogus path: |
|
216 | or true.executable with bogus path: | |
209 |
|
217 | |||
210 | $ beforemerge |
|
218 | $ beforemerge | |
211 | [merge-tools] |
|
219 | [merge-tools] | |
212 | false.whatever= |
|
220 | false.whatever= | |
213 | true.priority=1 |
|
221 | true.priority=1 | |
214 | # hg update -C 1 |
|
222 | # hg update -C 1 | |
215 | $ hg merge -r 2 --config merge-tools.true.executable=/nonexistent/mergetool |
|
223 | $ hg merge -r 2 --config merge-tools.true.executable=/nonexistent/mergetool | |
216 | merging f |
|
224 | merging f | |
217 | merging f failed! |
|
225 | merging f failed! | |
218 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
226 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
219 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
227 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
220 | [1] |
|
228 | [1] | |
221 | $ aftermerge |
|
229 | $ aftermerge | |
222 | # cat f |
|
230 | # cat f | |
223 | revision 1 |
|
231 | revision 1 | |
224 | space |
|
232 | space | |
225 | # hg stat |
|
233 | # hg stat | |
226 | M f |
|
234 | M f | |
227 | ? f.orig |
|
235 | ? f.orig | |
228 |
|
236 | |||
229 | but true.executable set to cat found in PATH works: |
|
237 | but true.executable set to cat found in PATH works: | |
230 |
|
238 | |||
231 | $ echo "true.executable=cat" >> .hg/hgrc |
|
239 | $ echo "true.executable=cat" >> .hg/hgrc | |
232 | $ beforemerge |
|
240 | $ beforemerge | |
233 | [merge-tools] |
|
241 | [merge-tools] | |
234 | false.whatever= |
|
242 | false.whatever= | |
235 | true.priority=1 |
|
243 | true.priority=1 | |
236 | true.executable=cat |
|
244 | true.executable=cat | |
237 | # hg update -C 1 |
|
245 | # hg update -C 1 | |
238 | $ hg merge -r 2 |
|
246 | $ hg merge -r 2 | |
239 | merging f |
|
247 | merging f | |
240 | revision 1 |
|
248 | revision 1 | |
241 | space |
|
249 | space | |
242 | revision 0 |
|
250 | revision 0 | |
243 | space |
|
251 | space | |
244 | revision 2 |
|
252 | revision 2 | |
245 | space |
|
253 | space | |
246 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
254 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
247 | (branch merge, don't forget to commit) |
|
255 | (branch merge, don't forget to commit) | |
248 | $ aftermerge |
|
256 | $ aftermerge | |
249 | # cat f |
|
257 | # cat f | |
250 | revision 1 |
|
258 | revision 1 | |
251 | space |
|
259 | space | |
252 | # hg stat |
|
260 | # hg stat | |
253 | M f |
|
261 | M f | |
254 |
|
262 | |||
255 | and true.executable set to cat with path works: |
|
263 | and true.executable set to cat with path works: | |
256 |
|
264 | |||
257 | $ beforemerge |
|
265 | $ beforemerge | |
258 | [merge-tools] |
|
266 | [merge-tools] | |
259 | false.whatever= |
|
267 | false.whatever= | |
260 | true.priority=1 |
|
268 | true.priority=1 | |
261 | true.executable=cat |
|
269 | true.executable=cat | |
262 | # hg update -C 1 |
|
270 | # hg update -C 1 | |
263 | $ hg merge -r 2 --config merge-tools.true.executable=cat |
|
271 | $ hg merge -r 2 --config merge-tools.true.executable=cat | |
264 | merging f |
|
272 | merging f | |
265 | revision 1 |
|
273 | revision 1 | |
266 | space |
|
274 | space | |
267 | revision 0 |
|
275 | revision 0 | |
268 | space |
|
276 | space | |
269 | revision 2 |
|
277 | revision 2 | |
270 | space |
|
278 | space | |
271 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
279 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
272 | (branch merge, don't forget to commit) |
|
280 | (branch merge, don't forget to commit) | |
273 | $ aftermerge |
|
281 | $ aftermerge | |
274 | # cat f |
|
282 | # cat f | |
275 | revision 1 |
|
283 | revision 1 | |
276 | space |
|
284 | space | |
277 | # hg stat |
|
285 | # hg stat | |
278 | M f |
|
286 | M f | |
279 |
|
287 | |||
280 | #if unix-permissions |
|
288 | #if unix-permissions | |
281 |
|
289 | |||
282 | environment variables in true.executable are handled: |
|
290 | environment variables in true.executable are handled: | |
283 |
|
291 | |||
284 | $ echo 'echo "custom merge tool"' > .hg/merge.sh |
|
292 | $ echo 'echo "custom merge tool"' > .hg/merge.sh | |
285 | $ beforemerge |
|
293 | $ beforemerge | |
286 | [merge-tools] |
|
294 | [merge-tools] | |
287 | false.whatever= |
|
295 | false.whatever= | |
288 | true.priority=1 |
|
296 | true.priority=1 | |
289 | true.executable=cat |
|
297 | true.executable=cat | |
290 | # hg update -C 1 |
|
298 | # hg update -C 1 | |
291 | $ hg --config merge-tools.true.executable='sh' \ |
|
299 | $ hg --config merge-tools.true.executable='sh' \ | |
292 | > --config merge-tools.true.args=.hg/merge.sh \ |
|
300 | > --config merge-tools.true.args=.hg/merge.sh \ | |
293 | > merge -r 2 |
|
301 | > merge -r 2 | |
294 | merging f |
|
302 | merging f | |
295 | custom merge tool |
|
303 | custom merge tool | |
296 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
304 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
297 | (branch merge, don't forget to commit) |
|
305 | (branch merge, don't forget to commit) | |
298 | $ aftermerge |
|
306 | $ aftermerge | |
299 | # cat f |
|
307 | # cat f | |
300 | revision 1 |
|
308 | revision 1 | |
301 | space |
|
309 | space | |
302 | # hg stat |
|
310 | # hg stat | |
303 | M f |
|
311 | M f | |
304 |
|
312 | |||
305 | #endif |
|
313 | #endif | |
306 |
|
314 | |||
307 | Tool selection and merge-patterns |
|
315 | Tool selection and merge-patterns | |
308 |
|
316 | |||
309 | merge-patterns specifies new tool false: |
|
317 | merge-patterns specifies new tool false: | |
310 |
|
318 | |||
311 | $ beforemerge |
|
319 | $ beforemerge | |
312 | [merge-tools] |
|
320 | [merge-tools] | |
313 | false.whatever= |
|
321 | false.whatever= | |
314 | true.priority=1 |
|
322 | true.priority=1 | |
315 | true.executable=cat |
|
323 | true.executable=cat | |
316 | # hg update -C 1 |
|
324 | # hg update -C 1 | |
317 | $ hg merge -r 2 --config merge-patterns.f=false |
|
325 | $ hg merge -r 2 --config merge-patterns.f=false | |
318 | merging f |
|
326 | merging f | |
319 | merging f failed! |
|
327 | merging f failed! | |
320 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
328 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
321 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
329 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
322 | [1] |
|
330 | [1] | |
323 | $ aftermerge |
|
331 | $ aftermerge | |
324 | # cat f |
|
332 | # cat f | |
325 | revision 1 |
|
333 | revision 1 | |
326 | space |
|
334 | space | |
327 | # hg stat |
|
335 | # hg stat | |
328 | M f |
|
336 | M f | |
329 | ? f.orig |
|
337 | ? f.orig | |
330 |
|
338 | |||
331 | merge-patterns specifies executable not found in PATH and gets warning: |
|
339 | merge-patterns specifies executable not found in PATH and gets warning: | |
332 |
|
340 | |||
333 | $ beforemerge |
|
341 | $ beforemerge | |
334 | [merge-tools] |
|
342 | [merge-tools] | |
335 | false.whatever= |
|
343 | false.whatever= | |
336 | true.priority=1 |
|
344 | true.priority=1 | |
337 | true.executable=cat |
|
345 | true.executable=cat | |
338 | # hg update -C 1 |
|
346 | # hg update -C 1 | |
339 | $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool |
|
347 | $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool | |
340 | couldn't find merge tool true specified for f |
|
348 | couldn't find merge tool true specified for f | |
341 | merging f |
|
349 | merging f | |
342 | merging f failed! |
|
350 | merging f failed! | |
343 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
351 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
344 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
352 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
345 | [1] |
|
353 | [1] | |
346 | $ aftermerge |
|
354 | $ aftermerge | |
347 | # cat f |
|
355 | # cat f | |
348 | revision 1 |
|
356 | revision 1 | |
349 | space |
|
357 | space | |
350 | # hg stat |
|
358 | # hg stat | |
351 | M f |
|
359 | M f | |
352 | ? f.orig |
|
360 | ? f.orig | |
353 |
|
361 | |||
354 | merge-patterns specifies executable with bogus path and gets warning: |
|
362 | merge-patterns specifies executable with bogus path and gets warning: | |
355 |
|
363 | |||
356 | $ beforemerge |
|
364 | $ beforemerge | |
357 | [merge-tools] |
|
365 | [merge-tools] | |
358 | false.whatever= |
|
366 | false.whatever= | |
359 | true.priority=1 |
|
367 | true.priority=1 | |
360 | true.executable=cat |
|
368 | true.executable=cat | |
361 | # hg update -C 1 |
|
369 | # hg update -C 1 | |
362 | $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool |
|
370 | $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool | |
363 | couldn't find merge tool true specified for f |
|
371 | couldn't find merge tool true specified for f | |
364 | merging f |
|
372 | merging f | |
365 | merging f failed! |
|
373 | merging f failed! | |
366 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
374 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
367 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
375 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
368 | [1] |
|
376 | [1] | |
369 | $ aftermerge |
|
377 | $ aftermerge | |
370 | # cat f |
|
378 | # cat f | |
371 | revision 1 |
|
379 | revision 1 | |
372 | space |
|
380 | space | |
373 | # hg stat |
|
381 | # hg stat | |
374 | M f |
|
382 | M f | |
375 | ? f.orig |
|
383 | ? f.orig | |
376 |
|
384 | |||
377 | ui.merge overrules priority |
|
385 | ui.merge overrules priority | |
378 |
|
386 | |||
379 | ui.merge specifies false: |
|
387 | ui.merge specifies false: | |
380 |
|
388 | |||
381 | $ beforemerge |
|
389 | $ beforemerge | |
382 | [merge-tools] |
|
390 | [merge-tools] | |
383 | false.whatever= |
|
391 | false.whatever= | |
384 | true.priority=1 |
|
392 | true.priority=1 | |
385 | true.executable=cat |
|
393 | true.executable=cat | |
386 | # hg update -C 1 |
|
394 | # hg update -C 1 | |
387 | $ hg merge -r 2 --config ui.merge=false |
|
395 | $ hg merge -r 2 --config ui.merge=false | |
388 | merging f |
|
396 | merging f | |
389 | merging f failed! |
|
397 | merging f failed! | |
390 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
398 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
391 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
399 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
392 | [1] |
|
400 | [1] | |
393 | $ aftermerge |
|
401 | $ aftermerge | |
394 | # cat f |
|
402 | # cat f | |
395 | revision 1 |
|
403 | revision 1 | |
396 | space |
|
404 | space | |
397 | # hg stat |
|
405 | # hg stat | |
398 | M f |
|
406 | M f | |
399 | ? f.orig |
|
407 | ? f.orig | |
400 |
|
408 | |||
401 | ui.merge specifies internal:fail: |
|
409 | ui.merge specifies internal:fail: | |
402 |
|
410 | |||
403 | $ beforemerge |
|
411 | $ beforemerge | |
404 | [merge-tools] |
|
412 | [merge-tools] | |
405 | false.whatever= |
|
413 | false.whatever= | |
406 | true.priority=1 |
|
414 | true.priority=1 | |
407 | true.executable=cat |
|
415 | true.executable=cat | |
408 | # hg update -C 1 |
|
416 | # hg update -C 1 | |
409 | $ hg merge -r 2 --config ui.merge=internal:fail |
|
417 | $ hg merge -r 2 --config ui.merge=internal:fail | |
410 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
418 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
411 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
419 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
412 | [1] |
|
420 | [1] | |
413 | $ aftermerge |
|
421 | $ aftermerge | |
414 | # cat f |
|
422 | # cat f | |
415 | revision 1 |
|
423 | revision 1 | |
416 | space |
|
424 | space | |
417 | # hg stat |
|
425 | # hg stat | |
418 | M f |
|
426 | M f | |
419 |
|
427 | |||
420 | ui.merge specifies internal:local: |
|
428 | ui.merge specifies internal:local: | |
421 |
|
429 | |||
422 | $ beforemerge |
|
430 | $ beforemerge | |
423 | [merge-tools] |
|
431 | [merge-tools] | |
424 | false.whatever= |
|
432 | false.whatever= | |
425 | true.priority=1 |
|
433 | true.priority=1 | |
426 | true.executable=cat |
|
434 | true.executable=cat | |
427 | # hg update -C 1 |
|
435 | # hg update -C 1 | |
428 | $ hg merge -r 2 --config ui.merge=internal:local |
|
436 | $ hg merge -r 2 --config ui.merge=internal:local | |
429 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
437 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
430 | (branch merge, don't forget to commit) |
|
438 | (branch merge, don't forget to commit) | |
431 | $ aftermerge |
|
439 | $ aftermerge | |
432 | # cat f |
|
440 | # cat f | |
433 | revision 1 |
|
441 | revision 1 | |
434 | space |
|
442 | space | |
435 | # hg stat |
|
443 | # hg stat | |
436 | M f |
|
444 | M f | |
437 |
|
445 | |||
438 | ui.merge specifies internal:other: |
|
446 | ui.merge specifies internal:other: | |
439 |
|
447 | |||
440 | $ beforemerge |
|
448 | $ beforemerge | |
441 | [merge-tools] |
|
449 | [merge-tools] | |
442 | false.whatever= |
|
450 | false.whatever= | |
443 | true.priority=1 |
|
451 | true.priority=1 | |
444 | true.executable=cat |
|
452 | true.executable=cat | |
445 | # hg update -C 1 |
|
453 | # hg update -C 1 | |
446 | $ hg merge -r 2 --config ui.merge=internal:other |
|
454 | $ hg merge -r 2 --config ui.merge=internal:other | |
447 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
455 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
448 | (branch merge, don't forget to commit) |
|
456 | (branch merge, don't forget to commit) | |
449 | $ aftermerge |
|
457 | $ aftermerge | |
450 | # cat f |
|
458 | # cat f | |
451 | revision 2 |
|
459 | revision 2 | |
452 | space |
|
460 | space | |
453 | # hg stat |
|
461 | # hg stat | |
454 | M f |
|
462 | M f | |
455 |
|
463 | |||
456 | ui.merge specifies internal:prompt: |
|
464 | ui.merge specifies internal:prompt: | |
457 |
|
465 | |||
458 | $ beforemerge |
|
466 | $ beforemerge | |
459 | [merge-tools] |
|
467 | [merge-tools] | |
460 | false.whatever= |
|
468 | false.whatever= | |
461 | true.priority=1 |
|
469 | true.priority=1 | |
462 | true.executable=cat |
|
470 | true.executable=cat | |
463 | # hg update -C 1 |
|
471 | # hg update -C 1 | |
464 | $ hg merge -r 2 --config ui.merge=internal:prompt |
|
472 | $ hg merge -r 2 --config ui.merge=internal:prompt | |
465 | no tool found to merge f |
|
473 | no tool found to merge f | |
466 | keep (l)ocal or take (o)ther? l |
|
474 | keep (l)ocal or take (o)ther? l | |
467 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
475 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
468 | (branch merge, don't forget to commit) |
|
476 | (branch merge, don't forget to commit) | |
469 | $ aftermerge |
|
477 | $ aftermerge | |
470 | # cat f |
|
478 | # cat f | |
471 | revision 1 |
|
479 | revision 1 | |
472 | space |
|
480 | space | |
473 | # hg stat |
|
481 | # hg stat | |
474 | M f |
|
482 | M f | |
475 |
|
483 | |||
476 | ui.merge specifies internal:dump: |
|
484 | ui.merge specifies internal:dump: | |
477 |
|
485 | |||
478 | $ beforemerge |
|
486 | $ beforemerge | |
479 | [merge-tools] |
|
487 | [merge-tools] | |
480 | false.whatever= |
|
488 | false.whatever= | |
481 | true.priority=1 |
|
489 | true.priority=1 | |
482 | true.executable=cat |
|
490 | true.executable=cat | |
483 | # hg update -C 1 |
|
491 | # hg update -C 1 | |
484 | $ hg merge -r 2 --config ui.merge=internal:dump |
|
492 | $ hg merge -r 2 --config ui.merge=internal:dump | |
485 | merging f |
|
493 | merging f | |
486 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
494 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
487 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
495 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
488 | [1] |
|
496 | [1] | |
489 | $ aftermerge |
|
497 | $ aftermerge | |
490 | # cat f |
|
498 | # cat f | |
491 | revision 1 |
|
499 | revision 1 | |
492 | space |
|
500 | space | |
493 | # hg stat |
|
501 | # hg stat | |
494 | M f |
|
502 | M f | |
495 | ? f.base |
|
503 | ? f.base | |
496 | ? f.local |
|
504 | ? f.local | |
497 | ? f.orig |
|
505 | ? f.orig | |
498 | ? f.other |
|
506 | ? f.other | |
499 |
|
507 | |||
500 | f.base: |
|
508 | f.base: | |
501 |
|
509 | |||
502 | $ cat f.base |
|
510 | $ cat f.base | |
503 | revision 0 |
|
511 | revision 0 | |
504 | space |
|
512 | space | |
505 |
|
513 | |||
506 | f.local: |
|
514 | f.local: | |
507 |
|
515 | |||
508 | $ cat f.local |
|
516 | $ cat f.local | |
509 | revision 1 |
|
517 | revision 1 | |
510 | space |
|
518 | space | |
511 |
|
519 | |||
512 | f.other: |
|
520 | f.other: | |
513 |
|
521 | |||
514 | $ cat f.other |
|
522 | $ cat f.other | |
515 | revision 2 |
|
523 | revision 2 | |
516 | space |
|
524 | space | |
517 | $ rm f.base f.local f.other |
|
525 | $ rm f.base f.local f.other | |
518 |
|
526 | |||
519 | ui.merge specifies internal:other but is overruled by pattern for false: |
|
527 | ui.merge specifies internal:other but is overruled by pattern for false: | |
520 |
|
528 | |||
521 | $ beforemerge |
|
529 | $ beforemerge | |
522 | [merge-tools] |
|
530 | [merge-tools] | |
523 | false.whatever= |
|
531 | false.whatever= | |
524 | true.priority=1 |
|
532 | true.priority=1 | |
525 | true.executable=cat |
|
533 | true.executable=cat | |
526 | # hg update -C 1 |
|
534 | # hg update -C 1 | |
527 | $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false |
|
535 | $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false | |
528 | merging f |
|
536 | merging f | |
529 | merging f failed! |
|
537 | merging f failed! | |
530 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
538 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
531 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
539 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
532 | [1] |
|
540 | [1] | |
533 | $ aftermerge |
|
541 | $ aftermerge | |
534 | # cat f |
|
542 | # cat f | |
535 | revision 1 |
|
543 | revision 1 | |
536 | space |
|
544 | space | |
537 | # hg stat |
|
545 | # hg stat | |
538 | M f |
|
546 | M f | |
539 | ? f.orig |
|
547 | ? f.orig | |
540 |
|
548 | |||
541 | Premerge |
|
549 | Premerge | |
542 |
|
550 | |||
543 | ui.merge specifies internal:other but is overruled by --tool=false |
|
551 | ui.merge specifies internal:other but is overruled by --tool=false | |
544 |
|
552 | |||
545 | $ beforemerge |
|
553 | $ beforemerge | |
546 | [merge-tools] |
|
554 | [merge-tools] | |
547 | false.whatever= |
|
555 | false.whatever= | |
548 | true.priority=1 |
|
556 | true.priority=1 | |
549 | true.executable=cat |
|
557 | true.executable=cat | |
550 | # hg update -C 1 |
|
558 | # hg update -C 1 | |
551 | $ hg merge -r 2 --config ui.merge=internal:other --tool=false |
|
559 | $ hg merge -r 2 --config ui.merge=internal:other --tool=false | |
552 | merging f |
|
560 | merging f | |
553 | merging f failed! |
|
561 | merging f failed! | |
554 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
562 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
555 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
563 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
556 | [1] |
|
564 | [1] | |
557 | $ aftermerge |
|
565 | $ aftermerge | |
558 | # cat f |
|
566 | # cat f | |
559 | revision 1 |
|
567 | revision 1 | |
560 | space |
|
568 | space | |
561 | # hg stat |
|
569 | # hg stat | |
562 | M f |
|
570 | M f | |
563 | ? f.orig |
|
571 | ? f.orig | |
564 |
|
572 | |||
565 | HGMERGE specifies internal:other but is overruled by --tool=false |
|
573 | HGMERGE specifies internal:other but is overruled by --tool=false | |
566 |
|
574 | |||
567 | $ HGMERGE=internal:other ; export HGMERGE |
|
575 | $ HGMERGE=internal:other ; export HGMERGE | |
568 | $ beforemerge |
|
576 | $ beforemerge | |
569 | [merge-tools] |
|
577 | [merge-tools] | |
570 | false.whatever= |
|
578 | false.whatever= | |
571 | true.priority=1 |
|
579 | true.priority=1 | |
572 | true.executable=cat |
|
580 | true.executable=cat | |
573 | # hg update -C 1 |
|
581 | # hg update -C 1 | |
574 | $ hg merge -r 2 --tool=false |
|
582 | $ hg merge -r 2 --tool=false | |
575 | merging f |
|
583 | merging f | |
576 | merging f failed! |
|
584 | merging f failed! | |
577 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
585 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
578 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
586 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
579 | [1] |
|
587 | [1] | |
580 | $ aftermerge |
|
588 | $ aftermerge | |
581 | # cat f |
|
589 | # cat f | |
582 | revision 1 |
|
590 | revision 1 | |
583 | space |
|
591 | space | |
584 | # hg stat |
|
592 | # hg stat | |
585 | M f |
|
593 | M f | |
586 | ? f.orig |
|
594 | ? f.orig | |
587 |
|
595 | |||
588 | $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests |
|
596 | $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests | |
589 |
|
597 | |||
590 | update is a merge ... |
|
598 | update is a merge ... | |
591 |
|
599 | |||
592 | $ beforemerge |
|
600 | $ beforemerge | |
593 | [merge-tools] |
|
601 | [merge-tools] | |
594 | false.whatever= |
|
602 | false.whatever= | |
595 | true.priority=1 |
|
603 | true.priority=1 | |
596 | true.executable=cat |
|
604 | true.executable=cat | |
597 | # hg update -C 1 |
|
605 | # hg update -C 1 | |
598 | $ hg debugsetparent 0 |
|
606 | $ hg debugsetparent 0 | |
599 | $ hg update -r 2 |
|
607 | $ hg update -r 2 | |
600 | merging f |
|
608 | merging f | |
601 | revision 1 |
|
609 | revision 1 | |
602 | space |
|
610 | space | |
603 | revision 0 |
|
611 | revision 0 | |
604 | space |
|
612 | space | |
605 | revision 2 |
|
613 | revision 2 | |
606 | space |
|
614 | space | |
607 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
615 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
608 | $ aftermerge |
|
616 | $ aftermerge | |
609 | # cat f |
|
617 | # cat f | |
610 | revision 1 |
|
618 | revision 1 | |
611 | space |
|
619 | space | |
612 | # hg stat |
|
620 | # hg stat | |
613 | M f |
|
621 | M f | |
614 |
|
622 | |||
615 | update should also have --tool |
|
623 | update should also have --tool | |
616 |
|
624 | |||
617 | $ beforemerge |
|
625 | $ beforemerge | |
618 | [merge-tools] |
|
626 | [merge-tools] | |
619 | false.whatever= |
|
627 | false.whatever= | |
620 | true.priority=1 |
|
628 | true.priority=1 | |
621 | true.executable=cat |
|
629 | true.executable=cat | |
622 | # hg update -C 1 |
|
630 | # hg update -C 1 | |
623 | $ hg debugsetparent 0 |
|
631 | $ hg debugsetparent 0 | |
624 | $ hg update -r 2 --tool false |
|
632 | $ hg update -r 2 --tool false | |
625 | merging f |
|
633 | merging f | |
626 | merging f failed! |
|
634 | merging f failed! | |
627 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
635 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
628 | use 'hg resolve' to retry unresolved file merges |
|
636 | use 'hg resolve' to retry unresolved file merges | |
629 | [1] |
|
637 | [1] | |
630 | $ aftermerge |
|
638 | $ aftermerge | |
631 | # cat f |
|
639 | # cat f | |
632 | revision 1 |
|
640 | revision 1 | |
633 | space |
|
641 | space | |
634 | # hg stat |
|
642 | # hg stat | |
635 | M f |
|
643 | M f | |
636 | ? f.orig |
|
644 | ? f.orig | |
637 |
|
645 | |||
638 | Default is silent simplemerge: |
|
646 | Default is silent simplemerge: | |
639 |
|
647 | |||
640 | $ beforemerge |
|
648 | $ beforemerge | |
641 | [merge-tools] |
|
649 | [merge-tools] | |
642 | false.whatever= |
|
650 | false.whatever= | |
643 | true.priority=1 |
|
651 | true.priority=1 | |
644 | true.executable=cat |
|
652 | true.executable=cat | |
645 | # hg update -C 1 |
|
653 | # hg update -C 1 | |
646 | $ hg merge -r 3 |
|
654 | $ hg merge -r 3 | |
647 | merging f |
|
655 | merging f | |
648 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
656 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
649 | (branch merge, don't forget to commit) |
|
657 | (branch merge, don't forget to commit) | |
650 | $ aftermerge |
|
658 | $ aftermerge | |
651 | # cat f |
|
659 | # cat f | |
652 | revision 1 |
|
660 | revision 1 | |
653 | space |
|
661 | space | |
654 | revision 3 |
|
662 | revision 3 | |
655 | # hg stat |
|
663 | # hg stat | |
656 | M f |
|
664 | M f | |
657 |
|
665 | |||
658 | .premerge=True is same: |
|
666 | .premerge=True is same: | |
659 |
|
667 | |||
660 | $ beforemerge |
|
668 | $ beforemerge | |
661 | [merge-tools] |
|
669 | [merge-tools] | |
662 | false.whatever= |
|
670 | false.whatever= | |
663 | true.priority=1 |
|
671 | true.priority=1 | |
664 | true.executable=cat |
|
672 | true.executable=cat | |
665 | # hg update -C 1 |
|
673 | # hg update -C 1 | |
666 | $ hg merge -r 3 --config merge-tools.true.premerge=True |
|
674 | $ hg merge -r 3 --config merge-tools.true.premerge=True | |
667 | merging f |
|
675 | merging f | |
668 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
676 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
669 | (branch merge, don't forget to commit) |
|
677 | (branch merge, don't forget to commit) | |
670 | $ aftermerge |
|
678 | $ aftermerge | |
671 | # cat f |
|
679 | # cat f | |
672 | revision 1 |
|
680 | revision 1 | |
673 | space |
|
681 | space | |
674 | revision 3 |
|
682 | revision 3 | |
675 | # hg stat |
|
683 | # hg stat | |
676 | M f |
|
684 | M f | |
677 |
|
685 | |||
678 | .premerge=False executes merge-tool: |
|
686 | .premerge=False executes merge-tool: | |
679 |
|
687 | |||
680 | $ beforemerge |
|
688 | $ beforemerge | |
681 | [merge-tools] |
|
689 | [merge-tools] | |
682 | false.whatever= |
|
690 | false.whatever= | |
683 | true.priority=1 |
|
691 | true.priority=1 | |
684 | true.executable=cat |
|
692 | true.executable=cat | |
685 | # hg update -C 1 |
|
693 | # hg update -C 1 | |
686 | $ hg merge -r 3 --config merge-tools.true.premerge=False |
|
694 | $ hg merge -r 3 --config merge-tools.true.premerge=False | |
687 | merging f |
|
695 | merging f | |
688 | revision 1 |
|
696 | revision 1 | |
689 | space |
|
697 | space | |
690 | revision 0 |
|
698 | revision 0 | |
691 | space |
|
699 | space | |
692 | revision 0 |
|
700 | revision 0 | |
693 | space |
|
701 | space | |
694 | revision 3 |
|
702 | revision 3 | |
695 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
703 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
696 | (branch merge, don't forget to commit) |
|
704 | (branch merge, don't forget to commit) | |
697 | $ aftermerge |
|
705 | $ aftermerge | |
698 | # cat f |
|
706 | # cat f | |
699 | revision 1 |
|
707 | revision 1 | |
700 | space |
|
708 | space | |
701 | # hg stat |
|
709 | # hg stat | |
702 | M f |
|
710 | M f | |
703 |
|
711 | |||
704 | Tool execution |
|
712 | Tool execution | |
705 |
|
713 | |||
706 | set tools.args explicit to include $base $local $other $output: |
|
714 | set tools.args explicit to include $base $local $other $output: | |
707 |
|
715 | |||
708 | $ beforemerge |
|
716 | $ beforemerge | |
709 | [merge-tools] |
|
717 | [merge-tools] | |
710 | false.whatever= |
|
718 | false.whatever= | |
711 | true.priority=1 |
|
719 | true.priority=1 | |
712 | true.executable=cat |
|
720 | true.executable=cat | |
713 | # hg update -C 1 |
|
721 | # hg update -C 1 | |
714 | $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ |
|
722 | $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ | |
715 | > | sed 's,==> .* <==,==> ... <==,g' |
|
723 | > | sed 's,==> .* <==,==> ... <==,g' | |
716 | merging f |
|
724 | merging f | |
717 | ==> ... <== |
|
725 | ==> ... <== | |
718 | revision 0 |
|
726 | revision 0 | |
719 | space |
|
727 | space | |
720 |
|
728 | |||
721 | ==> ... <== |
|
729 | ==> ... <== | |
722 | revision 1 |
|
730 | revision 1 | |
723 | space |
|
731 | space | |
724 |
|
732 | |||
725 | ==> ... <== |
|
733 | ==> ... <== | |
726 | revision 2 |
|
734 | revision 2 | |
727 | space |
|
735 | space | |
728 |
|
736 | |||
729 | ==> ... <== |
|
737 | ==> ... <== | |
730 | revision 1 |
|
738 | revision 1 | |
731 | space |
|
739 | space | |
732 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
740 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
733 | (branch merge, don't forget to commit) |
|
741 | (branch merge, don't forget to commit) | |
734 | $ aftermerge |
|
742 | $ aftermerge | |
735 | # cat f |
|
743 | # cat f | |
736 | revision 1 |
|
744 | revision 1 | |
737 | space |
|
745 | space | |
738 | # hg stat |
|
746 | # hg stat | |
739 | M f |
|
747 | M f | |
740 |
|
748 | |||
741 | Merge with "echo mergeresult > $local": |
|
749 | Merge with "echo mergeresult > $local": | |
742 |
|
750 | |||
743 | $ beforemerge |
|
751 | $ beforemerge | |
744 | [merge-tools] |
|
752 | [merge-tools] | |
745 | false.whatever= |
|
753 | false.whatever= | |
746 | true.priority=1 |
|
754 | true.priority=1 | |
747 | true.executable=cat |
|
755 | true.executable=cat | |
748 | # hg update -C 1 |
|
756 | # hg update -C 1 | |
749 | $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' |
|
757 | $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' | |
750 | merging f |
|
758 | merging f | |
751 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
759 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
752 | (branch merge, don't forget to commit) |
|
760 | (branch merge, don't forget to commit) | |
753 | $ aftermerge |
|
761 | $ aftermerge | |
754 | # cat f |
|
762 | # cat f | |
755 | mergeresult |
|
763 | mergeresult | |
756 | # hg stat |
|
764 | # hg stat | |
757 | M f |
|
765 | M f | |
758 |
|
766 | |||
759 | - and $local is the file f: |
|
767 | - and $local is the file f: | |
760 |
|
768 | |||
761 | $ beforemerge |
|
769 | $ beforemerge | |
762 | [merge-tools] |
|
770 | [merge-tools] | |
763 | false.whatever= |
|
771 | false.whatever= | |
764 | true.priority=1 |
|
772 | true.priority=1 | |
765 | true.executable=cat |
|
773 | true.executable=cat | |
766 | # hg update -C 1 |
|
774 | # hg update -C 1 | |
767 | $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' |
|
775 | $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' | |
768 | merging f |
|
776 | merging f | |
769 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
777 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
770 | (branch merge, don't forget to commit) |
|
778 | (branch merge, don't forget to commit) | |
771 | $ aftermerge |
|
779 | $ aftermerge | |
772 | # cat f |
|
780 | # cat f | |
773 | mergeresult |
|
781 | mergeresult | |
774 | # hg stat |
|
782 | # hg stat | |
775 | M f |
|
783 | M f | |
776 |
|
784 | |||
777 | Merge with "echo mergeresult > $output" - the variable is a bit magic: |
|
785 | Merge with "echo mergeresult > $output" - the variable is a bit magic: | |
778 |
|
786 | |||
779 | $ beforemerge |
|
787 | $ beforemerge | |
780 | [merge-tools] |
|
788 | [merge-tools] | |
781 | false.whatever= |
|
789 | false.whatever= | |
782 | true.priority=1 |
|
790 | true.priority=1 | |
783 | true.executable=cat |
|
791 | true.executable=cat | |
784 | # hg update -C 1 |
|
792 | # hg update -C 1 | |
785 | $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' |
|
793 | $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' | |
786 | merging f |
|
794 | merging f | |
787 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
795 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
788 | (branch merge, don't forget to commit) |
|
796 | (branch merge, don't forget to commit) | |
789 | $ aftermerge |
|
797 | $ aftermerge | |
790 | # cat f |
|
798 | # cat f | |
791 | mergeresult |
|
799 | mergeresult | |
792 | # hg stat |
|
800 | # hg stat | |
793 | M f |
|
801 | M f | |
794 |
|
802 | |||
795 | Merge using tool with a path that must be quoted: |
|
803 | Merge using tool with a path that must be quoted: | |
796 |
|
804 | |||
797 | $ beforemerge |
|
805 | $ beforemerge | |
798 | [merge-tools] |
|
806 | [merge-tools] | |
799 | false.whatever= |
|
807 | false.whatever= | |
800 | true.priority=1 |
|
808 | true.priority=1 | |
801 | true.executable=cat |
|
809 | true.executable=cat | |
802 | # hg update -C 1 |
|
810 | # hg update -C 1 | |
803 | $ cat <<EOF > 'my merge tool' |
|
811 | $ cat <<EOF > 'my merge tool' | |
804 | > cat "\$1" "\$2" "\$3" > "\$4" |
|
812 | > cat "\$1" "\$2" "\$3" > "\$4" | |
805 | > EOF |
|
813 | > EOF | |
806 | $ hg --config merge-tools.true.executable='sh' \ |
|
814 | $ hg --config merge-tools.true.executable='sh' \ | |
807 | > --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \ |
|
815 | > --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \ | |
808 | > merge -r 2 |
|
816 | > merge -r 2 | |
809 | merging f |
|
817 | merging f | |
810 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
818 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
811 | (branch merge, don't forget to commit) |
|
819 | (branch merge, don't forget to commit) | |
812 | $ rm -f 'my merge tool' |
|
820 | $ rm -f 'my merge tool' | |
813 | $ aftermerge |
|
821 | $ aftermerge | |
814 | # cat f |
|
822 | # cat f | |
815 | revision 0 |
|
823 | revision 0 | |
816 | space |
|
824 | space | |
817 | revision 1 |
|
825 | revision 1 | |
818 | space |
|
826 | space | |
819 | revision 2 |
|
827 | revision 2 | |
820 | space |
|
828 | space | |
821 | # hg stat |
|
829 | # hg stat | |
822 | M f |
|
830 | M f | |
823 |
|
831 | |||
824 | Issue3581: Merging a filename that needs to be quoted |
|
832 | Issue3581: Merging a filename that needs to be quoted | |
825 | (This test doesn't work on Windows filesystems even on Linux, so check |
|
833 | (This test doesn't work on Windows filesystems even on Linux, so check | |
826 | for Unix-like permission) |
|
834 | for Unix-like permission) | |
827 |
|
835 | |||
828 | #if unix-permissions |
|
836 | #if unix-permissions | |
829 | $ beforemerge |
|
837 | $ beforemerge | |
830 | [merge-tools] |
|
838 | [merge-tools] | |
831 | false.whatever= |
|
839 | false.whatever= | |
832 | true.priority=1 |
|
840 | true.priority=1 | |
833 | true.executable=cat |
|
841 | true.executable=cat | |
834 | # hg update -C 1 |
|
842 | # hg update -C 1 | |
835 | $ echo "revision 4" > '"; exit 1; echo "' |
|
|||
836 | $ hg commit -Am "revision 4" |
|
|||
837 | adding "; exit 1; echo " |
|
|||
838 | warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "' |
|
|||
839 | $ hg update -C 1 > /dev/null |
|
|||
840 | $ echo "revision 5" > '"; exit 1; echo "' |
|
843 | $ echo "revision 5" > '"; exit 1; echo "' | |
841 | $ hg commit -Am "revision 5" |
|
844 | $ hg commit -Am "revision 5" | |
842 | adding "; exit 1; echo " |
|
845 | adding "; exit 1; echo " | |
843 | warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "' |
|
846 | warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "' | |
|
847 | $ hg update -C 1 > /dev/null | |||
|
848 | $ echo "revision 6" > '"; exit 1; echo "' | |||
|
849 | $ hg commit -Am "revision 6" | |||
|
850 | adding "; exit 1; echo " | |||
|
851 | warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "' | |||
844 | created new head |
|
852 | created new head | |
845 |
$ hg merge --config merge-tools.true.executable="true" -r |
|
853 | $ hg merge --config merge-tools.true.executable="true" -r 5 | |
846 | merging "; exit 1; echo " |
|
854 | merging "; exit 1; echo " | |
847 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
855 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
848 | (branch merge, don't forget to commit) |
|
856 | (branch merge, don't forget to commit) | |
849 | $ hg update -C 1 > /dev/null |
|
857 | $ hg update -C 1 > /dev/null | |
850 | #endif |
|
858 | #endif | |
851 |
|
859 | |||
852 | Merge post-processing |
|
860 | Merge post-processing | |
853 |
|
861 | |||
854 | cat is a bad merge-tool and doesn't change: |
|
862 | cat is a bad merge-tool and doesn't change: | |
855 |
|
863 | |||
856 | $ beforemerge |
|
864 | $ beforemerge | |
857 | [merge-tools] |
|
865 | [merge-tools] | |
858 | false.whatever= |
|
866 | false.whatever= | |
859 | true.priority=1 |
|
867 | true.priority=1 | |
860 | true.executable=cat |
|
868 | true.executable=cat | |
861 | # hg update -C 1 |
|
869 | # hg update -C 1 | |
862 | $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1 |
|
870 | $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1 | |
863 | merging f |
|
871 | merging f | |
864 | revision 1 |
|
872 | revision 1 | |
865 | space |
|
873 | space | |
866 | revision 0 |
|
874 | revision 0 | |
867 | space |
|
875 | space | |
868 | revision 2 |
|
876 | revision 2 | |
869 | space |
|
877 | space | |
870 | output file f appears unchanged |
|
878 | output file f appears unchanged | |
871 | was merge successful (yn)? n |
|
879 | was merge successful (yn)? n | |
872 | merging f failed! |
|
880 | merging f failed! | |
873 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
881 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
874 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
882 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
875 | [1] |
|
883 | [1] | |
876 | $ aftermerge |
|
884 | $ aftermerge | |
877 | # cat f |
|
885 | # cat f | |
878 | revision 1 |
|
886 | revision 1 | |
879 | space |
|
887 | space | |
880 | # hg stat |
|
888 | # hg stat | |
881 | M f |
|
889 | M f | |
882 | ? f.orig |
|
890 | ? f.orig | |
883 |
|
891 | |||
884 | #if symlink |
|
892 | #if symlink | |
885 |
|
893 | |||
886 | internal merge cannot handle symlinks and shouldn't try: |
|
894 | internal merge cannot handle symlinks and shouldn't try: | |
887 |
|
895 | |||
888 | $ hg update -q -C 1 |
|
896 | $ hg update -q -C 1 | |
889 | $ rm f |
|
897 | $ rm f | |
890 | $ ln -s symlink f |
|
898 | $ ln -s symlink f | |
891 | $ hg commit -qm 'f is symlink' |
|
899 | $ hg commit -qm 'f is symlink' | |
892 | $ hg merge -r 2 --tool internal:merge |
|
900 | $ hg merge -r 2 --tool internal:merge | |
893 | merging f |
|
901 | merging f | |
894 | warning: internal:merge cannot merge symlinks for f |
|
902 | warning: internal:merge cannot merge symlinks for f | |
895 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
903 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
896 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
904 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
897 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
905 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
898 | [1] |
|
906 | [1] | |
899 |
|
907 | |||
900 | #endif |
|
908 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now