Show More
@@ -1570,6 +1570,12 b' coreconfigitem(' | |||
|
1570 | 1570 | default=False, |
|
1571 | 1571 | ) |
|
1572 | 1572 | coreconfigitem( |
|
1573 | b'merge', | |
|
1574 | b'disable-partial-tools', | |
|
1575 | default=False, | |
|
1576 | experimental=True, | |
|
1577 | ) | |
|
1578 | coreconfigitem( | |
|
1573 | 1579 | b'partial-merge-tools', |
|
1574 | 1580 | b'.*', |
|
1575 | 1581 | default=None, |
@@ -1609,6 +1615,14 b' coreconfigitem(' | |||
|
1609 | 1615 | experimental=True, |
|
1610 | 1616 | ) |
|
1611 | 1617 | coreconfigitem( |
|
1618 | b'partial-merge-tools', | |
|
1619 | br'.*\.disable', | |
|
1620 | default=False, | |
|
1621 | generic=True, | |
|
1622 | priority=-1, | |
|
1623 | experimental=True, | |
|
1624 | ) | |
|
1625 | coreconfigitem( | |
|
1612 | 1626 | b'merge-tools', |
|
1613 | 1627 | b'.*', |
|
1614 | 1628 | default=None, |
@@ -1119,6 +1119,8 b' def filemerge(repo, wctx, mynode, orig, ' | |||
|
1119 | 1119 | def _run_partial_resolution_tools(repo, local, other, base): |
|
1120 | 1120 | """Runs partial-resolution tools on the three inputs and updates them.""" |
|
1121 | 1121 | ui = repo.ui |
|
1122 | if ui.configbool(b'merge', b'disable-partial-tools'): | |
|
1123 | return | |
|
1122 | 1124 | # Tuples of (order, name, executable path, args) |
|
1123 | 1125 | tools = [] |
|
1124 | 1126 | seen = set() |
@@ -1133,6 +1135,8 b' def _run_partial_resolution_tools(repo, ' | |||
|
1133 | 1135 | m = match.match(repo.root, b'', patterns) |
|
1134 | 1136 | is_match = m(local.fctx.path()) |
|
1135 | 1137 | if is_match: |
|
1138 | if ui.configbool(section, b'%s.disable' % name): | |
|
1139 | continue | |
|
1136 | 1140 | order = ui.configint(section, b'%s.order' % name, 0) |
|
1137 | 1141 | executable = ui.config(section, b'%s.executable' % name, name) |
|
1138 | 1142 | args = ui.config(section, b'%s.args' % name) |
@@ -120,6 +120,57 b' be recorded and the regular merge tool s' | |||
|
120 | 120 | e |
|
121 | 121 | |
|
122 | 122 | |
|
123 | Can disable all partial merge tools (the `head` tool would have resolved this | |
|
124 | conflict it had been enabled) | |
|
125 | ||
|
126 | $ hg up -C 4 | |
|
127 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
128 | $ hg merge 3 -t :merge3 --config merge.disable-partial-tools=yes | |
|
129 | merging file | |
|
130 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
|
131 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
132 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
|
133 | [1] | |
|
134 | $ cat file | |
|
135 | a | |
|
136 | b | |
|
137 | c | |
|
138 | d | |
|
139 | e | |
|
140 | <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3 | |
|
141 | f3 | |
|
142 | ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f | |
|
143 | f | |
|
144 | ======= | |
|
145 | f2 | |
|
146 | >>>>>>> merge rev: 8c217da987be - test: a b c d e f2 | |
|
147 | ||
|
148 | ||
|
149 | Can disable one partial merge tool (the `head` tool would have resolved this | |
|
150 | conflict it had been enabled) | |
|
151 | ||
|
152 | $ hg up -C 4 | |
|
153 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
154 | $ hg merge 3 -t :merge3 --config partial-merge-tools.head.disable=yes | |
|
155 | merging file | |
|
156 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
|
157 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
158 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
|
159 | [1] | |
|
160 | $ cat file | |
|
161 | b | |
|
162 | c | |
|
163 | d | |
|
164 | e | |
|
165 | <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3 | |
|
166 | f3 | |
|
167 | ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f | |
|
168 | f | |
|
169 | ======= | |
|
170 | f2 | |
|
171 | >>>>>>> merge rev: 8c217da987be - test: a b c d e f2 | |
|
172 | ||
|
173 | ||
|
123 | 174 | Only tools whose patterns match are run. We make `head` not match here, so |
|
124 | 175 | only `tail` should run |
|
125 | 176 |
General Comments 0
You need to be logged in to leave comments.
Login now