Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 7125:4a1ac535be1d
show enabled extensions in hg help
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 18 Oct 2008 16:50:03 +0200 |
parents | a4769dec7773 |
children | 111813de4188 |
comparison
equal
deleted
inserted
replaced
7124:63579aa36c8e | 7125:4a1ac535be1d |
---|---|
1332 if ui.verbose: | 1332 if ui.verbose: |
1333 commands = cmds[f].replace("|",", ") | 1333 commands = cmds[f].replace("|",", ") |
1334 ui.write(" %s:\n %s\n"%(commands, h[f])) | 1334 ui.write(" %s:\n %s\n"%(commands, h[f])) |
1335 else: | 1335 else: |
1336 ui.write(' %-*s %s\n' % (m, f, h[f])) | 1336 ui.write(' %-*s %s\n' % (m, f, h[f])) |
1337 | |
1338 exts = list(extensions.extensions()) | |
1339 if exts: | |
1340 ui.write(_('\nenabled extensions:\n\n')) | |
1341 maxlength = 0 | |
1342 exthelps = [] | |
1343 for ename, ext in exts: | |
1344 doc = (ext.__doc__ or _('(no help text available)')) | |
1345 ename = ename.split('.')[-1] | |
1346 maxlength = max(len(ename), maxlength) | |
1347 exthelps.append((ename, doc.splitlines(0)[0].strip())) | |
1348 for ename, text in exthelps: | |
1349 ui.write(_(' %s %s\n') % (ename.ljust(maxlength), text)) | |
1337 | 1350 |
1338 if not ui.quiet: | 1351 if not ui.quiet: |
1339 addglobalopts(True) | 1352 addglobalopts(True) |
1340 | 1353 |
1341 def helptopic(name): | 1354 def helptopic(name): |