Bug 564643 - Create patch duplicates entries for files inside new packages/directories
Summary: Create patch duplicates entries for files inside new packages/directories
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-25 05:23 EDT by Alessandro Palma CLA
Modified: 2021-12-07 11:27 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Palma CLA 2020-06-25 05:23:08 EDT
Creating a patch by clicking on a parent folder containing a new package/directory results in files in the package/directory being duplicated in the created patch.

How to reproduce:
- in a project, create a new package xxx
- inside xxx, create a new class yyy
- create a patch starting from src directory
the created patch will contain the diff for yyy.java twice.

### Eclipse Workspace Patch 1.0
#P TEST
Index: src/xxx/yyy.java
===================================================================
--- src/xxx/yyy.java	(nonexistent)
+++ src/xxx/yyy.java	(working copy)
@@ -0,0 +1,5 @@
+package xxx;
+
+public class yyy {
+
+}
Index: src/xxx/yyy.java
===================================================================
--- src/xxx/yyy.java	(nonexistent)
+++ src/xxx/yyy.java	(working copy)
@@ -0,0 +1,5 @@
+package xxx;
+
+public class yyy {
+
+}

This doesn't happen creating the patch by clicking on the new file, but this is not acceptable when there are many files I want to include in a patch (I should click on every single file skipping new directories).

This doesn't happen only for java classes, I think for any kind of file (also xhtml in my case).

This is happening since I moved to Photon and this wasn't happening with previous releases (Oxygen, Neon, Mars) I worked with.
Comment 1 Rolf Theunissen CLA 2020-06-25 07:11:32 EDT
Can you reproduce the problem on the latest release, Eclipse 2020-06?
Comment 2 Alessandro Palma CLA 2020-06-25 10:02:29 EDT
(In reply to Rolf Theunissen from comment #1)
> Can you reproduce the problem on the latest release, Eclipse 2020-06?

Yes I do, on a fresh installed "Version: 2020-06 (4.16.0) - Build id: 20200615-1200".
I have to say that I've also installed Subclipse from Marketplace (https://marketplace.eclipse.org/content/subclipse).
Comment 3 Ihar Filipau CLA 2021-12-06 10:00:11 EST
The bug still happens on Eclipse: "Version: 2021-06 (4.20.0)", "Build id: 20210612-2011"
Comment 4 Ihar Filipau CLA 2021-12-07 11:27:52 EST
In the "Create patch" there is now "Next >" button. In the next screen, select "Project". (That seem to "fixed" the issue in my tests. And also "fixed" another brokennes: colleagues couldn't apply patches. Because in the team everyone names projects differently.)

Whatever this "Multi-Project Apply Patch wizard" thingy is, it's plainly broken. (And "Create patch" dialog seem to hard default to always preselect "Workspace".) Anyone has any idea how to disable/change it?

Thanks.