author | Benjamin Pollack <benjamin@bitquabit.com> |
Tue, 17 Mar 2009 11:47:40 -0400 | |
changeset 7854 | 423b4482c5cb |
parent 7821 | 9fe7e6acf525 |
child 7846 | 1cb6836946be |
permissions | -rw-r--r-- |
7731 | 1 |
# revision 0 |
2 |
adding f |
|
3 |
# revision 1 |
|
4 |
# revision 2 |
|
5 |
created new head |
|
6 |
# revision 3 - simple to merge |
|
7 |
created new head |
|
8 |
||
9 |
||
10 |
Tool selection |
|
11 |
||
12 |
# default is internal merge: |
|
13 |
[merge-tools] |
|
14 |
# hg update -C 1 |
|
15 |
# hg merge -r 2 |
|
16 |
merging f |
|
17 |
warning: conflicts during merge. |
|
18 |
merging f failed! |
|
19 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
20 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 21 |
# cat f |
22 |
<<<<<<< local |
|
23 |
revision 1 |
|
24 |
======= |
|
25 |
revision 2 |
|
26 |
>>>>>>> other |
|
27 |
space |
|
28 |
# hg stat |
|
29 |
M f |
|
30 |
? f.orig |
|
31 |
||
32 |
# simplest hgrc using false for merge: |
|
33 |
[merge-tools] |
|
34 |
false.whatever= |
|
35 |
# hg update -C 1 |
|
36 |
# hg merge -r 2 |
|
37 |
merging f |
|
38 |
merging f failed! |
|
39 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
40 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 41 |
# cat f |
42 |
revision 1 |
|
43 |
space |
|
44 |
# hg stat |
|
45 |
M f |
|
46 |
? f.orig |
|
47 |
||
48 |
# true with higher .priority gets precedence: |
|
49 |
[merge-tools] |
|
50 |
false.whatever= |
|
51 |
true.priority=1 |
|
52 |
# hg update -C 1 |
|
53 |
# hg merge -r 2 |
|
54 |
merging f |
|
55 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
56 |
(branch merge, don't forget to commit) |
|
57 |
# cat f |
|
58 |
revision 1 |
|
59 |
space |
|
60 |
# hg stat |
|
61 |
M f |
|
62 |
||
63 |
# unless lowered on command line: |
|
64 |
[merge-tools] |
|
65 |
false.whatever= |
|
66 |
true.priority=1 |
|
67 |
# hg update -C 1 |
|
68 |
# hg merge -r 2 --config merge-tools.true.priority=-7 |
|
69 |
merging f |
|
70 |
merging f failed! |
|
71 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
72 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 73 |
# cat f |
74 |
revision 1 |
|
75 |
space |
|
76 |
# hg stat |
|
77 |
M f |
|
78 |
? f.orig |
|
79 |
||
80 |
# or false set higher on command line: |
|
81 |
[merge-tools] |
|
82 |
false.whatever= |
|
83 |
true.priority=1 |
|
84 |
# hg update -C 1 |
|
85 |
# hg merge -r 2 --config merge-tools.false.priority=117 |
|
86 |
merging f |
|
87 |
merging f failed! |
|
88 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
89 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 90 |
# cat f |
91 |
revision 1 |
|
92 |
space |
|
93 |
# hg stat |
|
94 |
M f |
|
95 |
? f.orig |
|
96 |
||
97 |
# or true.executable not found in PATH: |
|
98 |
[merge-tools] |
|
99 |
false.whatever= |
|
100 |
true.priority=1 |
|
101 |
# hg update -C 1 |
|
102 |
# hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool |
|
103 |
merging f |
|
104 |
merging f failed! |
|
105 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
106 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 107 |
# cat f |
108 |
revision 1 |
|
109 |
space |
|
110 |
# hg stat |
|
111 |
M f |
|
112 |
? f.orig |
|
113 |
||
114 |
# or true.executable with bogus path: |
|
115 |
[merge-tools] |
|
116 |
false.whatever= |
|
117 |
true.priority=1 |
|
118 |
# hg update -C 1 |
|
119 |
# hg merge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool |
|
120 |
merging f |
|
121 |
merging f failed! |
|
122 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
123 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 124 |
# cat f |
125 |
revision 1 |
|
126 |
space |
|
127 |
# hg stat |
|
128 |
M f |
|
129 |
? f.orig |
|
130 |
||
131 |
# but true.executable set to cat found in PATH works: |
|
132 |
[merge-tools] |
|
133 |
false.whatever= |
|
134 |
true.priority=1 |
|
135 |
true.executable=cat |
|
136 |
# hg update -C 1 |
|
137 |
# hg merge -r 2 |
|
138 |
revision 1 |
|
139 |
space |
|
140 |
revision 0 |
|
141 |
space |
|
142 |
revision 2 |
|
143 |
space |
|
144 |
merging f |
|
145 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
146 |
(branch merge, don't forget to commit) |
|
147 |
# cat f |
|
148 |
revision 1 |
|
149 |
space |
|
150 |
# hg stat |
|
151 |
M f |
|
152 |
||
153 |
# and true.executable set to cat with path works: |
|
154 |
[merge-tools] |
|
155 |
false.whatever= |
|
156 |
true.priority=1 |
|
157 |
true.executable=cat |
|
158 |
# hg update -C 1 |
|
159 |
# hg merge -r 2 --config merge-tools.true.executable=/bin/cat |
|
160 |
revision 1 |
|
161 |
space |
|
162 |
revision 0 |
|
163 |
space |
|
164 |
revision 2 |
|
165 |
space |
|
166 |
merging f |
|
167 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
168 |
(branch merge, don't forget to commit) |
|
169 |
# cat f |
|
170 |
revision 1 |
|
171 |
space |
|
172 |
# hg stat |
|
173 |
M f |
|
174 |
||
175 |
||
176 |
Tool selection and merge-patterns |
|
177 |
||
7769
8c06d4bf2c23
test-merge-tools: Don't use tac
Mads Kiilerich <mads@kiilerich.com>
parents:
7732
diff
changeset
|
178 |
# merge-patterns specifies new tool false: |
7731 | 179 |
[merge-tools] |
180 |
false.whatever= |
|
181 |
true.priority=1 |
|
182 |
true.executable=cat |
|
183 |
# hg update -C 1 |
|
7769
8c06d4bf2c23
test-merge-tools: Don't use tac
Mads Kiilerich <mads@kiilerich.com>
parents:
7732
diff
changeset
|
184 |
# hg merge -r 2 --config merge-patterns.f=false |
7731 | 185 |
merging f |
7769
8c06d4bf2c23
test-merge-tools: Don't use tac
Mads Kiilerich <mads@kiilerich.com>
parents:
7732
diff
changeset
|
186 |
merging f failed! |
8c06d4bf2c23
test-merge-tools: Don't use tac
Mads Kiilerich <mads@kiilerich.com>
parents:
7732
diff
changeset
|
187 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
188 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 189 |
# cat f |
190 |
revision 1 |
|
191 |
space |
|
192 |
# hg stat |
|
193 |
M f |
|
7769
8c06d4bf2c23
test-merge-tools: Don't use tac
Mads Kiilerich <mads@kiilerich.com>
parents:
7732
diff
changeset
|
194 |
? f.orig |
7731 | 195 |
|
196 |
# merge-patterns specifies executable not found in PATH and gets warning: |
|
197 |
[merge-tools] |
|
198 |
false.whatever= |
|
199 |
true.priority=1 |
|
200 |
true.executable=cat |
|
201 |
# hg update -C 1 |
|
202 |
# hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool |
|
203 |
couldn't find merge tool true specified for f |
|
204 |
merging f |
|
205 |
merging f failed! |
|
206 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
207 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 208 |
# cat f |
209 |
revision 1 |
|
210 |
space |
|
211 |
# hg stat |
|
212 |
M f |
|
213 |
? f.orig |
|
214 |
||
215 |
# merge-patterns specifies executable with bogus path and gets warning: |
|
216 |
[merge-tools] |
|
217 |
false.whatever= |
|
218 |
true.priority=1 |
|
219 |
true.executable=cat |
|
220 |
# hg update -C 1 |
|
221 |
# hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool |
|
7732
3793802ea41b
Make util.find_exe alway returns existing file, fixing issue1459
Mads Kiilerich <mads@kiilerich.com>
parents:
7731
diff
changeset
|
222 |
couldn't find merge tool true specified for f |
7731 | 223 |
merging f |
224 |
merging f failed! |
|
225 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
226 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 227 |
# cat f |
228 |
revision 1 |
|
229 |
space |
|
230 |
# hg stat |
|
231 |
M f |
|
232 |
? f.orig |
|
233 |
||
234 |
||
235 |
Premerge |
|
236 |
||
237 |
# Default is silent simplemerge: |
|
238 |
[merge-tools] |
|
239 |
false.whatever= |
|
240 |
true.priority=1 |
|
241 |
true.executable=cat |
|
242 |
# hg update -C 1 |
|
243 |
# hg merge -r 3 |
|
244 |
merging f |
|
245 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
246 |
(branch merge, don't forget to commit) |
|
247 |
# cat f |
|
248 |
revision 1 |
|
249 |
space |
|
250 |
revision 3 |
|
251 |
# hg stat |
|
252 |
M f |
|
253 |
||
254 |
# .premerge=True is same: |
|
255 |
[merge-tools] |
|
256 |
false.whatever= |
|
257 |
true.priority=1 |
|
258 |
true.executable=cat |
|
259 |
# hg update -C 1 |
|
260 |
# hg merge -r 3 --config merge-tools.true.premerge=True |
|
261 |
merging f |
|
262 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
263 |
(branch merge, don't forget to commit) |
|
264 |
# cat f |
|
265 |
revision 1 |
|
266 |
space |
|
267 |
revision 3 |
|
268 |
# hg stat |
|
269 |
M f |
|
270 |
||
271 |
# .premerge=False executes merge-tool: |
|
272 |
[merge-tools] |
|
273 |
false.whatever= |
|
274 |
true.priority=1 |
|
275 |
true.executable=cat |
|
276 |
# hg update -C 1 |
|
277 |
# hg merge -r 3 --config merge-tools.true.premerge=False |
|
278 |
revision 1 |
|
279 |
space |
|
280 |
revision 0 |
|
281 |
space |
|
282 |
revision 0 |
|
283 |
space |
|
284 |
revision 3 |
|
285 |
merging f |
|
286 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
287 |
(branch merge, don't forget to commit) |
|
288 |
# cat f |
|
289 |
revision 1 |
|
290 |
space |
|
291 |
# hg stat |
|
292 |
M f |
|
293 |
||
294 |
||
295 |
Tool execution |
|
296 |
||
297 |
# set tools.args explicit to include $base $local $other $output: |
|
298 |
[merge-tools] |
|
299 |
false.whatever= |
|
300 |
true.priority=1 |
|
301 |
true.executable=cat |
|
302 |
# hg update -C 1 |
|
303 |
==> ... <== |
|
304 |
revision 0 |
|
305 |
space |
|
306 |
||
307 |
==> ... <== |
|
308 |
revision 1 |
|
309 |
space |
|
310 |
||
311 |
==> ... <== |
|
312 |
revision 2 |
|
313 |
space |
|
314 |
||
315 |
==> ... <== |
|
316 |
revision 1 |
|
317 |
space |
|
318 |
merging f |
|
319 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
320 |
(branch merge, don't forget to commit) |
|
321 |
# cat f |
|
322 |
revision 1 |
|
323 |
space |
|
324 |
# hg stat |
|
325 |
M f |
|
326 |
||
327 |
# Merge with "echo mergeresult > $local": |
|
328 |
[merge-tools] |
|
329 |
false.whatever= |
|
330 |
true.priority=1 |
|
331 |
true.executable=cat |
|
332 |
# hg update -C 1 |
|
333 |
merging f |
|
334 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
335 |
(branch merge, don't forget to commit) |
|
336 |
# cat f |
|
337 |
mergeresult |
|
338 |
# hg stat |
|
339 |
M f |
|
340 |
||
341 |
# - and $local is the file f: |
|
342 |
[merge-tools] |
|
343 |
false.whatever= |
|
344 |
true.priority=1 |
|
345 |
true.executable=cat |
|
346 |
# hg update -C 1 |
|
347 |
merging f |
|
348 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
349 |
(branch merge, don't forget to commit) |
|
350 |
# cat f |
|
351 |
mergeresult |
|
352 |
# hg stat |
|
353 |
M f |
|
354 |
||
355 |
# Merge with "echo mergeresult > $output" - the variable is a bit magic: |
|
356 |
[merge-tools] |
|
357 |
false.whatever= |
|
358 |
true.priority=1 |
|
359 |
true.executable=cat |
|
360 |
# hg update -C 1 |
|
361 |
merging f |
|
362 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
363 |
(branch merge, don't forget to commit) |
|
364 |
# cat f |
|
365 |
mergeresult |
|
366 |
# hg stat |
|
367 |
M f |
|
368 |
||
369 |
||
370 |
Merge post-processing |
|
371 |
||
372 |
# cat is a bad merge-tool and doesn't change: |
|
373 |
[merge-tools] |
|
374 |
false.whatever= |
|
375 |
true.priority=1 |
|
376 |
true.executable=cat |
|
377 |
# hg update -C 1 |
|
378 |
# hg merge -r 2 --config merge-tools.true.checkchanged=1 |
|
379 |
revision 1 |
|
380 |
space |
|
381 |
revision 0 |
|
382 |
space |
|
383 |
revision 2 |
|
384 |
space |
|
385 |
merging f |
|
386 |
merging f failed! |
|
387 |
0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
7821
9fe7e6acf525
merge: better error messages to lead users to hg update --clean to abandon merges.
Augie Fackler <durin42@gmail.com>
parents:
7769
diff
changeset
|
388 |
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon |
7731 | 389 |
# cat f |
390 |
revision 1 |
|
391 |
space |
|
392 |
# hg stat |
|
393 |
M f |
|
394 |
? f.orig |
|
395 |