changeset 42651:7f1df7019497

debugcommands: add support for extensions adding their own debug info We've had a couple of cases where it'd be handy at Google to add data to `hg debuginstall`'s output. We've kludged around that at various times, but it seems reasonable to let extensions add their own data here so extension maintainers can get useful extra data. Differential Revision: https://phab.mercurial-scm.org/D6681
author Augie Fackler <augie@google.com>
date Tue, 23 Jul 2019 14:37:51 -0400
parents ab1900323b1d
children 684b56ade431
files mercurial/debugcommands.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Tue Jul 23 14:36:38 2019 -0400
+++ b/mercurial/debugcommands.py	Tue Jul 23 14:37:51 2019 -0400
@@ -1383,6 +1383,11 @@
     fm.condwrite(err, 'usernameerror', _("checking username...\n %s\n"
         " (specify a username in your configuration file)\n"), err)
 
+    for name, mod in extensions.extensions():
+        handler = getattr(mod, 'debuginstall', None)
+        if handler is not None:
+            problems += handler(ui, fm)
+
     fm.condwrite(not problems, '',
                  _("no problems detected\n"))
     if not problems: