By Tomas Mysik on Mar 27, 2012
Hi all, today we would like to show you another improvement we have prepared for NetBeans 7.2. Today, let's talk a little bit about remote synchronization.
If you already use our simple (S)FTP client, this enhancement could be useful for you. Simply right click on Source Files and select Synchronize.
Please notice that the remote synchronization works better only on the whole project (it means that the Source Files must be selected). The Synchronize action is also available on individual files (more files can be selected at once) but the suggested operation (download, upload etc.) does not work so precisely. Also please notice that the suggested operations are not 100% reliable since the timestamps provided by FTP servers are not exact.
Once the remote files (their names and paths only, of course) are fetched, the main dialog appears:
As you can see, NetBeans tries to suggest you operations (upload, download etc.) which should be done for each individual file of your project. If you are interested only in some particular changes, you can simply filter the list:
Since we have a file conflict, we need to resolve it first. Fortunately this is very easy because we just select the desired file and click the Diff button . The remote version of our file is downloaded and compared with the local version. The resut is displayed in the dialog where you can easily apply and/or refuse the remote changes or even simply type manually to the local version of the selected file:
Once we are done with our changes, the operation for the selected file changes to Upload and the file is marked with * (since we made some changes). Please notice that if you now click the Cancel button, in fact no changes are done in our local file.
As you can see, if we have one or more files selected, we can change their operation to:
- no operation (file won't be synchronized)
- delete (both local and remote file)
- reset (the operation is resetted to the original one suggested by NetBeans and also all changes done via Diff action are discarded)
Now we are ready to synchronize our project. NetBeans will show us the synchronization summary (this dialog can be omitted, see the Show Summary checkbox on the previous image).
The synchronization itself starts and we can see its progress and of course its result.
As always, all the operations can be reviewed in the Output window.