gerrit/acl : check for capital booleans in normalize

We got caught out with this in All-Projects; let's just make sure we
keep capital booleans everywhere for consistency.

Change-Id: I7a1e528c620c07ecbb2def3d743ab4bba46a20df
This commit is contained in:
Ian Wienand 2023-03-16 13:36:26 +11:00
parent a172d416d9
commit b0963776f1
No known key found for this signature in database
1 changed files with 11 additions and 0 deletions

View File

@ -247,6 +247,17 @@ if '9' in transformations:
if value != 'NoBlock':
newsection.append(
'# XXX: The only supported function type is NoBlock')
# Gerrit 3.6 takes lower-case "and/or" literally -- as in
# you literally need to have and/or in the commit string.
# Gerrit 3.7 fixes this, but let's standarise on capital
# booleans
if key in ('copyCondition', 'submittableIf', 'applicableIf'):
value = value.replace(' and ', ' AND ')
value = value.replace(' or ', ' OR ')
newsection.append("%s = %s" % (key, value))
continue
newsection.append(option)
acl[section] = newsection
acl.update(missing_sr)