Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 14316:d5b525697ddb
extensions: drop maxlength from enabled and disabled
This is a bad/silly API. Instead calculate maxlength in one place in help
it's used and simplify all the callers.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 13 May 2011 11:04:51 -0500 |
parents | 32a548776b65 |
children | 1f46be4689ed |
line wrap: on
line diff
--- a/mercurial/commands.py Fri May 13 11:26:29 2011 +0200 +++ b/mercurial/commands.py Fri May 13 11:04:51 2011 -0500 @@ -2752,8 +2752,7 @@ doc = gettext(mod.__doc__).splitlines()[0] msg = help.listexts(_("'%s' is provided by the following " - "extension:") % cmd, {ext: doc}, len(ext), - indent=4) + "extension:") % cmd, {ext: doc}, indent=4) ui.write(minirst.format(msg, textwidth)) ui.write('\n\n') ui.write(_('use "hg help extensions" for information on enabling ' @@ -2799,8 +2798,7 @@ helplist(header) if name != 'shortlist': - exts, maxlength = extensions.enabled() - text = help.listexts(_('enabled extensions:'), exts, maxlength) + text = help.listexts(_('enabled extensions:'), extensions.enabled()) if text: ui.write("\n%s\n" % minirst.format(text, textwidth))