Reputation: 307
I wonder if it is possible to make an already pushed gerrit code review dependent on a pushed later different one, is there something like a Depends-On: <ChangeId>
commit message footer?
If not, how would it be possible with git
itself to rebase CR1 on CR2 without too much hassle?
Upvotes: 1
Views: 369
Reputation: 443
Dependencies in Gerrit are normal parent-child git relationships. You can create a dependency by rebasing one code review patch set onto another one, like this (you can find the correct references from the patch set download menu):
git fetch ssh://your_repo/your_project refs/changes/n/changenum1/patchset:CR1
git fetch ssh://your_repo/your_project refs/changes/n/changenum2/patchset:CR2
git checkout CR1
git rebase CR2
Now you can publish your rebased CR1 as usual. You should see a dependency to CR2 for the updated patch set.
Upvotes: 2