Reputation: 1671
I have a question about whether should push cherrypicked update to gerrit.
My code needs some other code in order to build, and those code is already pushed to gerrit but not merged. I cherrypicked that push and put my code on the top of it. And my code build successfully. Then I only pushed my code to gerrit, and this caused gerrit build failure, I am sure I did not miss any file from my code, what is the reason? Can someone help on this?
Upvotes: 0
Views: 1280
Reputation: 11581
The commit you upload should have the unmerged commit as its parent. Not a cherry-picked copy of the unmerged commit but that exact commit. When you upload your commit, it'll have its parent commit listed as a dependency and you won't be able to submit your change until the parent has been submitted.
This is how you can create and check out a new topic branch based on a uploaded but not merged commit (patch set 1 of change 8):
git fetch git://git.example.com/name-of-git refs/changes/08/8/1
git checkout -b mytopic FETCH_HEAD
The exact git fetch
command can be obtained from Gerrit's change screen. Make your changes, commit, and push to Gerrit like you'd usually do.
Upvotes: 1