/AWS1/IF_CMT=>MERGEBRANCHESBYSQUASH()¶
About MergeBranchesBySquash¶
Merges two branches using the squash merge strategy.
Method Signature¶
METHODS /AWS1/IF_CMT~MERGEBRANCHESBYSQUASH
IMPORTING
!IV_REPOSITORYNAME TYPE /AWS1/CMTREPOSITORYNAME OPTIONAL
!IV_SOURCECOMMITSPECIFIER TYPE /AWS1/CMTCOMMITNAME OPTIONAL
!IV_DSTCOMMITSPECIFIER TYPE /AWS1/CMTCOMMITNAME OPTIONAL
!IV_TARGETBRANCH TYPE /AWS1/CMTBRANCHNAME OPTIONAL
!IV_CONFLICTDETAILLEVEL TYPE /AWS1/CMTCONFLICTDETLEVELTYP00 OPTIONAL
!IV_CONFLICTRESOLUTIONSTRAG TYPE /AWS1/CMTCONFLICTRESOLUTIONS00 OPTIONAL
!IV_AUTHORNAME TYPE /AWS1/CMTNAME OPTIONAL
!IV_EMAIL TYPE /AWS1/CMTEMAIL OPTIONAL
!IV_COMMITMESSAGE TYPE /AWS1/CMTMESSAGE OPTIONAL
!IV_KEEPEMPTYFOLDERS TYPE /AWS1/CMTKEEPEMPTYFOLDERS OPTIONAL
!IO_CONFLICTRESOLUTION TYPE REF TO /AWS1/CL_CMTCONFLICTRESOLUTION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cmtmergebranchesbys01
RAISING
/AWS1/CX_CMTBRANCHDOESNOTEXEX
/AWS1/CX_CMTBRANCHNAMEISTAGN00
/AWS1/CX_CMTBRANCHNAMEREQUIR00
/AWS1/CX_CMTCOMMITDOESNOTEXEX
/AWS1/CX_CMTCOMMITMSGLENGTHE00
/AWS1/CX_CMTCOMMITREQUIREDEX
/AWS1/CX_CMTCONCURRENTREFERE00
/AWS1/CX_CMTENCINTEGRITYCHXF00
/AWS1/CX_CMTENCKEYACCDENIEDEX
/AWS1/CX_CMTENCKEYDISABLEDEX
/AWS1/CX_CMTENCKEYNOTFOUNDEX
/AWS1/CX_CMTENCKEYUNAVAILEX
/AWS1/CX_CMTFILECONTSIZELMTE00
/AWS1/CX_CMTFILEMODEREQUIREDEX
/AWS1/CX_CMTFOLDERCONTSIZELM00
/AWS1/CX_CMTINVBRANCHNAMEEX
/AWS1/CX_CMTINVALIDCOMMITEX
/AWS1/CX_CMTINVCONFLICTDETLE00
/AWS1/CX_CMTINVCONFLICTRESOL00
/AWS1/CX_CMTINVCONFLICTRESOL01
/AWS1/CX_CMTINVALIDEMAILEX
/AWS1/CX_CMTINVALIDFILEMODEEX
/AWS1/CX_CMTINVALIDPATHEX
/AWS1/CX_CMTINVREPLCMTCONTEX
/AWS1/CX_CMTINVREPLCMTTYPEEX
/AWS1/CX_CMTINVREPOSITORYNAM00
/AWS1/CX_CMTINVTARGETBRANCHEX
/AWS1/CX_CMTMANUALMERGEREQUI00
/AWS1/CX_CMTMAXCONFLICTRESOL00
/AWS1/CX_CMTMAXFILECONTTOLOA00
/AWS1/CX_CMTMAXITEMSTOCOMPAR00
/AWS1/CX_CMTMULTIPLECONFLICT00
/AWS1/CX_CMTNAMELENGTHEXCDEX
/AWS1/CX_CMTPATHREQUIREDEX
/AWS1/CX_CMTREPLCCONTREQUIRE00
/AWS1/CX_CMTREPLCTYPEREQUIRE00
/AWS1/CX_CMTREPOSITORYDOESNO00
/AWS1/CX_CMTREPOSITORYNAMERE00
/AWS1/CX_CMTTIPSDIVERGENCEEX00
/AWS1/CX_CMTCLIENTEXC
/AWS1/CX_CMTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_repositoryname TYPE /AWS1/CMTREPOSITORYNAME /AWS1/CMTREPOSITORYNAME¶
The name of the repository where you want to merge two branches.
iv_sourcecommitspecifier TYPE /AWS1/CMTCOMMITNAME /AWS1/CMTCOMMITNAME¶
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
iv_dstcommitspecifier TYPE /AWS1/CMTCOMMITNAME /AWS1/CMTCOMMITNAME¶
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Optional arguments:¶
iv_targetbranch TYPE /AWS1/CMTBRANCHNAME /AWS1/CMTBRANCHNAME¶
The branch where the merge is applied.
iv_conflictdetaillevel TYPE /AWS1/CMTCONFLICTDETLEVELTYP00 /AWS1/CMTCONFLICTDETLEVELTYP00¶
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
iv_conflictresolutionstrag TYPE /AWS1/CMTCONFLICTRESOLUTIONS00 /AWS1/CMTCONFLICTRESOLUTIONS00¶
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
iv_authorname TYPE /AWS1/CMTNAME /AWS1/CMTNAME¶
The name of the author who created the commit. This information is used as both the author and committer for the commit.
iv_email TYPE /AWS1/CMTEMAIL /AWS1/CMTEMAIL¶
The email address of the person merging the branches. This information is used in the commit information for the merge.
iv_commitmessage TYPE /AWS1/CMTMESSAGE /AWS1/CMTMESSAGE¶
The commit message for the merge.
iv_keepemptyfolders TYPE /AWS1/CMTKEEPEMPTYFOLDERS /AWS1/CMTKEEPEMPTYFOLDERS¶
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file is created for empty folders. The default is false.
io_conflictresolution TYPE REF TO /AWS1/CL_CMTCONFLICTRESOLUTION /AWS1/CL_CMTCONFLICTRESOLUTION¶
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cmtmergebranchesbys01 /AWS1/CL_CMTMERGEBRANCHESBYS01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->mergebranchesbysquash(
io_conflictresolution = new /aws1/cl_cmtconflictresolution(
it_deletefiles = VALUE /aws1/cl_cmtdeletefileentry=>tt_deletefileentries(
( new /aws1/cl_cmtdeletefileentry( |string| ) )
)
it_replacecontents = VALUE /aws1/cl_cmtreplacecontentry=>tt_replacecontententries(
(
new /aws1/cl_cmtreplacecontentry(
iv_content = '5347567362473873563239796247513D'
iv_filemode = |string|
iv_filepath = |string|
iv_replacementtype = |string|
)
)
)
it_setfilemodes = VALUE /aws1/cl_cmtsetfilemodeentry=>tt_setfilemodeentries(
(
new /aws1/cl_cmtsetfilemodeentry(
iv_filemode = |string|
iv_filepath = |string|
)
)
)
)
iv_authorname = |string|
iv_commitmessage = |string|
iv_conflictdetaillevel = |string|
iv_conflictresolutionstrag = |string|
iv_dstcommitspecifier = |string|
iv_email = |string|
iv_keepemptyfolders = ABAP_TRUE
iv_repositoryname = |string|
iv_sourcecommitspecifier = |string|
iv_targetbranch = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_objectid = lo_result->get_commitid( ).
lv_objectid = lo_result->get_treeid( ).
ENDIF.