changeset 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 253d5c0f3a2f
children a8786013f056
files mercurial/filemerge.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Wed Feb 08 07:44:10 2017 -0800
+++ b/mercurial/filemerge.py	Thu Feb 09 09:32:25 2017 -0800
@@ -489,6 +489,9 @@
     args = util.interpolate(r'\$', replace, args,
                             lambda s: util.shellquote(util.localpath(s)))
     cmd = toolpath + ' ' + args
+    if _toolbool(ui, tool, "gui"):
+        repo.ui.status(_('running merge tool %s for file %s\n') %
+                       (tool, fcd.path()))
     repo.ui.debug('launching merge tool: %s\n' % cmd)
     r = ui.system(cmd, cwd=repo.root, environ=env)
     repo.ui.debug('merge tool returned: %s\n' % r)