Bug 354474 - consider logical models in "Compare with"
Summary: consider logical models in "Compare with"
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 372967 (view as bug list)
Depends on: 354911 354923 354932 371580 393225
Blocks: 343597 370953
  Show dependency tree
 
Reported: 2011-08-11 06:09 EDT by Benjamin Muskalla CLA
Modified: 2018-03-07 08:58 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2011-08-11 06:09:26 EDT
We should take a look at "Compare with" in conjunction with logical models.
Comparing a file with another revision should bring up the sync view/Git Tree compare in case the logical scope spans across different files.
Comment 1 Laurent Goubet CLA 2011-08-11 06:46:21 EDT
I am currently trying to list all potential use cases where comparison can be called with EGit; the "Compare With" menu isn't the only one.

For example, Team > Show In History shows a list of commit, and selecting one of these commits shows the list of files this commit changed. Double-clicking one of these files calls the comparison ... and here, too, the model provider of the selected resource should be considered.

The same goes with Team > Show Local History, as does Synchronize Workspace > double click on a changed file.

I'll try and get a comprehensive list of the different scenarios together, and provide it here... Though I am not a git expert (nor am I an EGit expert). I might miss some of the potential scenarios.
Comment 2 Laurent Goubet CLA 2011-08-17 05:51:47 EDT
Hi,

I've somewhat completed the list of the actions that trigger comparison (and, thus, that should be considering logical resources). Note that I am only listing here the actions that need be fixed from EGit side (there are other actions, but they'll need to be fixed by Platform/Compare).

1. Team > Show History, then right-click one of the changed files and select "Compare with Version in Ancestor" (bug 354911)
2. Same action, different path : Team > Show History, then right-click a commit and select "Open in Commit Viewer". From there, right-click a changed file and select "Compare with Version in Ancestor" (bug 354911)
3. Compare With > Commit... and double click a commit (bug 354923)
4. Compare With > HEAD Revision
5. Compare With > Previous Revision
6. Compare With > Branch, Tag or Reference
7. Compare With > Git Index
8. Replace With > Local History... then double click a revision (bug 354932)

1, 2, 3 and 8 have their own bugs since the logical model integration is not the only problem raised by these actions.
Comment 3 Laurent Goubet CLA 2012-03-01 08:35:54 EST
*** Bug 372967 has been marked as a duplicate of this bug. ***
Comment 4 Laurent Goubet CLA 2012-03-01 08:37:09 EST
Any news on this fix?
Comment 5 Benjamin Muskalla CLA 2012-03-12 16:53:04 EDT
Laurent, there are currently no plans to work on this but it's on the backlog of things to tackle.
Comment 6 Robin Stocker CLA 2013-01-18 13:41:45 EST
Bug 371580 (Compare from History, Commit viewer) and bug 393225 (Compare With Branch, Tag or Reference) are fixed. That leaves some compare actions still to be done, right?

Gunnar, would you like to do the rest? (added to CC)
Comment 7 Gunnar Wagenknecht CLA 2013-01-18 13:53:04 EST
I haven't investigated further yet. But from my understanding the CompareWithRefActionHandler also a few other cases. 

Laurent, it would be great if you can test the actions using one of the upcoming nightly builds and provide feedback what's missing for your use-cases.
Comment 8 Laurent Goubet CLA 2013-01-21 02:56:41 EST
Gunnar, Robin,

I planned to check out the most recent changes in EGit and JGit in order to continue the work from our side (EMF Compare) on the model providers. With the first action taken care of (Compare With Reference), it should be a lot easier to fully test everything.

I should be able to provide you with feedback on this and the missing use cases in the middle or end of this week.

Thanks a lot for your work on this :).
Comment 9 Laurent Goubet CLA 2013-01-25 05:19:32 EST
I just re-opened bug 393225 : EGit properly calls the model providers when using compare with > branch, tag or reference... but fails in some cases to retrieve remote revisions. Still, I should be able to carry on implementing my end of the feature (the model provider itself).

However, I am prevented to make real progress because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=398982 . Basically, I cannot find a way to access the full history of a given file through the Team APIs if this file is under Git versionning.

Of course, another issue which will really soon get me into trouble is that "CommitFileRevision#getBranches()" returns an empty array... but that's another bug I'll have to investigate further before raising.

As for _this_ bug in particular : compare with > reference still needs a little work, and I believe the most important ones after that are Compare With > Git Index and Compare With > Commit... but since most of these actions are still to be tweaked so that they use the model proviers, you might want to set priorities yourself :) (see comment #2 for the list of actions).

Note that I have noticed a few infinite loops while trying the compare actions. I'll raise the bug(s) as soon as I have properly pinned it(them) down.