Show More
@@ -120,12 +120,15 b' def _picktool(repo, ui, path, binary, sy' | |||||
120 |
|
120 | |||
121 | # then merge tools |
|
121 | # then merge tools | |
122 | tools = {} |
|
122 | tools = {} | |
|
123 | disabled = set() | |||
123 | for k, v in ui.configitems("merge-tools"): |
|
124 | for k, v in ui.configitems("merge-tools"): | |
124 | t = k.split('.')[0] |
|
125 | t = k.split('.')[0] | |
125 | if t not in tools: |
|
126 | if t not in tools: | |
126 | tools[t] = int(_toolstr(ui, t, "priority", "0")) |
|
127 | tools[t] = int(_toolstr(ui, t, "priority", "0")) | |
|
128 | if _toolbool(ui, t, "disabled", False): | |||
|
129 | disabled.add(t) | |||
127 | names = tools.keys() |
|
130 | names = tools.keys() | |
128 | tools = sorted([(-p, t) for t, p in tools.items()]) |
|
131 | tools = sorted([(-p, t) for t, p in tools.items() if t not in disabled]) | |
129 | uimerge = ui.config("ui", "merge") |
|
132 | uimerge = ui.config("ui", "merge") | |
130 | if uimerge: |
|
133 | if uimerge: | |
131 | if uimerge not in names: |
|
134 | if uimerge not in names: |
@@ -1004,7 +1004,10 b' Example ``~/.hgrc``::' | |||||
1004 | kdiff3.priority = 1 |
|
1004 | kdiff3.priority = 1 | |
1005 |
|
1005 | |||
1006 | # Changing the priority of preconfigured tool |
|
1006 | # Changing the priority of preconfigured tool | |
1007 |
|
|
1007 | meld.priority = 0 | |
|
1008 | ||||
|
1009 | # Disable a preconfigured tool | |||
|
1010 | vimdiff.disabled = yes | |||
1008 |
|
1011 | |||
1009 | # Define new tool |
|
1012 | # Define new tool | |
1010 | myHtmlTool.args = -m $local $other $base $output |
|
1013 | myHtmlTool.args = -m $local $other $base $output |
@@ -193,6 +193,26 b' or false set higher on command line:' | |||||
193 | M f |
|
193 | M f | |
194 | ? f.orig |
|
194 | ? f.orig | |
195 |
|
195 | |||
|
196 | or true set to disabled: | |||
|
197 | $ beforemerge | |||
|
198 | [merge-tools] | |||
|
199 | false.whatever= | |||
|
200 | true.priority=1 | |||
|
201 | # hg update -C 1 | |||
|
202 | $ hg merge -r 2 --config merge-tools.true.disabled=yes | |||
|
203 | merging f | |||
|
204 | merging f failed! | |||
|
205 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |||
|
206 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |||
|
207 | [1] | |||
|
208 | $ aftermerge | |||
|
209 | # cat f | |||
|
210 | revision 1 | |||
|
211 | space | |||
|
212 | # hg stat | |||
|
213 | M f | |||
|
214 | ? f.orig | |||
|
215 | ||||
196 | or true.executable not found in PATH: |
|
216 | or true.executable not found in PATH: | |
197 |
|
217 | |||
198 | $ beforemerge |
|
218 | $ beforemerge |
General Comments 0
You need to be logged in to leave comments.
Login now