Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347652

Summary: Create Patch misses some of the selected files
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: CVSAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: malgorzata.tomczyk, pwebster, Szymon.Brandys, tomasz.zarna
Version: 3.7   
Target Milestone: 3.8 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Hack for testing - do not commit
none
workspace none

Description Markus Keller CLA 2011-05-30 09:50:15 EDT
I20110528-0800

- new workspace
- check out org.eclipse.core.expressions from HEAD
- check "Always run in background" (or check it on the "General" prefs page)
- Preferences > Team > CVS > Synchronize/Compare: Select "Automatically enable change set grouping..."
- modify first 2 files in org.eclipse.core.expressions and first file in org.eclipse.core.internal.expressions (e.g. change copyright date)
- synchronize the project or the workspace (I stayed in the Java perspective)
- enable Change Sets
- put src/org/eclipse/core/internal/expressions/ > AdaptExpression.java into new Change Set "a"
- in Package Explorer, select the 2 changed files in org.eclipse.core.expressions
- context menu > Team > Create Patch...
- enter a file path (I took C:\t\patch.txt) and click Finish
- if asked whether to override or not, click Yes
=> generated patch is correct

- restart Eclipse
- in the PE, select the the 2 changed files in org.eclipse.core.expressions again
- context menu > Team > Create Patch...
- click Finish, Yes (OK to override)
=> BUG: Only one of the selected files ends up in the patch.
Comment 1 Malgorzata Janczarska CLA 2011-05-31 04:40:54 EDT
I followed your steps and failed to reproduce this bug. Maybe it's another incarnation of Bug 201714 or Bug 294650. Can you tell me witch build version are you using?
Could you check two things on opened patch wizard before the wrong patch is generated:
1. Expand all tree nodes and verify if both files were added to the tree
2. Check if before clicking "Finish" all nodes are selected
3. If not all nodes are selected click "Select All" and tell me if it selected all the nodes.
Comment 2 Markus Keller CLA 2011-06-10 05:51:56 EDT
> Can you tell me witch build version are you using?
See first line of comment 0. I can still reproduce consistently with I20110603-0909.

Note that the bug only happens the first time after a restart. When I create the patch a second time, both files are correctly included.

> Could you check two things on opened patch wizard before the wrong patch is
> generated:
> 1. Expand all tree nodes and verify if both files were added to the tree
Yes, both files are there (plus the irrelevant change set).

> 2. Check if before clicking "Finish" all nodes are selected
Yes, all nodes are selected.

Clicking "Finish" now (after expanding all nodes) generates the correct patch. So the expansion of the nodes already fixes the problem.

> 3. If not all nodes are selected click "Select All" and tell me if it selected
> all the nodes.
"Select All" alone does not help (patch still incomplete, unless I expand the nodes).

To rule out other influences (background updates...), please close all editors and the Synchronize view before you restart.
Comment 3 Malgorzata Janczarska CLA 2012-03-15 11:46:37 EDT
Created attachment 212733 [details]
Hack for testing - do not commit

Mark, I tried again to reproduce this bug according to your scenario. I tried exactly what you described as well as with some variations. I am still unable to reproduce it.
Maybe you have a workspace that has this problem and you could attach? This would rule out any other setting that we may have different.
In meanwhile I looked into the code and I found that there where some timing issues addressed in bug 201714. Maybe in case of your workspace this fix was not sufficient. Would you be able to apply this patch to org.eclipse.team.core and see if you still observe the problem?
Comment 4 Markus Keller CLA 2012-03-21 15:08:06 EDT
Created attachment 213020 [details]
workspace

I could still reproduce with I20110613-1736 (3.7), but with I20120320-1400 (a 3.8 build), it works fine.

I don't want to invest more time into this. OK to close from my side.
Comment 5 Malgorzata Janczarska CLA 2012-03-23 11:40:29 EDT
(In reply to comment #4)
> I could still reproduce with I20110613-1736 (3.7), but with I20120320-1400 (a
> 3.8 build), it works fine.

Closing the bug, as it seems to be already resolved.