DESCRIPTION

Fixes obtaining common ancestor in Synchronize view

For obtaining common base ancestor I've used suggested RevWalk with
RevFilter.MERGE_BASE. For API compatibility it is also used for
obtaining remote variant.

This patch also improves GitResourceVariant implementation. I replaced
all dependencies to deprecated TreeEntry with proper RevObject
implementation. This have also requires to update test cases.

Bug: 317934
Change-Id: I8f5352862d01e5a5475a74f222241970cd7960ee
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2010-08-02 12:08:19.000000000

Uploaded patch set 8.

-------------------------------------
author: Carlie Harper
date: 2010-08-02 14:24:49.000000000

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

(2 inline comments)

I think that in GitSyncInfo we do not need anything (E)Git specific. I would even assume that we could use plain SyncInfo. The handling of folders could be done in the Comparator (see ThreeWayResourceComparator as an example).

If that is done or it is not feasible to do it I would say we could finally submit the change.

Line:123, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncInfo.java -> Here you already know that local and base version are equal. So the kind can only be IN_SYNC or INCOMING, right?

if (getComparator().compare(base, remote)) -> IN_SYNC
else -> INCOMING

Line:126, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitSyncInfo.java -> You could also use (getComparator().compare(base, remote)) here, then you do not need the id's here. This would better encapsulate the responsibility of comparison to the comparator

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