问题
We use Jenkins to verify patch sets. Sometimes Jenkins needs do some changes on the patch set. So it commit --amend
the changes and then uploads the new patch set.
It work nicely besides the fact, that all manual reviews made to the original patch set get erased.
- How can I push a new patch set (from Jenkins) without loosing all existing reviews/votes?
回答1:
Be aware that, in the situation you have described, you have a new patchset and, excluding in special situations, you don't want votes of the old patchset copied forward to the new patchset. For example: if someone have approved the patchset1 and Jenkins pushes the patchset2, probably he/she doesn't want to have his/her vote automatically copied to patchset2.
Said that: you can control how votes will/won't be copied forward to new patchset setting the label.LABEL-NAME.copyXXXXX options of the project. See more info in Gerrit documentation here.
来源:https://stackoverflow.com/questions/44439700/upload-patch-set-preserving-existing-reviews