Issue 2538: Can't download patch for merge commits
Status:  Submitted
Owner: ----
Closed:  Mar 2014
Reported by eng...@gmail.com, Mar 10, 2014
************************************************************
***** 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. Open any merge commit ( https://gerrit-review.googlesource.com/#/c/55052/ )
2. Click Download Patch (0010477.diff.base64 or 0010477.diff.zip}

What is the expected output? What do you see instead?
Expected:
 Download patch against common ancestor.
I See:
 File not found blah,blah,blah,....

See also issue 106
Mar 10, 2014
#1 eng...@gmail.com
This issue is for New change screen only
Mar 11, 2014
Project Member #2 david.pu...@sonymobile.com
Reproduced on gerrit-review.googlesource.com (2.8.1-1510-g2b28f44)
Status: Accepted
Mar 11, 2014
Project Member #3 David.Os...@gmail.com
The problem seems to be in com.google.gerrit.server.change.GetPatch.java

[...]
public BinaryResult apply(RevisionResource rsrc)
[...]

  if (parents.length > 1) {
          throw new ResourceConflictException(
              "Revision has more than 1 parent.");
  }

So that it cannot work for merge commits. Just guessing:
we don't know that it is a merge commit to disable the download
patch feature on the client side.

Mar 12, 2014
#4 eng...@gmail.com
For merge commit I expect diff against first parent which is the destination of merge.
Mar 12, 2014
Project Member #5 david.pu...@sonymobile.com
https://gerrit-review.googlesource.com/#/c/55091/
Status: ChangeUnderReview
Mar 26, 2014
Project Member #6 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.8.4