And... as S reminded me -- this is now documented at our handy little
debugging guide to gerrit:

https://www.mediawiki.org/wiki/Gerrit/Advanced_usage#.22.5Bremote_rejected.5D_HEAD_-.3E_refs.2Fpublish.2Fmaster.2F.3F.3F.3F_.28Cannot_merge_change_to_another_branch.29

~Matt Walker
Wikimedia Foundation
Fundraising Technology Team


On Fri, May 17, 2013 at 9:43 AM, Matthew Walker <[email protected]>wrote:

> Genius!
>
> I swore I tried git push gerrit HEAD:refs/for/??? and it not working --
> but clearly I had done something else boneheaded.
>
> It was indeed the .gitreview file pointing to the wrong branch that was
> the cause of all my troubles.
>
> Thanks :)
>
> ~Matt Walker
> Wikimedia Foundation
> Fundraising Technology Team
>
>
> On Fri, May 17, 2013 at 2:55 AM, Bartosz Dziewoński 
> <[email protected]>wrote:
>
>> (The below is how I understand this. I am no gerrit expert, though, and I
>> might be wrong.)
>>
>> Note this part:
>>
>>
>>   ! [remote rejected] HEAD -> refs/publish/master/mwalker_**test (change
>>> 59546
>>> closed)
>>>
>>
>> That's gerrit ("remote") telling you that the change is no good
>> ("rejected"), because 
>> https://gerrit.wikimedia.org/**r/#/c/59546/<https://gerrit.wikimedia.org/r/#/c/59546/>("change
>>  59546") is already merged ("closed").
>>
>> This means that instead of submitting the change to whatever branch you
>> wanted to, you're actually submitting it to master.
>>
>> You should either fix the .gitreview file to have something else than
>> "defaultbranch=master" in it for your branch, or just use the good old `git
>> push gerrit HEAD:refs/for/<branch>` command instead of `git review`.
>>
>> (Or, if you did mean to submit this to master for some reason, remove the
>> Change-Id line and have a new one generated to create a new gerrit
>> changeset.)
>>
>>
>> --
>> Matma Rex
>>
>> ______________________________**_________________
>> Wikitech-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/**mailman/listinfo/wikitech-l<https://lists.wikimedia.org/mailman/listinfo/wikitech-l>
>
>
>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to