extensions: copy attributes to wrapper by wrapfunction()
Before this patch, new partial function "wrap" had no useful docstring. It
makes sense to copy __doc__ and __module__ as we do for wrapcommand().
--- a/mercurial/extensions.py Sat Jan 09 19:45:10 2016 +0900
+++ b/mercurial/extensions.py Sat Jan 09 19:52:55 2016 +0900
@@ -286,7 +286,9 @@
origfn = getattr(container, funcname)
assert callable(origfn)
- setattr(container, funcname, bind(wrapper, origfn))
+ wrap = bind(wrapper, origfn)
+ _updatewrapper(wrap, origfn)
+ setattr(container, funcname, wrap)
return origfn
def _disabledpaths(strip_init=False):