Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 173138 - [Change Sets] Outgoing changes lost after Apply Patch/Commit
Summary: [Change Sets] Outgoing changes lost after Apply Patch/Commit
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.3   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.3 RC3   Edit
Assignee: Michael Valenta CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-06 13:48 EST by Kim Horne CLA
Modified: 2007-07-29 09:21 EDT (History)
4 users (show)

See Also:
eclipse: review+
Michael.Valenta: review? (gheorghe)


Attachments
Patch for option 1 (4.24 KB, patch)
2007-05-28 16:54 EDT, Michael Valenta CLA
no flags Details | Diff
Patch for option 1 (4.24 KB, patch)
2007-05-28 16:54 EDT, Michael Valenta CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Horne CLA 2007-02-06 13:48:24 EST
Boris commented to me earlier that the custom splash handlers were not working (bug 173133).  I stepped through the code to find out that all the calls to the splash API had been removed.  Panicing, I found the change, and apparently I had removed it days ago as part of a submission that had nothing to do with the API.  Now I'm pretty sure I didn't surgically remove the API accidentally which leads me to wonder how it was removed.    I do a lot of crazy things but I really dont think this was one of them.  :)

I would've checked this bad change in from my windows partition running a different workspace.  Is it possible that the update would've chosen the bad code in my workspace over the good code that I was updating to?  No up to date checks failed when I had done this...
Comment 1 Michael Valenta CLA 2007-02-12 15:17:26 EST
There's no much we can do without more information. If you can think of anything else that may have contributed to this, please include it.
Comment 2 Michael Valenta CLA 2007-03-12 13:39:48 EDT
I have identified one case where files could be unintentionally committed when using change sets (see bug 177031). I didn't reopen this bug because there is not enough here to link the two cases. Kim, if bug 177031 looks like it may have been what caused your problem, let me know.
Comment 3 Kim Horne CLA 2007-03-15 06:44:06 EDT
Mmm yah. that could very well have been it.   I logged into the window system to check in one very small change - I didn't synch before doing so.  This workspace would've had the code that CVS was reverted to and all of these changes are in the same general area.
Comment 4 Michael Valenta CLA 2007-03-15 09:14:04 EDT
Reopening
Comment 5 Michael Valenta CLA 2007-03-15 09:14:26 EDT

*** This bug has been marked as a duplicate of bug 177031 ***
Comment 6 Michael Valenta CLA 2007-04-05 13:05:16 EDT
A similar problem has been seen again by Kim (although it involved changes not being committed instead of unwanted changes being committed). The steps were something like:

1) Apply a patch to multiple files.

2) Commit the changes from the Unassigned set in Change set mode (Kim, are you sure they were in the view at this point?)

3) After the commit, notice that a few files are still dirty but do not appear in the sync view

4) Changing to the workspace model and back to the Change Set model fixed the problem

It appears to be related to the Unassigned category in Change Set mode. Either changes are not getting added or they somehow got removed by the commit without actually being committed. I believe the former is more likely.
Comment 7 Michael Valenta CLA 2007-05-02 16:12:29 EDT
I have not yet been able to track this down but I'll keep looking.
Comment 8 Kim Horne CLA 2007-05-02 16:30:12 EDT
Incidentally, this hit us again - part of the fix for 170950 was not committed many moons ago.
Comment 9 Michael Valenta CLA 2007-05-02 16:33:57 EDT
Tomasz, can you try and reproduce this failure and try to figure out what the problem is. The problem mostlikely lies in the ChangeSetContentProvider.
Comment 10 Tomasz Zarna CLA 2007-05-14 12:47:16 EDT
I'm still trying -- no luck yet...
Comment 11 Tomasz Zarna CLA 2007-05-16 09:20:14 EDT
Kim, Michael, Boris, Szymon if you see it happen again please let me know. Attaching a patch or at least a screen shot of your Synchronize view would be a helpful thing without any doubt. 
Comment 12 Michael Valenta CLA 2007-05-28 16:53:25 EDT
I have been able to reproduce this. Here is the scenario:

1) Have some outgoing changes and some incoming changes

2) One of the files must have a conflicting changes that are auto-mergable. 
    - The file with the conflicting change MUST NOT be assigned to an outgoing change set. 
    - When you expand the Unassigned category the conflict will not be there. It will only be in the incoming change set.

3) Perform an Update All.

4) The incoming change set containing the conflicting change is removed but the change is not re-added to the Unassigned set. 

The options to fix this are to either force a refresh of the Unassigned set whenever a set is removed  (I will attach a patch for this) or to always ensure that Conflicting changes appear either in the Unassigned set or an Outgoing Change set (i.e. they would always appear twice. The second option may be better from a user standpoint so I'll investigate what the patch looks like for that as well.

Comment 13 Michael Valenta CLA 2007-05-28 16:54:10 EDT
Created attachment 68967 [details]
Patch for option 1
Comment 14 Michael Valenta CLA 2007-05-28 16:54:24 EDT
Created attachment 68968 [details]
Patch for option 1
Comment 15 Michael Valenta CLA 2007-05-29 09:26:02 EDT
I have logged bug 189663 to look at option 2 at a later time as it is not trivial. Kim, can I get you to review the attached patch?
Comment 16 Kim Horne CLA 2007-05-29 09:40:37 EDT
I'm not familiar with the space but this looks entirely reasonable.
Comment 17 Michael Valenta CLA 2007-05-31 08:21:54 EDT
Fixed
Comment 18 Eclipse Webmaster CLA 2007-07-29 09:21:39 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991