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 179347 - remote synchronization occurs when downloading files
Summary: remote synchronization occurs when downloading files
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: FTP Support (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: RANDOM
: 180378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-09 16:57 UTC by Filip Zamboj
Modified: 2011-06-08 09:01 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Fix (1.99 KB, patch)
2010-08-10 20:33 UTC, esminis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Zamboj 2010-01-09 16:57:49 UTC
Product Version: NetBeans IDE Dev (Build 100107-32809d756144)
Java: 1.5.0_20-rev; Java HotSpot(TM) 64-Bit Server VM 1.5.0_20-rev-b03

let's have upload on save on 
if you download files using context menu then after each file you download it's uploaded back to server. So, the same file as you download is uploaded back ... would be more efficient and faster if this wouldn't happen.
Comment 1 Tomas Mysik 2010-01-11 02:07:18 UTC
Sorry, not possible to find out the source of the file-change event and in fact, it's against the idea behind upload-on-save fundtionality.
If it's really problem, then disable upload-on-save, download files and enable upload-on-save again.
Comment 2 Tomas Mysik 2010-02-07 05:22:18 UTC
Reopening because of bug #179347.
Comment 3 Tomas Mysik 2010-02-07 05:22:41 UTC
*** Bug 180378 has been marked as a duplicate of this bug. ***
Comment 4 Tomas Mysik 2010-02-07 05:25:23 UTC
OK, I will add some UI for temporary disabling of upload-on-save feature, I hope it will be possible.
Comment 5 Tomas Mysik 2010-02-09 05:32:51 UTC
Fixed, it should work (but not for opened files in the editor, these are uploaded back, sorry this seems to be not fixable). If not, please reopen and provide exact steps to reproduce.

Filipe, please, check that upload-on-save is not broken.

Thanks.
http://hg.netbeans.org/web-main/rev/bad3bd9d59e4
Comment 6 Quality Engineering 2010-02-10 02:21:33 UTC
Integrated into 'main-golden', will be available in build *201002100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/bad3bd9d59e4
User: Tomas Mysik <tmysik@netbeans.org>
Log: #179347: remote synchronization occurs when downloading files
Comment 7 Filip Zamboj 2010-02-11 05:55:58 UTC
v/c
Product Version: NetBeans IDE Dev (Build 2010-02-11_03-04-28 )
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
Comment 8 Filip Zamboj 2010-02-11 06:50:26 UTC
closed to fast :) - I reproduced => not done yet.
Comment 9 Tomas Mysik 2010-02-11 06:52:19 UTC
Sometimes it works, sometimes does not. I will try to investigate why.
Comment 10 Tomas Mysik 2010-02-25 06:31:45 UTC
It's random and seems to be a bug in FS, I will investigate more...
Comment 11 Tomas Mysik 2010-02-25 08:03:46 UTC
Caused by using java.io.File in download method of the remote client.
Comment 12 Tomas Mysik 2010-04-06 10:01:08 UTC
Perhaps too risky for NB 6.9.
Comment 13 esminis 2010-08-10 20:33:17 UTC
Created attachment 101291 [details]
Fix

Attached fix.

Basically this is what happens:
1. netbeans.php downloads file
2. netbeans.php overwrites current file, so time of last file change is modified
3. netbeans.php gets events of file modification
4. netbeans.php uploads file back, becouse after all file changes it does so

My fix makes netbeans.php ignore fileChange event if file has been downloaded by netbeans.php itself
Comment 14 Filip Zamboj 2010-08-11 11:58:24 UTC
thanks for the fix. We will have a look.
Comment 15 Tomas Mysik 2010-08-13 09:47:54 UTC
Radku, could you please review the patch? I'm not sute it is correct.
Comment 16 Filip Zamboj 2010-09-15 12:36:51 UTC
batch reassigning
Comment 17 Tomas Mysik 2011-06-03 10:18:32 UTC
Batch reassigning.
Comment 18 Tomas Mysik 2011-06-08 09:01:09 UTC
This should work now I think since we are using FileObjects only. If not, please reopen, I will investigate more.

Thanks.