Merge "Keep Gerrit ACL lines deduplicated"
This commit is contained in:
commit
a32acadfdc
@ -140,8 +140,11 @@ if '7' in transformations:
|
|||||||
for section in sorted(acl.keys()):
|
for section in sorted(acl.keys()):
|
||||||
if acl[section]:
|
if acl[section]:
|
||||||
out += '\n[%s]\n' % section
|
out += '\n[%s]\n' % section
|
||||||
|
lastoption = ''
|
||||||
for option in sorted(acl[section], key=tokens):
|
for option in sorted(acl[section], key=tokens):
|
||||||
out += '%s\n' % option
|
if option != lastoption:
|
||||||
|
out += '%s\n' % option
|
||||||
|
lastoption = option
|
||||||
|
|
||||||
if dry_run:
|
if dry_run:
|
||||||
print(out[1:-1])
|
print(out[1:-1])
|
||||||
|
Loading…
Reference in New Issue
Block a user