You are on page 1of 71

SourceGear DiffMerge

3.2 User Manual

By SourceGear LLC

Contents
SourceGear DiffMerge 3.2

1

SourceGear Contact Information

2

Installation

3

Windows ..............................................................................................................................3
Using the .msi: ........................................................................................................3
Using the .zip:.........................................................................................................3
Linux....................................................................................................................................3
Macintosh.............................................................................................................................4

The File Diff/Merge Windows

5

Opening a File Window ........................................................................................................5
Toolbar.................................................................................................................................6
Window Layout ....................................................................................................................7
Window Splitter Orientation....................................................................................8
Displaying Files..................................................................................................................10
Basic File Display .................................................................................................10
Detail Level ..........................................................................................................12
Filtering Text ........................................................................................................13
Types of Changes..................................................................................................17
Editing................................................................................................................................20
Interactive Editing.................................................................................................20
Patch Operations ...................................................................................................20
Merge to Center Panel (Auto-Merge).....................................................................21
Undo/Redo............................................................................................................21
Moving Around within Files ...............................................................................................22
Find... ...................................................................................................................22
Find Next / Find Previous......................................................................................22
Go To Line............................................................................................................23
Next and Previous Change.....................................................................................23
Next Conflict and Previous Conflict ......................................................................23

The Folder Diff Window

24

Opening a Folder Diff Window ...........................................................................................24
Folder Diff Windows Layout ..............................................................................................25
Viewing Options.................................................................................................................25
Display Detail.....................................................................................................................25

The Options Dialog

27

File Windows .....................................................................................................................28

SourceGear DiffMerge 3.2 User Manual

Contents • iii

.........................................................................................................................................................................................................................................................................................................................................................................................................39 Multi-Line Intra-Line Analysis Detail Level ...............................40 Intra-line Smoothing Threshold ........................................................................................................................................................................31 Detail Level .......................................................................43 Other Colors ...................................2 User Manual ...50 External Tools ......................................................41 Line Colors.............................................................................................................................................................................................................................................................52 Add/Edit External Tool ..................................46 Folder Colors.........61 iv • Contents Regular Expressions 63 SourceGear License Agreement 65 SourceGear DiffMerge 3................................39 Analysis Detail Level ..........................................................................................................................................................................................................................................................................................................30 Editing Rulesets ..................................................................................56 The Goto Page Dialog............................................................................................................................................................................................................58 Command Line Arguments 59 Integration with Third-Party Software 61 Microsoft TFS ..................45 Folder Filters .................................................................61 TortoiseSVN............................44 Folder Windows ...........................................................................................................................................................48 Messages ..........................................................................41 Inter-line Smoothing Threshold ..............53 Printing 56 Print Preview Dialog...........................................................49 Windows Explorer Integration ........................42 Intra-Line Colors ..........................................................................Rulesets ...........................................

Each file in each folder is shown to be different.2 • 1 .2 User Manual SourceGear DiffMerge 3. • Compare two folders side-by-side. DiffMerge enables you to perform three crucial tasks: • Compare two files side-by-side and see their differences.2 Welcome to DiffMerge. Normally this is used to merge the changes from two independent (branched) versions into one file based upon a common ancestor version. SourceGear DiffMerge 3. or without a match in the other folder. identical.SourceGear DiffMerge 3. • Compare three files side-by-side-by-side. Normally this is used to compare two different versions of a file and see how the file has changed.

Copyright (C) 2003-2008 SourceGear LLC. USA Sales Web: https://store.sourcegear. Support Web: http://support.com/sgstore/ Email: sgstore@sourcegear. All rights reserved. 61820. 2 • SourceGear Contact Information SourceGear DiffMerge 3. Suite 408 Champaign.com/ E-mail: support@sourcegear.sourcegear.com Phone: 1-217-356-0105 x399 (weekdays 9am to 4pm Central United States time) FAX: 1-217-356-0135.2 User Manual . Illinois. SourceGear is a registered trademark of SourceGear LLC. SourceGear DiffMerge is a trademark of SourceGear LLC.com Phone: 1-217-356-0105 x700 (weekdays 9am to 4pm Central United States time) This copy of DiffMerge is licensed to you under the terms listed in the license agreement.SourceGear Contact Information Mailing Address SourceGear LLC 115 North Neil Street.

If you installed the Windows Explorer shell extension.deb package.zip file. simply click the . and Macintosh. the package for the 1000 build of the 3.msi package or a .deb This completely installs DiffMerge.exe or the DiffMerge Options Dialog) before deleting the DiffMerge folder.2. and platform information.2.2.zip: If for some reason you cannot use the .exe.2.2. You can register the Windows Explorer shell extension by running regsvr32.0.0. for example. To uninstall DiffMerge either click the .1000-1ubuntu610_i386. a man page.msi and DiffMerge_3. for example.1000. and create a Desktop Shortcut. Linux. This will install the application in Program Files. simply delete the folder containing DiffMerge.deb contains release. Linux DiffMerge is distributed for Ubuntu Linux as a debian .1000.exe or by using the DiffMerge Options Dialog.msi: To install DiffMerge using the . the packages for the 1000 build of the 3.msi file or simply prefer to use the . you may simply unzip the . You can create menu items in the Start Menu and Desktop Shortcut if you want.Installation DiffMerge works can be installed on three platforms: Windows.zip file somewhere on your system and execute DiffMerge.2 User Manual Installation • 3 .2.zip archive.msi file or use the Add/Remove Programs Control Panel. build. Windows DiffMerge is distributed for Microsoft Windows as a standard Microsoft Installer .0 release are named DiffMerge_3.deb file.msi file. you can install DiffMerge using the following command from a terminal window: sudo dpkg -i diffmerge_3. This is the preferred method of installing the application. and a menu item in the Ubuntu Application|Programming menu. register a Windows Explorer shell extension. The filename of the file contains release and build information.zip file.0.msi file and follow the on-screen instructions. uninstall it (either using regsvr32.0 release for Ubuntu 6. including an executable in /usr/bin.deb After downloading the most recent .0.10 on Intel is named diffmerge_3.1000-1ubuntu610_i386. The filename of the . SourceGear DiffMerge 3. Using the .zip. create menu items in the Start Menu. To uninstall DiffMerge after using the . Using the .

To uninstall.0 release is named DiffMerge.dmg file.2 User Manual .2.3. click to let OS X open it. To uninstall.1000.dmg file.If you are installing on a 64-bit system. open your Applications folder and move the DiffMerge application to the trash. for example. You may want to put this folder in your PATH.0. A sample shell script is also provided to make it easier to use DiffMerge from the command line.dmg contains release and build information. This application is completely self-contained. The filename of the . 4 • Installation SourceGear DiffMerge 3. type the following from a terminal window: sudo dpkg -r diffmerge Macintosh DiffMerge is distributed for Apple Mac OS X as a standard disk image .dmg After downloading the most recent . Simply drag it to your Applications folder. It contains a Universal binary that can run on both PPC and Intel systems.2. you may have to add "--force architecture" to the dpkg install command line. copies of the license and manual files are included in disk image folder for your convenience. Inside you will find the DiffMerge application. the package for the 1000 build of the 3. You may need to edit it to set the DiffMerge application pathname to match where you installed DiffMerge.

browse buttons are provided that open the standard system File Open Dialog. You can use this window to see the changes side-by-side. when looking at the revision history of a file to see the changes between two revisions. Note: if the set of files selected are already open in another window. for example. You can use this window. You can use this window to see the changes side-by-side-by-side. They are discussed together here because they share multiple features. You can edit the center file and merge in changes from both branches. typically this is a common ancestor (in the middle) and two branches that have independently evolved (on the left and right). this is called a File Diff Window. creating a common/unified version. This is called a File Merge Window. The first is a two-way view showing the differences between two files or two versions of the same file. duplicate window. The second is a three-way window that shows the differences between three files. Opening a File Window You can open a File Window by selecting File|Open Diff Window or File|Open Merge Window from the menu.2 User Manual The File Diff/Merge Windows • 5 . SourceGear DiffMerge 3. either interactively as you would with a normal editor or by applying patches (or changes) from the version on the left. that window is raised rather than a new. And you can edit the file on the right.The File Diff/Merge Windows There are two types of file windows – File Diff Windows and File Merge Windows. You are given a brief Select Files to Compare Dialog enabling you to type the pathnames of the files you wish to compare.

Toolbar A toolbar above the File Diff/Merge Window presents the following icons. Show All Undo the Last Edit Show Differences Only Redo the Last Edit Show Differences with Context Apply Change from Left Show Line Numbers Apply Change from Right (3-Way Merge Only) Show Invisibles Jump to Next Change Split Windows Vertically Jump to Previous Change Split Windows Horizontally Jump to the Next Conflict (3-Way Merge Only) Save File Jump to Previous Conflict (3-Way Merge Only) Cut Merge to Center (3-Way Merge Only) Copy Paste 6 • The File Diff/Merge Windows SourceGear DiffMerge 3.2 User Manual . Some appear only in the 3-Way Merge Window.

the coloring and shape of the bars reflects the color and shape of the change within the files as though seen from a birds-eye. Click the Glance Bar to scroll to that line in the file. It enables you to make changes SourceGear DiffMerge 3. You may scroll around and view the differences and you may copy things to the clipboard -. View Selector The view selector enables you to select between the Reference View and Edit View. Around these file panels are several important features. the line numbers of the corresponding location are shown in the Status Bar. they track the vertical scrolling of the files.2 User Manual The File Diff/Merge Windows • 7 . In this view the files are considered read-only.but you cannot modify the files. As the mouse moves over the Glance Bar. Field Meaning File Panel Labels File panel labels show either the pathnames of the files you’re comparing or labels describing the versions of the file. The colored bars indicate changes in the files.Window Layout The File Diff/Merge Window shows two or three files side-by-side. A star "*" is used when the line represents a Void line in a file panel. The black vertical bars indicate what portion of the files are on screen. such as when you want to see the changes between two historical versions of a file. The Edit View is an interactive editor and live difference viewer. Glance Bar The Glance Bar summarizes the differences between the files displayed on screen. The Reference View is a static view of the changes in the files as originally read from disk. This mode can be useful in various situations.

the window only shows the Reference View and treats all files in the window as read-only. but you should be able to see the entire line in each file. If all 3 have the same encoding. This mode allows you to easily see and match up the corresponding lines in the files. In this mode. and their changes are displayed. DiffMerge shows the files side-by-side with vertical “splitters” between them. you may have to scroll horizontally to see parts of a line. However. the order of the files is the same: editing takes place in the bottom/right file in a File Diff Window and the center file in a File Merge Window. The View Selector is only present when editing is permitted on the files. DiffMerge also lets you view the files one above another with horizontal “splitters” between them. As you edit. 8 • The File Diff/Merge Windows SourceGear DiffMerge 3. In this mode. The Ruleset provides rules for comparing and displaying file content (such as whitespace handling and character encodings). Change Summary The Change Summary Indicator shows a brief summary of the number of changes and conflicts in the current View. If they are different. each is listed. it may be a little difficult to see the line correspondence. "(BOM)" is listed with the encoding when a Unicode Byte Order Mark is present.2 User Manual . Active Ruleset The Active Ruleset Indicator shows the current Ruleset in use in this window. it is listed once.to the center panel in a File Merge Window and the right panel in a File Diff Window. When not present. Character Encoding The Character Encoding Indicator shows the character encoding of the files. Window Splitter Orientation By default. your changes are highlighted. the files are re-compared in real-time.

2 User Manual The File Diff/Merge Windows • 9 .SourceGear DiffMerge 3.

omitted lines. file content is drawn in a variety of ways to show equal text. non-equal text.2 User Manual . 10 • The File Diff/Merge Windows SourceGear DiffMerge 3. edited text. Basic File Display The following figure and its accompanying chart show some of the most basic features of file panels shown in DiffMerge windows. and other information.Displaying Files Within a file panel. invisible characters.

Changed Text Changed text is shown in color.2 User Manual The File Diff/Merge Windows • 11 . Normal Context Menus are available that include traditional commands for editing text. SourceGear DiffMerge 3. Special change-related Context Menus are available that include additional commands for working with changes. The specific colors used depend upon the Type of Change and the Detail Level setting.Field Meaning Identical Text Identical text is show in plain black and white.

Gaps Gaps are drawn as a horizontal line between rows of text to indicate that chunks of text have been omitted from the display. Manual Alignment Markers Manual Alignment Markers enable you to force the alignment within the difference analysis. spaces. 12 • The File Diff/Merge Windows SourceGear DiffMerge 3. when the Display Mode is set to Changes Only. Invisible Characters Tabs. These are used. Detail Level DiffMerge has two Detail Levels: Lines Only and Lines and Characters. When a change is highlighted. Voids Voids are drawn when a change has fewer lines than the corresponding section in another panel. line feeds are drawn using special characters when View|Show Invisibles is on. it may be acted upon by the Apply Change from the Left and Apply Change from the Right toolbar buttons. Lines are colored using the overall line status color and then intra-line highlights are added. for example. Edited Line Indicator Edited lines have an "e" drawn in the left margin when View|Show Line Numbers is on. • Lines Only: DiffMerge only performs difference analysis line-by-line.2 User Manual . Changes are indicated based upon equality of the entire line (subject to the Overall Line Matching settings in the active Ruleset). They are drawn as a pair of dashed lines between two lines of text. Edited Text Edits are shown in bold and underlined. Lines are colored without intra-line highlighting. carriage returns.Highlighted Change Highlighted changes are surrounded by a dotted line. • Lines and Characters: DiffMerge performs line-by-line difference analysis and then within each change performs intra-line difference analysis.

Gaps are drawn where content is hidden. a horizontal line is drawn to indicate a Gap. Gaps are drawn where content is hidden.2 User Manual The File Diff/Merge Windows • 13 . when not drawn. • Show Differences Only: This mode only shows the changes in the files.Filtering Text DiffMerge can show you all the text. Each is accessible from the View menu as well as through toolbar icons: • Show All: This mode shows the complete text of the files. • Show Differences with Context: This mode shows changes with up to three lines of context around each. The display modes Show Difference Only and Show Differences with Context are only available in Reference View. SourceGear DiffMerge 3. Hide Omitted Lines This option hides lines that were omitted from the difference analysis. The Display Mode There are three primary ways to display files. the entire content of your files. they are drawn in a special gray color. When omitted lines are drawn. or it can hide things that are not currently of interest.

Note how these lines are drawn in gray in the first figure.2 User Manual .These figures show a pair of C++ source files using a modified version of the C/C++/C# Ruleset that omits lines beginning with "//" from the analysis. 14 • The File Diff/Merge Windows SourceGear DiffMerge 3. this indicates that they were excluded from the analysis. In the second figure a Gap is drawn in their place.

unimportant changes are displayed in subdued colors in the file panels and not shown in the Glance Window. The Hide Unimportant Differences option causes DiffMerge to de-emphasize the coloring and display unimportant changes. These figures show a pair C++ source files using the C/C++/C# Ruleset with Display Mode set to changes only. unimportant changes may be excluded. When the Display Mode is set to Show All.2 User Manual The File Diff/Merge Windows • 15 . Hide Unimportant Differences DiffMerge classifies all changes as Important or Unimportant based upon information in the current Ruleset. When the Display Mode is set to Show Differences Only or Show Differences with Context. SourceGear DiffMerge 3.You must be in Reference View and have the Display Mode set to Show All to use this feature.

You must have the Detail Level set to Lines-and-Characters to select this feature (View|Hide Important Differences).2 User Manual . the second figure shows DiffMerge with Display Mode turned off. 16 • The File Diff/Merge Windows SourceGear DiffMerge 3.The first figure shows DiffMerge with Display Mode turned on.

it looks like a change. Deletions Lines deleted from the file on the right that were originally present in the file on the left. When the Detail Level is set to Lines Only.Types of Changes Changes and Conflicts are highlighted using various text colors. depending on the type of change and the current Detail Level. you see something like the following: SourceGear DiffMerge 3. The same color is used to highlight all three types of changes. File Diff Window Changes There are three types of changes in a File Diff Window: Additions Lines added to the file on the right that were not present in the original. This can be either changes to an existing line or a deletion and addition at the same point in the file -. Changes Lines that were changed between the two versions.2 User Manual The File Diff/Merge Windows • 17 .either way. The coloring is simple.

For example. adjacent or overlapping changes are aggregated into a single change. in the figure below. these usually require your attention because DiffMerge cannot automatically determine what to do with them. you see a screen similar to the following: Conflict Aggregation As a precaution.2 User Manual . "Line 1" was added to both branches (in the left and right panels) and "Line 2" was deleted from the right panel. Usually this produces a conflict (depending on the individual types of changes in the grouping). an addition to one of the branches. So what should the merge result look like? 18 • The File Diff/Merge Windows SourceGear DiffMerge 3. • Changes occur on lines where one of the three files is different from the other two.File Merge Window Changes There are nine types of Changes and four types of Conflicts that can occur when three files are compared. When you’re merging multiple files. The Matching Lines in the two files are colored using the Matching Color and the NonMatching Line in the other file is colored using the Non-Matching Color. • Conflicts occur on lines where all three are different. For example. When the Detail Level is set to Lines Only.

hold down the Control key while using the left or right mouse buttons to select the desired line. SourceGear DiffMerge 3.2 User Manual The File Diff/Merge Windows • 19 .To access an individual line change within a block of changes.

this can either be an Insert. Insert Replace This option inserts content from the source panel into the Void in the edit panel.this is the Default Action. a Replace or a Delete. Editing is only permitted in Edit View in the Editable Panel. Interactive Editing Interactive Editing refers to the normal editing operations found in most text editors and includes inserting/deleting text with the keyboard and mouse and the standard cut/copy/paste clipboard operations. Patch Operations Patch Operations are a convenience mechanism for applying changes to the Editable Panel in the Edit View from one of the other file panels. All Patch Operations are variations of one of the following verbs and refer to the content of the currently highlighted change or conflict within each file panel. depending on the type of change. To perform a Patch Operation. 20 • The File Diff/Merge Windows SourceGear DiffMerge 3.2 User Manual .contrast "Insert This" when clicking on the left panel vs. Most of the time. To apply the default action you can shift-right-click on the change or select one of the Apply Change from Left or Right toolbar buttons to automatically apply the individual change without raising the context menu. the first item in the context menu will be labeled with "(default)" -. highlight a Change or Conflict and raise a context menu over it with the right mouse button. This lists the appropriate Patch Operations for the particular type of change.Editing DiffMerge enables two types of editing: Interactive Editing and Patch Operations. For example. Apply Change from Left copies the text from the left panel to the editable panel. there isn't a Default Action. in File Merge Windows the Editable Panel is the center panel. "Insert From Left" when clicking in the center panel. In File Diff Windows the Editable Panel is the right panel. This option deletes the content in the editable panel and inserts the content from the source panel. Apply Change from Left Apply Change from Right Tip: The exact wording of the menu item depends upon which window the mouse is clicked in -. For conflicts.

SourceGear DiffMerge 3. it is disabled. Undo/Redo DiffMerge features an unlimited Undo/Redo so that it is possible to undo changes all the way back to the initial state. For each automatic change made in the right and left panels. This option inserts the source content before the existing content in the editable panel. Merge to Center Panel (Auto-Merge) Auto-Merge automatically applies the Default Action for all of the non-conflict changes in a File Merge Window.Delete Prepend Append This option deletes the content in the editable panel. This option appends the source content after the existing content in the editable panel. or click the toolbar button After Auto-Merge completes. This is done as a batch (in 1 transaction) and may be undone using Undo. The goal of Auto-Merge is to automatically take care of the easy changes so that you can focus on the conflicts. It is strongly recommended that if you wish to use Auto-Merge you use it BEFORE making any other edits in the window. The Auto-Merge Results dialog displays a report on what changes were made. select Edit|Merge to Center Panel.2 User Manual The File Diff/Merge Windows • 21 . This is to prevent Auto-Merge from being used twice and possibly reverting some edits made by the first Auto-Merge. To start Auto-Merge. Also. after Auto-Merge has been applied to a window. from where they came. and finally a notification about what conflicts could not be merged. the default Patch Operation is applied for that type of change. This prevents Auto-Merge from possibly reverting some of your edits.

backward searching is disabled. Find. and choose which file panel you wish to search from. When searching with Regular Expressions. The Find Dialog is accessed from Edit|Find.. It can be used to search forward or backward for text within the files.Moving Around within Files DiffMerge offers a number of ways to find key text within a File Diff and File Merge Windows. 22 • The File Diff/Merge Windows SourceGear DiffMerge 3. search using Regular expressions.2 User Manual . Find Next / Find Previous Edit|Find Next and Edit|Find Previous repeat the last search performed by the Find Dialog.. Check boxes and radio buttons enable you to ignore case.

Next and Previous Change The Next Change and Previous Change commands enable you to quickly jump between changes in the files. click or select Edit|Previous Change.. Next Conflict and Previous Conflict The Next Conflict and Previous Conflict command are available only in the File Merge windows and enable you to skip to places where the right panel and left panel have both been changed from the original version..2 User Manual or select Edit|Next Conflict. The Go To Line Dialog is accessed from Edit|Go To Line…. but not in the same way. or select Edit|Previous Conflict. It enables you to jump to a specific line in the file. To jump to the next change in the file. click or select Edit|Next Change. To jump to the next conflict. click To jump to the previous conflict. The File Diff/Merge Windows • 23 . To jump to the previous change in the file.Go To Line. click SourceGear DiffMerge 3.

select File|Open Folder Diff. for example. You are given a brief Select Folders to Compare Dialog enabling you to type the pathnames of the folders you wish to compare. duplicate window. browse buttons are provided that open the standard system Browse for Folder dialog. to compare two versions of a software project and quickly see an overview of the changes between them. You can then click on individual non-equal files to open a File Diff Window and see the individual changes within the files. You can use this. it shows you which files and folders are present in both or only present in one. The Folder Diff Window is a recursive listing. It also shows you which files are equal in both folders and which are not. that window is raised rather than creating a new.2 User Manual . Producing a listing in a large folder tree can take a significant amount of time. it examines all files and folders contained within the given root folders and all sub-folders regardless of how deeply the folders are nested. That is.The Folder Diff Window The Folder Diff Window enables you to compare two folders and quickly see all of the differences between them. 24 • The Folder Diff Window SourceGear DiffMerge 3. Note: if the set of folders selected are already open in another window. that is. Opening a Folder Diff Window To open a Folder Window.

Viewing Options Within the Folder Diff Window you can open new File Diff Windows or Folder Diff Windows by double-clicking a line in the list or using the View|Compare Selected Files or View|Compare Selected Folders commands. The window has two columns listing the files and folders that are present in the two folders being compared. The status bar contains a summary of the number of files and folders listed. Display Detail The Folder Diff Window enables you see all files and sub-folders in the folders. alternatively you can have it omit various types of items so that you can decrease clutter and concentrate on the important items more easily. SourceGear DiffMerge 3.Folder Diff Windows Layout The following image shows the key features of a Folder Diff Window. all sub-folders are completely expanded. For files present in both folders. DiffMerge indicates which are identical and which are different. Lines are colored and an icon is attached to each line based upon the status of the files or folders on the line.2 User Manual The Folder Diff Window • 25 . This is a recursive listing.

26 • The Folder Diff Window SourceGear DiffMerge 3.View|Show Equal Files causes equal files to be shown or hidden. View|Show Folders causes sub-folders to be shown or hidden. Selecting (or unselecting) View|Show Errors causes file system errors to be displayed or hidden.2 User Manual . View|Show Files without Peers causes peerless files to be shown or hidden.

select Tools|Options.the buttons on the bottom of its screen.2 User Manual The Options Dialog • 27 . If you wish to restore defaults you altered from another page of the Options dialog.The Options Dialog The Options dialog box presents the user with a variety of options. the titles of which are listed on the left side of the Options dialog. Restore Defaults restores all of the fields ONLY ON THE CURRENT PAGE of the dialog to factory settings. To access the Options dialog. you’ll have to do it from the individual page. Each section of the Options dialog has three elements in common . and Restore Defaults is ideal for turning things back to normal if you've made one change too many and are unhappy with the result. OK and Cancel provide their usual functions. SourceGear DiffMerge 3.

DiffMerge checks to see if the files were changed by another application while the DiffMerge window was not the front window. 28 • The Options Dialog SourceGear DiffMerge 3. File Windows is the first dialog page that opens when you first start DiffMerge and access Options. The third portion of the dialog page enables you to click a variety of options on and off. A message box informs you if files were changed.File Windows By default. DiffMerge prints all of the left file pages. and so on. This dialog enables you to change the default fonts for displayed files and printer files by selecting the Choose… buttons. DiffMerge prints all the page 1s first.2 User Manual . then all of the center file pages and then all of the right file pages. When this option is checked. then all the page 2s. Print Files Interleaved When printing file windows. offering you a chance to reload them. Field Meaning Check for Modified Files When selected. DiffMerge actually prints 2 (or 3) files simultaneously. When this option is off.

then the auto-save file is rewritten after every 100 changes. you can recover your work from the temporary file. The user can then use the Next toolbar button to advance. if the edit-interval is set to 100. The auto-save is performed after a user-adjustable number of edits. Clicking Restore Defaults restores all the fields on this (and only this) page to factory settings SourceGear DiffMerge 3.Require Final EOL When this option is enabled. Auto save does not modify the original file. If not checked. DiffMerge adds the appropriate end of line character(s). In the event of a program or system crash.2 User Manual The Options Dialog • 29 . Automatically Advance If this option is checked. This enables you to rapidly apply changes without having to advance using the Next Change toolbar button. For example. DiffMerge automatically advances the patch-highlight to the next change/conflict when you press one of the "apply change from…" toolbar buttons. Enable Auto Save This option directs DiffMerge to periodically save the edited file in a special temporary file. DiffMerge leaves the caret where it was and does not highlight a change. to the end of the final line of the file before saving. if necessary.

Rulesets enable custom per-file-type handling of various DiffMerge features.Rulesets The Rulesets portion of the Options dialog controls whether Custom Rulesets are enabled and if so. how they are chosen when a set of files is loaded into a File Diff or Merge window. and opens the Edit Default Ruleset dialog. Enable Custom Rulesets Turns on Custom Rulesets. end of line conventions. and whitespace handling. This button enables you to edit this default Ruleset. Automatically Match Each Custom Ruleset includes a list of file suffixes indicating the file types to which it applies. 30 • The Options Dialog SourceGear DiffMerge 3. When OFF. Field Meaning Edit Default Ruleset This default Ruleset is used when Custom Rulesets are not enabled or when no appropriate Custom Ruleset exists. the default Ruleset is used for all files. These features can be triggered automatically by file suffix or interactively after files are loaded.2 User Manual . such as character encoding.

When editing a custom Ruleset. Ask Me When Nothing Matches If no suffix match can be found.. Restore Defaults Restores all of the fields on this (and only this) page to factory settings.py" and "bar. You can double-click a line item and edit/view the settings for it (or click the Edit button to the right). The default Ruleset is used when the use of custom Rulesets is disabled and when none of the custom Rulesets match the suffixes of the files being loaded in a window. If you load "foo. the Edit Ruleset dialog is entitled "Edit Ruleset: <custom Ruleset name>" and has the following 5 pages: • Name • Character Encodings • Line Handling • Content Handling • Lines to Omit When you’re editing the default Ruleset the Edit Ruleset dialog is entitled Edit Default Ruleset and only has the last 4 pages listed above. Temp files often get a system-defined temp name rather than the proper suffix. You can edit both the default Ruleset (using the Edit. DiffMerge automatically selects the "C/C++/C# Source" Custom Ruleset. Other buttons to the right enable you to perform the standard operations Add/Delete/Clone and MoveUp/MoveDown. Enabling one file to match enables you to ignore the temp file suffix when it’s being compared against a properly named file in your workspace. it’s possible to take the first match. When DiffMerge loads files it tests the suffixes on the files against the ones in this list. You probably don't want this turned on.cpp". This name can be entered in the top text box of the Name page. or to require all of the files to match the same rule. This list is ordered – DiffMerge searches for a match in the order listed..cpp" and "bar.Suffixes When set. The Edit Ruleset dialog enables you to modify the settings within a Ruleset. If a Ruleset has a matching suffix for a particular file. and several others. then that Ruleset might be used. DiffMerge automatically selects the "Python Source" Custom Ruleset.2 User Manual The Options Dialog • 31 . button at the top of the page) and individual custom Rulesets (using the Edit.. Ignore Case Ignores the case of the file suffixes when matching. SourceGear DiffMerge 3. if you load a set of files "foo.. DiffMerge ships with Rulesets predefined for C/C++/C# Source. List of Custom Rulesets and Buttons The list box lists all of the currently defined Custom Rulesets. Editing Rulesets DiffMerge includes a default Ruleset and a list of named custom Rulesets. The File Suffixes text box is a space-separated list of suffixes.py". button to the right of the list of custom Rulesets). Require Complete Match When the files in the set have different suffixes. DiffMerge uses the suffix list of each custom Ruleset (in order) to automatically find a matching Ruleset. For example. Name The Name page of the New Ruleset dialog enables the user to enter a “human-readable” Ruleset name that DiffMerge uses to display on the Rulesets page of the Options dialog and in the file window’s status bar. VB Source. DiffMerge either uses the default Ruleset or asks you to pick one from the Choose Ruleset dialog.

DiffMerge converts them into Unicode(TM) before performing any analysis. When loaded.Character Encodings Files on disk can be stored in various character encodings. This dialog enables you to specify the character encoding for files of this type. 32 • The Options Dialog SourceGear DiffMerge 3. and enables you to choose a specific encoding or request to be asked each time a document is loaded.2 User Manual .

This encoding is used for all files when this Ruleset is used. DiffMerge uses the existing encoding options. DiffMerge displays the character encoding(s) of the files in the status bar. The value of the Character Encoding settings in the active Ruleset of the first window is used. Ask for Each Window Raises the Choose Character Encoding dialog and asks once for each set of files when a file window is opened. If the Unicode Byte OrderMark is not present. Ask for Each File.. Note: If a file is loaded in multiple windows. SourceGear DiffMerge 3.but the same within a group of files that you want to compare. This enables you to have files of this type be in multiple encodings -.Field Meaning Search for Unicode BOM When this is enabled DiffMerge looks for a Unicode Byte-Order-Mark when loading files.2 User Manual The Options Dialog • 33 . Raises the Choose Character Encoding dialog once FOR EACH FILE in a set of files when a file window is opened. it will only be read from disk and decoded once. Use Named Character Encoding Below Enables you to select a fixed character encoding from the drop-down list below it. if a Unicode ByteOrder-Mark is present. After files are loaded. This enables files with different encodings on disk to be compared. if it is loaded into a second window. Use this if all files on your system of this type have the same encoding as the local system. DiffMerge informs you of the file's character encoding.. This enables maximum flexibility and lets you pick the encoding on a file-by-file basis. it shares the in-memory copy – and NOT the character encoding settings active in the second window. That is. Use System Local/Default Encoding Assume that files are encoded using the local system default character encoding.

Such differences can cause two otherwise identical files to look like completely different files. the highlighting of Line Termination differences is context dependent. but don't negatively affect overall alignment.Line Handling This dialog enables you to adjust Overall Line Termination Handling as well as Overall Line Matching. When disabled. Unless you have specific needs. line termination differences are not indicated in any way. When enabled. and CRLF characters to generic end-of-line (EOL) markers before the difference analysis begins. LF. BOTH options should always be enabled. Overall Line Matching These 3 options direct DiffMerge to ignore case and whitespace during the vertical alignment portion of the difference analysis. LF. 34 • The Options Dialog SourceGear DiffMerge 3. and CRLF characters are preserved and used in the analysis.2 User Manual . the original CR. Changes in case or whitespace are still indicated (regardless of the Detail Level). This allows DiffMerge to achieve the best text alignment. Therefore. this option changes all CR. • String literals and comments are generally Matched Contexts. • Content that matches a specific pattern is said to be in that context. files from different platforms with different EOL conventions can be compared. and everything else. Field Meaning Ignore/Strip All Line Termination Characters Different platforms use different line termination characters. meaning that there is a specific pattern of characters that delimit the beginning and ending of the context. Everything else generally includes the functional part of the source code. comments. These different types of content are called contexts. Content Handling Within source code there are usually three types of content: string literals.

Clicking Add… or Edit… takes you to the Edit Pattern dialog. If important. Generally. this option should be turned on. The fields under Default Context Guidelines are explained in the following table. this includes string literals and comments. The Content Handling portion of the Edit Default Ruleset dialog enables you to create/edit/delete matched contexts and set the attributes of the Default Context. for example). because leading whitespace is significant. Whitespace is Important This option determines how DiffMerge highlights differences due to changes in whitespace. and if whitespace is not important. Generally. Line Termination is Important This option is only enabled if you elected to keep end-of-line chars in the analysis (not Ignore/Strip EOLs). Case is Important This option determines how DiffMerge highlights differences due to changes in case. It determines how DiffMerge highlights differences in the EOL chars on a line. Generally. all changes (except for comments) should be marked important. string literals should be more strict (everything is important) and comments are probably more relaxed (the body of a comment is usually not as important as code.• Content that doesn't match a specific pattern (falls into the everything else category) is said to be in the Default Context. unless you're in a case-insensitive language like VB. These explanations also apply to the Context Guidelines area of the Add/Edit Context dialog. Generally. you can refine the context further to make commonly ignored things unimportant. you should turn it on. Field Meaning Classify Differences as Important This option determines if the overall context is important or unimportant. Treat TABs as This option is only enabled if the overall context is important. where matched contexts can be created or edited. In languages like Python. The goal of matched contexts is to describe the features of the source code language to identify contexts that should have different properties from the default context. this can mean SPACES or SPACES and TABS depending on the next field. this option is always disabled (because of the overall EOL handling).2 User Manual The Options Dialog • 35 . It SourceGear DiffMerge 3. In languages like C/C++ you should turn this option off for the default context because whitespace is not significant within code.

string and character literals and comments. this option should be turned on for most languages.determines whether TABs are equivalent to SPACES. only the content following it. For information about Context Guidelines. The end pattern may be omitted if Ends at EOL is checked. The text matching the ending pattern is considered part of the matched context. At least 1 choice from End Pattern or Ends-at-EOL must be set. you can either have an ending regular expression. Patterns must be valid regular expressions. The text that matches the starting pattern is not considered part of the matched context. Escape Character Set if there is a special character (usually '\') that alters the interpretation of the next character. All of the text between that matching the start pattern and that matching the end pattern and/or the end-of-line are considered to be in this context. If the context ends at the end of the line. Whitespace Edit Context A context is a mechanism for identifying portions of a document that should be specially handled. that is. leave this blank. Ends at EOL Set if the context is terminated by the end-of-line. Tip: Contexts and context highlighting are only enabled when in Lines-and-Character Detail Level mode. accessible through the Content Handling dialog. Generally. Set the Escape Character if this context has a special character (such as a backslash) to prevent premature matching of the end pattern or EOL. 36 • The Options Dialog SourceGear DiffMerge 3. or both. For example. refer to Edit Content Handling dialog.2 User Manual . A context is defined as a start pattern and an optional end pattern. The Edit Context box. enables you to alter context boundaries and guidelines. Field Meaning Start Pattern A Regular Expression that describes the start of a context. End Pattern An Optional Regular Expression describing the end of the context. Ends-at-EOL.

Clicking Add… or Edit… takes you to the Edit Pattern dialog. SourceGear DiffMerge 3. For example. Everything on this page is optional.2 User Manual The Options Dialog • 37 .Lines to Omit This dialog enables you to describe lines that should be completely omitted from the analysis. this dialog can be used when comparing reports to omit page and column headers and help the synchronization match up data in the report rather than the headers.

Edit Pattern This page of the Edit Default Ruleset dialog presents a list of active patterns. this should be 1. For convenience.2 User Manual . The Pattern section of the dialog enables you to enter a regular expression to search for lines to omit. The Lines to Skip portion of the dialog indicates how many lines should be omitted with each match. there are buttons to the right to supply patterns for commonly omitted items. Normally. 38 • The Options Dialog SourceGear DiffMerge 3.

DiffMerge performs the line-by-line analysis and then performs intra-line analysis within the changes.2 User Manual The Options Dialog • 39 . DiffMerge compares the files line-by-line and does not perform any intra-line highlighting/analysis. • In Lines-and-Character mode. Clicking Restore Defaults restores all the fields on this (and only this) page to factory settings Analysis Detail Level Analysis Detail Level determines how the files are compared: • If Lines-Only mode is selected. Intra-line analysis is performed over the body of each change. SourceGear DiffMerge 3.Detail Level The Detail Level page of the Options dialog controls various file analysis parameters.

• If Complete mode is selected. Multi-Line Intra-Line Analysis Detail Level This feature controls how hard DiffMerge works to match up characters within a multiple line change. Since DiffMerge does not combine the lines in this mode. the two parts are simply adjacent. Switch to Line-Only mode if you’re working with large files and having performance problems. DiffMerge sees this as five line change: there is a one line change (where text was deleted from the end) followed by an insert of four lines of text. When Disabled. but this is limited to avoid using an excessive amount of time and memory. • If Disabled. When Simple or Complete is enabled. This allows changes introduced by re-wrapping text to be separated from actual changes to the text. the following images show where a line of source code was broken across several lines in one version. lines are joined like in Complete mode. DiffMerge does not attempt to join lines before doing the character level analysis. 40 • The Options Dialog SourceGear DiffMerge 3. • If Simple mode is selected.2 User Manual .Tip: Line-Only mode is faster than Lines-and-Character mode. only the whitespace is highlighted because DiffMerge matches up the words by crossing the line boundaries. For example. the entire body (spanning all of the lines in the change) are essentially joined into a single line before doing the character level analysis. but unrelated.

Setting the Inter-Line Smoothing Threshold to 1 can cause these blocks of change to appear as 1 large change rather than numerous little ones. It causes small spans of equal text within an intra-line change to be marked as part of the change.2. Inter-line Smoothing Threshold This field causes small groups of equal lines between two changes to be marked as part of the change. Intra-line Smoothing Threshold This field is only used when the Analysis Detail Level is set to Lines and Character. In source code a function frequently consists of several lines of text. you see that "DEF" changed to "123" and that "HIJ" changed to "456" with a "g" between them. Inter-line smoothing can cause adjacent changes to be considered a conflict when the individual (unclumped) changes would not be. just the coloring of short spans of text within lines. switch to Simple or Disabled. the blank lines can sync up and unrelated chunks of code can appear as blocks of changes. several lines of text. you may produce a few conflicts that will cause Auto-Merge to complain.Tip: Complete mode was the only mode available prior to version 3. in File Merge windows. This field is used in both detail-level settings: Lines-Only and Lines and Character. if the following two lines abcDEFgHIJklmnopqrstuvwxyz abc123g456klmnopqrstuvwxyz are matched up.it's somewhat questionable how far apart nearby changes should be to be considered independent changes. Enabling the feature increases the likelihood that Auto-Merge will require manual follow-up. For example. By increasing the setting to 1 or 2. you see that "DEFgHIJ" changed to "123g456" as 1 change. a blank line. This feature is initially set to 0 (disabling it) because. which may or may not be a good thing -. If you experience performance problems. and so on. If someone inserts or changes a big chunk of code. SourceGear DiffMerge 3. This feature doesn't change any results. Inter-line smoothing can be though of as "clumping" nearby changes into a single change. a blank line. When the Intra-line Smoothing Threshold is set to 1. but these are areas that you probably want to examine anyway. This mode is very expensive.2 User Manual The Options Dialog • 41 .

all you need do is select the appropriate button. The preview windows in the center of the page illustrate how your color choices will appear in File Diff and Merge Windows when the detail level is set to Lines Only. You are then taken to the standard color dialog box where you can choose from pre-selected colors or pick your own. It is concerned with overall line coloring in both Lines Only and Lines and Characters detail levels.Line Colors The Line Colors page of the Options dialog enables you to change the default foreground and background highlighting colors of each of the five different types of lines in File Windows. Clicking Restore Defaults restores all the fields on this (and only this) page to factory settings 42 • The Options Dialog SourceGear DiffMerge 3. To change a color.2 User Manual .

The buttons in the Intra-line Background column enable you to change the background color of the intra-line highlight. such as text within a comment. The overall line colors (from the Line Colors page) are shown for reference in the first and last columns. The preview windows in the center of the page illustrate how your color choices appear in File Diff and Merge Windows when the detail level is set to Lines and Characters. You are then taken to the standard color dialog box where you can choose from pre-selected colors or pick your own. all you need do is select the appropriate button. To change a color.Intra-Line Colors This page enables you to set the colors used to draw intra-line changes.2 User Manual The Options Dialog • 43 . Clicking Restore Defaults restores all the fields on this (and only this) page to factory settings SourceGear DiffMerge 3. The buttons in the Foreground (Unimportant) column enable you to change the de-emphasized foreground color used when an intra-line change is marked as unimportant.

Clicking Restore Defaults restores all the fields on this (and only this) page to factory settings 44 • The Options Dialog SourceGear DiffMerge 3. You are then taken to a standard color dialog box where you can choose from pre-selected colors or pick your own. all you need do is select the appropriately labeled box.2 User Manual . To change a color.Other Colors This page enables you to set the colors used to draw miscellaneous items in File Diff and Merge Windows. The Other Colors page of the Options dialog is accessed by selecting Tools|Options and choosing Other Colors from the left side of the Options dialog.

Folder Windows
The Folder Windows page of the Options dialog enables you to change the font used in windows, the font used when
the document is sent to the printer, and to select whether or not you want DiffMerge to automatically check for changed
files and folders when folder windows are activated.

Clicking Restore Defaults restores all the fields on this (and only this) page to factory settings.

SourceGear DiffMerge 3.2 User Manual

The Options Dialog • 45

Folder Filters
If desired, Folder Windows can filter out temporary, binary, and other machine generated files and folders that are
normally produced as a by-product of software development. This page enables you to enable/disable this filtering and
set the list of file suffixes and folder names that should be omitted from the Folder Window display.
Please note that excluding these types of files and folders greatly increases the file system scanning speed and reduces
on-screen clutter.

File Suffix Filters: This section handles filtering files by suffix. The text field contains a space-separated list of suffixes
of files that should be excluded from the folder window. For example, you should filter out .EXE's and .DLL's because
they are binary files.
To turn off file suffix filtering, uncheck the Use File Suffix Filters checkbox.
Folder Filters: This section handles the filtering of entire sub-folders (and everything contained within them). The text
field contains a space-separated list of folder names that should be excluded from the folder window. For example, you
should filter out folders containing only binary files, such as a bin, lib, or obj directory generated by your compiler. You
should also exclude the SourceGear Fortress or Vault control file folders.

46 • The Options Dialog

SourceGear DiffMerge 3.2 User Manual

To turn off sub-folder filtering, uncheck the Use Folder Filters checkbox.
You can turn off folder-filtering by clicking Ignore Folder Filters.
The Restore Defaults button restores all of the fields on this (and only this) page to factory settings.

SourceGear DiffMerge 3.2 User Manual

The Options Dialog • 47

when a list of files or folders is being compared. and errors.Folder Colors This Folder Colors page of the Options dialog enables you to change the default foreground and background colors of files. all you need do is select the appropriate button. has no file or folder in the comparison window. You are then taken to the standard color dialog box where you can choose from pre-selected colors or pick your own. 48 • The Options Dialog SourceGear DiffMerge 3. folders. Note: A Peerless file or folder is a folder that. The Restore Defaults button restores all of the fields on this (and only this) page to factory settings.2 User Manual . To change a color.

Each message box has a "Do not show again" option.Messages This Messages page of the Options dialog enables you to choose which messages you want displayed by selecting them from a list of choices. these checked boxes ensure message boxes that provide either warnings or information display when the labeled events take place. SourceGear DiffMerge 3. Clicking Restore Defaults restores all of the fields on this (and only this) page to factory settings. These dialog fields indicate if the warning/message is enabled or suppressed.2 User Manual The Options Dialog • 49 . after the dialog has displayed. you have selected the "Do not show again" option. In brief. You can use these fields to turn a message back on if.

registered with the system) before Explorer will use it. The Explorer/Shell Integration feature allows DiffMerge to add a menu item to Windows Explorer. • This step is automatically performed by the DiffMerge . This feature is optional and not required to use DiffMerge.MSI installer. the desktop. You can do this from Windows Explorer by right clicking on the DiffMerge executable and selecting Run as Administrator.2 User Manual . This feature is provided by an Explorer Integration library DLL that is shipped along with the DiffMerge executable.ZIP distribution. It controls the Windows Explorer/Shell Integration feature. If the Explorer Integration library is not registered with the system. Tip: If the Install Now button fails on Vista because of privilege problems. and the Start Menu that allows you to launch DiffMerge on selected files and folders. try launching DiffMerge with administrator privileges. Press this button to register the library with the system and enable the feature. This is a system-wide registration and requires administrator privileges. • This step is not performed if you received DiffMerge as part of a Vault or Fortress package.Windows Explorer Integration This dialog is only available on Windows. the Install Now button will be enabled. • This step is not performed if you installed DiffMerge using the . This library must be separately installed (that is. 50 • The Options Dialog SourceGear DiffMerge 3.

this is C:\Program Files\SourceGear\Fortress Client\sgdm. For the version shipped with Fortress or Vault.exe.exe. Personal Settings: Once the Explorer Integration library is installed.For the stand-alone version of DiffMerge. SourceGear DiffMerge 3.exe or C:\Program Files\SourceGear\Vault Client\sgdm.2 User Manual The Options Dialog • 51 . this is C:\Program Files\SourceGear\DiffMerge\DiffMerge. you may enable or disable the feature for your individual user account.

third-party tools when comparing and/or merging various types of files. such as binary files and word processing documents that DiffMerge doesn’t support or for which you’d just like to use a different tool for. Ignore Case When Matching File Suffixes: Indicates if case should be respected when matching files. When DiffMerge receives an interactive request. it does not wait for the tool to complete.2 User Manual .External Tools The External Tools page of the Options dialog allows you to direct DiffMerge to invoke external. • files interactively selected from the Select Files to Compare Dialog. External tools are triggered by file suffix so you can use it to configure other tools to handle file types. it will then exit with that tool’s exit status. DiffMerge creates a normal File Window When DiffMerge is given a set of files on the command line with a matching tool configured. Tool suffix checking is performed before Ruleset suffix checking. 52 • The Options Dialog SourceGear DiffMerge 3. If no tool matches. • and files interactively selected from within a Folder Window. DiffMerge searches for tools in the order listed in the dialog and takes the first match. This includes: • files given on the command line. Enable External Tools: Turns on/off the entire external tools feature. it will invoke the tool and wait for it to exit before exiting.

Tip: You probably don’t want this turned on. or both.2 User Manual The Options Dialog • 53 . This name is for information only. For each External Tool configured. Restore Defaults: Restores all of the fields on this (and only this) page to factory settings. Add/Edit External Tool The Add/Edit External Tool dialog enables you to modify the settings for a tool. then that tool might be used. 3-way merges. no external tools are configured. SourceGear DiffMerge 3. Name The Name page of the External Tool Dialog. Name: The name field lets you enter a “human-readable” name for the tool. By default. Temp files often get a system-defined temp name rather than the proper suffix. edit.Require Complete Match: Indicates if the suffixes for all of the files in the set must match or if only one needs to match. You can select different executables and command line argument templates for each mode. If a tool has a matching suffix for a particular file. delete. File Suffixes: The File Suffixes text box is a space-separated list of suffixes. you can decide if the tool is enabled for 2-way diffs. You can use the buttons to the right of the list to create. and reorder tools. When DiffMerge loads files it tests the suffixes on files against the ones in this list. it is displayed in various places to help you identify the tool. The listbox in the center lists all of the External Tools that are configured. Turning off ‘Complete Match’ allows you to ignore the temp file suffix when it is being compared against a properly named file in your workspace.

app/Contents/MacOS/foo). Enable External Tool for File Diffing: Determines if this tool will be used for 2-way file diffs. • If not given on the command line or if you interactively cause DiffMerge to invoke an external tool. • When DiffMerge is handing off the initial set of files received on the command line. DiffMerge defines the following substitution tokens for external 2-way file diff tools. Command Line Arguments for External Tools: This text field contains the template for the command line to be used with the executable.Diff The Diff page controls settings for performing 2-way file diffs. Pathname to External Tool: This text field contains the pathname to the third-party executable. %LEFT_LABEL% %RIGHT_LABEL% The labels/titles for the left and right files. the values for these tokens are the corresponding pathnames. You can use the … button to browse for it. Tip: On the Mac.2 User Manual . The buttons below the text field are for your convenience and can be used to insert the corresponding token at the current insertion point into the text field. Tip: It is highly recommended that you enclose these tokens in quotes so that whitespace in the titles and/or pathnames are properly received by the external application. 54 • The Options Dialog SourceGear DiffMerge 3. you can give the path to either the application bundle (the foo. if given. DiffMerge will perform token substitution on the field before invoking the command. the values for these tokens come from the /title1 and /title2 arguments.app folder) or the name of the actual executable inside the application bundle (foo.

This comes from the /title2 argument when given. if given. DiffMerge defines the following substitution tokens for external 3-way file merge tools. • If not given on the command line or if you interactively cause DiffMerge to invoke an external tool. The descriptions for most of these fields are identical to the descriptions on the previous page for 2-way file diffs. It falls back to the baseline pathname. %WORKING_LABEL% %OTHER_LABEL% %DEST_LABEL% %WORKING_PATH% %OTHER_PATH% %BASELINE_PATH% %DEST_PATH% The labels/titles for the working (left) file and the other (right) files.2 User Manual The Options Dialog • 55 . The pathname where the merge result should be written.%LEFT_PATH% %RIGHT_PATH% The pathnames for the left and right files. It falls back to the destination result pathname or the common ancestor baseline pathname. the values for these tokens come from the /title1 and /title3 arguments. The pathname of the common ancestor/baseline (center) file. the values for these tokens are the corresponding pathnames. • When DiffMerge is handing off the intial set of files received on the command line. SourceGear DiffMerge 3. This comes from the /result argument when given. The pathnames for the working (left) and the other (right) files. Merge The Merge page controls settings for performing 3-way file merges. The label/title for the common ancestor (center) file.

Print Preview Dialog The Print Preview dialog is accessed by selecting File|Print Preview. (It is also possible to print from the Print Preview dialog. etcetera. 56 • Printing SourceGear DiffMerge 3. Lines that don't fit across a page are currently truncated. that is. the display of files is synchronized (with Voids used when necessary and printed as they are shown on screen) so that content is lined up on each page. Select File|Print. print using landscape mode. If long lines are a problem.2 User Manual . b. Page numbers are augmented with the letters a. 2 pages across or 3 pages across as necessary. Vertically. and c to help track the printed papers. you can place pages 10a and 10b side-by-side and the changes line up.Printing Printing in DiffMerge is standard. the number of copies. asking you to select the printer. The standard Print dialog box then displays.) Each panel of a window is printed on a separate page.

SourceGear DiffMerge 3. To change the document’s display size. these buttons enable you to advance one page or backup one page.2 User Manual Printing • 57 . advance all the way to the end of the document. click the window and select a size. Assuming the document has multiple pages. each with a “fast forward” or “rewind” symbol. the printing font can be changed from the Options dialog. Likewise.Four related buttons are listed below the Print button. Line Color and Line Numbers can be adjusted from Options|Line Colors and Options|Other Colors. or backup to the beginning. The Size Selection window selects the size at which you view the document. Clicking the Goto button opens the Goto Page dialog.

and c to aid in easier placement of the printed pages. This includes the current Ruleset in use. it enables you to select the page you wish to view by typing in its number in the blank area of the dialog box. It is possible to change File Colors from the Options Dialog. When the Goto Page dialog appears. It’s primarily useful when you’re dealing with a very long document.There are a number of features that can be adjusted when you are preparing a document for printing. Footers Footers provide a summary of the options and settings in effect at the time of the printing. providing the (elided) pathname of the file being compared. and the Tab Stop setting. 58 • Printing SourceGear DiffMerge 3. b. (To turn on the line numbers see Show Line Numbers. The Goto Page Dialog The Goto Page dialog is accessed from the Print Preview dialog: open the File|Print Preview and click Goto. Line detail (whether whole lines are highlighted or intra-line changes are highlighted) depends upon the Detail Level you select in the Options dialog. Headers Headers are printed on each page. the Display Mode. Page Numbers Each panel is printed on a separate page.2 User Manual . Page numbers are augmented with a. the output also has line numbers. Line Numbers If the Line Numbers option is turned on in the window.) Line Colors Lines with changes are printed in color and in bold.

(Only available on Microsoft Windows.exe [ options ] [ pathname1 [ pathname2 [ pathname3 ] ] ] Option Meaning h. caption Descriptive caption for the application title bar of the first window opened.) Only applies when 2 or 3 pathnames are given on the command line.Command Line Arguments diffmerge. /title1="Version 12 (foo. Example: /caption="Hello World!" m. Prevents editing in the first window opened. Only applies when no pathnames are given. If not specified. Example: /result="C:merge_result. ro3 [DEPRECATED] Unused. nosplash Run "Merge to Center Panel" immediately after loading files in the first window opened. Specifies alternate pathname for saving the merge result from the first window. forces the Open Files or Folders dialog to appear (even when not necessary) before opening the first window.) t1.cpp)" SourceGear DiffMerge 3. c. Suppresses splash screen.txt" ro1 [DEPRECATED] Unused. This allows you an opportunity to swap the pathnames if necessary. merge Only applies to File Merge Windows. the merge result (if saved) will overwrite the center file. title1 Example: Sets the display title for the first pathname given on the command line. result Only applies when 3 source pathnames are given on the command line. ro2 Treat the second pathname as read-only.2 User Manual Command Line Arguments • 59 . shex Shell/Extension flag. r. help Raises usage dialog and exits. (See "Viewer Mode".

output” The file is only created if there are differences to report. u. -help. or SPACE separator character between the keyword and the value.when they are different. they must have a COLON.t2. --help.cpp diffmerge /t1="My Working Version" /t2="Merge Result" /t3="Repository Version" /r="c:\merge_result. Sets the display title for the second pathname given on the command line. diff Compare two files and write results to an output file rather than opening a window.when there are file errors. unified Write the /diff output file in UNIFIED format rather than TRADITIONAL format.cpp c:/work/foo. pathname1 is placed in the left panel. For Folder Diff Windows. pathname3 A set of 2 or 3 files or 2 folders to open in the first window. For options that require values. and pathname3 is placed in the right panel. Example: /diff=”diff. pathname1 is placed in the left panel and pathname2 is placed in the right panel. /h.cpp c:/current/foo. For example. and -1 (255) . pathname2 is considered to be the common ancestor. /caption="Hello World!". pathname2 will be editable. pathname2 is placed in the middle panel. Sets the display title for the third pathname given on the command line. Command options have a long and short form and may either be prefixed by a '/' or a '-' depending upon your platform. EQUAL. title3 Only applies to 3-way windows.if the input files are identical. Arguments Meaning pathname1.cpp 60 • Command Line Arguments SourceGear DiffMerge 3. 2 . pathname1 is placed in the left panel and pathname2 is placed in the right panel. For File Merge Windows. For File Diff Windows. title2 t3. Batch Option Meaning d. The Exit Status is: 0 . For example: diffmerge /t1="Baseline" /t2="My Working Version" c:/baseline/foo.cpp" c:/work/foo. or /help. 1 . For example: -h.2 User Manual . pathname2.cpp c:/baseline/foo.for command line errors.

aspx This document describes how to configure tools based upon file suffix. Microsoft TFS Information on configuring an external diff/merge tool can be found at: http://msdn2. “original version (%1)” will be in the left panel and the “modified version (%2)” will be in the right panel.com/en-us/library/ms181446.aspx The arguments for comparing two files or two versions of a file should be: /t1=%6 /t2=%7 %1 %2 With this command line. Usually this just involves formatting the correct command line template string in the package’s options dialog. add /ro2 to the beginning of the above command line. The arugments for merging two versions of a file from a common ancestor should be: /m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1 With this command line. the changes. A “*” can be used for the suffix to change the default tool settings. and “their changes (%1)” will be in the right panel. “your changes (%2)” will be in the left panel. When you save your merge changes.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.2 User Manual Integration with Third-Party Software • 61 . see James Manning’s blog: http://blogs. If you want to limit yourself to strictly viewing.microsoft.Integration with Third-Party Software DiffMerge can be configured as an external compare / merge tool with various third-party version control systems. they will be written to the “merge result (%4)” file. the “common ancestor (%3)” will be in the center panel.html#tsvn-dug-settings-progs SourceGear DiffMerge 3. TortoiseSVN Information on configuring an external diff/merge tool can be found in http://tortoisesvn. For a listing of the arguments used to build the command line string. Here are instructions for the packages that we have information about.msdn.com/jmanning/articles/535573. rather than editing.

add /ro2 to the beginning of the above command line. If you want to limit yourself to strictly viewing.2 User Manual . they will be written to the “merge result (%merged)” file. The arugments for merging two versions of a file from a common ancestor should be: /m /r=%merged /t1=%yname /t2=%bname /t3=%tname /c=%mname %mine %base %theirs With this command line. the “common ancestor (%base)” will be in the center panel. “original version (%bname)” will be in the left panel and the “modified version (%mine)” will be in the right panel. the changes. When you save your merge changes. 62 • Integration with Third-Party Software SourceGear DiffMerge 3. rather than editing.The arguments for comparing two files or two versions of a file should be: /t1=%bname /t2=%yname %base %mine With this command line. . “your changes (%mine)” will be in the left panel. and “their changes (%theirs)” will be in the right panel.

Sun Microsystems.. IN NO EVENT SHALL HENRY SPENCER BE LIABLE FOR ANY DIRECT. provided that the new terms are clearly indicated on the first page of each file where they apply.with or without modification -. INCIDENTAL.. The authors hereby grant permission to use. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES. ActiveState Corporation and other parties. distribute. Development of this software was funded. BUT NOT LIMITED TO. and Scriptics Corporation. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE.are permitted for any purpose. Sun Microsystems Inc. in part. WHETHER IN CONTRACT. BUT NOT LIMITED TO. provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. but that is not a requirement. modify. DATA. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here. STRICT LIABILITY. UUNET Communications Services Inc. The library implements POSIX regular expressions and also supports Unicode and some Perl5 extensions.4. none of whom are responsible for the results. All rights reserved. INDIRECT. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. SourceGear DiffMerge 3. DiffMerge uses the Advanced Regular Expressions that it defines. Inc. SPECIAL. 1999 Henry Spencer. The author thanks all of them. license. provided that redistributions in source form retain this entire copyright notice and indicate the origin and nature of any modifications. or royalty fee is required for any of the authorized uses. OR PROFITS.. these files bear the Tcl copyright and license notice: ********************************************************************** This software is copyrighted by the Regents of the University of California. Redistribution and use in source and binary forms -. by Cray Research Inc. No written agreement.. LOSS OF USE. and license this software and its documentation for any purpose.n were developed by Tcl developers other than Henry Spencer. copy. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ********************************************************************** Copyright (c) 1998.Regular Expressions DiffMerge performs various searches and pattern matches using the RegEx regular expression library from Henry Spencer.5. OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES. Scriptics Corporation. I'd appreciate being given credit for this package in the documentation of software which uses it.2 User Manual Regular Expressions • 63 . INCLUDING. ********************************************************************** wxWindows adopted the code out of Tcl 8. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.c and re_syntax. Portions of regc_locale. OR CONSEQUENTIAL DAMAGES (INCLUDING. EXEMPLARY.

227-7013 (c) (1) of DFARs. OR ANY DERIVATIVES THEREOF.2 User Manual . THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES. GOVERNMENT USE: If you are acquiring this software on behalf of the U. ITS DOCUMENTATION. BUT NOT LIMITED TO. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. UPDATES.S. SPECIAL. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS. Notwithstanding the foregoing. THE IMPLIED WARRANTIES OF MERCHANTABILITY.S.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense. the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52. the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT. ENHANCEMENTS. INDIRECT. ********************************************************************** 64 • Regular Expressions SourceGear DiffMerge 3. EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. INCIDENTAL. SUPPORT. government. OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE. AND NON-INFRINGEMENT. INCLUDING. OR MODIFICATIONS. the authors grant the U. FITNESS FOR A PARTICULAR PURPOSE.227. AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE.

DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS. If the SOFTWARE PRODUCT is an upgrade. 3b. SourceGear LLC may terminate this Agreement if you fail to comply with the terms and conditions of this Agreement. Decompilation. 3a. or otherwise using the SOFTWARE PRODUCT. copying. If you do not agree to the terms of this Agreement. text. the media and printed materials. music. provided you retain no copies. any images. 3c. and the recipient agrees to the terms of this Agreement. Distribution.2 User Manual SourceGear License Agreement • 65 . You may permanently transfer all of your rights under this Agreement. In such event. and copyrights in and to the SOFTWARE PRODUCT (including. photographs. except that you may make one copy of the SOFTWARE PRODUCT solely for backup or archival purposes. animations. Software Transfer. as well as other intellectual property laws and treaties. title. By installing. 1. not sold. SOFTWARE PRODUCT LICENSE The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties. You may not reverse engineer. You may not rent or lease the SOFTWARE PRODUCT. You may not distribute this product. 3. This Agreement grants you certain limited. 4. except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. but not limited to. you agree to be bound by the terms of this Agreement. Limitations on Reverse Engineering.SourceGear License Agreement IMPORTANT – READ CAREFULLY. video. export or transmit the SOFTWARE PRODUCT or related documentation and technical data to any SourceGear DiffMerge 3. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. or any portion thereof. decompile. EXPORT RESTRICTIONS. and Disassembly. audio. You agree that neither you nor your customers intend to or will. Termination. any transfer must include all prior versions of the SOFTWARE PRODUCT. you transfer all of the SOFTWARE PRODUCT (including all component parts. Therefore. COPYRIGHT. or disassemble the SOFTWARE PRODUCT. You may not copy the printed materials accompanying the SOFTWARE PRODUCT. or any derived work thereof. any upgrades. Rental. The SOFTWARE PRODUCT is licensed. 3d. you must treat the SOFTWARE PRODUCT like any other copyrighted material. SourceGear LLC reserves all rights not expressly granted to you. do not install or use the SOFTWARE PRODUCT. This License Agreement (Agreement) is a legal agreement between you (either an individual or a single entity) and SourceGear LLC for SourceGear DiffMerge which includes computer software and online or electronic documentation and may include associated media and printed materials (SOFTWARE PRODUCT or SOFTWARE). GRANT OF LICENSE. All rights. non-exclusive rights. 3e. and this Agreement). directly or indirectly. you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts. Without prejudice to any other rights. to anyone outside your organization. 2. and "applets" incorporated into the SOFTWARE PRODUCT) and any copies of the SOFTWARE PRODUCT are owned by SourceGear LLC or its suppliers.

of the Bureau of Export Administration of the U. this SourceGear LLC product.S. regulation or statute. or such other governmental entity as may have jurisdiction over such export or transmission. 5.com. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. in no event shall SourceGear LLC or its suppliers be liable for any damages whatsoever (including. the above limitation may not apply to you. To the maximum extent permitted by applicable law. MISCELLANEOUS This Agreement is governed by the laws of the State of Illinois. damages for loss of business profit. NO WARRANTIES. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you. an Illinois LLC. or any other pecuniary loss) arising out of the use of.227-19. NO LIABILITY FOR CONSEQUENTIAL DAMAGES. SourceGear LLC entire liability and your exclusive remedy under this Agreement shall not exceed five dollars (US $5. loss of business information. please access our website at http://www. 66 • SourceGear License Agreement SourceGear DiffMerge 3.S. if required. SourceGear DiffMerge is a trademark of SourceGear LLC. Should you have any questions concerning this Agreement. without the prior written consent. as applicable. Department of Commerce. To the maximum extent permitted by applicable law. even if SourceGear LLC has been advised of the possibility of such damages. business interruption. GOVERNMENT RESTRICTED RIGHTS. LIMITATION OF LIABILITY. the implied warranties of merchantability or fitness for a particular purpose.S. All rights reserved.country to which such export or transmission is restricted by any applicable U.00).227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software Restricted Rights at 48 CFR 52. duplication. The SOFTWARE PRODUCT and any related documentation are provided "as is" without warranty of any kind. or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at DFARS 252. Copyright (C) 2003-2008 SourceGear LLC. including. or inability to use.2 User Manual . SourceGear LLC expressly disclaims any warranty for the SOFTWARE PRODUCT. without limitation. Manufacturer is SourceGear LLC. -------------------------------------SourceGear is a registered trademark of SourceGear LLC. without limitation. U.sourcegear. either express or implied. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages.com or contact us at feedback@sourcegear. or if you desire to contact SourceGear LLC for any reason. Use.

SourceGear DiffMerge 3.2 User Manual • 67 .