Suggestion: Enhanced content comparison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • James Clark
    Journeyman
    • Oct 2007
    • 11

    Suggestion: Enhanced content comparison

    It would be very useful when performing a folder compare if only certain differences would be detected as an important difference.

    For example, when comparing two source trees, there can be many different files. If I am only looking for changes relating to "widget" it would be good to be able to include in the comparison criteria (or in a post-process filter operation):

    Ignore unless change includes: "widget".

    (There could also be an "Ignore if change includes"... option.)

    Ideally, the "widget" field could be regular text, or RegEx.

    This would be a pretty powerful way to look for specific differences (and I could really use it right now!).
  • Michael Bulgrien
    Carpal Tunnel
    • Oct 2007
    • 1772

    #2
    Sounds like it would, indeed, be a useful feature. Along the same lines, it is sometimes desireable to find files that contain specific content (whether or not there are differences between the LHS and the RHS). Ultra-edit has a "Find in Files" option that often comes in handy. This functionality could be combined with Jame's request:

    A possible implementation could be a Content Filter category under the Other Filters tab in the Session Settings dialog.

    Filter text: [_____________________]
    [ ] Ignore Case
    [ ] Regular Expression

    ( ) Ignore files containing filter text
    ( ) Ignore files not containing filter text
    ( ) Ignore file pairs if difference includes filter text
    ( ) Ignore file pairs unless difference includes filter text
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment

    • Tim
      Team Scooter
      • Oct 2007
      • 786

      #3
      Thanks for your suggestion.

      Originally posted by James Clark
      Ignore unless change includes: "widget".
      I believe you can accomplish this now. You can define a new element type in the file format's grammar, and in the session set everything unimportant except for the new element.

      Originally posted by James Clark
      There could also be an "Ignore if change includes"... option.
      The Text Compare's "Replacements" feature is designed to handle this. You can find it on the session settings dialog's Replacements tab.
      Tim T Scooter Software

      Comment

      • Tim
        Team Scooter
        • Oct 2007
        • 786

        #4
        Originally posted by Michael Bulgrien
        A possible implementation could be a Content Filter category under the Other Filters tab in the Session Settings dialog.
        Thanks, Michael. Content Filters and/or Find In Files have been on our long term TODO list for some time, but unfortunately didn't make it into 3.0.
        Tim T Scooter Software

        Comment

        • James Clark
          Journeyman
          • Oct 2007
          • 11

          #5
          Originally posted by Tim
          I believe you can accomplish this now. You can define a new element type in the file format's grammar, and in the session set everything unimportant except for the new element.
          I did wonder if this could be done like this. Though it's perhaps a bit cryptic/advanced for many users?

          Comment

          • Tim
            Team Scooter
            • Oct 2007
            • 786

            #6
            Originally posted by James Clark
            Though it's perhaps a bit cryptic/advanced for many users?
            Yes, that's our problem. It's not particularly hard to do, but it's hard for users to figure out how to do it. We'll be working more on this.
            Last edited by Tim; 14-May-2008, 09:38 AM.
            Tim T Scooter Software

            Comment

            Working...