comparison mercurial/commands.py @ 6653:a78d8edaeedd

help: list special help topics with -v
author Johannes Stezenbach <js@sig21.net>
date Tue, 03 Jun 2008 20:56:54 +0200
parents ffcf8e82f647
children 2713e42dcf4e
comparison
equal deleted inserted replaced
6652:ffcf8e82f647 6653:a78d8edaeedd
1398 longopt and " --%s" % longopt), 1398 longopt and " --%s" % longopt),
1399 "%s%s" % (desc, 1399 "%s%s" % (desc,
1400 default 1400 default
1401 and _(" (default: %s)") % default 1401 and _(" (default: %s)") % default
1402 or ""))) 1402 or "")))
1403
1404 if ui.verbose:
1405 ui.write(_("\nspecial help topics:\n"))
1406 topics = []
1407 for i in help.helptable:
1408 l = i.split('|')
1409 topics.append((", ".join(l[:-1]), l[-1]))
1410 topics_len = max([len(s[0]) for s in topics])
1411 for t, desc in topics:
1412 ui.write(" %-*s %s\n" % (topics_len, t, desc))
1403 1413
1404 if opt_output: 1414 if opt_output:
1405 opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0]) 1415 opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])
1406 for first, second in opt_output: 1416 for first, second in opt_output:
1407 if second: 1417 if second: