Problem with ignore comments

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
luebbe
New Member
Posts: 3
Joined: Mon May 05, 2008 1:54 am

Problem with ignore comments

Post by luebbe »

Hi Folks,

i like the ignore comments function very much. It does - however - not handle one of the standard use cases with Subversion very well. When I compare a file inside my working copy against its BASE, the base file has a 'svn-base' appended to its file name. Subversion always keeps the original (BASE) of a a file in a sub folder called '.svn\text-base'. So the comparison is:

File 1: 'C:\Folder\.svn\text-base\MyFile.pas.svn-base'
File 2: 'C:\Folder\MyFile.pas'

The comments are correctly ignored in 'Myfile.pas', but the filter is not applied to 'MyFile.pas.svn-base' since the file doesn't end in '.pas'.

It would be nice, if Examdiff would recognize this use case and ignore the comments in both files.

Cheers
-Lübbe
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Problem with ignore comments

Post by psguru »

What you need to do is add "svn-base" extension to the Pascal document type under Options | Document Types.
psguru
PrestoSoft
luebbe
New Member
Posts: 3
Joined: Mon May 05, 2008 1:54 am

Re: Problem with ignore comments

Post by luebbe »

psguru wrote:What you need to do is add "svn-base" extension to the Pascal document type under Options | Document Types.
This does not solve the problem, because I also compare other files types: .pas, .cpp, .po, .bat, .cs, .xml, .pl, .php, ...

Adding the "svn-base" extension to the Pascal document type under Options will result in correct behaviour for .pas files and nothing else. Examdiff doesn't accept dots in file extensions, so it's not possible to add "pas.svn-base" to Pascal, "cpp.svn-base" to C and so on. This would be cumbersome as well, because every file extension would need that extra definition.

The funny thing is that the syntax highlighting of Examdiff detects the file type correctly and highlights ".pas.svn-base" files with Pascal syntax or ".xml.svn-base" files with xml syntax. Since the correct file type is already known, I'm wondering why the comments cannot be ignored properly.
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Problem with ignore comments

Post by psguru »

Syntax highlighting is "smarter" because there it uses a rule that states that if a type is not recognized, the other file's type is used. Perhaps the same rule should be used for ignoring comments.
psguru
PrestoSoft
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Problem with ignore comments

Post by psguru »

The latest build ( 4.0.2.8 ) includes the feature that assigns document type to an unknown extension based on the opposite file's type. This affects both ignoring comments and syntax highlighting. This behavior is controlled by a new option under Options | Document Types: "Use the other file's type if a file only matches the Default type".
psguru
PrestoSoft
luebbe
New Member
Posts: 3
Joined: Mon May 05, 2008 1:54 am

Re: Problem with ignore comments

Post by luebbe »

Perfect! Thanks a lot for the quick solution!
Now I can finally spot the differences in Gnu gettext .po files which consist of 50% automatically created comments. Very often 95% of the comments are changed, but only 1% of the strings to translate are different, so this feature really helps a lot.

We use gettext for the translation of TortoiseSVN. ExamDiff is one of the diff tools we mention on the TortoiseSVN web site.

Now only CNet needs to update their download. They still deliver 4.0.2.7, which I had downloaded first. No wonder I couldn't find the fix :)
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Problem with ignore comments

Post by psguru »

Yes, CNet is always a bit behind.
psguru
PrestoSoft
Post Reply