Allow topics to be callables
authorMatt Mackall <mpm@selenic.com>
Tue, 05 Dec 2006 16:28:56 -0600
changeset 3796 58133ba5847d
parent 3795 17a11f4ff260
child 3797 54fd4d3b4fce
Allow topics to be callables
mercurial/commands.py
--- a/mercurial/commands.py	Tue Dec 05 16:06:13 2006 -0600
+++ b/mercurial/commands.py	Tue Dec 05 16:28:56 2006 -0600
@@ -1155,6 +1155,8 @@
         doc = help.helptable[v]
         if not doc:
             doc = _("(No help text available)")
+        if callable(doc):
+            doc = doc()
 
         ui.write("%s\n" % header)
         ui.write("%s\n" % doc.rstrip())