Mercurial > public > mercurial-scm > hg
comparison mercurial/filemerge.py @ 30898:4d019d0e1b3b
merge: print status message before launching external merge tool
It seems somewhat common that people run into a merge conflict and
don't notice the launched merge tool, and instead they think hg just
hung. Let's print a message for each file that we launch a GUI merge
tool for.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 09 Feb 2017 09:32:25 -0800 |
parents | f1c9fafcbf46 |
children | 48dea083f66d |
comparison
equal
deleted
inserted
replaced
30897:253d5c0f3a2f | 30898:4d019d0e1b3b |
---|---|
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 |