How to chain cherry-picks

132 views
Skip to first unread message

Christian Gagneraud

unread,
Aug 17, 2023, 10:29:11 PM8/17/23
to Repo and Gerrit Discussion
Hi all,

I'm looking at automatically cherry-picking changes from branch A to B
(changes typically use gerrit topics).
I've been experimenting with python-gerrit-api [1] and I can do a
single "initial" cherry-pick. To do the next one, I need to add a
"base" revision to the CherryPickInput [2].
The Documentation says "must be a merged commit or a change revision
on the destination branch", in my case I'm looking for the "change
revision" of the previous CP but can't find it.
Does anyone know how/where to get this piece of infor using the REST API?

Thanks,
Chris

[1] https://python-gerrit-api.readthedocs.io/
[2] https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#cherrypick-input

Björn Pedersen

unread,
Aug 18, 2023, 2:32:34 AM8/18/23
to Repo and Gerrit Discussion
Christian Gagneraud schrieb am Freitag, 18. August 2023 um 04:29:11 UTC+2:
Hi all,

I'm looking at automatically cherry-picking changes from branch A to B
(changes typically use gerrit topics).
I've been experimenting with python-gerrit-api [1] and I can do a
single "initial" cherry-pick. To do the next one, I need to add a
"base" revision to the CherryPickInput [2].
The Documentation says "must be a merged commit or a change revision
on the destination branch", in my case I'm looking for the "change
revision" of the previous CP but can't find it.
Does anyone know how/where to get this piece of infor using the REST API?


It should be the new sha of the previous cherry-pick (which is a change (revision=1)) , I guess.
Reply all
Reply to author
Forward
0 new messages