Show More
@@ -169,7 +169,7 def _ifail(repo, mynode, orig, fcd, fco, | |||
|
169 | 169 | used to resolve these conflicts.""" |
|
170 | 170 | return 1 |
|
171 | 171 | |
|
172 | def _premerge(repo, toolconf, files): | |
|
172 | def _premerge(repo, toolconf, files, labels=None): | |
|
173 | 173 | tool, toolpath, binary, symlink = toolconf |
|
174 | 174 | if symlink: |
|
175 | 175 | return 1 |
@@ -190,7 +190,7 def _premerge(repo, toolconf, files): | |||
|
190 | 190 | (tool, premerge, _valid)) |
|
191 | 191 | |
|
192 | 192 | if premerge: |
|
193 | r = simplemerge.simplemerge(ui, a, b, c, quiet=True) | |
|
193 | r = simplemerge.simplemerge(ui, a, b, c, quiet=True, label=labels) | |
|
194 | 194 | if not r: |
|
195 | 195 | ui.debug(" premerge successful\n") |
|
196 | 196 | return 0 |
@@ -201,7 +201,7 def _premerge(repo, toolconf, files): | |||
|
201 | 201 | @internaltool('merge', True, |
|
202 | 202 | _("merging %s incomplete! " |
|
203 | 203 | "(edit conflicts, then use 'hg resolve --mark')\n")) |
|
204 | def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files): | |
|
204 | def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
|
205 | 205 | """ |
|
206 | 206 | Uses the internal non-interactive simple merge algorithm for merging |
|
207 | 207 | files. It will fail if there are any conflicts and leave markers in |
@@ -211,19 +211,18 def _imerge(repo, mynode, orig, fcd, fco | |||
|
211 | 211 | repo.ui.warn(_('warning: internal:merge cannot merge symlinks ' |
|
212 | 212 | 'for %s\n') % fcd.path()) |
|
213 | 213 | return False, 1 |
|
214 | ||
|
215 | r = _premerge(repo, toolconf, files) | |
|
214 | r = _premerge(repo, toolconf, files, labels=labels) | |
|
216 | 215 | if r: |
|
217 | 216 | a, b, c, back = files |
|
218 | 217 | |
|
219 | 218 | ui = repo.ui |
|
220 | 219 | |
|
221 |
r = simplemerge.simplemerge(ui, a, b, c, label= |
|
|
220 | r = simplemerge.simplemerge(ui, a, b, c, label=labels) | |
|
222 | 221 | return True, r |
|
223 | 222 | return False, 0 |
|
224 | 223 | |
|
225 | 224 | @internaltool('dump', True) |
|
226 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files): | |
|
225 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
|
227 | 226 | """ |
|
228 | 227 | Creates three versions of the files to merge, containing the |
|
229 | 228 | contents of local, other and base. These files can then be used to |
@@ -231,7 +230,7 def _idump(repo, mynode, orig, fcd, fco, | |||
|
231 | 230 | ``a.txt``, these files will accordingly be named ``a.txt.local``, |
|
232 | 231 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the |
|
233 | 232 | same directory as ``a.txt``.""" |
|
234 | r = _premerge(repo, toolconf, files) | |
|
233 | r = _premerge(repo, toolconf, files, labels=labels) | |
|
235 | 234 | if r: |
|
236 | 235 | a, b, c, back = files |
|
237 | 236 | |
@@ -242,8 +241,8 def _idump(repo, mynode, orig, fcd, fco, | |||
|
242 | 241 | repo.wwrite(fd + ".base", fca.data(), fca.flags()) |
|
243 | 242 | return False, r |
|
244 | 243 | |
|
245 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files): | |
|
246 | r = _premerge(repo, toolconf, files) | |
|
244 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
|
245 | r = _premerge(repo, toolconf, files, labels=labels) | |
|
247 | 246 | if r: |
|
248 | 247 | tool, toolpath, binary, symlink = toolconf |
|
249 | 248 | a, b, c, back = files |
@@ -327,8 +326,9 def filemerge(repo, mynode, orig, fcd, f | |||
|
327 | 326 | |
|
328 | 327 | ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca)) |
|
329 | 328 | |
|
329 | labels = ['local', 'other'] | |
|
330 | 330 | needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
331 | (a, b, c, back)) | |
|
331 | (a, b, c, back), labels=labels) | |
|
332 | 332 | if not needcheck: |
|
333 | 333 | if r: |
|
334 | 334 | if onfailure: |
General Comments 0
You need to be logged in to leave comments.
Login now