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:
parent
a172d416d9
commit
b0963776f1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user