Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 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 | eb7bd7d64a9d |
children | 127d57e950e0 |
comparison
equal
deleted
inserted
replaced
42650:ab1900323b1d | 42651:7f1df7019497 |
---|---|
1381 | 1381 |
1382 fm.condwrite(username, 'username', _("checking username (%s)\n"), username) | 1382 fm.condwrite(username, 'username', _("checking username (%s)\n"), username) |
1383 fm.condwrite(err, 'usernameerror', _("checking username...\n %s\n" | 1383 fm.condwrite(err, 'usernameerror', _("checking username...\n %s\n" |
1384 " (specify a username in your configuration file)\n"), err) | 1384 " (specify a username in your configuration file)\n"), err) |
1385 | 1385 |
1386 for name, mod in extensions.extensions(): | |
1387 handler = getattr(mod, 'debuginstall', None) | |
1388 if handler is not None: | |
1389 problems += handler(ui, fm) | |
1390 | |
1386 fm.condwrite(not problems, '', | 1391 fm.condwrite(not problems, '', |
1387 _("no problems detected\n")) | 1392 _("no problems detected\n")) |
1388 if not problems: | 1393 if not problems: |
1389 fm.data(problems=problems) | 1394 fm.data(problems=problems) |
1390 fm.condwrite(problems, 'problems', | 1395 fm.condwrite(problems, 'problems', |