[PATCH 08 of 11] py3: pass ctx.rev() instead of ctx in range()

Pulkit Goyal 7895pulkit at gmail.com
Fri Feb 23 13:15:21 EST 2018


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1519389273 -19800
#      Fri Feb 23 18:04:33 2018 +0530
# Node ID a2b469c5995b4c2602f1bb1c3959d67ee9c08141
# Parent  457aea9470d03f8e69c873b9aec845256abf9023
py3: pass ctx.rev() instead of ctx in range()

diff --git a/hgext/acl.py b/hgext/acl.py
--- a/hgext/acl.py
+++ b/hgext/acl.py
@@ -356,7 +356,7 @@ def hook(ui, repo, hooktype, node=None, 
     allow = buildmatch(ui, repo, user, 'acl.allow')
     deny = buildmatch(ui, repo, user, 'acl.deny')
 
-    for rev in xrange(repo[node], len(repo)):
+    for rev in xrange(repo[node].rev(), len(repo)):
         ctx = repo[rev]
         branch = ctx.branch()
         if denybranches and denybranches(branch):


More information about the Mercurial-devel mailing list