Mercurial > hg
comparison hgext/acl.py @ 41759:aaad36b88298
cleanup: use () to wrap long lines instead of \
This is a little less brittle, and often helps indentation. In a
surprising number of cases the entire cleanup was deleting the \, as
the expression was *already* parenthesized in a workable way.
Differential Revision: https://phab.mercurial-scm.org/D5993
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 20 Feb 2019 19:28:51 -0500 |
parents | 3694c9aaf5e4 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
41758:15d3facfa40a | 41759:aaad36b88298 |
---|---|
291 if ug.startswith('!'): | 291 if ug.startswith('!'): |
292 # Test for excluded user or group. Format: | 292 # Test for excluded user or group. Format: |
293 # if ug is a user name: !username | 293 # if ug is a user name: !username |
294 # if ug is a group name: !@groupname | 294 # if ug is a group name: !@groupname |
295 ug = ug[1:] | 295 ug = ug[1:] |
296 if not ug.startswith('@') and user != ug \ | 296 if (not ug.startswith('@') and user != ug |
297 or ug.startswith('@') and user not in _getusers(ui, ug[1:]): | 297 or ug.startswith('@') and user not in _getusers(ui, ug[1:])): |
298 return True | 298 return True |
299 | 299 |
300 # Test for user or group. Format: | 300 # Test for user or group. Format: |
301 # if ug is a user name: username | 301 # if ug is a user name: username |
302 # if ug is a group name: @groupname | 302 # if ug is a group name: @groupname |
303 elif user == ug \ | 303 elif (user == ug |
304 or ug.startswith('@') and user in _getusers(ui, ug[1:]): | 304 or ug.startswith('@') and user in _getusers(ui, ug[1:])): |
305 return True | 305 return True |
306 | 306 |
307 return False | 307 return False |
308 | 308 |
309 def buildmatch(ui, repo, user, key): | 309 def buildmatch(ui, repo, user, key): |