DESCRIPTION

[historyView] Support following renames from compare action

This updated the Compare with Version in Ancestor action
available from the files table in the History view and commit
editor to look for a previous path when operating on added
files.

Change-Id: Icd4dac91d1e704d3c0af7496b3b6e6db0d574604


COMMENTS

author: Jaidyn Nichols
date: 2012-03-21 17:42:33.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2012-03-21 18:06:53.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2012-03-21 18:26:38.000000000

Patch Set 2: Verified

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/2734/ : SUCCESS

-------------------------------------
author: Carlie Harper
date: 2012-03-25 16:29:52.000000000

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

(1 inline comment)

The RenameCallback does not work as expected. We should try to fix it. Please see my inline comment.

Line:472, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java -> This method does not do what is expected. It does not return the path the file was renamed from in the given commit. Instead it returns the first path the file ever had.

I investigated further and found out that the RenameCallback does not work properly. As soon as the rw.next is called the first time the method "renamed" is called for all the renames which had ever happened.

The testcase RevWalkFollowFilterTest does not reveal that because it only tests if all the renames are detected, but not if they are detected for the right commit. I'll push a failing testcase for that.

CompareWithPreviousActionHandler also does not work properly. E.g., rename a file and do a follow-up commit on that file. Then do Compare with Preivious on the last commit. It tries to use the old path and does not find it in the parent commit.

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