Issue 2129: Submit-type cherry-pick broken with enabled "Can merge" feature
Status:  CannotReproduce
Owner: ----
Closed:  Dec 2013
Reported by voel...@gmail.com, Sep 17, 2013
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:

What steps will reproduce the problem?
1. Set submit-type for your project to "cherry-pick"
2. Enable the "Can merge" feature
3. Try to submit a change with pending dependency or based on outdated patchset

What is the expected output? What do you see instead?
Expected: Change can be merged. According to the docu [1], this is what should happen: "Cherry Pick - Always cherry pick the patch set, ignoring the parent lineage and instead creating a brand new commit on top of the current branch head." 

Actual: "Can merge: no - requires rebase or has dependency". I actually have to press the rebase button or need to submit the dependencies first. This is not how it was without the "Can merge" feature. Maybe I don't understand the documentation correctly, but this doesn't seem to be right.

[1] https://gerrit-review.googlesource.com/Documentation/project-setup.html
Sep 17, 2013
#1 voel...@gmail.com
Gerrit version 2.6
Sep 24, 2013
Project Member #2 edwin.ke...@gmail.com
Actually this Gerrit instance is 2.5 with some commits cherry-picked from 2.6.

I tried the described scenario with the "Can merge" feature enabled with both Gerrit 2.5 and current master (aka 2.8) and in both cases I could submit a change which has a pending dependency or which was based on an outdated patch set and the cherry-pick was successfully done.

Please note that if you have two open changes A and B, where B depends on A, you can only cherry-pick B if:
1. B does not touch any file that was touched by A
2. All files touched by B that were also touched by A can be automatically merged AND
'Automatically resolve conflicts' is enabled on the project

Otherwise it is correct that you get "Can merge: no - requires rebase or has dependency" for B.

Can you please check, if in your case B contains files from A and if yes, if the modifications allow an automatic content merge and that 'Automatically resolve conflicts' is enabled on the project?
Status: AwaitingInformation
Sep 24, 2013
Project Member #3 edwin.ke...@gmail.com
By the way, clicking on the "Rebase" button may help because in this case Gerrit always tries to do a content merge even if 'Automatically resolve conflicts' is not enabled on the project.
Dec 6, 2013
#4 voel...@gmail.com
After updating to gerrit-2.7 the problem seems have vanished. Thanks!
Dec 6, 2013
Project Member #5 bklarson@gmail.com
(No comment was entered for this change.)
Status: CannotReproduce