davenovak
23-Dec-2010, 07:34 AM
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:
@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:
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!
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:
@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:
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!