Bug in C/C++/C# Source Comment Detection

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
Virgil Smith
Posts: 21
Joined: Thu Sep 14, 2006 9:11 am
Location: FLIR Systems Stillwater Oklahoma

Bug in C/C++/C# Source Comment Detection

Post by Virgil Smith » Tue Jul 28, 2015 11:55 am

Given the following two snippets as source for two versions of a C# file, DiffMerge will decide that the change (insertion of the keyword virtual) is "unimportant".

--- Version 1
//
public void Initialize()
--- Version 2
//
public virtual void Initialize()
--- End of snippets

When recreating the files, understand that there is no whitespace (or other content) between the comment marker and the end of line for the line it is on. Also, inserting identical leading whitespace does not impact the results.

This occurs using the default settings for the C/C++/C# ruleset.

Obviously the workaround is "don't make empty/pointless comments".
Hopefully, this is a succinct enough test case and simple enough condition that a fix can be included in the next release (should there be one).

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Bug in C/C++/C# Source Comment Detection

Post by Beth » Tue Jul 28, 2015 3:04 pm

Which version of DiffMerge are you using?

Can you show me how you made your setting to rule out the comment markers?

How many lines do you have it skipping when it sees those markers?

I'm unable to reproduce the issue so far.
Beth Kieler
SourceGear Technical Support

Virgil Smith
Posts: 21
Joined: Thu Sep 14, 2006 9:11 am
Location: FLIR Systems Stillwater Oklahoma

Re: Bug in C/C++/C# Source Comment Detection

Post by Virgil Smith » Tue Jul 28, 2015 3:38 pm

[quote]I'm unable to reproduce the issue so far.[/quote]
Well darn, I thought this would be a simple report/reproduce. Then I could feel like I'd done my part for a what remains a great product/tool. Ah well, details follow...


[quote]Which version of DiffMerge are you using?[/quote]
I'm using Vault 8.0.1 (30299), as this is the latest/current version of Vault at this time I can only assume that means DiffMerge 4.2.0 (latest according to release notes). However, since a Vault install tweaks DiffMerge (at least enough to hide its 'actual' version number) I suppose just Vault 8.0.1 is the correct answer.

http://sourcegear.com/vault/downloads.html
http://sourcegear.com/diffmerge/webhelp ... notes.html


[quote]Can you show me how you made your setting to rule out the comment markers?[/quote]
Um, I installed the software and didn't edit the rulesets to my knowledge. However, this machine has had Vault upgraded twice and *probably* had a standalone DiffMerge installation prior to the upgrades.

I've attached the full info from Help -> About -> Support... I think that should clarify the relevant settings (and more).


[quote]How many lines do you have it skipping when it sees those markers?[/quote]
I'm not sure what you mean by that. However, changes to lines following the last line in my examples display properly for me wrt "unimportant" (or not) changes.
Attachments
DiffMerge_Support_Info.txt
Support info with Ruleset settings et al.
(28.85 KiB) Downloaded 1120 times

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Bug in C/C++/C# Source Comment Detection

Post by Beth » Tue Aug 02, 2016 10:43 am

I still can't reproduce trying out your settings. I've attached my settings. I removed most of the extra rule sets and am using the default rule set.
Attachments
Settings.txt
(22.14 KiB) Downloaded 1068 times
Beth Kieler
SourceGear Technical Support

Virgil Smith
Posts: 21
Joined: Thu Sep 14, 2006 9:11 am
Location: FLIR Systems Stillwater Oklahoma

Re: Bug in C/C++/C# Source Comment Detection

Post by Virgil Smith » Tue Aug 02, 2016 1:06 pm

At this time I can (also) confirm that the bug does NOT reproduce in
'SourceGear DiffMerge : Version 4.2.0 (697:52f98c4fcb) [x64] stable : WXMSW {3.0.0}',
but it still appears for me in
'SourceGear DiffMerge : Version 8.0.1 (30299) : WXMSW {2.8.12}'.

Alas we have not upgraded Vault to 9.0 in the year since this posting, so I can't comment on if the bug is still present in "SourceGear DiffMerge : Version 9.0.??" (or even that Vault still uses a modified version of DiffMerge instead of installing it 'clean').

So it may be that one can work around the problem by performing a manual installation of DiffMerge to override/overwrite the one done by Vault. Simply copying the sgdm.exe out of a DiffMerge installation over the sgdm.exe in a VaultPro installation folder seems to work, but repeat it at your own risk, ymmv, caveat emptor, etc.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Bug in C/C++/C# Source Comment Detection

Post by Beth » Tue Aug 02, 2016 1:15 pm

I was testing the separate product due to the forum we were in. Feel free to install the separate download of DiffMerge.
Beth Kieler
SourceGear Technical Support

Post Reply