I am using gerrit for my project. I am automating some of my work which includes identifying the gerrit commit cherry-picked to local machine. for example: I have several changes uploaded on gerrit for review. I cherry picked those changes to local machine. Is there any way i can find out which changes are cherry picked and which are not?? I can compare revisions of cherry picked changes with the one on gerrit, but the problem is revision changes if parent changes.[revision is calculated by using different factors like diff,parent etc]
Which is the unique thing about gerrit change that doesn't change even if I cherry pick changes locally.
The Change-Id footer line in the commit message is unique for each commit (at least for a particular project/branch combo). The SHA-1 can't be used since it, as you've discovered, changes after a cherry-pick. To find the change id of an uploaded commit the query
SSH command and /changes REST endpoint are useful.
Theoretically you could also use git cherry
or git patch-id
to compare commits, but I don't think it would be very practical in this case.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.