[PATCH 1 of 5] advertise special help topics in the online help
Johannes Stezenbach
js at sig21.net
Sat May 24 16:11:05 CDT 2008
# HG changeset patch
# User Johannes Stezenbach <js at sig21.net>
# Date 1211658000 -7200
# Node ID f069f51882e0f6a52937bb22ced89a08164f7c2d
# Parent 170818dad56b671a4782794fb5da02635cfe6681
advertise special help topics in the online help
diff -r 170818dad56b -r f069f51882e0 mercurial/commands.py
--- a/mercurial/commands.py Mon May 19 10:23:47 2008 +0200
+++ b/mercurial/commands.py Sat May 24 21:40:00 2008 +0200
@@ -1394,6 +1394,16 @@
default
and _(" (default: %s)") % default
or "")))
+
+ if ui.verbose:
+ ui.write(_("\nspecial help topics:\n"))
+ topics = []
+ for i in help.helptable:
+ l = i.split('|')
+ topics.append((", ".join(l[:-1]), l[-1]))
+ topics_len = max([len(s[0]) for s in topics])
+ for t, desc in topics:
+ ui.write(" %-*s %s\n" % (topics_len, t, desc))
if opt_output:
opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])
More information about the Mercurial-devel
mailing list