Bug 202463 - Option to enable/disable remote synchronization
Option to enable/disable remote synchronization
Status: NEW
Product: php
Classification: Unclassified
Component: FTP Support
8.0
PC Windows 8 x64
: P3 with 8 votes (vote)
: TBD
Assigned To: Tomas Mysik
issues@php
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-22 01:11 UTC by dazweeja
Modified: 2015-11-18 08:55 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dazweeja 2011-09-22 01:11:11 UTC
I use the Netbeans "Upload on save" functionality with a remote FTP server. It generally works well and to me, it implies that if I create, edit, rename, or delete a file *within* the Netbeans IDE, this will be replicated on the server. However, it seems to go far beyond this with potentially serious consequences. Activity happening outside the IDE is also replicated on the server, taking the control away from the user. This is not desirable - the function has transformed from a user-initiated process to an automatic one without the consent of the user. Please make (automatic) "remote synchronization" an optional feature and not mandatory. "Upload on save" functionality in programs like Dreamweaver do the job just fine - external changes to the source folders appear in the folder view, and you are notified if an open document has been changed on the server, but no changes are made to the remote host without being initiated by a user action within the IDE.
Comment 1 Tomas Mysik 2011-09-22 08:01:29 UTC
Not sure whether it is doable since we (PHP) simply get the events from FS. However, you can try to disable auto-scanning of sources [1], it might work for you.

Let me know if it helps you, thanks.
[1] Tools > Options > Miscellaneous > Files
Comment 2 dazweeja 2011-09-22 08:50:37 UTC
Thank you for your fast response. I disabled that option but it doesn't seem to fix the problem because a) it still scans and makes changes to remote files on startup and b) there's no auto-scan (obviously) which is actually useful.

I was hoping for a solution where "Remote Synchronization" and "Upload on Save" were split into separate options. That is:

1. Remote synchronization: keeps local and remote files synchronized. Listens and repsonds to FS events.

2. Upload on Save: uploads/deletes/moves only in response to internal IDE events, eg. an IDE  file save initiates the FTP upload procedure (chained command style). Auto-scanning still takes place but no action is taken on remote files in response to FS events. I guess one issue with this is dealing with conflict in externally-changed open files. For this, Dreamweaver brings up a dialog, "File has been modified externally. Do you want to reload it?", which is sufficient.
Comment 3 Tomas Mysik 2011-09-22 09:14:45 UTC
(In reply to comment #2)
> I was hoping for a solution where "Remote Synchronization" and "Upload on Save"
> were split into separate options.

Unfortunately IMHO not possible but I will try to investigate (after NB 7.1).
Comment 4 virgokid 2012-04-13 19:30:50 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I was hoping for a solution where "Remote Synchronization" and "Upload on Save"
> > were split into separate options.
> 
> Unfortunately IMHO not possible but I will try to investigate (after NB 7.1).

I know I would benefit from a way to temporarily disable remote sync when I need top make external changes.

Perhaps the "Upload Files" option can be replicated to a more accessible place.  This way a user could easily switch from "On Save" to "Manual", or "On Run" when making external changes that are not intended to be uploaded to the server.

It would have to somehow be associated with the project in question as it is possible to have multiple projects open simultaneously.

This is not exactly the original request but it may still be deemed helpful.  I know it would be for me.
Comment 5 kimek 2013-12-29 19:24:46 UTC
I am with virgokid@netbeans.org and option to easily switch from "On Save", "Manual" or "On Run/AutoSync" for all project as also for individual folders/files.
Comment 6 barrystaes 2014-08-18 09:32:57 UTC
(In reply to Tomas Mysik from comment #1)
> Not sure whether it is doable since we (PHP) simply get the events from FS.

Thanks, i was looking for this info.

I also encountered this issue in NetBeans 8. While i deleted the local copy of a big binary directory via Windows Explorer, NetBeans triggered and started deleting this via FTP as well.

I'd advocate having Upload-On-Save actually trigger on the IDE save operation, and making Upload-On-FileSystem-Change a seperate option. 

I no longer dare having NetBeans8 open while doing ANY file mutations outside of it, i now wonder what else it changed on the FTP site without my intention. :S
Comment 7 Tomas Mysik 2014-08-18 09:48:44 UTC
Not a defect, please do not change it. Thanks.
Comment 8 xnau 2014-09-02 21:04:06 UTC
I also think that "upload on save" does not imply synchronization, and the two should not be joined into a single feature.

If it's not possible to separate the two, the configuration dialog should at least explain the full consequences of using the "upload on save" feature.

While no-one seems to be suggesting the "synchronization" be eliminated, it certainly would be an improvement to usability to give more granular control over this feature.
Comment 9 karsonito 2014-09-08 11:53:04 UTC
I second previous commentator. This is danger behavior of netbeans to sync changes maked outside of IDE.
Please add option "Upload external changes" like in PhpStorm:
"Select this check box to have PhpStorm upload also the local changes that were made using a third-party tool."
Comment 10 lemon_juice 2014-09-21 18:07:01 UTC
I agree with the request and I think this should have a higher priority because this can be a dangerous feature! And also I don't consider it enhancement but a defect, because upload files "On Save" doesn't imply synchronization of files saved outside Netbeans and is misleading.

I had a few cases of some files on my server being overwritten without my consent just because I opened a project after a few months of not working on it and suddenly I saw some ftp activity in the log. In certain scenarios this could be fatal!

If you are only getting events from the FS then can't Netbeans be changed so that you get events from Netbeans that initiates/finishes file saving process? In my opinion this should happen because the current implementation is inconvenient, dangerous and misleading - it can sometimes be handy but only as an optional behaviour.

As a minimal fix I think the naming should be changed to something like "On Save by Any Application" or to something meaning "Synchronization".
Comment 11 jimbrooking 2015-11-18 03:00:20 UTC
This "automatic sync outside the IDE" has damaged more than one file on me. Scenario:

1. Outside the IDE, start to FTP a large file from my site on the server
2. NetBeans sees the partially downloaded file in the local directory and starts uploading it to the file being downloaded.
3. non-Netbeans FTP gets an error because the remote file can't be accessed.
4. Both files - on my local machine and on the server - are truncated and broken. 

This is clearly a bug. It has broken many graphics images, PDFs, and error logs!
Comment 12 Tomas Mysik 2015-11-18 08:55:23 UTC
The original report "Option to enable/disable remote synchronization" is not a bug, definitely. If you have any issues, please submit them as a new report with IDE log and exact steps to reproduce.

Thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo