Announcement

Collapse
No announcement yet.

3-Way Merge - Force conflict for specific lines

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

  • 3-Way Merge - Force conflict for specific lines

    Hey Scooter Software Community,

    We're using BC4's 3-way merge tool to reconcile differences between production and development versions of files. Due to how we manage our dev files are managed, they often contain references to other items within our development environment. When we merge dev changes into production, we don't want these dev references to be deployed.

    For example, in the Dev file we're referencing another Dev resource. Right now, because only a change has been detected on the left, the "_dev(001)_" change is merged into the output, without raising any conflicts.

    Dev File (Left)
    INCLUDE "_dev(001)_Include.pdi"

    Ancestor
    INCLUDE "Include.pdi"

    Live File (Right)
    INCLUDE "Include.pdi"

    Output
    INCLUDE "_dev(001)_Include.pdi"

    Desired Output (ignore change, prevent dev reference from going live.)
    Include.pdi

    At minimum, is there a way to use a regular expression to detect this line and always raise a conflict if present?

    I don't believe it would be reasonable to expect this but is it possible to automatically detect and ignore this difference to get the desired output?

    Because of this, we're unable to confidently utilize the automerge functionality to streamline basic set lives.

    Thanks!

    As an aside, has the option to enable a pop-up to warn about unresolved conflicts been added yet? It appears this was still on the customer wishlist from 2010 to 2016 based on the following post, and still seems to be missing from the current release.
    https://www.scootersoftware.com/vbul...lved-conflicts

  • #2
    Hello,

    Beyond Compare's Text Merge isn't designed to handle this scenario, but we could accomplish something similar in a two-pass, graphical method. If you create a grammar element in the File Format to match on your "tag" _dev(\d\d\d)_, then mark this element as Important, and Everything Else as Unimportant in the Session Settings, Importance tab, this should leave you with only this text as Important.

    Toggle on Ignore Unimportant Differences to hide all other differences as black text (instead of blue), then you can navigate to each Differences (not conflicts) and take the Other Side (without _dev_). This would leave the output with the non-dev sides take. You can then go back to the Session Settings Importance tab, and invert the items (so Everything Else is Important and the tag is unimportant) to perform the second pass and merge the file.

    The Conflict Save behavior is something still on our radar; I've added your notes to our entry on the subject.
    Aaron P Scooter Software

    Comment


    • #3
      I should add that I've added this scenario to our Customer Wishlist, along with notes about raising the conflict, or defining something similar to a Text Replacement for the variable name, so it could be treated as the regular version of the variable name for merging purposes.
      Aaron P Scooter Software

      Comment

      Working...
      X