PDA

View Full Version : Inconsistent statistics


emile
08-Apr-2004, 03:40 PM
:confused:In the File Differences Report, if I select Statistics, I see numbers like these:


Important Lines Unimportant Lines
664 original lines(s) 531 original lines(s)
97 line(s) added 95 line(s) added
132 line(s) deleted 66 line(s) deleted
13 line(s) modified 23 line(s) modified

I am somewhat confused about the meaning of these numbers. Since Important and Umimportant lines are shown separately, I would expect it to be irrelevant whether I select Ignore Unimportant Differences, before running the report. However, when I did this, I obtained the following numbers:


Important Lines Unimportant Lines
1171 original lines(s) 24 original lines(s)
144 line(s) added 39 line(s) added
165 line(s) deleted 24 line(s) deleted
24 line(s) modified 0 line(s) modified

Is this a bug? Or could someone please explain what the numbers mean?

Craig
09-Apr-2004, 02:32 PM
The Statistics report does have incorrect behavior when "Ignore Unimportant" is checked. We've discussed it and we're going to remove that option in the next release (for Statistics only).

As for what the numbers mean:

The numbers under "Important Lines" are those that have important text, and the ones under "Unimportant Lines" are those that only have unimportant text (comments and/or whitespace).

The number of important (source) lines in the left file is Important_Original, and the number of whitespace/comment lines in the left file is Unimportant_Original. So the total number of lines on the left side is Important_Original + Unimportant_Original.

The lines added and deleted are in reference to changes going from the left file to the right file. So, to get the number of source lines in the right file you would use Important_Original + Important_Added - Important_Deleted. To get the total number of lines for the right file it would be Important_Original + Unimportant_Original + Important_Added + Unimportant_Added - Important_Deleted - Unimportant_Deleted.

The "modified" lines refer to the type of changes on each line. The way it's laid out now is a little confusing, so we're going to clean that up in the next release too. The one under "Important Lines" actually means "Lines with important differences", and the one under "Unimportant Lines" means "Lines with only unimportant differences" (eg changes in whitespace).