CLI Reference > Configuration Management Commands > si diff
  
si diff
displays differences between two revisions of a member
Synopsis
si diff [--context=value] [--[no]ignoreBlanks] [--[no]ignoreCase] [--[no]ignoreWhitespace] [-r rev1[-r rev2]] [--[no]failOnAmbiguousProject] [(-R|--[no|confirm]recurse)] [--guiCharacterEncoding=value] [--filter=filteroptions] [(-P project|--project=project)] [(-S sandbox|--sandbox=sandbox)] [--devpath=path] [--projectRevision=rev] [--hostname=server] [--port=number] [--password=password] [--user=name] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [(-g|--gui)] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] member...
Description
si diff displays the differences between the following types of files:
any two text-based revisions in a history
any two symbolic link file revisions in a history
a text-based revision and its associated working file in a Sandbox
a symbolic link file revision and its associated working file in a Sandbox
For example,
si diff -r 1.3 -r 1.4 --project=c:/Documentation/Man_Pages/xml_man/project.pj si_add.1.xml
displays the differences between revision 1.3 and revision 1.4 of si_add.1.xml.
If no members are specified, si diff operates on all project members.
By default, in a Sandbox, this command compares the member revision against the working file.
If you use the -g or --gui option, this command invokes the Visual Difference tool. Otherwise, the diffb utility is used to evaluate differences in binary files.
* 
A symbolic link is a special type of file that contains a reference that points to another file or directory. When comparing symbolic link file members using the -g or --gui option, the Visual Difference tool does not display. Instead, a dialog box displays the original target file path and the newer target file path.
If used with -g or--gui, only one member can be differenced at a time, and the --context option is ignored.
Options
This command takes the universal options available to all si commands, as well as some general options. See the options reference page for descriptions.
--context=value
shows value number of lines of context, before and after each difference between two files. si diff marks lines removed from the "old" revision with -, marks lines added to the "new" revision with +, and marks lines changed in both files with !
--[no]ignoreBlanks
controls whether to ignore blanks when comparing textual revisions. When --ignoreBlanks is used, all differences involving blanks are ignored except blanks at the start of a line. These are treated differently than blanks between other characters. The following pair would be considered different, for example, because of the leading blank:
a b c def
a b c def
--[no]ignoreCase
controls whether to ignore case when comparing revisions.
--[no]ignoreWhitespace
controls whether to ignore white space at the end of each line (except the newline) and treat all consecutive strings of white space elsewhere in a line as equivalent (effectively, reducing all strings of white space to a single space for the purpose of comparing lines).
-rrev1[-r rev2]
uses a specified revision. Specify this option twice to identify the two revisions to be compared; the first instance is the "old" revision, the second is the "new". If the second revision is not specified, the working file is assumed. Both revisions must be specified if operating against a project. rev can be a valid revision number or a label. If neither is specified, it defaults to member revision.
--guiCharacterEncoding=value
specifies the character encoding to use for the revision contents in the GUI, and can only be specified with the -g option. Windchill RV&S automatically decodes UTF-8 revision contents based on the presence of a byte order mark (BOM) in the file. You can set character encoding preferences for each view and command through your client preferences. The preference setting is used if the character set cannot be determined through the file’s BOM, or if no character set is specified in the command line. By default, the character set in the preferences matches the default character set provided by the client’s operating system locale. The option does not apply to pure CLI output, or third party merge and/or differencing tools. Possible values are:
UTF-8
US-ASCII
windows-1252
ISO-8859 -1
ISO-8859 -15
IBM437
IBM850
IBM863
EUC-JP
Shift_JIS
x-euc-jp-linux
x-eucJP-Open
x-windows-iso2022jp
IBM862
ISO-8859-8
ISO-8859-9
member...
identifies a specific project or Sandbox member, depending on whether the -Ssandbox option or the -Pproject option is specified. To specify more than one member, use spaces between them.
Diagnostics
See the diagnostics reference page for possible exit status values.
Preferences
Using si setprefs or si viewprefs, you are able to set or view the preference keys for this command.
See Also
Commands: si ci, si merge, si mods, si revisioninfo, si rlog, si updaterevision, si viewrevision
Miscellaneous: ACL, diagnostics, options, preferences