/AWS1/IF_CMT=>GETMERGECONFLICTS()¶
About GetMergeConflicts¶
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
Method Signature¶
METHODS /AWS1/IF_CMT~GETMERGECONFLICTS
IMPORTING
!IV_REPOSITORYNAME TYPE /AWS1/CMTREPOSITORYNAME OPTIONAL
!IV_DSTCOMMITSPECIFIER TYPE /AWS1/CMTCOMMITNAME OPTIONAL
!IV_SOURCECOMMITSPECIFIER TYPE /AWS1/CMTCOMMITNAME OPTIONAL
!IV_MERGEOPTION TYPE /AWS1/CMTMERGEOPTIONTYPEENUM OPTIONAL
!IV_CONFLICTDETAILLEVEL TYPE /AWS1/CMTCONFLICTDETLEVELTYP00 OPTIONAL
!IV_MAXCONFLICTFILES TYPE /AWS1/CMTMAXRESULTS OPTIONAL
!IV_CONFLICTRESOLUTIONSTRAG TYPE /AWS1/CMTCONFLICTRESOLUTIONS00 OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/CMTNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cmtgetmergeconflict01
RAISING
/AWS1/CX_CMTCOMMITDOESNOTEXEX
/AWS1/CX_CMTCOMMITREQUIREDEX
/AWS1/CX_CMTENCINTEGRITYCHXF00
/AWS1/CX_CMTENCKEYACCDENIEDEX
/AWS1/CX_CMTENCKEYDISABLEDEX
/AWS1/CX_CMTENCKEYNOTFOUNDEX
/AWS1/CX_CMTENCKEYUNAVAILEX
/AWS1/CX_CMTINVALIDCOMMITEX
/AWS1/CX_CMTINVCONFLICTDETLE00
/AWS1/CX_CMTINVCONFLICTRESOL01
/AWS1/CX_CMTINVCONTINUATIONT00
/AWS1/CX_CMTINVDSTCOMMITSPEC00
/AWS1/CX_CMTINVMAXCONFLICTFI00
/AWS1/CX_CMTINVMERGEOPTIONEX
/AWS1/CX_CMTINVREPOSITORYNAM00
/AWS1/CX_CMTINVSRCCOMMITSPEC00
/AWS1/CX_CMTMAXFILECONTTOLOA00
/AWS1/CX_CMTMAXITEMSTOCOMPAR00
/AWS1/CX_CMTMERGEOPTIONREQUI00
/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 the pull request was created.
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).
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_mergeoption TYPE /AWS1/CMTMERGEOPTIONTYPEENUM /AWS1/CMTMERGEOPTIONTYPEENUM¶
The merge option or strategy you want to use to merge the code.
Optional arguments:¶
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_maxconflictfiles TYPE /AWS1/CMTMAXRESULTS /AWS1/CMTMAXRESULTS¶
The maximum number of files to include in the output.
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_nexttoken TYPE /AWS1/CMTNEXTTOKEN /AWS1/CMTNEXTTOKEN¶
An enumeration token that, when provided in a request, returns the next batch of the results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cmtgetmergeconflict01 /AWS1/CL_CMTGETMERGECONFLICT01¶
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->getmergeconflicts(
iv_conflictdetaillevel = |string|
iv_conflictresolutionstrag = |string|
iv_dstcommitspecifier = |string|
iv_maxconflictfiles = 123
iv_mergeoption = |string|
iv_nexttoken = |string|
iv_repositoryname = |string|
iv_sourcecommitspecifier = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_ismergeable = lo_result->get_mergeable( ).
lv_objectid = lo_result->get_destinationcommitid( ).
lv_objectid = lo_result->get_sourcecommitid( ).
lv_objectid = lo_result->get_basecommitid( ).
LOOP AT lo_result->get_conflictmetadatalist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_path = lo_row_1->get_filepath( ).
lo_filesizes = lo_row_1->get_filesizes( ).
IF lo_filesizes IS NOT INITIAL.
lv_filesize = lo_filesizes->get_source( ).
lv_filesize = lo_filesizes->get_destination( ).
lv_filesize = lo_filesizes->get_base( ).
ENDIF.
lo_filemodes = lo_row_1->get_filemodes( ).
IF lo_filemodes IS NOT INITIAL.
lv_filemodetypeenum = lo_filemodes->get_source( ).
lv_filemodetypeenum = lo_filemodes->get_destination( ).
lv_filemodetypeenum = lo_filemodes->get_base( ).
ENDIF.
lo_objecttypes = lo_row_1->get_objecttypes( ).
IF lo_objecttypes IS NOT INITIAL.
lv_objecttypeenum = lo_objecttypes->get_source( ).
lv_objecttypeenum = lo_objecttypes->get_destination( ).
lv_objecttypeenum = lo_objecttypes->get_base( ).
ENDIF.
lv_numberofconflicts = lo_row_1->get_numberofconflicts( ).
lo_isbinaryfile = lo_row_1->get_isbinaryfile( ).
IF lo_isbinaryfile IS NOT INITIAL.
lv_capitalboolean = lo_isbinaryfile->get_source( ).
lv_capitalboolean = lo_isbinaryfile->get_destination( ).
lv_capitalboolean = lo_isbinaryfile->get_base( ).
ENDIF.
lv_iscontentconflict = lo_row_1->get_contentconflict( ).
lv_isfilemodeconflict = lo_row_1->get_filemodeconflict( ).
lv_isobjecttypeconflict = lo_row_1->get_objecttypeconflict( ).
lo_mergeoperations = lo_row_1->get_mergeoperations( ).
IF lo_mergeoperations IS NOT INITIAL.
lv_changetypeenum = lo_mergeoperations->get_source( ).
lv_changetypeenum = lo_mergeoperations->get_destination( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.