Fix passing labels to Gerrit when they are not defined in All-Projects

Turns out that the shortcut --verified or --code-review only work when
these labels are defined globally for all projects [1]. The other syntax
with a --label works fine even when e.g. the Verified label is being
used just for a subset of projects.

[1] https://gerrit-review.googlesource.com/#/c/51800/1/Documentation/cmd-review.txt

Change-Id: Ib591997141b68708bee0b291bb88a93cd3294301
This commit is contained in:
Jan Kundrát
2014-12-01 18:39:07 +01:00
parent 186a1d5261
commit c387a5043e

View File

@@ -120,7 +120,7 @@ class Gerrit(object):
if v is True:
cmd += ' --%s' % k
else:
cmd += ' --%s %s' % (k, v)
cmd += ' --label %s=%s' % (k, v)
cmd += ' %s' % change
out, err = self._ssh(cmd)
return err