Show More
@@ -356,34 +356,31 b' def _idump(repo, mynode, orig, fcd, fco,' | |||||
356 | return False, 1 |
|
356 | return False, 1 | |
357 |
|
357 | |||
358 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
358 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
359 | r = 1 |
|
359 | tool, toolpath, binary, symlink = toolconf | |
360 | if r: |
|
360 | a, b, c, back = files | |
361 | tool, toolpath, binary, symlink = toolconf |
|
361 | out = "" | |
362 | a, b, c, back = files |
|
362 | env = {'HG_FILE': fcd.path(), | |
363 | out = "" |
|
363 | 'HG_MY_NODE': short(mynode), | |
364 |
|
|
364 | 'HG_OTHER_NODE': str(fco.changectx()), | |
365 |
|
|
365 | 'HG_BASE_NODE': str(fca.changectx()), | |
366 | 'HG_OTHER_NODE': str(fco.changectx()), |
|
366 | 'HG_MY_ISLINK': 'l' in fcd.flags(), | |
367 | 'HG_BASE_NODE': str(fca.changectx()), |
|
367 | 'HG_OTHER_ISLINK': 'l' in fco.flags(), | |
368 |
|
|
368 | 'HG_BASE_ISLINK': 'l' in fca.flags(), | |
369 | 'HG_OTHER_ISLINK': 'l' in fco.flags(), |
|
369 | } | |
370 | 'HG_BASE_ISLINK': 'l' in fca.flags(), |
|
|||
371 | } |
|
|||
372 |
|
370 | |||
373 |
|
|
371 | ui = repo.ui | |
374 |
|
372 | |||
375 |
|
|
373 | args = _toolstr(ui, tool, "args", '$local $base $other') | |
376 |
|
|
374 | if "$output" in args: | |
377 |
|
|
375 | out, a = a, back # read input from backup, write to original | |
378 |
|
|
376 | replace = {'local': a, 'base': b, 'other': c, 'output': out} | |
379 |
|
|
377 | args = util.interpolate(r'\$', replace, args, | |
380 |
|
|
378 | lambda s: util.shellquote(util.localpath(s))) | |
381 |
|
|
379 | cmd = toolpath + ' ' + args | |
382 |
|
|
380 | repo.ui.debug('launching merge tool: %s\n' % cmd) | |
383 |
|
|
381 | r = ui.system(cmd, cwd=repo.root, environ=env) | |
384 |
|
|
382 | repo.ui.debug('merge tool returned: %s\n' % r) | |
385 |
|
|
383 | return True, r | |
386 | return False, 0 |
|
|||
387 |
|
384 | |||
388 | def _formatconflictmarker(repo, ctx, template, label, pad): |
|
385 | def _formatconflictmarker(repo, ctx, template, label, pad): | |
389 | """Applies the given template to the ctx, prefixed by the label. |
|
386 | """Applies the given template to the ctx, prefixed by the label. |
General Comments 0
You need to be logged in to leave comments.
Login now