DESCRIPTION

Compare/ReplaceWithPrevious support for multiple resources (in mappings)

The CompareWithPrevious and ReplaceWithPrevious actions now also support
scenarios where the current selection consists of a single object but
maps to multiple files (commonly via ResourceMappings).

The previous commit is the next-to-last commit which touched any of the
resources.

Bug: 496916
Change-Id: I1a208bd9949711e602309cac702a5a158b0eab4b
Signed-off-by: Ronin Harrell xxx@xxx.xxx
Signed-off-by: Maren Gonzales xxx@xxx.xxx
Also-by: Maleah Marks xxx@xxx.xxx
Also-by: Felicity Case xxx@xxx.xxx

COMMENTS

author: Ronin Harrell
date: 2016-11-16 14:10:00.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2016-11-16 14:10:06.000000000

Patch Set 4:

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

-------------------------------------
author: Ronin Harrell
date: 2016-11-16 14:22:08.000000000

Patch Set 4:

Thanks for your review!

Somehow some changes got lost when this PS was extracted from the PS it originated from, but still there were too many checks.

I updated this commit and now it should work as expected. I kept the check for a single selected object, since the implemented definition (previous = next-to-last of any element in selection) only makes sense when the collection is seen as "one unit".

-------------------------------------
author: Brenden Conley
date: 2016-11-16 14:36:27.000000000

Patch Set 4: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-12-12 21:01:51.000000000

Patch Set 4: Code-Review+1

(1 comment)

Works well, but if the HEAD commit did not touch any of the resources the behavior is rather strange. I tested this with working sets. I have a "Team" working set containing a checkout of eclipse.platform.team at commit b89030e. I have two uncommitted change in my workspace: added whitespace in org.eclipse.compare/plugin.xml,and a change in /org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java .

Compare with Previous is correctly enabled on the working set. When invoked, it presents the synchronize view with a comparison against commit d0eedce. (Showing changes in plugin.xml and PreferencePageContainerDialog.java, but additionally also in /org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java and in /org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties .) This is indeed two commits behind HEAD (b89030e). But why that should be "previous" is beyond me. I would have expected a comparison against 6d184ce.

I realized only when writing this here that this is caused by the HEAD commit not touching any of the resources -- it modifies only a global .gitignore outside of any Eclipse projects (and that change is consequently not shown in the Synchronize view at all).

Not sure how this could be avoided, though...

Line:104, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryAction.java -> Why is this necessary?

-------------------------------------
author: Alayna Houston
date: 2016-12-12 21:02:32.000000000

Patch Set 4:

Please also rebase onto current master.

-------------------------------------
author: Ronin Harrell
date: 2016-12-14 11:20:39.000000000

Patch Set 4:

(1 comment)

The PS was updated to the latest master and I added minor improvements.

Line:104, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryAction.java -> I agree, this seems rather redundant. Removed in next PS.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-12-18 10:20:59.000000000

Change has been successfully merged into the git repository by Alayna Houston

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