merge with mpm
authorMartin Geisler <mg@lazybytes.net>
Sat, 30 Apr 2011 15:30:51 +0200
changeset 14059 c0e29e10b9ef
parent 14058 3233b39d756f (diff)
parent 14056 bcfe78c3d15c (current diff)
child 14060 aaa9a5989405
child 14112 3956ea942492
merge with mpm
--- 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):
--- 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]