extensions: copy __module__ for wrapped commands
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Fri, 14 Nov 2008 14:17:42 +0100
changeset 7373 d9e9dd2b00fb
parent 7372 e17dbf140035
child 7374 ccec5ae82282
extensions: copy __module__ for wrapped commands
mercurial/extensions.py
--- a/mercurial/extensions.py	Fri Nov 14 14:36:17 2008 +0100
+++ b/mercurial/extensions.py	Fri Nov 14 14:17:42 2008 +0100
@@ -99,6 +99,7 @@
         return wrapper(origfn, *args, **kwargs)
 
     wrap.__doc__ = getattr(origfn, '__doc__')
+    wrap.__module__ = getattr(origfn, '__module__')
 
     newentry = list(entry)
     newentry[0] = wrap