Community
Participate
Working Groups
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.
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.
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.
*** Bug 372967 has been marked as a duplicate of this bug. ***
Any news on this fix?
Laurent, there are currently no plans to work on this but it's on the backlog of things to tackle.
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)
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.
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 :).
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.