webcommands: define a dict of available commands
This will be used to hook web commands up to the help system. It also
makes web commands work similarly as CLI commands.
--- a/mercurial/hgweb/webcommands.py Fri Feb 06 19:06:17 2015 -0800
+++ b/mercurial/hgweb/webcommands.py Fri Feb 06 22:52:40 2015 -0800
@@ -20,6 +20,7 @@
from mercurial import revset
__all__ = []
+commands = {}
class webcommand(object):
"""Decorator used to register a web command handler.
@@ -39,6 +40,7 @@
def __call__(self, func):
__all__.append(self.name)
+ commands[self.name] = func
return func
@webcommand('log')