Fun with loading extensions

Dirkjan Ochtman dirkjan at ochtman.nl
Tue Jun 15 09:52:24 CDT 2010


On Mon, Jun 14, 2010 at 19:22, Chad Dombrova <chadrik at gmail.com> wrote:
> i disagree. i think that subclassing is much more powerful, and that the use
> of wrapfunction on class methods should be discouraged.  i think there is a
> reason that every official mercurial extension that wraps localrepo -- mq,
> bookmarks, keyword, parentrevspec, and inotify -- all use subclassing:  it's
> a more powerful and direct approach.  the main problem here is that the
> official workflow needs to be decided and proper documentation needs to be
> provided.

Augie and I discussed this a little bit in IRC yesterday, and we
seemed to agree that using wrapfunction() for (repo) methods is weird,
and everyone should use subclassing and call super() instead.
wrapfunction() is really intended for *functions*, not methods.

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list