##// END OF EJS Templates
webcommands: define a dict of available commands...
Gregory Szorc -
r24077:e8046ca0 default
parent child Browse files
Show More
@@ -20,6 +20,7 b' from mercurial.error import ParseError, '
20 from mercurial import revset
20 from mercurial import revset
21
21
22 __all__ = []
22 __all__ = []
23 commands = {}
23
24
24 class webcommand(object):
25 class webcommand(object):
25 """Decorator used to register a web command handler.
26 """Decorator used to register a web command handler.
@@ -39,6 +40,7 b' class webcommand(object):'
39
40
40 def __call__(self, func):
41 def __call__(self, func):
41 __all__.append(self.name)
42 __all__.append(self.name)
43 commands[self.name] = func
42 return func
44 return func
43
45
44 @webcommand('log')
46 @webcommand('log')
General Comments 0
You need to be logged in to leave comments. Login now