Announcement

Collapse
No announcement yet.

Automatically solving merge conflicts by running custom script

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

  • Automatically solving merge conflicts by running custom script

    Hey Guys,

    I'm using git mergetool with beyond compare 4 (4.2.4) for solving git merge conflicts.
    In my project files i often have markers for date/time/version-list that always gives me an merge conflict.
    I would like to automate the resolutions of those conflicts. For e.g. selecting the latest date, or version (there's a clear logic that i could script).

    How could i achieve it using it BC4?
    Can I execute powershell script everytime mergetool opens me a new merge file?

    Best Regards,
    Gintautas


  • #2
    Hello,

    BC4's comparison can help align specific differences, and define specific sections of text as Unimportant, but the Text Compare/Merge session type does not support a numeric or date comparison for finding Larger/Newer or Smaller/Older within a text section.

    If you define this header section as Unimportant, and then set the view to disable Ignore Unimportant Differences, the files will show up as containing Similar, or only Unimportant, differences, if that is the only difference present in the files.

    We have a KB article and video for defining Unimportant text, available here:
    http://www.scootersoftware.com/suppo..._unimportantv3

    Of quick note: all BC4.x updates are free for 4.x users, so you can update to the latest release for free from our Help menu -> Check for Updates or via our website:
    http://www.scootersoftware.com/download.php
    Aaron P Scooter Software

    Comment


    • #3
      Marking those changes unimportant won't help. I still need to merge those changes.

      Comment


      • #4
        Hello,

        The toggle could help limit the view to only files that contain other (non-header) differences, resolve them, and then disabling the toggle to set the view to only files that contain the header differences that need manual intervention.

        Defining a grammar that can evaluate larger/smaller or newer/older is not something supported in the Text Compare of BC4.
        Aaron P Scooter Software

        Comment

        Working...
        X