FTP Synchronization States and Conflicts

Synchronization States

Conflicts

Exceptions to Synchronization Rules

Hiding the Status Display

 

Synchronization States

Because copies of a file can be found on both the client and the server, the FTP filesystem maintains a set of states to describe the status files on the client and server. The state is found to the right of the filename in brackets [].  The client state is shown first, followed by the server state.  The states are separated by a vertical bar.  (The state display is enabled by default, but can be disabled. See FTP Filesystem Properties.)

A file on the client or server can be in one of five possible states:

State Name

Description

New

File is new

Modified

File has changed

Missing

File has disappeared

UpToDate

File has not changed

NoSuchFile

No physical file exists

In the following example, the state of the client and server copies of the file Test.java is UpToDate on the client and UpToDate on the server.

If AutoSync is unchecked, and you change the client copy of Test.java, the state of the client and server copies of Test.java is Modified on the client and UpToDate on the server.

For Java files, NetBeans treats the Java file and the corresponding Class file(s) and Form files as one file node in Filesystems.  In an FTP filesystem, this results in a status followed by an asterisk (*).  The asterisk indicates that the status has been derived from more than one status.  

When a status shows an asterisk, the most severe status is displayed.  The precedence for the status value is as follows:

    

The following actions are performed based on the state of the client and server copies of a file:

Client State

Server State

Sync or AutoSync Action

UpToDate

UpToDate

None

UpToDate

New

Conflict dialog

UpToDate

Modified

Server —> client

UpToDate

Missing

Client —> server

UpToDate

NoSuchFile

Client —> server

New

UpToDate

Conflict dialog

New

New

Conflict dialog

New

Modified

Conflict dialog

New

Missing

Conflict dialog

New

NoSuchFile

Client —> server

Modified

UpToDate

Client —> server

Modified

New

Conflict dialog

Modified

Modified

Conflict dialog

Modified

Missing

Conflict dialog

Modified

NoSuchFile

Client —> server

Missing

UpToDate

Server —> client

Missing

New

Conflict dialog

Missing

Modified

Conflict dialog

Missing

Missing

None

Missing

NoSuchFile

Ignore file

NoSuchFile

UpToDate

Server —> client

NoSuchFile

New

Server —> client

NoSuchFile

Modified

Server —> client

NoSuchFile

Missing

Ignore file

NoSuchFile

NoSuchFile

Throw exception

 

Conflicts

A file is marked with a red exclamation point (!) when the FTP filesystem cannot determine which copy of a file -- client or server -- is more recent.

     

When a conflict occurs, the conflict resolution dialog box is displayed.

    

You can select one of three actions:  

Server —>  client copies the server file to the client.

Client —>  server copies the client file to the server.

No Action causes Distributed NetBeans to take no action to resolve the conflict.  The file remains marked with a red exclamation point.

After you select the action you want to occur, click Synchronize or Cancel.

 

Exceptions to Synchronization Rules:  PDF, XML, and Java Files

During the refresh or synchronization operation on an FTP file system, PDF, XML, and Java files do not necessarily follow the predefined refresh or synchronization rules.

-  If PDF files are not present in a local FTP directory but are present in a remote FTP directory, PDF files are always copied to the local FTP directory.

-  If XML files are not present in a local FTP directory but are present in a remote FTP directory, XML files are copied to the local FTP directory when NetBeans parses XML files to find the right association (for example, Ant XML or other  XML).

-  If Java files are not present in a local FTP directory but are present in a remote FTP directory, Java files are copied to the local FTP directory when NetBeans parses Java files for class browsing.

 

Hiding the Status Display

The synchronization status of files can be hidden for an FTP filesystem by selecting the FTP filesystem (marked with ) in Filesystems.  Right click and select Properties, then clear the check box next to the Display Status property.