DESCRIPTION

[historyView] Fix Create Patch result diff when filtered

When the History view is filtered to only show commits of the selected
resource, creating a patch resulted in an incorrect diff. The problem
was that the RevCommit was used as is, and the parent was the one as
shown in the History view, not the real parent of the commit.

Test with e.g. ApplyCommand from JGit, filter the History view to
resource, and then Create Patch. The diff should be pretty small.

Change-Id: I2afa11033b26069795f57d2381e66973865cd7a9


COMMENTS

author: Brenden Conley
date: 2012-09-25 21:27:14.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3409/ 

-------------------------------------
author: Brenden Conley
date: 2012-09-25 21:48:19.000000000

Patch Set 1: I would prefer that you didn't submit this

Build Unstable 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3409/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2012-09-25 23:05:35.000000000

Patch Set 1: No score

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3413/ 

-------------------------------------
author: Brenden Conley
date: 2012-09-25 23:21:13.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3413/ : SUCCESS

-------------------------------------
author: Carlie Harper
date: 2012-09-28 15:27:43.000000000

Patch Set 1: (1 inline comment)

Looks good, one question about an implementation detail.

Line:183, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> Why don't you use the getRepository method?

-------------------------------------
author: Danika Greer
date: 2012-09-30 15:37:29.000000000

Patch Set 1: (1 inline comment)



Line:183, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> Because then one would have to pass an ExecutionEvent as argument (because getRepository needs that). Also, `getSelectedCommits` only works when the history page is active, so the additional ways to get the repository in `getRepository` are not needed.

-------------------------------------
