[PATCH 1 of 1] hgweb: add support for extension provided check_perm hooks

Dirkjan Ochtman dirkjan at ochtman.nl
Fri Nov 6 09:08:39 CST 2009


On Fri, Nov 6, 2009 at 16:05, Sune Foldager <cryo at cyanite.org> wrote:
> Yes, but note that check_perm already gets passed the operation type in
> the op parameter, which is decided on depending on the operation. 'read'
> for static stuff, 'pull' for changegroups and similar, and 'push' for
> unbundling on the remote.

Ah, even better!

> Is there a reason to separate the hooks? I suppose it would look nicer
> and it could be easily done, for sure, but either all hooks 'below' in
> level should be called as well, then, since there are common stuff for
> all three types, or it's up to the hooks to deal with any common stuff.

Yeah, it's nice exactly because you can leave the hooks to deal with
the common stuff. I think it will probably at the very least make the
default code easier to read/understand.

> I should be on IRC tonight, also.

Not sure if I have a lot of time to burn on IRC tonight, but I'll try.

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list