help: move option list display into subfunctions
authorMatt Mackall <mpm@selenic.com>
Sat, 17 Sep 2011 14:50:42 -0500
changeset 15128 aaf666bd2942
parent 15127 2c80862728cb
child 15129 9b904d679850
help: move option list display into subfunctions
mercurial/commands.py
--- a/mercurial/commands.py	Sat Sep 17 14:46:13 2011 -0500
+++ b/mercurial/commands.py	Sat Sep 17 14:50:42 2011 -0500
@@ -2805,6 +2805,8 @@
         except KeyError:
             pass
 
+        ui.write(opttext(optlist, textwidth))
+
     def helplist(select=None):
         # list of commands
         if name == "shortlist":
@@ -2867,6 +2869,8 @@
             for t, desc in topics:
                 ui.write(" %-*s  %s\n" % (topics_len, t, desc))
 
+        ui.write(opttext(optlist, textwidth))
+
     def helptopic(name):
         for names, header, doc in help.helptable:
             if name in names:
@@ -2955,7 +2959,6 @@
         ui.status('\n')
         helplist()
 
-    ui.write(opttext(optlist, textwidth))
 
 @command('identify|id',
     [('r', 'rev', '',