Show More
@@ -463,13 +463,19 b' Supported arguments:' | |||||
463 | ``symlink`` |
|
463 | ``symlink`` | |
464 | This tool can merge symlinks. Defaults to False, even if tool was |
|
464 | This tool can merge symlinks. Defaults to False, even if tool was | |
465 | selected by file pattern match. |
|
465 | selected by file pattern match. | |
466 |
``check |
|
466 | ``check`` | |
467 | Check whether there are conflicts even though the tool reported |
|
467 | A list of merge success-checking options: | |
468 | success. |
|
468 | ||
|
469 | ``changed`` | |||
|
470 | Ask whether merge was successful when the merged file shows no changes. | |||
|
471 | ``conflicts`` | |||
|
472 | Check whether there are conflicts even though the tool reported success. | |||
|
473 | ||||
|
474 | ``checkchanged`` | |||
|
475 | True is equivalent to ``check = changed``. | |||
469 | Default: False |
|
476 | Default: False | |
470 |
``checkc |
|
477 | ``checkconflicts`` | |
471 | Check whether outputs were written even though the tool reported |
|
478 | True is equivalent to ``check = conflicts``. | |
472 | success. |
|
|||
473 | Default: False |
|
479 | Default: False | |
474 | ``fixeol`` |
|
480 | ``fixeol`` | |
475 | Attempt to fix up EOL changes caused by the merge tool. |
|
481 | Attempt to fix up EOL changes caused by the merge tool. |
@@ -16,6 +16,9 b' def _toolstr(ui, tool, part, default="")' | |||||
16 | def _toolbool(ui, tool, part, default=False): |
|
16 | def _toolbool(ui, tool, part, default=False): | |
17 | return ui.configbool("merge-tools", tool + "." + part, default) |
|
17 | return ui.configbool("merge-tools", tool + "." + part, default) | |
18 |
|
18 | |||
|
19 | def _toollist(ui, tool, part, default=[]): | |||
|
20 | return ui.configlist("merge-tools", tool + "." + part, default) | |||
|
21 | ||||
19 | _internal = ['internal:' + s |
|
22 | _internal = ['internal:' + s | |
20 | for s in 'fail local other merge prompt dump'.split()] |
|
23 | for s in 'fail local other merge prompt dump'.split()] | |
21 |
|
24 | |||
@@ -223,11 +226,13 b' def filemerge(repo, mynode, orig, fcd, f' | |||||
223 | lambda x: '"%s"' % util.localpath(replace[x.group()[1:]]), args) |
|
226 | lambda x: '"%s"' % util.localpath(replace[x.group()[1:]]), args) | |
224 | r = util.system(toolpath + ' ' + args, cwd=repo.root, environ=env) |
|
227 | r = util.system(toolpath + ' ' + args, cwd=repo.root, environ=env) | |
225 |
|
228 | |||
226 |
if not r and _toolbool(ui, tool, "checkconflicts") |
|
229 | if not r and (_toolbool(ui, tool, "checkconflicts") or | |
|
230 | 'conflicts' in _toollist(ui, tool, "check")): | |||
227 | if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data()): |
|
231 | if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data()): | |
228 | r = 1 |
|
232 | r = 1 | |
229 |
|
233 | |||
230 |
if not r and _toolbool(ui, tool, "checkchanged") |
|
234 | if not r and (_toolbool(ui, tool, "checkchanged") or | |
|
235 | 'changed' in _toollist(ui, tool, "check")): | |||
231 | if filecmp.cmp(repo.wjoin(fd), back): |
|
236 | if filecmp.cmp(repo.wjoin(fd), back): | |
232 | if ui.promptchoice(_(" output file %s appears unchanged\n" |
|
237 | if ui.promptchoice(_(" output file %s appears unchanged\n" | |
233 | "was merge successful (yn)?") % fd, |
|
238 | "was merge successful (yn)?") % fd, |
General Comments 0
You need to be logged in to leave comments.
Login now