Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 7373:d9e9dd2b00fb
extensions: copy __module__ for wrapped commands
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Fri, 14 Nov 2008 14:17:42 +0100 |
parents | 0ab5f21c390b |
children | 5751631246de |
comparison
equal
deleted
inserted
replaced
7372:e17dbf140035 | 7373:d9e9dd2b00fb |
---|---|
97 origfn = entry[0] | 97 origfn = entry[0] |
98 def wrap(*args, **kwargs): | 98 def wrap(*args, **kwargs): |
99 return wrapper(origfn, *args, **kwargs) | 99 return wrapper(origfn, *args, **kwargs) |
100 | 100 |
101 wrap.__doc__ = getattr(origfn, '__doc__') | 101 wrap.__doc__ = getattr(origfn, '__doc__') |
102 wrap.__module__ = getattr(origfn, '__module__') | |
102 | 103 |
103 newentry = list(entry) | 104 newentry = list(entry) |
104 newentry[0] = wrap | 105 newentry[0] = wrap |
105 table[key] = tuple(newentry) | 106 table[key] = tuple(newentry) |
106 return entry | 107 return entry |