487 out, a = a, back # read input from backup, write to original |
487 out, a = a, back # read input from backup, write to original |
488 replace = {'local': a, 'base': b, 'other': c, 'output': out} |
488 replace = {'local': a, 'base': b, 'other': c, 'output': out} |
489 args = util.interpolate(r'\$', replace, args, |
489 args = util.interpolate(r'\$', replace, args, |
490 lambda s: util.shellquote(util.localpath(s))) |
490 lambda s: util.shellquote(util.localpath(s))) |
491 cmd = toolpath + ' ' + args |
491 cmd = toolpath + ' ' + args |
|
492 if _toolbool(ui, tool, "gui"): |
|
493 repo.ui.status(_('running merge tool %s for file %s\n') % |
|
494 (tool, fcd.path())) |
492 repo.ui.debug('launching merge tool: %s\n' % cmd) |
495 repo.ui.debug('launching merge tool: %s\n' % cmd) |
493 r = ui.system(cmd, cwd=repo.root, environ=env) |
496 r = ui.system(cmd, cwd=repo.root, environ=env) |
494 repo.ui.debug('merge tool returned: %s\n' % r) |
497 repo.ui.debug('merge tool returned: %s\n' % r) |
495 return True, r, False |
498 return True, r, False |
496 |
499 |