Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Tree compare

Kinzler, Mathias skrev 2011-01-26 09:28:
> -----Ursprüngliche Nachricht-----
> Von: egit-dev-bounces@xxxxxxxxxxx
[mailto:egit-dev-bounces@xxxxxxxxxxx] Im Auftrag von Robin Rosenberg
> Gesendet: Mittwoch, 26. Januar 2011 00:09
> An: egit-dev@xxxxxxxxxxx
> Betreff: [egit-dev] Tree compare
>
> There is a tree compare (again) in EGit. Why was it not done like this
> image (circa EGit 0.3)?
>
>
http://rosenberg.homelinux.net/wordpress/wp-content/uploads/2007/03/eclipse-20070318.png
>
> -- robin
> _______________________________________________
> egit-dev mailing list
> egit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/egit-dev
>
> I tried to do something just like this (actually without knowing the
EGit 3.0 implementation), but couldn't find a way to integrate a
structure and compare editor. Any hint how to do this?
> _______________________________________________
> egit-dev mailing list
> egit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/egit-dev
>

That was fairly straigt forward. Essentally provide a Differences that
produces DiffNode:s. See the org.eclipse.compare.structuremergeviewer
packages and some old commit, like
8bb1056a1d545eecef1cdca1f00100689e851bfd (can be found on repo.org.cz)

My first version produced a tree for directories, but I think the
flattened view was an improvement. It is probably easier to make it
handle renames, which I think is a must. I'm not sure having a tree view
for the directories is compatible with rename detection at all.

The structured diff was also many times faster than your diff. It
typically took way less than half a second to perform a full compare of
two versions. I also set focus back to the commit list so it was
possible to browse the history using the up/down arrow keys.

-- robin


Back to the top