Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323161 - Synchronize View: Incoming, Outgoing Mode etc. have no effect
Summary: Synchronize View: Incoming, Outgoing Mode etc. have no effect
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-19 11:18 EDT by Stefan Lay CLA
Modified: 2013-05-18 16:02 EDT (History)
4 users (show)

See Also:


Attachments
Screenshot: incoming mode showing outgoing+incoming and duplicates (124.74 KB, image/png)
2010-09-19 04:51 EDT, François Rey CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Lay CLA 2010-08-19 11:18:36 EDT
The toggle buttons Incoming Mode, Outgoing mode, Incoming Mode/Outgoing mode on the tool bar have no effect on the Java Workspace model.
Comment 1 Remy Suen CLA 2010-08-31 12:12:33 EDT
This seems to be working properly for me.
Comment 2 Stefan Lay CLA 2010-09-03 05:54:27 EDT
This works now.
Comment 3 François Rey CLA 2010-09-19 04:51:03 EDT
Created attachment 179201 [details]
Screenshot: incoming mode showing outgoing+incoming and duplicates
Comment 4 François Rey CLA 2010-09-19 04:55:33 EDT
About the previous attached screenshot:
You can see the button for incoming changes selected, however you still see outgoing changesets. Additionally many changesets appear twice as outgoing and incoming, with different sha1...
Are we sure this bug is fixed?
I'm new to git and egit, so I may not understand the whole git process yet, but this sure looks weird.
Using egit/jgit 0.9.3 on arch linux 64 bits
Comment 5 François Rey CLA 2010-09-19 08:26:05 EDT
Well I can explain the presence of duplicate incoming and outgoing: I basically did not synchronize with the proper origin branch, hence the different sha1.
As I said, still learning git/egit...
Still, the presence of both outgoing and incoming while in incoming mode is weird. It did however point me towards my own mistake.
Comment 6 Dariusz Luksza CLA 2010-09-19 08:47:38 EDT
(In reply to comment #4)
> About the previous attached screenshot:
> You can see the button for incoming changes selected, however you still see
> outgoing changesets. Additionally many changesets appear twice as outgoing and
> incoming, with different sha1...

This is quite possible consider this scenario:
- you fetch a commit from yours team member for review and starts reviewing it
- in mean time some one else from team has finish reviewing same commit, send his feedback to the author, author has done some improvements and amend this commit. Finally he push it to origin repo
- for some reasons you want to compare commit hat you are reviewing with origin so you are fetching current state from origin and now you have two commits that has same message but different SHA-1

It would be perfect if you could describe yours scenario so that we could reproduce it.

> Are we sure this bug is fixed?

It seams that this isn't fixed. I've use above scenario to reproduce this and it reproduces always.
Comment 7 François Rey CLA 2010-09-19 10:54:29 EDT
Well my scenario is simple:
I cloned mantisbt repository from git://mantisbt.org/mantisbt.git
I checked out branch master-1.2.x and created a new branch from it.
Made some changes and committed them to my new branch.
Then I wanted to synchronize with the origin, except that instead of comparing to origin/master-1.2.x I compared to origin/master.
I suppose mantisbt has a workflow of applying changes from the master branch into the master-1.2.x branch, so my screenshot was showing both changesets.
Comment 8 Dariusz Luksza CLA 2010-09-19 14:03:47 EDT
It seams that we hit another limitation of Team Framework here. As before it is all because the three way compare relays on local version of file.

Team Framework uses instances of IDiff interface to cache change deltas and base on those deltas it sorts changes on incoming and outgoing. When synchronization occurs the Subscriber.getDiff(IResource) and returns instance of IDiff. This method uses standard SyncInfo to IDiff converter (SyncInfoToDiffConverter.getDefault().getDeltaFor(SyncInfo)) with internally uses local file version to determinate change direction.

If we want to have proper distinction of incoming and outgoing changes in Git Change Set model we should provide proper implementation of Subscriber.getDiff(IResource) method that would be aware of given source commit that we would like to load data from.
Comment 9 François Rey CLA 2010-09-19 15:44:54 EDT
The plugin for mercurial does provide a nice synchronize view which could provide some inspiration. However if I remember correctly mercurial stores diff, so that may be why it's easier for them to use the team framework.
Comment 10 Robin Stocker CLA 2013-05-18 16:02:32 EDT
I couldn't reproduce the problem with the newest version of EGit -> resolving.