Page 1 of 1
Problem with ignore comments
Posted: Mon May 05, 2008 2:06 am
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
Re: Problem with ignore comments
Posted: Mon May 05, 2008 5:53 am
by psguru
What you need to do is add "svn-base" extension to the Pascal document type under Options | Document Types.
Re: Problem with ignore comments
Posted: Mon May 05, 2008 6:10 am
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.
Re: Problem with ignore comments
Posted: Mon May 05, 2008 8:39 am
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.
Re: Problem with ignore comments
Posted: Mon May 05, 2008 6:49 pm
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".
Re: Problem with ignore comments
Posted: Tue May 06, 2008 11:58 pm
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

Re: Problem with ignore comments
Posted: Wed May 07, 2008 5:54 am
by psguru
Yes, CNet is always a bit behind.