Change default compare to compare contents

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • imightbewrong
    Visitor
    • Sep 2008
    • 7

    Change default compare to compare contents

    Hi. This is probably a silly question but I have just upgraded to BC3 and can't figure it out.

    If I go to folder compare for my text files, it seems to always default to the file-version compare, which I basically never want to do since my files are all created at different times and I am only interested in contests. If I double click a file it opens a tab with the version comparison in, but I want it to open up the text contents comparison.

    Also, if I do select all -> compare contents -> binary comparison, my files come back different, but if I then right-click-> quick compare -> text compare, the diff window opens are they are flagged as exact, then if I close that the file is now marked as exact in the folder view.

    Would appreciate any help here, as I don't really trust BC3 at the moment with my important comparisons.
  • Michael Bulgrien
    Carpal Tunnel
    • Oct 2007
    • 1772

    #2
    You can change the default folder compare method as follows:

    Session drop-down menu \ Session Settings \ Comparison tab

    First, check the Compare Contents checkbox and choose the compare method to use:

    Binary comparison: A byte to byte comparison. Any difference, no matter how insignificant, will result in files showing up as different.

    Rules-based comparison: Compares the content of the files based on the grammar rules defined for that specific file type. Differences not defined by the grammar rules are ignored. For example: If two files have the same content, but have been saved with different encodings (ANSI vs Unicode) or different line endings (Windows vs Linux) then a rules-based comparison will show them as being equal.

    Secondly, check the "Override quick test results" setting under the Compare Contents section or disable your quick tests altogether. This will ensure that equality in your folder view is initially set based on the content compare, and not on the quick tests.

    Originally posted by imightbewrong
    Also, if I do select all -> compare contents -> binary comparison, my files come back different, but if I then right-click-> quick compare -> text compare, the diff window opens are they are flagged as exact
    When you open two files in a text compare, it performs a rules-based comparison and updates the equality column in the folder view with the results.

    Originally posted by imightbewrong
    then if I close that the file is now marked as exact in the folder view.
    Actually, binary equality (exactly the same) looks different than rules-based equality (no significant differences in content) in the folder view. If files are deemed to be exactly the same in a binary compare, the equal sign with have binary bits (0101) next to it. If equality is determined by a rules-based compare, the equal sign will not have binary bits next to it and does not signify that the files are exactly the same.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment

    • imightbewrong
      Visitor
      • Sep 2008
      • 7

      #3
      Hi Michael - thanks for the quick reply, although I doesn't quite do it for me (or I don't get it).

      I have changed the 'comparison' tab to tick 'compare contents'/'binary' and override quick results. If I then do 'select all' then 'compare contents', the files are marked as different, with the a little 0111 next to the not-equals sign. Edit> does the binary comparison look at the timestamp etc, or just the contesnts? I have no rules set up for unimportant text.

      These files are exactly the same (except for the timestamps) and I want them to appear equal in the viewer. Is there another setting I am missing?

      Also, double clicking on the files still brings up the version comparer, not the contents comparison tool (where you can see the actual contests of the files) as it did in BC2. Again, is this just a setting?

      Thanks.
      Last edited by imightbewrong; 13-May-2009, 07:55 AM.

      Comment

      • imightbewrong
        Visitor
        • Sep 2008
        • 7

        #4
        Okay - I think I get the binary thing now - I should be using rule-based, although I don't exactly understand why.

        I would still like to get double-click to bring up the text contents comparer though.

        Thanks!

        Comment

        • Erik
          Team Scooter
          • Oct 2007
          • 437

          #5
          Originally posted by imightbewrong
          These files are exactly the same (except for the timestamps)
          Based on your comments, I don't think this is true. Files that are exactly the same will show up that way if you use a binary compare.

          Originally posted by imightbewrong
          I would still like to get double-click to bring up the text contents comparer though.
          I'd guess that your files have executable extensions (*.386;*.bcp;*.bpl;*.dll;*.drv;*.exe;*.ocx;*.scr;* .sys;*.vxd). Assuming that is true, select Tools -> File Formats and find "Executables" in the list. You can either uncheck it (prevent any files from opening in Version Compare) or change its Mask (change which file extensions are opened in Version Compare).
          Erik Scooter Software

          Comment

          • Michael Bulgrien
            Carpal Tunnel
            • Oct 2007
            • 1772

            #6
            Originally posted by imightbewrong
            does the binary comparison look at the timestamp etc, or just the contesnts?
            Just the file itself (contents) not the external attributes (timestamp, etc.)

            Originally posted by imightbewrong
            Also, double clicking on the files still brings up the version comparer, not the contents comparison tool (where you can see the actual contests of the files) as it did in BC2. Again, is this just a setting?
            Version compare should only come up for non-text files (executables, dlls, etc.) If this is not the case, then something is wrong on your system. You can always override the version compare by right-clicking and choosing "Open With -> Hex Compare" from the context menu.

            If you really don't like the version compare pane, click Tools \ File Formats... and remove the checkmark from the Executables format to disable it.
            BC v4.0.7 build 19761
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

            Comment

            • imightbewrong
              Visitor
              • Sep 2008
              • 7

              #7
              Originally posted by Erik
              Based on your comments, I don't think this is true. Files that are exactly the same will show up that way if you use a binary compare.
              Okay - perhaps something is different but I don't know enough to know what - not to worry.

              Originally posted by Erik
              I'd guess that your files have executable extensions (*.386;*.bcp;*.bpl;*.dll;*.drv;*.exe;*.ocx;*.scr;* .sys;*.vxd). Assuming that is true, select Tools -> File Formats and find "Executables" in the list. You can either uncheck it (prevent any files from opening in Version Compare) or change its Mask (change which file extensions are opened in Version Compare).
              Good guess! It's a .bcp file (a text file for insertion into a database - although I believe there may be other uses for the extension).

              Is this a new thing in BC3? I don't recall making that change in BC2 (although I did set it up ages ago).


              Thanks a lot!

              Comment

              • Erik
                Team Scooter
                • Oct 2007
                • 437

                #8
                The change in BC3 that is affecting you is that the Version Compare is now built-in instead of being a separate download (plug-in). One of the extensions our program uses is .bcp (stands for Beyond Compare plug-in) which makes sense to open with Version Compare. The fix for you is to remove *.bcp from the "Executables" file format.
                Erik Scooter Software

                Comment

                • Michael Bulgrien
                  Carpal Tunnel
                  • Oct 2007
                  • 1772

                  #9
                  Originally posted by imightbewrong
                  These files are exactly the same (except for the timestamps) and I want them to appear equal in the viewer. Is there another setting I am missing?
                  The files are not exactly the same if a binary compare shows them as different. Some things you can try:

                  You can open the files in a hex compare to view encoding differences. Unicode files will often have additional BOM characters (byte order mark) at the beginning of the file. Unicode 16 formats will use two hex bytes to represent each character while Unicode 8 formats will use a single byte to represent each character, etc.

                  You can switch between Hex Details and Text Details under the View drop-down menu to look at the current line with greater scrutiny...

                  You can enable the visible whitespace [»] button on the toolbar to see whitespace differences. Trailing spaces, tabs in place of spaces, different line ending characters, can all be viewed when visible whitespace is enabled.

                  You can enable the "Compare line endings" option under the Session Settings \ Importance tab if you want line ending differences to automatically be identified as differences in the text compare.
                  BC v4.0.7 build 19761
                  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                  Comment

                  • imightbewrong
                    Visitor
                    • Sep 2008
                    • 7

                    #10
                    Originally posted by Erik
                    The change in BC3 that is affecting you is that the Version Compare is now built-in instead of being a separate download (plug-in). One of the extensions our program uses is .bcp (stands for Beyond Compare plug-in) which makes sense to open with Version Compare. The fix for you is to remove *.bcp from the "Executables" file format.
                    Thanks - I've done that and all is well.

                    Comment

                    • Michael Bulgrien
                      Carpal Tunnel
                      • Oct 2007
                      • 1772

                      #11
                      Originally posted by Michael Bulgrien
                      You can open the files in a hex compare to view encoding differences.
                      Also, I forgot to mention that if you have the View \ File Info header pane visible, it has an encoding dropdown. Text files may show up as ANSI, Unicode, UTF8, etc. based on how they were saved. Create a text file in Windows notepad and save it. Then do a File \ Save As... and save it using a different encoding. If you compare the two files, they will have identical content (rules-based content compare), but a binary compare will show them as different because the same content is saved to the file in a different encoding format.

                      One last thing you can do is right-click on the column headers in a folder compare and enable the CRC column. This is a checksum calculation that will only be the same if the files are exactly the same from a binary perspective.

                      Note: You may not want to keep the CRC column enabled for large folders and files, however, since BC3 has to read the entire file before it can calulate the checksum.
                      BC v4.0.7 build 19761
                      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                      Comment

                      • imightbewrong
                        Visitor
                        • Sep 2008
                        • 7

                        #12
                        Thanks for your help today guys - I will try out some of those file checking options, but I think essentially I am up and running again

                        Comment

                        • ehansen
                          Visitor
                          • Mar 2015
                          • 3

                          #13
                          I'm working on setting up Beyond Compare to work similarly to WinMerge for directory compares (we are transitioning into BC)... I followed this thread to setup directory compare sessions to do full binary compares by default so that in difference-only view you would instantly see only files with contents that don't match (we often have time-stamp changes). The problem I have is that even if I compare a folder to itself, BC opens, does it's compare, and lists all subfolders in the folder until I manually highlight (CTRL+A) and then choose Compare Contents, at which point they disappear...which leads me to believe something isn't happening properly or they would have not shown up to begin with.

                          Simple to recreate, set your sessions settings to binary and override quick test results, and then compare any folder (with subfolders) to itself and you'll see the subfolders listed until you click them or initiate the compare yourself manually. Can you help me resolve this?

                          Comment

                          • Aaron
                            Team Scooter
                            • Oct 2007
                            • 15945

                            #14
                            Hello,

                            What color are the subfolders before you click them, and is it expanding the subfolder that removes them, or double clicking the files within?

                            From your description, you've set things up correctly. If you view the pair of files, and note the center column between them is populated with an equal or red unequal sign, then those files have had a content scan run. Folders don't show the icon in the center column, but the Session Settings, Binary scan should run on everything as the comparison loads. The Compare Contents active command is similar to a Copy or Delete; it only runs when activated on a selection, and isn't what you are looking for.

                            If the Session Settings are set to run Binary in the Comparison tab, what is currently enabled in the Handling tab? By default "Automatically scan subfolders in background" should be enabled; if not, please enable it. Depending on your filtering and what needs to be removed, you may also want to enable "Automatically scan top-level orphan folders". Without, these folders are still an Orphan status, but wouldn't have been built (size column is unpopulated). Enabling this will also build them as well.

                            If you are still having any trouble, could you post or email a full screen screenshot of a selection but before you double click it? If emailed to [email protected], please include a link back to this forum thread for our reference. Also, if emailed, you can include your Help menu -> Support; Export: BCSupport.zip, which will include a copy of all of your settings which we can look through.
                            Aaron P Scooter Software

                            Comment

                            • ehansen
                              Visitor
                              • Mar 2015
                              • 3

                              #15
                              Hi Aaron, thanks for the reply. If you setup BC similarly and compare a directory to itself does yours show nothing in the difference-only view? To be clear, I'm right clicking in explorer, selecting left folder, and then right-clicking same folder and comparing to itself. I've tried various settings (including those you've suggested here), with no success. I am wondering if anyone there can make BC do it properly?

                              Here's how it looks when the compare opens:
                              https://puu.sh/wUtY1/ab513f685e.png

                              Comparison Settings (default for sessions):
                              https://puu.sh/wUtWT/00da519234.png

                              Handling:
                              https://puu.sh/wUtWp/fee9a94857.png

                              Also, the folders which appear on both sides will disappear as soon as you choose compare contents (as the dialog opens) before you hit start to do the actual compare.
                              Last edited by ehansen; 27-Jul-2017, 10:39 AM.

                              Comment

                              Working...