Map review mark types from Gerrit 2.8.x to 2.4.x

Change-Id: Id07cfed01eb981b5e19a37105ab1308874c9e0f9
This commit is contained in:
Ilya Shakhat
2014-04-29 18:33:32 +04:00
parent 80aad63d4c
commit d8583d4f64

View File

@@ -322,6 +322,10 @@ class RecordProcessor(object):
mark['review_id'] = review['id']
mark['patch'] = int(patch['number'])
# map type from new Gerrit to old
mark['type'] = {'Approved': 'APRV', 'Code-Review': 'CRVW',
'Verified': 'VRIF'}.get(mark['type'], mark['type'])
self._update_record_and_user(mark)
return mark