# HG changeset patch # User Martin Geisler # Date 1304170251 -7200 # Node ID c0e29e10b9ef96bfbe8ec7998124e0535d15e6d6 # Parent 3233b39d756f737d4b4e6bdd7e09242bd55becd6# Parent bcfe78c3d15c928cd0ab80625c640c81a0ae7d62 merge with mpm diff -r bcfe78c3d15c -r c0e29e10b9ef mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Sat Apr 30 12:56:28 2011 +0200 +++ b/mercurial/hgweb/common.py Sat Apr 30 15:30:51 2011 +0200 @@ -17,12 +17,6 @@ HTTP_METHOD_NOT_ALLOWED = 405 HTTP_SERVER_ERROR = 500 -# Hooks for hgweb permission checks; extensions can add hooks here. Each hook -# is invoked like this: hook(hgweb, request, operation), where operation is -# either read, pull or push. Hooks should either raise an ErrorResponse -# exception, or just return. -# It is possible to do both authentication and authorization through this. -permhooks = [] def checkauthz(hgweb, req, op): '''Check permission for operation based on request data (including @@ -65,8 +59,14 @@ if not result: raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized') -# Add the default permhook, which provides simple authorization. -permhooks.append(checkauthz) +# Hooks for hgweb permission checks; extensions can add hooks here. +# Each hook is invoked like this: hook(hgweb, request, operation), +# where operation is either read, pull or push. Hooks should either +# raise an ErrorResponse exception, or just return. +# +# It is possible to do both authentication and authorization through +# this. +permhooks = [checkauthz] class ErrorResponse(Exception): diff -r bcfe78c3d15c -r c0e29e10b9ef mercurial/revset.py --- a/mercurial/revset.py Sat Apr 30 12:56:28 2011 +0200 +++ b/mercurial/revset.py Sat Apr 30 15:30:51 2011 +0200 @@ -223,7 +223,7 @@ """ state = getstring(x, _("bisect requires a string")).lower() if state not in ('good', 'bad', 'skip', 'unknown'): - raise ParseError(_('invalid bisect state')) + raise error.ParseError(_('invalid bisect state')) marked = set(repo.changelog.rev(n) for n in hbisect.load_state(repo)[state]) return [r for r in subset if r in marked]