No announcement yet.

Filter SVN Revision within Comment

  • Filter
  • Time
  • Show
Clear All
new posts

  • Filter SVN Revision within Comment

    Hey there,

    I'm new to Beyond Compare, so excuse me if that's a stupid question:
    In a text comparison I want to ignore all SVN comments like "$Id: xyz $" or "$Revision: xyz $". I've added some grammar and it all works fine as long as the SVN comment is not within another comment.
    Unfortunately our file headers all start with "/*", followed by some informative lines including the svn comment, ending with "*/".
    	Somebody, [email protected]
    	$Id: filename.jsp 1158 2010-01-18 14:40:38Z xxyyzz $
    	What does the file/class/jsp do?
    Comparison of comments is turned on, so this seems to overrule the setting that differences in SVN comments should be ignored. I've tried changing the order of my grammar rules, but to no effect.

    What can I do?

    Thank you in advance

    Kai Widmann

  • #2
    BC doesn't support having a grammar item within a grammar item.

    If text is matched by multiple grammar items, it will first match on the item that matches the most text, in your case /* to */ is a larger number of characters than the SVN comment so it is treated as a standard comment.

    If two grammar items match on the same number of characters, then the grammar item higher in the grammar list is used.

    The best workaround is probably to delete the definition of /* to */ as a comment, then it will be treated as default text, which should be important.
    Chris K Scooter Software