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.

Bug 197782 - allow overwriting Files when copying within trees
Summary: allow overwriting Files when copying within trees
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0.1
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 09:55 UTC by wegus
Modified: 2015-09-15 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wegus 2011-04-15 09:55:44 UTC
Java Projects are normally deployed as one JAR-File. PHP Projects consist of a bunch of Scripts. The .PHAR-Format from PHP is not wide spread yet. So you do handle a bunch of separate scripts.

So, when deploying a PHP-Project one will need to separate Code-Trees. One for development (commonly that's the Trunk of your Repository) and one for Deployment ( a branch or tag within the repos).

When you finished a task and hav changed and tested i.E. 7 files you got to copy them from your Trunk to your Deploy-Branch. Well in Netbeans you can't for existing files as Netbeans does not overwrite files, it renames them as same_name_1.php, same_name_2.php... 

Both Behaviours when copying do make sense. Unfortunately there is no choice when using Netbeans. To avoid renaming you have to delete the Files in the Destination first and then you can copy the new versions in. Or, even worse, you leave the IDE and change the Project by shell-command.

i would appreciate to simply have the choice wether existing Files should be overwritten or not. For PHP and other Script-Based Languages this would be a small but effective change. I would appreciate such an Option in the Settings of the Project- or File-View.

Thanx for reading and evaluating this proposal!
Comment 1 stmsat 2015-09-15 09:14:27 UTC
This is an issue not limited to php projects. I may have good reasons to overwrite any type of file: pictures, .java, .js, .css, .html, .properties, .xml, .jar, .jnlp. If I have a versioning system in place I really don't need this over-protective behavior (even though I may like it in a minority of cases).

Example 1:
I maintain a maven artifact which is a web module containing jnlps and jars for an applet/java web start application (used inside a web application). When I release a new version I overwrite the jars generated from another project (they can't be used as artifacts because they don't go in the classpath). I don't need the old jars/jnlps as they are already in the maven repository.

Example 2:
A colleague in project A has redone a bunch of pictures I use in my project B (not all of them, only a bunch which are shared between the two projects); I want to overwrite all such pictures (let's say I can isolate those that got modified in a particular changeset/since a specific date) with no remorse; do I have to hand-rename or hand-delete every one of them? They are in our mercurial history already, I can revert the operation anytime and anyhow I want.

Example 3:
Let's say I have a tool that generates code (i.e. the minified version of some javascript library, java sources generated from a wsdl), and for some reason the output folder is not the final position in my project. At this point I want to overwrite the old version of the code in my project without wiping out everything beforehand.

At the moment I have to use the plugin "QuickOpener" to fallback to OS tools for such operations.