Hervé CUCHE
Hervé CUCHE

Reputation: 35

Push patchset to gerrit own by another author

I'm a gerrit user for few years now and I'm trying to setup a gerrit server in my new company. I succeed almost every configurations but I have two last issues (I'll discuss only one here).

I used to cherry-pick patchset that I didn't wrote (I'm not the author), change it to improve it (or rebase or whatever...), then push it to gerrit with the same change-id to become a patchset n + 1.

I currently have some trouble pushing the modify patchset.

Here what I have done.

  1. Going to the patchset in gerrit I want to change
  2. Cherry-pick this patchset into my local git repository
  3. Update the source code
  4. Commit the modification using the same change-id (since I really want to keep the all history and author ownership)
  5. Trying to push to gerrit (git push gerrit HEAD:refs/for/...)

The fifth point doesn't work. Here is the error:

$ git push gerrit HEAD:refs/for/develop
  Counting objects: 16, done.
  Delta compression using up to 8 threads. 
  Compressing objects: 100% (16/16), done.
  Writing objects: 100% (16/16), 2.07 KiB | 0 bytes/s, done.
  Total 16 (delta 13), reused 0 (delta 0)
  remote: Resolving deltas: 100% (13/13)
  remote: Processing changes: refs: 1, done
  To ssh://gerrit.server.lan:29418/group/project
   ! [remote rejected]   HEAD -> refs/for/develop (cannot add patch set to 87.)
  error: failed to push some refs to 'ssh://[email protected]:29418/group/project'

Obviously user, server, group and project are correctly fill. I'm using gerrit 2.13.5

I'm rebase over the gerrit/develop branch.

I guess I messed up some configurations but I cannot find which one.

Upvotes: 1

Views: 5946

Answers (1)

It seems the problem is that you don't have "Add Patch Set" permission. See more details here. This permission controls which users are allowed to upload new patch sets to existing changes.

Upvotes: 1

Related Questions