How to I increase conflict range from command line merge?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • davenovak
    Expert
    • May 2008
    • 58

    How to I increase conflict range from command line merge?

    When performing a 3-way text merge manually, there are session settings (under the Alignment tab) that control what a merge conflict is. The description for this in the help is as follows:
    A merge conflict is...

    These settings define the scope of conflicts. A conflict occurs when the same section of text has changes on both left and right sides.

    Select Only different change lines to limit conflicts to where each line has changes on both sides. Select Left change and right change separated by lines to specify the maximum number of lines between changes that should be considered conflicts. This way, left and right changes that are close to each other can be flagged for review along with direct conflicts.

    By default, the number of lines is set to 1; I'd like to increase this to 15 or so for my automated merge script, just not as a general rule. Here's my merge script:
    Code:
    @ECHO OFF
    if "%1"=="" goto HELP_USAGE
    
    SET BC3_PROGRAM=C:\Program Files (x86)\Beyond Compare 3\BComp.exe
    SET LEFT_ROOT=C:\Src\Crytek_Releases\v3_2_4
    SET RIGHT_ROOT=C:\Src\CryENGINE3
    SET ANCESTOR_ROOT=C:\Src\Crytek_Releases\v3_2_0
    SET OUTPUT_ROOT=C:\Src\Xaviant_Merge\v3_2_4\CryENGINE3
    SET FILE_NAME=%*
    SET LEFT_FILE=%LEFT_ROOT%\%FILE_NAME%
    SET RIGHT_FILE=%RIGHT_ROOT%\%FILE_NAME%
    SET ANCESTOR_FILE=%ANCESTOR_ROOT%\%FILE_NAME%
    SET MERGED_FILE=%OUTPUT_ROOT%\%FILE_NAME%
    SET BC3_ARGS=/title1="Crytek: %LEFT_FILE%" /title2="Xaviant: %RIGHT_FILE%" /title3="Ancestor: %ANCESTOR_FILE%" /title4="Merged: %MERGED_FILE%" /automerge /nobackups /reviewconflicts
    
    "%BC3_PROGRAM%" %BC3_ARGS% "%LEFT_FILE%" "%RIGHT_FILE%" "%ANCESTOR_FILE%" "%MERGED_FILE%"
    goto EXIT
    
    :HELP_USAGE
    ECHO USAGE: AutoMerge "{relative file name}"
    goto EXIT
    
    :EXIT
    @ECHO ON
    Here's how I call my merge script:
    Code:
    call AutoMerge.bat Code\Game\LichdomGame\PlayerInput.cpp
    call AutoMerge.bat Code\Game\LichdomGame\PlayerInput.h
    call AutoMerge.bat Code\Game\LichdomGame\PlayerMovement.cpp
    call AutoMerge.bat Code\Game\LichdomGame\PlayerMovementController.cpp
    How can I increase the scope of my conflict range? Any suggestions would be appreciated.

    Thanks!
  • Aaron
    Team Scooter
    • Oct 2007
    • 16009

    #2
    Hello,

    You can set default session settings from the Home screen. In in the initial home screen, expand the Edit session defaults folder in the Save Sessions list.
    Select the Text Merge session, and go to the Alignment tab. From here, change the number from 1 to "15".

    This will apply to all future Text Merge sessions, including any script run as the same user. Please note that settings are store per Windows User account by default, so script will need to run as the same user that uses the program interactively. If this is an issue, let us know and we can help you setup a Portable install.

    How does that work for you?
    Aaron P Scooter Software

    Comment

    • davenovak
      Expert
      • May 2008
      • 58

      #3
      Being able to override the default from the command line is preferable, but your suggestion is workable for the time being.

      Thanks!

      Comment

      Working...