Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Gerrit Merge "<gerrit topic>" commits

From: Bálint Réczey <balint@xxxxxxxxxxxxxxx>
Date: Fri, 31 Jan 2014 16:44:46 +0100
Hi Evan,

2014-01-30 Evan Huus <eapache@xxxxxxxxx>:
> On Thu, Jan 30, 2014 at 2:35 PM, Gerald Combs <gerald@xxxxxxxxxxxxx> wrote:
>> On 1/30/14 6:17 AM, Bálint Réczey wrote:
>>> Hi,
>>>
>>> 2014-01-30 Evan Huus <eapache@xxxxxxxxx>:
>>>> I believe the simpler answer is that the submit type has been set to "Merge If Necessary" which means if changes are not submitted exactly on top of the change they were authored on, Gerrit will produce a merge automatically.
>>> I suggested using "Cherry Pick" for "Change Submit Action" and I would
>>> like to bring it up again.
>>> BTW this is what is documented on our workflow page.
>>> http://wiki.wireshark.org/Development/Workflow :
>>> "After all the criteria are met any Core Developer can push the
>>> "Submit Change" button; integration to the target branch does not
>>> happen automatically.
>>>
>>> Changes are cherry-picked to the target branch by Gerrit to keep the
>>> history linear. The rationale behind this is that while merging would
>>> reflect the history more accurately, linear history is easier to
>>> interpret by humans. Changes with dependencies are cherry-picked after
>>> all dependencies are cherry-picked, too. When a cherry-pick can't be
>>> done without conflict, the change needs to be updated in the review. "
>>>
>>> This is how I set up Gerrit at my previous job, too.
>>
>> I changed the "Change Submit Action" for Wireshark to "Cherry Pick". In
>> case anyone is interested the official documentation is at
>>
>> http://test.code.wireshark.org/review/Documentation/project-setup.html#submit_type
>
> How does test.code.wireshark... compare to just code.wireshark...? Is
> the testbed still up for a reason, or do they both resolve to the same
> place now?
> https://code.wireshark.org/review/Documentation/project-setup.html#submit_type
I guess it is a leftover an will disappear.

>
>> and a discussion of the various options on the repo-discuss (Gerrit)
>> Google group is at
>>
>> https://groups.google.com/forum/#!topic/repo-discuss/GInKJgLUa2w
>
> Since that discussion is too old to include "Rebase if Necessary", I'm
> curious what the pros/cons of that are (do you know, Balint?). It
> seems like it's got the pros of "Cherry Pick" in that it maintains
> linear history etc, without all the complications of ignoring
> dependencies and rewriting commit messages.
I have not used "Rebase if Necessary" yet, but in theory it sound
better than chery-picking.
However a quick googling found this bug for me:
http://code.google.com/p/gerrit/issues/detail?id=2167

For now I would stick with cherry-pick until "Rebase if Necessary" matures
and consider using it later.

Thank you for bringing up this option.

Cheers,
Balint