diff mercurial/dispatch.py @ 29846:318e2b600b80

blackbox: also log alias expansions This should be extremely useful for helping users debug without having to see their complete configuration. Shell aliases do not get their expansion logged, because we don't look and see if we're in a repo before we dive into the execution of a shell alias. As a result, the ui object doesn't know where to log.
author Augie Fackler <augie@google.com>
date Tue, 23 Aug 2016 16:40:08 -0400
parents d5883fd055c6
children ed793f41e83f
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Aug 25 01:06:32 2016 -0400
+++ b/mercurial/dispatch.py	Tue Aug 23 16:40:08 2016 -0400
@@ -500,6 +500,8 @@
             ui.debug("alias '%s' shadows command '%s'\n" %
                      (self.name, self.cmdname))
 
+        ui.log('commandalias', "alias '%s' expands to '%s'\n",
+               self.name, self.definition)
         if util.safehasattr(self, 'shell'):
             return self.fn(ui, *args, **opts)
         else: