Table of Contents

Name

wdiff - display differences between file revisions.

Synopsis

wdiff [-rRev [-rRev]] [-abBceEgHiIKLMnOpqRtTuvVwXz] [-Cn] [-jpatternList] [-kkv|-kk|-kv|-ko] [-o/Path] [-P/diff-program-specification] [-Un] [-NWorkspaceName] [-hHost -SSnapshot [-DDir]] name ...

Description

wdiff displays the differences between file revisions. If name is a directory, display differences for every file within the directory.

If no revisions are specified, compare the snapshot file and the workspace file, which shows any changes made since the latest check out. Useful to review changes before a check in.

Workspace Mapping

Mapping is consistent across all workspace commands. See wco(1) for details.

Default Options

Default options can be set on most workspace commands. See wco(1) for details.

Workspace Options

The workspace mapping is automatically looked up in the user's workspace mapping table for the given files. Override this by specifying an explicit workspace:
-NworkspaceName
Use the named workspace mapping.

Or override with a temporary workspace mapping with these three options:

-hHost
Use the SnapshotCM server on Host for a workspace mapping.
-SSnapshotPath
Use SnapshotPath for a workspace mapping.
-DWorkspaceDirectory
The local destination directory for a workspace mapping. This can be a relative or absolute path. If this option is not provided with the other two, the local destination directory defaults to the current directory where the command is executed.

For more information on workspace mappings, see wmap(1) .

Options

-a
Diff option: treat files as text files.
-b
Diff option: ignore changes in the amount of white space.
-B
Check out all files using 'binary' I/O mode.
-c
Diff option: output differences with two lines of copied context.
-Cn
Diff option: output differences with 'n' lines of copied context.
-e
Diff option: output an ed( 1) script.
-E
Operate only on files present in both the workspace and snapshot.
-g
Diff -B option: ignore changes whose lines are all blank.
-H
Diff option: assume large files with small changes.
-i
Diff option: Consider upper- and lower-case to be the same.
-I
Operate only on locally modified files. A quick way to review changes before checking in.
-jpatternList
List only files whose name (or path) matches patternList. PatternList consists of one or more patterns separated by a '|' (pipe/or) symbol. Each pattern can contain shell wild cards as follows:

* - match 0 or more characters
? - match any one character
[set] - match any character in set
[!set] - match any character not in set

A pattern not ending in a slash ('/') matches only files. A pattern ending in a slash matches only directories. A pattern containing a slash other than at the end is matched against the full workspace path. Otherwise pattern is matched against the last component of the path. If patternList begins with an '!' (exclamation/bang) character, the normal selection is negated.

-kkv, -kk, -kv, -ko
Override the default keyword expansion mode for all check outs. See wco(1) for more information.
-K
Diff --ignore-keyword-values option: Ignore keyword value differences. Use this option to avoid displaying differences in the value portion of $Keyword:value$ patterns.
-L
Operate only on locally locked files. A quick way to review changes before checking in.
-M
Print workspace mapping before normal output.
-o/Path
Map /Path in the selected snapshot to the specified (-D) local directory, creating a temporary, partial workspace mapping for the command. Normally, the root directory of a snapshot is what is mapped.
-p
Diff option: show which C function each change is in (requires -c or -u).
-PProgram
Call the external 'Program' to display the output. If Program is 'diff', 'diffu' or 'diffc', the default diff tool will be called, with default, unified or context options respectively. If Program is 'tkdiff', the tkdiff program will be called. Otherwise, Program may contain the variables $(source), $(target), $(sourcelabel) and $(targetlabel). If Program is specified without any variables, $(source) and $(target) will be appended.
If the Program specification contains any values containing embedded spaces, they must be quoted within the specification. The variables themselves should not be quoted. See the example below.
-q
Diff option: only report files that differ.
-rRev
Specify file revisions to compare. Rev can be a file revision number or a relative or full snapshot path, in which case, the revision of file selected by that snapshot will be used.
-R
Operate recursively on all files and directories.
-t
Diff option: expand tabs to spaces in output. Useful for maintaining alignment of output which contains tab characters.
-T
Check out all files using 'text' I/O mode.
-u
Diff option: output differences with two lines of unified context.
-Un
Diff option: output differences with 'n' lines of unified context.
-v
Show file revision information.
-V
Print internal version and exit.
-w
Diff option: ignore all white space.
-W
Wait on external diff program to exit (see -P option).
-X
Display 'full archive path' names.
-z
Diff -T option: make tabs line up by prepending a tab to each line. Useful for maintaining alignment of output which contains tab characters.

Diagnostics

Exit status is 0 for no differences, 1 for some differences, and >1 if there was a bad option or a network error.

Examples

The following calls the external program 'my diff' to display the file differences and waits for the external program to complete. Note that the program name is quoted within the -P parameter because it contains spaces:

wdiff -W -P '"my diff" -L $(sourcelabel) -L $(targetlabel) $(source) $(target)' file.txt

See Also

wci(1) , wco(1) , whist(1) , wls(1) , wmap(1) , wmerge(1) , wremove(1) , wrename(1) , wset(1) , wupdate(1) .


Table of Contents