Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

diff(1)

sdiff(1)

workshop(1)

textedit(1)

TWMERGE(1)

NAME

twmerge, filemerge − twmerge is a window-based file comparison and merging program

SYNOPSIS

twmerge [ −b ] [ −r ] [ −a ancestor ] [ −f1 name ] [ −f2 name ] [ −l listfile ]
    [ leftfile [ rightfile [ outfile ] ] ] [ −V ]

DESCRIPTION

twmerge, formerly known as FileMerge, is the graphical user interface to diff(1), the utility for displaying differences between source files.  twmerge compares two files with each other or with a common ancestor file and automatically merges the files into an output file which you can edit. 

You can start twmerge from a shell command line as described in this man page, from Sun TeamWare, or from Sun WorkShop. See the workshop(1) man page for details. 

You can specify the names of the input files and the name of the output file at startup or from within the tool after it has started; however, to load files from a list you must use command-line options at startup. 

OPTIONS

−b Causes twmerge to ignore trailing blanks (white space) when comparing lines. 

−r Starts twmerge in read-only mode. Only the input file text panes are displayed; the output text pane is absent. 

−a ancestor
Specifies an existing ancestor file for the two files to be merged (called descendants of the ancestor file). The merged file is based on ancestor and the changes made to it in the descendants. 

−f1 name1
Sets the file name displayed for the left, or child, pane. This option is useful when a list of files is being loaded (with the −l option), and you want to display a name for reference only in the twmerge window. 

For example, if you are loading files from two directories that correspond to two different revisions of a product, you could use the −f1 option to display the name Rev1 above the left pane and the −f2 option to display the name Rev2 above the right pane. 

−f2 name2
Sets the file name displayed for the right, or parent, file.

−l listfile
Specifies a file containing a list of individual file names. This option is useful for  merging entire project directories.

twmerge uses the names in listfile to successively load files from directories named with the leftfile and rightfile arguments, placing the output files in the directory named with the outfile argument. The names in listfile must match file names in the leftfile and rightfile directories. When used with the −a ancestor option, the ancestor argument should be a directory: twmerge looks for files in the ancestor directory that have the same names as those in listfile, and uses the file with the matching name as the ancestor file for each merge. 

To load successive files named in listfile, choose File --> Load Next From List.  If you specify "-" for listfile, twmerge reads the list of files from standard input. 

leftfile The name of the child file to be loaded for comparison. When used with the −l listfile option, leftfile is a directory of files, which you can load in succession from the File menu. 

rightfile
The name of the parent file to be loaded for comparison. When used with the −l listfile option, rightfile is a directory of files, which you can load in succession from the File menu. 

Any of the three input files can be directories, but at least one of the three must be a simple file name.  When you specify a directory for input, twmerge uses the file name to find a corresponding file in the directory. 

outfile Specifies the name of the merged output file. If you do not specify an outfile, the output file is given the default name filemerge.out.  If you want to specify a different name when you save the file, use File --> Save As. 

−V Displays the version being run. 

SEE ALSO

Sun TeamWare User’s Guide

diff(1), sdiff(1), workshop(1), textedit(1)

 

SunOS WorkShop_4.2  —  Last change: 01 September 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026