How do I configure BeyondCompare to ignore SCM replaced text in comments?

后端 未结 2 610
忘了有多久
忘了有多久 2021-02-07 05:10

I do have some text sequences that are replaced by the SCM (Perforce in my case).

I do want to configure BeyondCompare to consider these sequences as unimportant differe

2条回答
  •  孤街浪徒
    2021-02-07 05:58

    Beyond Compare's parser doesn't currently (v3/v4) support nested elements, so file formats grammars can't be used to mark an SCM sequence as unimportant for a specific file type if the text is already classified as a comment, string, etc.

    Beyond Compare 4.0 added support for marking arbitrary text as unimportant across an entire comparison, separate from the grammar.

    1. Load the files you're interested in
    2. Click the Session Settings button (aka Rules w/ umpire icon) or use the Session->Session Settings menu item.
    3. Switch to the Importance tab
    4. Click the + button at the bottom of the Unimportant text list.
    5. Add the plain text or regular expression to Text to find edit and check the Regular Expression checkbox if necessary. In this case the regular expression would be:
      \$(Id|DateTime|Author|Change):.*\$
    6. Click Ok.
    7. By default these changes will only affect the current comparison. You can change the combobox at the bottom of the Session Settings dialog from Use for this view only to Also update session defaults to make it affect all future comparisons for all file types.

提交回复
热议问题