DIFFMETRICS
Description
Shows diff metrics between two revs.
Usage
cm diffmetrics | dm <revspec1> <revspec2> [--format=<str_format>] [--encoding=<name>] [--comparisonmethod=(ignoreeol | ignorewhitespaces | ignoreeolandwhitespaces | recognizeall)]
Options
| Option / Argument | Description |
|---|---|
| --format | Retrieves the output message in a specific format. See Remarks for more info. |
| --encoding | Specifies the output encoding, i.e.: utf-8. See the MSDN documentation at http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx to get the table of supported encodings and its format, (at the end of the page, in the "Name" column). |
| --comparisonmethod | Sets the specified comparison method. See Remarks for more info. |
| revspec | Revisions used to compare. (Use 'cm help objectspec' to learn more about rev specs.) |
Help
Remarks
The metrics are: number of changed, added, and deleted lines.
Output format parameters (--format option): This command accepts a format string to show the output. The output parameters of this command are the following:
| Option / Argument | Description |
|---|---|
| {0} | Number of changed lines. |
| {1} | Number of added lines. |
| {2} | Number of deleted lines. |
Comparison methods (--comparisonmethod option)
| Option / Argument | Description |
|---|---|
| ignoreeol | Ignores the end of line differences. |
| ignorewhitespaces | Ignores the whitespace differences. |
| ignoreeolandwhitespaces | Ignores the end of line and whitespace differences. |
| recognizeall | Detects the end of line and whitespace differences. |
Examples
cm diffmetrics file.txt#cs:2 file.txt#br:/main/scm0211 --format="There are {0} changed, {1} added and {2} deleted lines."
(Retrieves diffmetrics results formatted.)
cm dm file.txt#cs:2 file.txt#cs:3 --encoding=utf-8 --comparisonmethod=ignorewhitespaces