No announcement yet.

Feature suggestion - swap file/section

  • Filter
  • Time
  • Show
Clear All
new posts

  • Feature suggestion - swap file/section

    Long-time user and fan of BeyondCompare! It's not often I find anything missing in this tool but....

    I tend to work with several branches of a codebase simultaneously (checked out to different folders) and occasionally I make changes on the wrong branch. When I notice this prior to commit I fire up BeyondCompare to diff the two branches and move the changes over to the correct branch.

    Beyond Compare currently allows me to copy a section or entire file left or right but it would be a real convenience if there was also a "swap" operation. So in the scenario where I have modified file wrong-branch/foo.cs and want the changes in right-branch/foo.cs I could just use the swap operation to both move the changes to right-branch and backout the changes in wrong-branch. (For the sake of this example you can assume that the two branches are closely enough related that taking the unmodified file/section from right-branch is equivalent to backing out.)

    Keep up the good work :-)

  • #2
    BC4 has a visual "Swap" command, to flip sides in the interface, but this would not move the edits like you recommend. A "flip" or "switch" command is something I can add to our wishlist.
    Aaron P Scooter Software


    • #3
      Beyond Compare 4 already has this command, it's just not on the menu by default. The command is called Exchange.

      To enable the command:
      Open Tools > Options.
      Go to the Toolbars, etc. section.
      In the Select view dropdown, choose Folder Compare.
      Go to the Exchange command, then check Menu Actions and Toolbar.

      After you've enabled the command, select a file on both sides, then right click and select Exchange to move the files to opposite sides.
      Chris K Scooter Software


      • #4
        That's great! Is there a corresponding action for the "Text Compare" view? Although it's less important it would be quite nice to be able to exchange a section of a file rather than the entire thing.


        • #5
          The Text Compare doesn't have a corresponding action, it's on the feature wish list for a future version.

          The closest workflow for the Text Compare is to select a line or lines, right click and use the Isolate command, then copy and delete.
          Chris K Scooter Software