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 / ArgumentDescription
--formatRetrieves the output message in a specific format. See Remarks for more info.
--encodingSpecifies 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).
--comparisonmethodSets the specified comparison method. See Remarks for more info.
revspecRevisions 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 / ArgumentDescription
{0}Number of changed lines.
{1}Number of added lines.
{2}Number of deleted lines.

Comparison methods (--comparisonmethod option)

Option / ArgumentDescription
ignoreeolIgnores the end of line differences.
ignorewhitespacesIgnores the whitespace differences.
ignoreeolandwhitespacesIgnores the end of line and whitespace differences.
recognizeallDetects 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