No announcement yet.

Poor selectivity in text compare

  • Filter
  • Time
  • Show
Clear All
new posts

  • Poor selectivity in text compare

    I find the text compare to be quite disappointing in BC3. The problem involves alignment of similar lines, and no amount of tweaking the alignment settings seems to help.

    Quite often text files will contain lines which are the same up to a point, but which have a different end. Typically these are profile, properties or settings files, but they are not INI file format.

    BC3's text compare seems to treat each line as an entity, and is not able to look for similarities between lines and align them so that only true differences between the files are found, and - even worse - cannot find lines which match exactly but which are not in exactly the same sequence.

    I've attached a screen shot of an example where BC3's text compare is really not doing very well. In this 19 line file, one line, "GeneralSettings<~>PlayTune=false" is exactly the same each side but offset by just one line in each file, yet BC3 is flagging them against different lines: one side as a mismatch with another line, and the other as a new line.

    Last edited by norrisg; 11-Sep-2011, 01:08 PM. Reason: Missing punctuation in last sentence

  • #2
    What you have in your screenshot is an example of moved lines. Lines 15 and 16 appear in the opposite order on one side than on the other. This throws off the compare and causes what appears to be further mis-alignment further down in the file. The vast majority of text compare tools cannot gracefully auto-detect and compare differences in moved lines. This feature has been on BC3's customer wish list for some time now, but has not yet made it to development. If you really must have this capability, consider XDiff instead.
    BC v4.0.7 build 19761


    • #3
      Hello Graham,

      Thanks for the screenshot. I believe Michael may be right; the different order of the lines would 'push' other lines out of the way, since BC3 does not rearrange the lines.

      You can use an External Conversion to tidy or sort the file, giving the lines similar line breaks or order. We have a KB article that goes into detail on how to set up this process (for resx files.)
      Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.
      Aaron P Scooter Software