This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans (7.0 beta) issues a Subversion remove for every time a file disappears from the working directory, be it from a NetBeans action or external action such as a mass file update or regeneration. This is rarely if ever desired, especially as it happens without warning or permission. It breaks the history of what should be a net update. Scenario - run JAXB command to generate schema-handler Java source files. This deletes and recreates *.java files, typically with the same names in the same package as previously. If these files are version controlled, as sometimes they are, then one has to shut down NetBeans before and restart after this regeneration, otherwise it automatically SVN removes all the files, then SVN adds the same files as new, breaking the history. This is unacceptable. NB should only remove from (or add to) the repository as the result of an explicit version-control command, not implicitly and in so consistently damaging a way.
We'll try to deal with it an find some better heuristics. It has probably become more visible and irritating for someone with the new filesystem watcher built inside NetBeans. In the meantime, please run the IDE with -J-Dorg.netbeans.modules.subversion.deleteMissingFiles=false - this one turns the automatic metadata correction off.
That is an excellent solution. I suggest only that NB reverse the default and require an explicit "-J-Dorg.netbeans.modules.subversion.deleteMissingFiles=true" to enable the feature, with accompanying fanfare to educate us on the feature.
How exactly does the generator work? It removes *.java files an recreates them. But does it also remove parent packages? Does it somehow touch any folder? Because if it does (if it removes a folder/package) i am afraid the working copy gets broken (metadata will be deleted along with the files and folders). And one more thing, if we don't svn rm the files and the generator simply removes a file and does not recreate it (possibly because the definition of the class is removed from the model), the file will remain *missing* in the WC. What would you suggest we should do in such case? Will you be satisfied with the missing status of such file?
Regarding, "if we don't svn rm the files and the generator simply removes a file and does not recreate it (possibly because the definition of the class is removed from the model), the file will remain *missing* in the WC. What would you suggest we should do in such case? Will you be satisfied with the missing status of such file?" What does "WC" mean? I can only speak for myself, but of course I would be satisfied with that status. Why wouldn't I be? What does *not* satisfy me is the removal from Subversion without permission, without even warning, and without documentation that this is what happens. The risk incurred by failing to remove a file from SVN is much, much lower than the risk incurred by inappropriate removal of a file. Who in the world ever thought it was a good idea to quietly destroy the source repository? HUGE mistake!
> Who in the world ever thought it was a good idea to quietly destroy the source repository? HUGE mistake! Well, actually, ruby users. They run external scripts that delete (not svn rm, but simple filesystem remove) files in WC (working copy) and eventually complain that the files remain missing and during a subsequent update are recreated instead of removed from the repository. Don't take me wrong, with my previous comment i simply wanted to make sure that you understand all consequences. But you did not answer my first question. Does the external generator removes also folders or just files?
just for info: the current behavior is the result of the fix for bug #142698
*** Bug 153504 has been marked as a duplicate of this bug. ***
fix: http://hg.netbeans.org/core-main/rev/8aba47cac335
Integrated into 'main-golden', will be available in build *201102260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8aba47cac335 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: Issue #194998 - NB too aggressive with implicit "svn rm"