Community
Participate
Working Groups
Build Identifier: 20100617-1415 We have a custom eclipse plugin and we generate some source files from an external DSL. Those gets updated whenever the DSL changes. Due to the fact, that we have to share the generated file via SVN they are also checked in. When we execute a "Project -> Clean" the generated source files get removed and then get added back. Subversive subsequently shows them as "Replaced, not added". This alone would not be so bad, but the recreated files still show up in the synchronize view. even though they have absolutely no changes. I created a very simple custom eclipse plugin that does something similar: - It registers an IncrementalProjectBuilder on a project that is called "subversive-bug" (not any other project) - It then scans the Java Files for String literals and outputs the number of String literals to a file, sorted by name. i.e. Foo.Java: 2 Bar.java: 1 This file is also deleted during "Clean" and subsequently regenerated. It shows the same problems. The source code of that small plugin is available on github: https://github.com/kungfoo/subversive_filestatus_plugin Reproducible: Always Steps to Reproduce: Directions for setup: - Have a clean install of Eclipse with Subversive and JavaHL 1.6 Connector installed. - Download this archive -> https://github.com/downloads/kungfoo/subversive_filestatus_plugin/subversive-bug-data.zip and extract it somewhere. - Copy the plugin jar from the extracted plugins folder to your clean eclipse install plugins folder. - Start eclipse with a new, clean workspace. - Go into your newly created workspace folder and do svn checkout file:///{folder where you extracted the archive}/subversive-bug-repo subversive-bug - In Eclipse: File -> Import -> Existing Projects -> Choose the subversive-bug folder you just checked out. Directions to reproduce: - Make sure Project -> Build automatically is ticked. - Create a new Java File in the project. - Observe that offending-file gets updated (the plugin counts the String literals in *.java Resources) - Commit the changes, so you can revert back later. - Execute a Project -> Clean. - Observe how the file gets created again, with the same content, yet svn now marks the file with '?', even though there is no changes. - Also observe that the file shows up in the synchronize view, even though there are no changes.
Thank you for the detailed explanation, although it tells me that the problem is not related to the Subversive, but to the tool that regenerates these files. Why? The reason is simple: replacing is the function of Subversion, it happens when you first perform deletion of the selected resource through SVN API, then addition of a new one with the same name. And so, Subversive reacted just like it was instructed by external code. In order to avoid the "replaced" state from happening external code should have just rewrited the file content, or deleted then created file using Java (not Eclipse Platform) file functions. If the project that performs DSL processing is hosted on the Eclipse.org site, we can reassign the report to the corresponding component. If not then I will close the report with the "NOT_ECLIPSE" resolution.
The way it works seems to be correct according to the actions performed by a DSL tool.