File Compare/Merge options

This section describes the File Compare/Merge tool's options.

Setting File Compare/Merge options

You can use the File Compare/Merge options to configure the tool's behavior and screen display. You can only set options in the Main and Standalone File Compare/Merge windows.

Option settings globally impact product behavior. Many options are provided to enable you to configure File Compare/Merge to function in a way that you desire. Option settings are provided at a general level and at a more granular level for both file and folder comparisons.

The options available depend on which version of File Compare/Merge you are using. For example, if you are using the Main File Compare/Merge in the client, folder options are not available because this version does not allow you to compare folders. All options are available in the Standalone version.

To set File Compare/Merge options

  1. In the File Compare/Merge menu, choose Tools > Options ( Ctrl+O ).
  2. There are general options, and options specific to file or folder comparisons and merges. Select the page of options you want to change: General, File Comparison, or Folder Comparison.
  3. After you have completed making your changes, click OK .

Note: You can reset the options to their default values by deleting the config.properties user settings file found in your <username>\.fcm folder. (For example, in Windows it would be C:\Documents and settings\<user home>\.fcm\config.properties).

Back to top

General options

These are general options for File Compare/Merge. To access these options, choose Tools > Options > General.

Option Description
Open Panes For:

Opens File Compare/Merge ready for making the selected type of comparison on start-up: A File Comparison, A Folder Comparison, or the Last Type of Comparison made.

This option is not available when launching File Compare/Merge from within the client.

File History Limit

Populates the file history list with a maximum value. You can view the file history by clicking the DOWN ARROW to the right of Open New Comparison on the toolbar.

This option is not available when launching File Compare/Merge from within the client.

Immediately Start Comparison As New File/Folder Is Entered

Starts a comparison as soon as the file/folder is opened. If this option is not set, open the file/folder to compare, and click Reload Content on the toolbar to begin the comparison.

This option is not available when launching File Compare/Merge from within the client.

Open Comparison In Read-only Mode

Opens files that you are comparing in read-only mode.

This option is not available when launching File Compare/Merge from within the client.

Allow Editing For Read-only Files/Folders

Allows you to edit read-only files/folders.

This option is not available when launching File Compare/Merge from within the client.

Darken Pane While In Read-only Mode Darkens the UI pane to indicate the file/folder is read-only.
Enable Quick Start

Places the File Compare/Merge Quick Start icon in your Windows System Tray. (Note: This could be invisible if File Compare/Merge cannot find the required .dll file.)

This option is not available when launching File Compare/Merge from within the client.

Allow Only One Running Instance

Allows starting of only one instance of File Compare/Merge .

This option is not available when launching File Compare/Merge from within the client.

3-way Merge: Start With Empty Center Pane

Opens an empty third pane on switching to a 3-way merge.

This option is not available when launching File Compare/Merge from within the client.

3-way Merge: Allow Editing Only In Center Pane

Allows you to only edit the center pane (merged results) on switching to a 3-way merge.

This option is not available when launching File Compare/Merge from within the client.

3-way Merge: Put Left Scroll Bar on Center Pane Adds a left scroll bar to the center pane for a 3-way merge.
Tabs: On Bottom

Locates tabs containing your file/folder comparisons at the bottom of the UI by default. If this option is off, the tabs are located at the top of the UI just beneath the toolbar.

This option is not available when launching File Compare/Merge from within the client.

Tabs: Start New Comparison In A New Tab

Starts new comparisons in a new tab by default.

This option is not available when launching File Compare/Merge from within the client.

Tabs: Show Only One Comparison

Only allows one file/folder comparison. Selecting this option disables the Start New Comparison in a New Tab option.

This option is not available when launching File Compare/Merge from within the client.

For Next/Previous Change: Always Adjust Scroll Bar Automatically adjusts the scroll bar to the location of the next or previous change.
For Next/Previous Change: Adjust Scroll Bar Only If The Difference Is Off Screen Automatically adjusts the scroll bar to the location of the difference if it is not visible on the screen.

Back to top

File Comparison options

The following options apply to File type comparisons. To access these options, choose Tools > Options > File Comparison. Expand the links to view the options.

Main File Comparison options

Below are the options available on the first page of the File Comparison node.

Option Description

Ignore All White Space

ASCII characters 0x01 to 0x20 are removed from the text.

Ignore Leading and Trailing White Space

Ignores all leading or trailing white space in a line.

Ignore Differences in End-Of-Line Separators (CR and LF)

Ignores differences in end-of-line CR LF separators when comparing files. There are Windows (CR LF), Unix (LF) and Mac (CR) line endings that can affect your file comparisons. This is especially useful if you are comparing files that have been generated on a variety of operating systems.

Ignore Case

Ignores differences in character case within lines.

Insert Spaces Instead of Tabs

Inserts spaces instead of tabs.

Tab Size

Specifies the tab size.

Show Invisible Characters

Shows invisible characters in the editor panes, such as the trailing carriage return and/or line feed (CR LF) characters, and tabs and spaces.

This option does not affect the end-of-line characters used when files are saved -it only displays them visually in the editor pane. You can change the line endings using the Change Line Separator On Load, Use Line Separator On Enter, Change Line Separator On Copy, Change Line Separator On Paste, and Change Line Separator On Save Options.

Change Line Separator When File Opens

Designates line separators. You can choose from Platform SpecificNo ChangeWindowsUnix, or Mac.

Insert Line Separator On Enter

Determines the line separator to use whenever you enter a new line in the view pane. You can choose from Auto (need reload), Platform SpecificWindowsUnix, or Mac.

Change Line Separator On Copy

Determines the line separator that will be used in the copied text whenever you copy text in the view pane. You can choose from Platform SpecificNo ChangeWindowsUnix, or Mac.

Change Line Separator On Paste

This setting determines the line separator that will be used in pasted text. Using the combo box, you can choose from Auto (need reload), Platform specific, No change, Windows, Unix, or Mac.

Change Line Separator On Save

Determines the line separator that will be used when saving changes. You can choose from Platform SpecificNo Change, WindowsUnix, or Mac.

Editor Font

Changes the View pane editor font and size.

Show Line Numbers

Displays line numbers on the left side of each of the editor panes.

When File Opened, Auto Scroll To Difference

Scrolls automatically to the first difference found in your file comparison.

When File Opened, Reset Scroll to Beginning

Scrolls automatically to the beginning of the file in your file comparison.

Default Encoding

Specifies an encoding value to apply to your files. The Default Encoding value is System-Dependent, and it is applied to any new files that you open in File Compare/Merge.

Change Encoding For Opened Files

Changes the encoding automatically for files that you currently have loaded in File Compare/Merge. The value that you select for the encoding in the Default Encoding option is applied.

Inherit Encoding From Opened File

Specifies that if you replace the current file in a file comparison, the file that you open automatically inherits the encoding of the file that it is replacing. Without this setting activated, the file gets its encoding from the Default Encoding option.

Preliminary Comparison:

Internally compare two files (or two versions of the same file) first to decide if they are the same. If they are the same, then prompts the user that "Files are identical. Continue opening diff?". These options let you use a different set of settings when doing this initial comparison, than when doing the comparison which is actually displayed.

  • No Comparison. Does not perform an initial comparison, and never displays a prompt. In this case, if you compare two identical files, FCM just launches and shows the files.
  • Do Comparison Ignoring All Settings. Performs a comparison which ignores the settings.
  • Do Comparison Using All Settings. Performs a comparison which uses all the settings.
  • Do Comparison Firstly Ignoring And then Using All Settings. First performs a comparison ignoring the settings. If this comparison indicates there is a difference, the FCM performs another comparison using the settings. If the second comparison says there is a difference, then it prompts the user. The intent of this last option is to prompt if either type of comparison (Ignoring All Settings and Using All Settings) indicates that the files are the same.

Inline Differences

Use this options to control how inline differences are handled.

Option Description

Show inline differences

Performs detailed inline comparisons on changed lines highlighting insertions, changes, and so on.

Compare Lines By Characters As A Block

Compares and highlights differences inside a sequence of changed lines. All characters in the lines are scanned, and the text is divided by lines. You must enable Show Inline Differences to activate this option.

Compare Lines By Characters

Compares the characters in each line with the characters in the opposite line. For example, characters in the first line of the sequence are compared with the characters in the first line of the opposite sequence, characters in the second line of the sequence are compared with the characters in the second line of the opposite sequence and so on. This option is automatically activated when you enable  This option is automatically activated when you enable Show inline Differences.

Compare Lines By Words

Splits lines into words (or lexemes) using standard separators, and compares them. You must enable Show inline Differences to activate this option

Separate Differences

Enables you to Compare Lines By Characters, Compare Lines By Words, or Compare Lines By Words - Best Choice. The default setting is to compare lines at a granular level, by characters. Normally, File Compare/Merge presents sequences of differences for changed lines as a block. In other words, you can perform operations, such as Replace, Append, or Delete only on the block. If you have enabled this option, File Compare/Merge does not combine the sequences in a block. Instead it considers each pair of changed lines as a block. You must enable Show inline Differences to activate this option.

Best Choice

Compares all pairs of lines and selects the best ones. You must enable Show inline Differences to activate this option.

Minimum Word Size

Represents the minimum number of characters between separators that is considered as a word. You must enable Show Inline Differences to activate this option.

Acceptance Weight (Words*100+Chars)

Provides the criteria for File Compare/Merge to decide which lines should be considered a match and have their differences highlighted. The acceptance weight is equal to the number of hit words multiplied by 100, plus the total number of equal (matched) characters in the comparing lines. You must enable Show Inline Differences to activate this option.

Color Background

Highlights the background of the different characters in the line. You must enable Show inline Differences to activate this option.

The Highlight Characters option is not available with this option selected.

Strikethrough

Crosses out the characters in the line to show differences. You can also activate the Highlight Characters option along with this option.

Strikethrough and Highlight

Crosses out and highlights the characters in the line to show differences.

Underscore

Underscores he characters in the line to show differences. You can also activate the Highlight Characters option along with this option.

Underscore and Highlight

Underscores and highlights he characters in the line to show differences.

Left Color/Right Color

Changes the color within the line. You can set colors for both the right and left editor panes.

Smart Comparison

Apply these settings to compare files at a more granular level.

Option Description

Advanced Search Of Differences

Uses a special algorithm to finds swapped blocks and perform efficiently on large files, enabling you to use this option to improve performance when comparing large files. This option must be selected to enable the Detect swapped blocks option.

Detect Swapped Blocks

Detects swapped blocks of text. The Advanced Search Of Differences option must be selected to enable this option. The Hide Links Between Unselected Blocks, Shorten Differences, and Include Only Blocks With Unique Lines options are automatically selected by default when this option is enabled.

Hide Actual Difference Links Between Selected Blocks

Hides actual difference links between selected blocs. You can optionally activate this option when you activate Detect Swapped Blocks.

Hide Links Between Unselected Blocks

Hides links between unselected blocks. This option is activated by default if you choose to Detect Swapped Blocks.

Shorten Differences

Prevents Detect Swapped Blocks from creating expanded blocks (appending identical lines to blocks of changed lines).

Include Repeated Blocks

Includes repeated blocks. You can optionally activate this option when you activate Detect Swapped Blocks.

Ignore Repeated Blocks

Ignores repeated blocks. You can optionally activate this option when you activate Detect Swapped Blocks.

Include Only Blocks With Unique Lines

Ignores blocks not containing unique lines when a comparison is performed if Detect Swapped Blocks is activated.

Patterns

Use this option page to edit a list of patterns (or regular expressions) that are used in file comparisons. These options are useful for filtering out unimportant changes that you do not necessarily want to see in the editor panes.

Patterns conform to the standard syntax of Regular Expressions. For examples, see http://www.regular-expressions.info.

Option Description

Ignore

Allows you to ignore specified patterns during a file comparison. To ignore patterns, check this option, and then choose one or more options from the pattern list to ignore. You can also create new patterns using New to open the Ignorable Pattern dialog box where you can enter regular expression syntax to search for sequences of characters.

.

Allow Gluing of Blocks Separated By Pattern-like Lines

Allows you choose to glue lines that are empty, or that contain only braces. You can also modify the existing patterns, or add your own patterns.

For example, if you have three lines of differences that you want to move from file1.txt to file2.text, and those different lines are separated only by blank lines or lines with braces in them, without this option, you would have to resolve each line of difference separately.

When this option is enabled AND a Pattern (custom or predefined) is enabled, then the "Glue delimiter lines" button STARTEAM-0DD8E9FE-FCM-GLUE-ICON-low.jpg is displayed in the toolbar. Selecting this toolbar button merges the three lines of differences into a single difference, because the lines between the differences match the glue pattern of “empty line” specified in the Pattern options. It only requires a single click to move all three lines of differences from one file to the other.

New/Change/Remove

Enables you to add new patterns, change existing patterns, or remove existing patterns. New and Change display the Patterns dialog box where you define the pattern.

Ignorable Pattern/Glue Pattern dialog boxes

Uses New and Change to display the a dialog box where you define a pattern.

In the Glue Pattern dialog box, you have an option to add file extension(s) to which to apply the glue pattern. If you are applying the glue pattern to more than one file type, separate them with commas. For example: java, cpp, c, h, hpp.

  • Name. Specifies the name for the pattern. The name displays in the corresponding pattern/glue list exactly as you enter it in the dialog.
  • Pattern. Specifies the pattern (expression). You can use regular expression syntax. For example, ^[\t]*//.*$ or [{}\s]*.
  • Left Text Box. Provides a place to type sample test text.
  • Right Text Box. Displays the results after performing a pattern test.
  • Test. Applies the pattern to the sample test text. The results display in the text box on the right of the dialog.

Report Transformers

The Report Transformer options enable you to define new transformers, edit existing ones, or remove transformers from the list. These options are available whenever you choose to generate a report (click Generate Report in the toolbar). You can choose to use an empty transformer, use one of the predefined transformers, or create your own.

Option Description
Report Transformers List

Displays the list of report transformers available for use in transforming XML files to various outputs.

Add/View & Edit

Allows you to add, view, or edit a report transformer XSL file using the Report Transformer Configuration dialog box.

Remove

Allows you to remove a selected report transformer from the list.

Color Preferences

Use the Color Preferences options to control the colors displayed for file comparisons in the editor panes. Changes to the colors apply to each of the editor panes.

Option Description
Text Type

Assign distinct background colors to aid in identifying differences and similarities in files. This option displays a list of the types of text that can be color coded in the File Compare/Merge window. The Background Color button automatically changes colors to reflect the type of text selected. The text preview area shows the current color configuration settings. You can change the background color for the following types of text:

  • Unchanged text line
  • Changed text line
  • Inserted text line
  • Deleted text line
  • Conflict text line
  • Transposed text line
  • Transposed and changed text line
  • Transposed inserted text line
  • Frozen text line. Note that this is also referred to as Made change (Advanced merge mode) in the Text type drop down list . This type of text represents lines in the non-result panes that have been merged.
Background Color

Displays the color of the selected Text Type. This button also opens the Select Color dialog box where you can choose a different color.

Back to top

See also: