hgext/acl.py
changeset 10955 470a6ace7574
parent 10801 fcfe2e50faab
child 11041 623fe42a649e
--- a/hgext/acl.py	Mon Apr 19 21:47:23 2010 +0200
+++ b/hgext/acl.py	Tue Apr 06 22:15:43 2010 -0300
@@ -72,10 +72,11 @@
 
 
 def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
-    if hooktype != 'pretxnchangegroup':
+    if hooktype not in ['pretxnchangegroup', 'pretxncommit']:
         raise util.Abort(_('config error - hook type "%s" cannot stop '
-                           'incoming changesets') % hooktype)
-    if source not in ui.config('acl', 'sources', 'serve').split():
+                           'incoming changesets nor commits') % hooktype)
+    if (hooktype == 'pretxnchangegroup' and
+        source not in ui.config('acl', 'sources', 'serve').split()):
         ui.debug('acl: changes have source "%s" - skipping\n' % source)
         return