Community
Participate
Working Groups
Build Identifier: 3.7.1 From within the Package Explorer. Using the context menu Replace With command on a package within a plugin causes all files within the _file system folder_ for that package to be replaced. This means that it is possible to lose data on packages not selected by the Replace With command. I've had a few users already lose data from this bug. This errors occurs on 1.1.0 and 1.3.0.201201041014 of EGit. Reproducible: Always Steps to Reproduce: 1. Clone http://egit.eclipse.org/egit-training.git 2. Make a change to org.eclipse.example.calc.internal.operations/AbstractOperation.java 3. Open the Project Explorer to src -> org.eclipse.example.calc 4. Right click on org.eclipse.example.calc 5. Select Replace With -> Head Revision 6. Click OK to the dialog box 7. The changes in AbstractOperation.java will be lost even though they do not fall under the hierarchy of org.eclipse.example.calc
(In reply to comment #0) > 2. Make a change to > org.eclipse.example.calc.internal.operations/AbstractOperation.java > 3. Open the Project Explorer to src -> org.eclipse.example.calc > 4. Right click on org.eclipse.example.calc > 5. Select Replace With -> Head Revision > 6. Click OK to the dialog box > 7. The changes in AbstractOperation.java will be lost even though they do not > fall under the hierarchy of org.eclipse.example.calc AbstractOperation, at a filesystem level, is nested within the org.eclipse.example.calc folder. When you ask that folder to have its contents replaced, then your AbstractOperation will also be replaced. The "hierarchy" shown in the view is merely a visual representation. If you changed the setting to not show packages as being "flat" then they would be nested like subfolders.
What's the API to use for getting the information about packages, considering the EGit is project-type agnostic? We need to be able to iterate both the file system (which I guess is the easy part), but also index and a tree according to the same rules.