DESCRIPTION

Use three-way mode of the compare editor

When the user compares versions which are not direct descendants of
each other it is useful to see the content of the common ancestor.
This change introduces the usage of the three-way compare editor.

Three-way compare is still not supported when the user compares folders
or projects. This would have to be implemented in the CompareTreeView.

Change-Id: Ied1fa51d3a1ec9136ec270ff8500e08a32629fce
Signed-off-by: Carlie Harper xxx@xxx.xxx

COMMENTS

author: Carlie Harper
date: 2012-11-05 08:22:28.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2012-11-05 08:22:34.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2012-11-05 08:38:18.000000000

Patch Set 2: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3543/ : SUCCESS

-------------------------------------
author: Danika Greer
date: 2012-11-05 14:24:04.000000000

Patch Set 2: (3 inline comments)

Could the following repeated code be put into CompareUtils (with error handling)?:

    try {
        RevCommit commonAncestor = RevUtils.getCommonAncestor(repo, commit1, commit2);
        return commonAncestor != null ? CompareUtils.getFileRevisionTypedElement(...) : null;
    } catch (...) {
    }

What do you think?

Line:88, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java -> This seems to be unnecessary. I also get the label after removing this.

Line:71, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CompareVersionsHandler.java -> Missing `ancestor = ` here.

Line:88, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CompareVersionsHandler.java -> s/commit2/commonAncestor/, right?

Could you extract the common code from above into a new method? It's the same except getting gitPath and repository.

-------------------------------------
author: Carlie Harper
date: 2012-11-06 09:28:34.000000000

Patch Set 2: (3 inline comments)



Line:88, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java -> Done

Line:71, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CompareVersionsHandler.java -> I hadn't tested this! And what's not tested, doesn't work...

Line:88, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CompareVersionsHandler.java -> Done

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