comparison hgext/acl.py @ 49284:d44e3c45f0e4

py3: replace `pycompat.xrange` by `range`
author Manuel Jacob <me@manueljacob.de>
date Sun, 29 May 2022 15:17:27 +0200
parents 6000f5b25c9b
children 493034cc3265
comparison
equal deleted inserted replaced
49283:44b26349127b 49284:d44e3c45f0e4
217 from mercurial.i18n import _ 217 from mercurial.i18n import _
218 from mercurial import ( 218 from mercurial import (
219 error, 219 error,
220 extensions, 220 extensions,
221 match, 221 match,
222 pycompat,
223 registrar, 222 registrar,
224 util, 223 util,
225 ) 224 )
226 from mercurial.utils import procutil 225 from mercurial.utils import procutil
227 226
450 allowbranches = buildmatch(ui, None, user, b'acl.allow.branches') 449 allowbranches = buildmatch(ui, None, user, b'acl.allow.branches')
451 denybranches = buildmatch(ui, None, user, b'acl.deny.branches') 450 denybranches = buildmatch(ui, None, user, b'acl.deny.branches')
452 allow = buildmatch(ui, repo, user, b'acl.allow') 451 allow = buildmatch(ui, repo, user, b'acl.allow')
453 deny = buildmatch(ui, repo, user, b'acl.deny') 452 deny = buildmatch(ui, repo, user, b'acl.deny')
454 453
455 for rev in pycompat.xrange(repo[node].rev(), len(repo)): 454 for rev in range(repo[node].rev(), len(repo)):
456 ctx = repo[rev] 455 ctx = repo[rev]
457 branch = ctx.branch() 456 branch = ctx.branch()
458 if denybranches and denybranches(branch): 457 if denybranches and denybranches(branch):
459 raise error.Abort( 458 raise error.Abort(
460 _(b'acl: user "%s" denied on branch "%s" (changeset "%s")') 459 _(b'acl: user "%s" denied on branch "%s" (changeset "%s")')