##// END OF EJS Templates
extensions: add docstring for wrapcommand().
Dan Villiom Podlaski Christiansen -
r11519:bbdf1fb1 stable
parent child Browse files
Show More
@@ -104,6 +104,18 b' def loadall(ui):'
104 extsetup() # old extsetup with no ui argument
104 extsetup() # old extsetup with no ui argument
105
105
106 def wrapcommand(table, command, wrapper):
106 def wrapcommand(table, command, wrapper):
107 '''Wrap the command named `command' in table
108
109 Replace command in the command table with wrapper. The wrapped command will
110 be inserted into the command table specified by the table argument.
111
112 The wrapper will be called like
113
114 wrapper(orig, *args, **kwargs)
115
116 where orig is the original (wrapped) function, and *args, **kwargs
117 are the arguments passed to it.
118 '''
107 aliases, entry = cmdutil.findcmd(command, table)
119 aliases, entry = cmdutil.findcmd(command, table)
108 for alias, e in table.iteritems():
120 for alias, e in table.iteritems():
109 if e is entry:
121 if e is entry:
General Comments 0
You need to be logged in to leave comments. Login now