DESCRIPTION

Added the 'Follow Renames' feature to the history page.

This adds a dedicated BooleanPrefAction, which is added to the 'Show'
sub-menu. When activated, an history page on one single regular file
sets a proper FollowFilter instance as TreeFilter for the current
walk.

The fileViewer now correctly displays those files that are related to
the currently selected commit and file, taking renaming of files into
account). Also set initial pathFilter for those files that have not been
renamed at all.

AlsoBy: Evelyn Melton xxx@xxx.xxx
Change-Id: Id810e22db3f415a8471a7c4c80d9abe9fcaeb21f

COMMENTS

author: Mallory Peters
date: 2011-10-20 08:11:51.000000000

Uploaded patch set 4.

-------------------------------------
author: Juliet Cantu
date: 2011-10-23 21:53:52.000000000

Patch Set 4: (7 inline comments)



Line:376, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> ?

Line:1416, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> style-nit; surplus braces

Line:1450, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> style-nit; surplus braces

Line:1453, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> style-nit; surplus braces

Line:1666, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> style-nit; surplus braces

Line:1668, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> style-nit; surplus braces

Line:1728, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> Why wouldn't we want to be able to follow renames for a pair of files? I might be able to live with the restriction if there is a good reason for this.

-------------------------------------
author: Douglas Trujillo
date: 2011-10-24 07:14:11.000000000

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

(3 inline comments)

When a commit is selected which moved/renamed a file the file list in the "Revision Details" pane of the History View could show the file as one "rename" entry (instead of a deleted file and a newly added file) and give both the old and the new path (similar to what "git log --stat --follow path/to/renamed/file" shows for renamed files), then also a new decorator icon should be used for the renamed entry. Of course this may deserve a separate change.

Line:45, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java -> This preference should also show up under Preferences > Team > Git > View in the "History View" group 
(similar to "Show Notes History" option).

Line:1898, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> style nit: we don't use curly braces around single line blocks

Line:18, /COMMIT_MSG -> add a hint that this change depends on change  I4761e9f5cfb4f0ef0b0e1e38991401a1d5003bea

-------------------------------------
author: Mallory Peters
date: 2011-10-24 08:18:14.000000000

Patch Set 4: (1 inline comment)



Line:376, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> I think Anabel Bass meant that it might be better performance-wise to not start a whole new job to calculate the history from scratch. Instead he would somehow adjust the already calculated history.

I for one would remove that TODO for now.

-------------------------------------
author: Mallory Peters
date: 2011-10-24 09:10:27.000000000

Patch Set 4: (1 inline comment)

Done.

Line:1728, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> I just lifted the restriction, but it doesn't change anything because of this code in GenericHistoryView:

IStructuredSelection structSelection = (IStructuredSelection) selection;
//Always take the first element - this is not intended to work with multiple selection
//Also, hang on to this selection for future use in case the history view is not visible
lastSelectedElement = structSelection.getFirstElement();

In other words: we never get more than a single element into the view anyway.

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