[Contents] [Prev. Chapter] [Next Section] [Next Chapter] [Index] [Help]

8    Compare

This chapter provides an overview of the Compare Tool's features and capabilities. For more detailed information on how to use this tool, choose Help: On Compare. You can print Help topics using the HyperHelp Viewer.

Compare allows you to compare the contents of two files and display the results of the comparison in a window, using either lines or filled polygons to indicate the differences between the two files. It is similar to dxdiff, which is available as a standalone tool on Digital UNIX systems.

Figure 8-1:  Compare Main Window

Key elements are the major window panes running from the top to the bottom of the window:

Configuration area

Displays the current project and working directory.

Display area

Presents a graphical view of the highlighted differences between the selected files in a scrollable window.

Push buttons

Let you move through the differences.

Information area

Displays information messages and Quick Help on menu items when you press and hold MB1 on the item.


[Contents] [Prev. Chapter] [Next Section] [Next Chapter] [Index] [Help]

8.1    Summary of Features

Compare does the following:


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.2    Requirements for Using Compare

Compare assumes that the following system utilities are present in your directory path:

You must be able to execute these utilities in command-line mode without having to specify a relative pathname. For example:

% diff test1.c test2.c

Compare, like diff, allows you to perform a comparison of the contents of text (ASCII) files only.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.3    Starting Compare

You can start the Compare tool in several ways:


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.3.1    Use the Command Line

You can start Compare from the command line using the following command:

% fusecompare [-Xt-Options] [-cwd] [file-1] [file-2]

See Appendix Appendix D and the specific reference pages for the command syntax and options. Appendix Appendix D also has syntax for the fusemerge command, which starts the Compare tool in merge mode.

If the Control Panel is not running, it starts automatically as a minimized icon. If FUSE is already running, Compare is placed in the current project..


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.3.2    Use the Compare Icon from CDE

When you have CDE installed, FUSE provides a FUSE application group icon and icons for the individual tools that make up the FUSE environment.

To invoke Compare:

  1. Double click on the Application Manager icon in the CDE Front Panel to display the application group icons.

  2. Double click on the FUSE application group icon to display the icons in the FUSE application group.

  3. Double click on the Compare icon to start the tool.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.3.3    Use the FUSE Control Panel

To start Compare from the FUSE Control Panel, select Compare from the Tools menu. Like all tools, Compare inherits its configuration data from the project settings.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.3.4    Use the Tools Menu from Most FUSE Tools

Most FUSE tools have a Tools menu. To start a tool, select the tool from the Tools menu.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.4    Comparing the Contents of Files

To perform a comparison between the contents of two text files:

Step Action

1

Choose Compare... from the File menu. Compare displays the Compare dialog boxes, allowing you to specify the respective locations of the files to be compared.

2

In the Left File field, enter the full pathname and file name of one of the files to be compared. Optionally, use the Pick button to display Select Left File dialog box and choose the pathname and file name.

3

In the Right File field, enter the full pathname and file name of the second file to be compared. Optionally, use the Pick button to display Select Right File dialog box and choose the pathname and file name.

4

Optionally, click on the New Window toggle to display the results of the compare in a new window. This is useful when you want to compare the contents of numerous pairs of files.

5

Click on OK.

Compare displays the contents of the two files in the main window, using lines in the difference display area to highlight the differences between the contents of the files.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.5    Customizing the Compare Main Window

The items in the Display menu allow you to alter Compare's display mechanism so that you can interpret the information in the main window more easily. There are three areas in which you can customize the main window:

For information on how to customize these features, see the online Help for Compare.

The Options menu in the Compare main window allows you to modify various features of your local Compare environment, such as colors, fonts, and the size and position of tool windows.


[Contents] [Prev. Chapter] [Prev. Section] [Next Section] [Next Chapter] [Index] [Help]

8.6    Using the FUSE Editor with Compare

After displaying the differences between two files, you can invoke the FUSE Editor. There are several ways to load a file into a FUSE Editor buffer. Choose one of the following:

At this point, you can then edit the file using all the functionality normally associated with the FUSE Editor.


[Contents] [Prev. Chapter] [Prev. Section] [Next Chapter] [Index] [Help]

8.7    Merging Files Using Compare

Compare allows you to merge the differences of two files based on a parent file (that is, a common ancestor). When you merge two files, Compare displays the differences as with a normal Compare operation, and allows you to choose which differences from the left and the right file that you want to merge into a new file. It also shows any conflicts between the files and lets you step through the conflicts. For additional information on how to perform a merge operation, see the online Help for Compare.


[Contents] [Prev. Chapter] [Prev. Section] [Next Chapter] [Index] [Help]