DESCRIPTION

Added context actions 'Assume Unchanged' and 'Untrack'

Modified unstaged changes can be marked as 'Assume Unchanged' or
untracked using a context menu action.

AssumeUnchangedOperation and UntrackOperation are extended by a
constructor that takes a path list. Reason is that it cannot be assumed
that in the StagingView the StagingEntry's are workspace resources. In
this case the selection is a collection of paths of the current selected
repository.

Bug: 381158

Change-Id: I4eec5d307ae7b1a04ad288b3c3e769218a98a0b5
Signed-off-by: Armani Hurst xxx@xxx.xxx


COMMENTS

author: Armani Hurst
date: 2017-08-04 12:41:15.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2017-08-04 12:41:20.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2017-08-04 13:06:34.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/10078/ : SUCCESS

-------------------------------------
author: Alayna Houston
date: 2017-08-04 13:22:02.000000000

Patch Set 4: Code-Review-1

(1 comment)

Much better; thanks! But see inline comment...

Line:3460, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Now there's another problem relating to filters. This applies the action to all files, even filtered out ones. Stage/unstage applies only to visible nodes. We should be consistent.

To see what I mean: have a test project with a folder foo containing two files A.txt and B.txt. Modify both. Enter "foo/A" in the filter box in the staging view's toolbar with Compact Tree View enabled. There should be only foo/A.txt visible in the unstaged viewer. Now choose "Untrack". Staged viewer shows deletion of foo/A.txt. Now clear the filter text in the toolbar. Oops, foo/B.txt also got removed from the index.

Looking at stage(), I see it uses contentProvider.getStagingEntriesFiltered() to get the children of a StagingFolderEntry. I think that should be done here, too.

(I also see that stage() has a funny "if StagingEntry {} else if StagingFolderEntry {} else {}" structure. I wonder what that else-branch could be good for... might be a leftover from old code. AFAIK we only have StagingEntry or StagingFolderEntry elements in that tree. unstage() doesn't have a corresponding else part either. Looks like some more clean-up and duplicate code unification would be needed here; but maybe in a later commit.)

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