Table of Contents
wdiff - display differences between file revisions.
[-rRev]] [-abBceEgHiIKLMnOpqRtTuvVwXz] [-Cn] [-jpatternList] [-kkv|-kk|-kv|-ko] [-o/Path]
[-P/diff-program-specification] [-Un] [-NWorkspaceName] [-hHost -SSnapshot [-DDir]]
wdiff displays the differences between file revisions.
If name is a directory, display differences for every file within the
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.
is consistent across all workspace commands. See wco(1)
Default options can be set on most workspace commands. See wco(1)
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:
- Use the named workspace
Or override with a temporary workspace mapping with these three
- Use the SnapshotCM server on Host for a workspace mapping.
- Use SnapshotPath for a workspace mapping.
- 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)
status is 0 for no differences, 1 for some differences, and >1 if there
was a bad option or a network error.
- Diff option: treat files as text files.
- Diff option: ignore
changes in the amount of white space.
- Check out all files using 'binary'
- Diff option: output differences with two lines of copied context.
- Diff option: output differences with 'n' lines of copied context.
option: output an ed( 1) script.
- Operate only on files present in both
the workspace and snapshot.
- Diff -B option: ignore changes whose lines
are all blank.
- Diff option: assume large files with small changes.
option: Consider upper- and lower-case to be the same.
- Operate only on locally
modified files. A quick way to review changes before checking in.
- 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.
- Diff --ignore-keyword-values option:
Ignore keyword value differences. Use this option to avoid displaying differences
in the value portion of $Keyword:value$ patterns.
- Operate only on locally
locked files. A quick way to review changes before checking in.
- Print workspace
mapping before normal output.
- 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
- Diff option: show which C function each change is in (requires
-c or -u).
- 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.
- Diff option: only report
files that differ.
- 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.
- Operate recursively
on all files and directories.
- Diff option: expand tabs to spaces in output.
Useful for maintaining alignment of output which contains tab characters.
- Check out all files using 'text' I/O mode.
- Diff option: output differences
with two lines of unified context.
- Diff option: output differences with
'n' lines of unified context.
- Show file revision information.
- Print internal
version and exit.
- Diff option: ignore all white space.
- Wait on external
diff program to exit (see -P option).
- Display 'full archive path' names.
- Diff -T option: make tabs line up by prepending a tab to each line. Useful
for maintaining alignment of output which contains tab characters.
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
Table of Contents