Shows the differences between the lines in a VSS master copy and the corresponding local copy in your working folder, or a previous version.
Note For binary files, VSS can tell you if two files are different, but not how they are different. VSS stores reverse deltas for all files, but in the case of a binary file, the binary record stored cannot be displayed to the user. Only ASCII text files can be compared line-by-line.
ss Diff VSS files [-B] [-D] [-H] [-I] [-I-] [-N] [-O] [-V] [-Y] [-?]
Compares the VSS file HELP.C to the local file HELP.C:
ss Diff HELP.C
Compares the version 2 VSS file HELP.C to the local copy of HELP.C:
ss Diff HELP.C -V2
Compares versions 2 and 4 of the VSS file HELP.C:
ss Diff HELP.C -V4~2
Compares file HELP.C in the VSS database against the file BAR.C on your local computer:
SS Diff $/HELP.C C:\BAR.C
The following table describes the command-line options available with this command.
Option | Description |
-O | Paginate or redirect the command output. |
-V | Specify the old file version(s) to compare. |
-I [C|E|S|W] | Specify which informational messages are ignored. The -IS option means ignore small matches prevents a large section of changes from looking like there are matches when there really aren't. |
-I- | Ignore: Do not ask for input under any circumstances. |
-D <S|U|V> [width] | Specify the format of the difference display. |
-DX [ - |number of lines] | Specify the number of displayed context lines. |
-B | Create a brief difference report. |
-N | Change between long and short file name mode. |
-Y | Specify a username and/or password. |
-?, -H | Request online Help on a command. |
You must have the Read access right to use this command.
The -B option provides a brief difference report. It checks to see if the specified files are different and is faster than computing actual line differences. This can be useful in batch files and scripts that react differently when a file has been modified.
The -D option controls how VSS displays the differences. A file difference can be displayed in one of three manners:
27 Ins: hello, world
26a27
> hello, world
Immediately after the V, S, or U in the -D option, you can specify a number indicating the line width. If you specify more characters than your screen permits, long lines wrap, which may affect the readability of the display.
Finally, X controls how many context lines VSS displays around each change. Seeing these lines may help you understand why a change was made. X by itself shows three lines of context; X- shows no context; X followed by a number specifies how many lines to show.
By default, VSS uses the VSS display, with line width calculated to fit on your screen, and no context lines. If you specify a UNIX display, the other defaults are the same; the visual display, by default, shows all lines (infinite context).
The following table demonstrates some uses of the -D option.
Example | Description |
-DV35 | Visual display, 35-character width |
-DX | Three context lines |
-DU70X5 | UNIX-style display, 70-character width, five context lines |
The -I option indicates which of four factors VSS should ignore when comparing two files:
The default setting, -IE, ignores end-of-line characters and reports any other difference as a change.