Feature Req: Recognize moved blocks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dbullock
    Visitor
    • Oct 2005
    • 3

    Feature Req: Recognize moved blocks

    I'd like BC to recognize moved blocks or lines. I am finding it impossible to use BC to compare to files of SQL which are similar but the blocks or some lines are in a slightly different order.

    Thanks,
    Dan

    For example, FILE 1 and FILE 2 below should show as matching in BC, but BC could possibly use lines to show the connection between moved lines or blocks.

    FILE 1:
    Text Line 1
    Text Line 2
    Text Line 3
    Text Line 4
    Text Line 5
    Text Line 6
    Text Line 7
    Text Line 8
    Text Line 9
    Text Line 10

    FILE 2:
    Text Line 6
    Text Line 7
    Text Line 1
    Text Line 4
    Text Line 5
    Text Line 8
    Text Line 2
    Text Line 3
    Text Line 9
    Text Line 10
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Re: Feature Req: Recognize moved blocks

    Detecting moved lines is on our wish list for a future release of BC.

    The best way to compare your files using the current version of BC might be to use our Sort rule. It uses the DOS Sort command to sort lines of text before opening them for comparison in the File Viewer.

    You can download the rule from: http://www.scootersoftware.com/downl...c=kb_morerules
    Chris K Scooter Software

    Comment

    • dbullock
      Visitor
      • Oct 2005
      • 3

      #3
      Re: Feature Req: Recognize moved blocks

      Thank you. Glad to hear it is on the wish list. The sorting you mention should help so long as no tables have the same name for any fields. Otherwise I couldn't tell which table the fields belong. I will try the sorting though.

      I did eval a competing product which claims to support moved blocks, but it failed in detecting the moved lines in my files. Hopefully you can find a way for it to work well.

      Thanks,
      Dan

      Comment

      • dbullock
        Visitor
        • Oct 2005
        • 3

        #4
        Re: Feature Req: Recognize moved blocks

        I tried the sort extension but it didn't work well. I'll need to wait for the added support in version 3.

        The closest I came to getting a good sort was using TEXTools a pretty powerful program.

        Thanks,
        Dan

        Comment

        • Zoë
          Team Scooter
          • Oct 2007
          • 2666

          #5
          Re: Feature Req: Recognize moved blocks

          Dan, there are a few well defined algorithms for finding moved lines and it's quite possible we'll end up using the same one as the competing product you tried. If you have any samples that you could send us it may allow us to line them up better. One thing to keep in mind is that even minor changes will break any move detection; we'll probably be able to handle changes in text marked as unimportant, but anything else probably won't work.
          Zoë P Scooter Software

          Comment

          • davisnw
            New User
            • Feb 2011
            • 1

            #6
            Moved blocks plus language specific parsing

            I too would find moved block detection incredibly useful. I would also find useful the ability to add in language specific awareness of method boundaries etc, for example to allow lining up along method boundaries regardless of location in the file (with capabilities to say manually align methods if desired)

            It's possible that a combination of moved blocks and language syntax awareness might also yield better initial results and require less manual moving.

            Perhaps a relatively simple approach to language awareness would be to allow definition of syntax files via regular expressions for methods, method parameters, properties (in the case of languages like C#), member variables, etc.

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 15997

              #7
              Thanks for the suggestion. We are still interested in example files and use cases. Please feel free to email them to us at [email protected]. If you do, please include a link back to this forum post for reference.
              Aaron P Scooter Software

              Comment

              • EugeneB
                Visitor
                • Dec 2010
                • 3

                #8
                It is a great feature!
                I think it would be particularly useful for resolving conflict caused by reorganizing code structure, e.g. if methods of a particular class in a particular file were sorted alphabetically and some of the methods was modified by another user it should help to resolve conflicts more smoothly (or even automatically resolve them).

                Comment

                • zartc
                  Visitor
                  • Nov 2012
                  • 4

                  #9
                  Hello, any projection on when the "moved block detection" will eventually be implemented in BC ? (it's been seven years of reflexion now
                  There are more and more compare program out there that implement this feature now, BC is starting to lag seriously in this area.
                  ZC

                  Comment

                  • Aaron
                    Team Scooter
                    • Oct 2007
                    • 15997

                    #10
                    Hello,

                    Handling this internally is still something on our wishlist. Using an external conversion is our current workaround. Here's an example using a custom conversion for RESX:
                    http://www.scootersoftware.com/suppo...rnalconversion
                    Aaron P Scooter Software

                    Comment

                    • Vasili Galka
                      New User
                      • May 2013
                      • 1

                      #11
                      I would like to add my vote for this feature. It will be extremely helpful.
                      Actually I came to the forum just to propose it.
                      I'm glad that others need it too, pity it still wasn't implemented in so many years :-(

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 15997

                        #12
                        Thanks for your input. This is still something on our wishlist.
                        Aaron P Scooter Software

                        Comment

                        • rob_levine
                          New User
                          • Nov 2014
                          • 1

                          #13
                          I'd like to vote for this feature too; it is the only key feature missing from BeyondCompare IMHO.

                          Comment

                          • rtanski
                            Visitor
                            • Feb 2021
                            • 3

                            #14
                            Hello

                            It has been 16 years since this feature has been requested. has it yet been implemented?

                            regards

                            Comment

                            • Chris
                              Team Scooter
                              • Oct 2007
                              • 5538

                              #15
                              Sorry, moved block detection is still not available in Beyond Compare's Text Compare.

                              Possible workarounds:
                              • Use the Sorted file format in the Text Compare.
                              • Use a source code beautifier/formatter before comparison in the Text Compare.
                              • Use the XML sorted file format for XML in the Text Compare.
                              • Use the Table Compare for sorted comparison if data is a list, CSV, or tab delimited.
                              Chris K Scooter Software

                              Comment

                              Working...