Bartosz Marcinkowski
Bartosz Marcinkowski

Reputation: 6861

Git + gerrit: forcing new patch set without any changes

TL;DR

I want to git review -R even though I changed nothing since I did it the last time. I get an error No changes between prior commit 5aa6a81 and new commit 2f0fa24. How to force it?

Whole story

What I want may seem weird, but I have a reason for it: each new patch set triggers integration tests on Jenkins, which may fail because some service is unavailable and mark my change with Verified -1. After such failure, I want to retrigger the tests.

I used to look for a file without newline at the end and add it, but I hope there is a better way.

Upvotes: 3

Views: 2288

Answers (1)

laplasz
laplasz

Reputation: 3497

yes - there are some other options:

  1. if you have issues with the test environment (not with code) then touch the environment -> you can retrigger every gerrit related jobs - which can update the score from -1 to +1 if the execution was successful that time. How to do that? in newer versions of Gerrit Trigger plugin (from Version 2.10.0) each job has a Retrigger or Retrigger All menu item. Or with admin permission you can use the Gerrit plugin settings where you can query each trigger by the corresponding ChangeId. Then retrigger it.
  2. Amend your commit and change the commit message by adding some extras - this will cause a 'real' change in the pachset so you can create a new one which will retrigger the jobs.

Upvotes: 3

Related Questions