RubyMine 2016.1 Help

Comparing Deployed Files and Folders with Their Local Versions

Correspondence between files and folders under the project root and their copies on a server is set through server access configuration mappings. Please note, that for the sake of simplicity any file or folder under the project root is referred to as local and any file or folder on the server is referred to as remote, even if the server is installed on your machine. For details, see Working with Web Servers: Copying Files. For details, see Configuring Synchronization with a Web Server.

It is clear, that a local file or folder can be mapped to an unlimited number of remote counterparts, while each remote file or folder is mapped to one and only one file or folder respectively.

Consequently, for each remote file or folder, RubyMine unambiguously detects its local version to compare with, so you can have remote items compared with their local counterparts at any time. On the contrary, remote versions of local files or folders cannot be identified uniquely, therefore RubyMine can compare local items only with their remote versions mapped through the default server access configuration.

RubyMine provides a dedicated Differences Viewer for Folders for comparing files in remote folders and their local versions against the file size, content, or timestamp. The Differences Viewer shows the contents of the local and remote directories in the Item List, in the left and right panes respectively. The contents of the selected file are shown in the lower pane, with the differences being color-highlighted.

The remote files in the Difference Viewer have the status read-only. This means that you cannot update them directly in the Difference Viewer. Make all the necessary changes to the local version of the file in question and upload the updated file to the server.

Besides exploring differences, the tool also provides interface for synchronizing the contents of folders.

In this section:

Opening the Remote Host Tool Window

Do one of the following:

  • On the main menu, choose Tools | Deployment | Browse Remote Host.
  • On the main menu, choose View | Tool Windows | Remote Host. Note that the tool window can be accessed this way after you have opened it using the Tools | Deployment | Browse Remote Host.

Comparing a Remote Folder with Its Local Version

  1. Open the Remote Host tool window.
  2. Select the folder in question. Then choose Tools | Deployment | Sync with Local on the main menu or Sync with local on the context menu of the selection.
  3. In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable.

Comparing a Remote File with Its Local Version

  1. Open the Remote Host tool window.
  2. Select the file in question, and then choose Compare with local version on the context menu of the selection.
  3. In the Differences Viewer for Files dialog box, that opens, explore the differences and apply them, if necessary, using the icon_InsertReplace and icon_InsertReplace2 buttons. For details, see Viewing Differences Between Files.

Comparing a Local Folder with Its Remote Version

This action is available only if you have a default server access configuration appointed.

  1. Select the folder in question in the Project tool window, and then choose Tools | Deployment | Sync with Deployed to <default server access configuration> on the main menu.
  2. In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable.

Comparing a Local File with Its Version on a Server

This action is available only if you have a default server access configuration appointed.

  1. Select the file in question in the Project tool window, and then choose Tools | Deployment | Compare with Deployed Version on <default server access configuration> on the main menu.
  2. In the Differences Viewer for Files dialog box, that opens, explore the differences and apply them, if necessary, using the icon_InsertReplace and icon_InsertReplace2 buttons. For details, see Viewing Differences Between Files.

Comparing Two Folders in the Difference Viewer

Configure the layout of the Items List. Use the toolbar buttons to narrow down or widen the set of items to show. For example, show or hide files that are present only locally or remotely, equal files, different files, files excluded from synchronization, etc.

Specify the parameter for comparison. In the Compare by drop-down list, select one of the possible options (contents, size, or time stamp). Filter the folders' contents. To do that, type filtering string in the Filter text field, and press Enter to apply it. Using the asterisk * wildcard to represent any number of characters is welcome. To switch to another pair of folders to compare, update the fully qualified paths to them. Click the Browse button browseButton.png next to the Paths read-only fields and choose the required folders in the dialog that opens. Explore the detected differences between files in the Differences Pane.
Comparing folders

Synchronizing Contents of Folders

The contents of the remote folder are always shown in the right-hand pane of the Items List, the contents of its local version are always shown in the left-hand pane.

  1. For each pair of items, in the * field specifies the action to apply. Click the icon in the field until the required action is set.
    • arrow_right the file will be uploaded, possibly overwriting the remote version.
    • arrow_left the file will be downloaded, possibly overwriting the local version.
    • equal the files are treated identical with regard to the selected criterion of comparison. No action will be performed by default.
    • not_equal the files differ with regard to the selected criterion of comparison. No action will be performed by default. Explore the differences in the Differences Pane of the Difference Viewer and change the intended action by clicking the icon.

      The remote files in the Difference Viewer have the status read-only. This means that you cannot update them directly in the Difference Viewer. Make all the necessary changes to the local version of the file in question and upload the updated file to the server.

    • close the file is present only locally or remotely and will be removed.
  2. Do one of the following:
    • To synchronize the currently selected item, click the Synchronize Selected button debug_resume.gif on the toolbar.
    • To synchronize all the items, click the Synchronize All button rerun.png on the toolbar.

See Also

Last modified: 21 July 2016