cm: build: Fix cherry picking specific patchsets
Change-Id: I396a1218f141a1ff4cb45252cc01a1487c2afd31
This commit is contained in:
@@ -268,6 +268,7 @@ if __name__ == '__main__':
|
||||
continue
|
||||
|
||||
change = int(change)
|
||||
patchset = int(patchset)
|
||||
review = next((x for x in reviews if x['number'] == change), None)
|
||||
if review is None:
|
||||
print('Change %d not found, skipping' % change)
|
||||
@@ -286,7 +287,7 @@ if __name__ == '__main__':
|
||||
mergables[-1]['id'] = change
|
||||
if patchset:
|
||||
try:
|
||||
mergables[-1]['fetch'] = [x['fetch'] for x in review['revisions'] if x['_number'] == patchset][0]
|
||||
mergables[-1]['fetch'] = [review['revisions'][x]['fetch'] for x in review['revisions'] if review['revisions'][x]['_number'] == patchset][0]
|
||||
mergables[-1]['id'] = '{0}/{1}'.format(change, patchset)
|
||||
except (IndexError, ValueError):
|
||||
args.quiet or print('ERROR: The patch set {0}/{1} could not be found, using CURRENT_REVISION instead.'.format(change, patchset))
|
||||
|
Reference in New Issue
Block a user