beautypg.com

Comparing files for differences – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 413

background image

Comparing files for differences

To the top

Compare local and remote files for differences
Compare before putting files
Compare files when synchronizing

Compare local and remote files for differences

Dreamweaver can work with file comparison tools (also known as “diff tools”) to compare the code of local and remote versions of the same file,
two different remote files, or two different local files. Comparing local and remote versions is useful if you’re working on a file locally and you
suspect the copy of the file on the server has been modified by someone else. Without leaving Dreamweaver, you can view and merge the remote
changes into your local version before putting the file to the server.

Comparing two local files or two remote files is also useful if you keep previous, renamed versions of your files. If you’ve forgotten the changes
made to a file from a previous version, a quick comparison will remind you.

Before you start, you must install a third-party file comparison tool on your system. For more information on file comparison tools, use a web
search engine such as Google Search to search for “file comparison” or “diff” tools. Dreamweaver works with most third-party tools.

Specify a comparison tool in Dreamweaver

1. Install the file comparison tool on the same system as Dreamweaver.

2. In Dreamweaver, open the Preferences dialog box by selecting Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh),

and then select the File Compare category.

3. Do one of the following:

In Windows, click the Browse button and select the application that compares files.

On the Macintosh, click the Browse button and select the tool or script that launches the file comparison tool from the command line, not
the actual comparison tool itself.

Launch tools or scripts are typically located in the /usr/bin folder on your Macintosh. For example, if you want to use FileMerge, browse to
/usr/bin and select opendiff, which is the tool that launches FileMerge.

The following table lists common file comparison tools for the Macintosh and the location of their launch tools or scripts on your hard disk:

If you use

Select the following file

FileMerge

/usr/bin/opendiff (or /Developer/usr/bin/opendiff)

BBEdit

/usr/bin/bbdiff

TextWrangler

/usr/bin/twdiff

Note: The usr folder is normally hidden in Finder. However, you can access it with the Browse button in Dreamweaver.
Note: The actual results displayed depends on the diff tool you are using. Check the user manual for your tool to understand how to interpret the
results.

Compare two local files

You can compare two files located anywhere on your computer.

1. In the Files panel, Control-click (Windows) or Command-click (Macintosh) the two files to select them.

To select files outside your defined site, select your local disk from the left pop-up menu in the Files panel and then select the files.

2. Right-click one of the selected files and select Compare Local Files from the context menu.

Note: If you have a one-button mouse, Control-click one of the selected files instead.

The file comparison tool starts and compares the two files.

Compare two remote files

You can compare two files located on your remote server. You must define a Dreamweaver site with remote settings before you can accomplish
this task.

406

This manual is related to the following products: