Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [plug-in] Comparing two remote branches in Synchronize view
[plug-in] Comparing two remote branches in Synchronize view [message #547206] Thu, 15 July 2010 22:39 Go to next message
Dariusz Luksza is currently offline Dariusz LukszaFriend
Messages: 40
Registered: July 2010
Member

Hi all,

I'm currently implementing EGit integration with Synchronize view. Current status of my project is that, is supports selecting two branches and viewing changes in Synchronize view.

Everything works fine if branch that was selected as base branch is same as currently used (in git's terminology this means that this is a HEAD). But things goes wrong wen selected branch is different then HEAD. In this case team framework will use local files as a 'local' (in three-way-compare) source, this is quite logical for centralized version control systems. In this case result that will be shown in synchronize view will be corrupted. Additionally all code previous in compare view will be also corrupted because 'local' is pointing on local files instead of pointing on files that are in selected branch.

I'm wondering is there any (simple) way to bypass this and initialize 'local' with data from selected branch ?

Re: [plug-in] Comparing two remote branches in Synchronize view [message #549713 is a reply to message #547206] Tue, 27 July 2010 16:24 Go to previous messageGo to next message
Tomasz Zarna is currently offline Tomasz ZarnaFriend
Messages: 172
Registered: July 2009
Senior Member
The fact that Team API has been designed for a centralized VCS, namely CVS, is a secret of Polichinelle. I can imagine that an attempt to make it work for a DVCS is a challenging job.

Frankly speaking, I've never tried to compare two remote branches in CVS, but after reading your post I guess this is not possible. However, if I'm wrong this could be the light at the end of the tunnel Wink

Have you manged to pinpoint the class that causing you so much pain? The one that is hard-set to use local files in the 3 way compare.
Re: [plug-in] Comparing two remote branches in Synchronize view [message #549738 is a reply to message #547206] Tue, 27 July 2010 19:05 Go to previous messageGo to next message
Dariusz Luksza is currently offline Dariusz LukszaFriend
Messages: 40
Registered: July 2010
Member

Well in my humble opinion it all starts from ResourceVariantTreeSubscriber.getSyncInfo() method with one, as you said, has hard-coded IResource in parameter, also SyncInfo class uses IResource instance for resolving local variant in 3-way compare
Re: [plug-in] Comparing two remote branches in Synchronize view [message #550789 is a reply to message #549713] Wed, 04 August 2010 11:14 Go to previous messageGo to next message
Tomasz Zarna is currently offline Tomasz ZarnaFriend
Messages: 172
Registered: July 2009
Senior Member
Tomasz Zarna wrote on Tue, 27 July 2010 18:24
Frankly speaking, I've never tried to compare two remote branches in CVS, but after reading your post I guess this is not possible.


It appears that I was wrong, you can compare two remote branches (incl. HEAD) using Compare With... action available in CVS Repositories view. The bad news is that it opens the result in the Compare Editor (with Structure Compare pane), which I guess is not an option in your case.

What I would suggest is to open a bug against Team and propose the API you'll need. If we decide it's fine, we could start from adding it in an internal package, but after it matures we would make it public.
Re: [plug-in] Comparing two remote branches in Synchronize view [message #550795 is a reply to message #550789] Wed, 04 August 2010 11:43 Go to previous message
Dariusz Luksza is currently offline Dariusz LukszaFriend
Messages: 40
Registered: July 2010
Member

Can't we just hook instance of customized StructuredCompare for each resource in SyncView ?

Or maybe provide custome implementation for double click action on file resources that will launch Compare Editor with proper "configuration" ?
Previous Topic:Problems with "Synchronize with patch"
Next Topic:Unable to delete/move files after opening
Goto Forum:
  


Current Time: Wed Apr 24 21:13:13 GMT 2024

Powered by FUDForum. Page generated in 0.03329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top