mercurial/exthelper.py
changeset 41049 021496277392
parent 41046 f5ec93f69171
child 41056 41cd64a81dd9
equal deleted inserted replaced
41048:84d61fdcefa5 41049:021496277392
   255         This function takes two arguments, the container and the name of the
   255         This function takes two arguments, the container and the name of the
   256         function to wrap. The wrapping is performed during `uisetup`.
   256         function to wrap. The wrapping is performed during `uisetup`.
   257 
   257 
   258         example::
   258         example::
   259 
   259 
   260             @eh.function(context.changectx, 'babar')
   260             @eh.addattr(context.changectx, 'babar')
   261             def babar(ctx):
   261             def babar(ctx):
   262                 return 'babar' in ctx.description
   262                 return 'babar' in ctx.description
   263         """
   263         """
   264         def dec(func):
   264         def dec(func):
   265             self._duckpunchers.append((container, funcname, func))
   265             self._duckpunchers.append((container, funcname, func))