Show More
@@ -544,6 +544,60 b" coreconfigitem('merge', 'on-failure'," | |||||
544 | coreconfigitem('merge', 'preferancestor', |
|
544 | coreconfigitem('merge', 'preferancestor', | |
545 | default=lambda: ['*'], |
|
545 | default=lambda: ['*'], | |
546 | ) |
|
546 | ) | |
|
547 | coreconfigitem('merge-tools', '.*', | |||
|
548 | default=None, | |||
|
549 | generic=True, | |||
|
550 | ) | |||
|
551 | coreconfigitem('merge-tools', r'.*\.args$', | |||
|
552 | default="$local $base $other", | |||
|
553 | generic=True, | |||
|
554 | priority=-1, | |||
|
555 | ) | |||
|
556 | coreconfigitem('merge-tools', r'.*\.binary$', | |||
|
557 | default=False, | |||
|
558 | generic=True, | |||
|
559 | priority=-1, | |||
|
560 | ) | |||
|
561 | coreconfigitem('merge-tools', r'.*\.check$', | |||
|
562 | default=list, | |||
|
563 | generic=True, | |||
|
564 | priority=-1, | |||
|
565 | ) | |||
|
566 | coreconfigitem('merge-tools', r'.*\.checkchanged$', | |||
|
567 | default=False, | |||
|
568 | generic=True, | |||
|
569 | priority=-1, | |||
|
570 | ) | |||
|
571 | coreconfigitem('merge-tools', r'.*\.executable$', | |||
|
572 | default=dynamicdefault, | |||
|
573 | generic=True, | |||
|
574 | priority=-1, | |||
|
575 | ) | |||
|
576 | coreconfigitem('merge-tools', r'.*\.fixeol$', | |||
|
577 | default=False, | |||
|
578 | generic=True, | |||
|
579 | priority=-1, | |||
|
580 | ) | |||
|
581 | coreconfigitem('merge-tools', r'.*\.gui$', | |||
|
582 | default=False, | |||
|
583 | generic=True, | |||
|
584 | priority=-1, | |||
|
585 | ) | |||
|
586 | coreconfigitem('merge-tools', r'.*\.priority$', | |||
|
587 | default=0, | |||
|
588 | generic=True, | |||
|
589 | priority=-1, | |||
|
590 | ) | |||
|
591 | coreconfigitem('merge-tools', r'.*\.premerge$', | |||
|
592 | default=dynamicdefault, | |||
|
593 | generic=True, | |||
|
594 | priority=-1, | |||
|
595 | ) | |||
|
596 | coreconfigitem('merge-tools', r'.*\.symlink$', | |||
|
597 | default=False, | |||
|
598 | generic=True, | |||
|
599 | priority=-1, | |||
|
600 | ) | |||
547 | coreconfigitem('pager', 'attend-.*', |
|
601 | coreconfigitem('pager', 'attend-.*', | |
548 | default=dynamicdefault, |
|
602 | default=dynamicdefault, | |
549 | generic=True, |
|
603 | generic=True, |
@@ -29,16 +29,14 b' from . import (' | |||||
29 | util, |
|
29 | util, | |
30 | ) |
|
30 | ) | |
31 |
|
31 | |||
32 |
def _toolstr(ui, tool, part, |
|
32 | def _toolstr(ui, tool, part, *args): | |
33 |
return ui.config("merge-tools", tool + "." + part, |
|
33 | return ui.config("merge-tools", tool + "." + part, *args) | |
34 |
|
34 | |||
35 |
def _toolbool(ui, tool, part, |
|
35 | def _toolbool(ui, tool, part,*args): | |
36 |
return ui.configbool("merge-tools", tool + "." + part, |
|
36 | return ui.configbool("merge-tools", tool + "." + part, *args) | |
37 |
|
37 | |||
38 |
def _toollist(ui, tool, part |
|
38 | def _toollist(ui, tool, part): | |
39 | if default is None: |
|
39 | return ui.configlist("merge-tools", tool + "." + part) | |
40 | default = [] |
|
|||
41 | return ui.configlist("merge-tools", tool + "." + part, default) |
|
|||
42 |
|
40 | |||
43 | internals = {} |
|
41 | internals = {} | |
44 | # Merge tools to document. |
|
42 | # Merge tools to document. | |
@@ -186,8 +184,8 b' def _picktool(repo, ui, path, binary, sy' | |||||
186 | for k, v in ui.configitems("merge-tools"): |
|
184 | for k, v in ui.configitems("merge-tools"): | |
187 | t = k.split('.')[0] |
|
185 | t = k.split('.')[0] | |
188 | if t not in tools: |
|
186 | if t not in tools: | |
189 |
tools[t] = int(_toolstr(ui, t, "priority" |
|
187 | tools[t] = int(_toolstr(ui, t, "priority")) | |
190 |
if _toolbool(ui, t, "disabled" |
|
188 | if _toolbool(ui, t, "disabled"): | |
191 | disabled.add(t) |
|
189 | disabled.add(t) | |
192 | names = tools.keys() |
|
190 | names = tools.keys() | |
193 | tools = sorted([(-p, tool) for tool, p in tools.items() |
|
191 | tools = sorted([(-p, tool) for tool, p in tools.items() | |
@@ -327,7 +325,7 b' def _premerge(repo, fcd, fco, fca, toolc' | |||||
327 | try: |
|
325 | try: | |
328 | premerge = _toolbool(ui, tool, "premerge", not binary) |
|
326 | premerge = _toolbool(ui, tool, "premerge", not binary) | |
329 | except error.ConfigError: |
|
327 | except error.ConfigError: | |
330 | premerge = _toolstr(ui, tool, "premerge").lower() |
|
328 | premerge = _toolstr(ui, tool, "premerge", "").lower() | |
331 | if premerge not in validkeep: |
|
329 | if premerge not in validkeep: | |
332 | _valid = ', '.join(["'" + v + "'" for v in validkeep]) |
|
330 | _valid = ', '.join(["'" + v + "'" for v in validkeep]) | |
333 | raise error.ConfigError(_("%s.premerge not valid " |
|
331 | raise error.ConfigError(_("%s.premerge not valid " | |
@@ -508,7 +506,7 b' def _xmerge(repo, mynode, orig, fcd, fco' | |||||
508 | } |
|
506 | } | |
509 | ui = repo.ui |
|
507 | ui = repo.ui | |
510 |
|
508 | |||
511 |
args = _toolstr(ui, tool, "args" |
|
509 | args = _toolstr(ui, tool, "args") | |
512 | if "$output" in args: |
|
510 | if "$output" in args: | |
513 | # read input from backup, write to original |
|
511 | # read input from backup, write to original | |
514 | out = a |
|
512 | out = a |
General Comments 0
You need to be logged in to leave comments.
Login now