Announcement

Collapse
No announcement yet.

Actually Ignoring Unimportant Diff.s

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Actually Ignoring Unimportant Diff.s

    I've tried "everything" & I can't get it to do this as well as it alleges to.
    We really need this for team VCS use w/o formatting legislation.
    (java)
    eg: the diff. betw/ block braces being on their own line or not
    (Yes, I *have* tried the various line-end stuff, but...)

  • #2
    Re: Actually Ignoring Unimportant Diff.s

    IIRC, bc does a line-by-line compare, so if one file has a line like
    foo; }
    and the other file has this as 2 lines
    foo;
    }
    Then I would *expect* bc to consider these different.

    One way around this would be to use a helper program to provide uniform formatting as input to bc. A pretty printer, for instance. This is similar to some of the techniques I've seen for, as an example, excel files.

    Good luck!

    /dps

    Comment


    • #3
      Re: Actually Ignoring Unimportant Diff.s

      Yes, the best way to deal with comparison of files with line break differences is to use something to format the code before it is opened in Beyond Compare.

      For Java we already have an Add On Rule to do this. Try the Jalopy rule from:
      http://www.scootersoftware.com/downl...c=kb_morerules
      Chris K Scooter Software

      Comment


      • #4
        Possible to ignore brace differences?

        Is possible to add a rule to BC in order to be able to mark a change like the one mentioned above:

        Code:
        foo; }
        and the other file has this as 2 lines
        foo;
        }
        as an unimportant difference? This way I can hide them with the "Ignore Unimportant Differences" option?

        Comment


        • #5
          Beyond Compare can't ignore differences that go across line breaks. This is still on our wish list for a future version of BC.

          The best workaround is to find a source code formatting tool for whatever programming language you're using, then run the files through it before opening them for comparison in BC.

          If you find a command line code formatter that works with your files, you can have BC automatically run it before files are compared. To specify a command line text processor, select "Tools > File Formats". Select the format that matches your files. Go to the Conversion tab. Change Conversion from "None" to "External program (Unicode filenames)". In the "Loading" edit, enter the path to your conversion tool, followed by %s and %t to pass the source (original) and target (output) filenames to the utility.

          For an example of a file format that already uses an external conversion utility, see the PDF Documents file format that comes with Beyond Compare. It runs PDF files through a text extraction tool, then outputs the results to temporary text file that BC opens in the Text Compare.
          Chris K Scooter Software

          Comment


          • #6
            Originally posted by Chris View Post
            Beyond Compare can't ignore differences that go across line breaks. This is still on our wish list for a future version of BC.

            The best workaround is to find a source code formatting tool for whatever programming language you're using, then run the files through it before opening them for comparison in BC.

            If you find a command line code formatter that works with your files, you can have BC automatically run it before files are compared. To specify a command line text processor, select "Tools > File Formats". Select the format that matches your files. Go to the Conversion tab. Change Conversion from "None" to "External program (Unicode filenames)". In the "Loading" edit, enter the path to your conversion tool, followed by %s and %t to pass the source (original) and target (output) filenames to the utility.

            For an example of a file format that already uses an external conversion utility, see the PDF Documents file format that comes with Beyond Compare. It runs PDF files through a text extraction tool, then outputs the results to temporary text file that BC opens in the Text Compare.
            Is this feature already available in the latest version?

            Comment


            • #7
              No, you would still need to use a conversion, like HTML Tidy or XML Tidy, to reformat the line breaks and then compare them line by line.
              Aaron P Scooter Software

              Comment


              • #8
                Any movement on this? We've been waiting a long time...

                Comment


                • #9
                  Hello,

                  BC4 currently only supports the External Conversion method. If you have example files you would like to post (or email to support@scootersoftware.com with a link back to this forum thread for reference), we could add them to our test cases.
                  Aaron P Scooter Software

                  Comment

                  Working...
                  X