mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
separate repo from CREATE_TAG
This commit is contained in:
parent
d431f2d9d0
commit
71b7f9d788
|
@ -34,7 +34,7 @@ CLASS zcl_abapgit_git_porcelain DEFINITION
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS create_tag
|
CLASS-METHODS create_tag
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!io_repo TYPE REF TO zcl_abapgit_repo_online
|
!iv_url TYPE string
|
||||||
!is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
!is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
@ -59,75 +59,85 @@ CLASS zcl_abapgit_git_porcelain DEFINITION
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
TYPES: BEGIN OF ty_tree,
|
|
||||||
|
TYPES:
|
||||||
|
BEGIN OF ty_tree,
|
||||||
path TYPE string,
|
path TYPE string,
|
||||||
data TYPE xstring,
|
data TYPE xstring,
|
||||||
sha1 TYPE zif_abapgit_definitions=>ty_sha1,
|
sha1 TYPE zif_abapgit_definitions=>ty_sha1,
|
||||||
END OF ty_tree .
|
END OF ty_tree .
|
||||||
|
TYPES:
|
||||||
TYPES: ty_trees_tt TYPE STANDARD TABLE OF ty_tree WITH DEFAULT KEY.
|
ty_trees_tt TYPE STANDARD TABLE OF ty_tree WITH DEFAULT KEY .
|
||||||
|
TYPES:
|
||||||
TYPES: BEGIN OF ty_folder,
|
BEGIN OF ty_folder,
|
||||||
path TYPE string,
|
path TYPE string,
|
||||||
count TYPE i,
|
count TYPE i,
|
||||||
sha1 TYPE zif_abapgit_definitions=>ty_sha1,
|
sha1 TYPE zif_abapgit_definitions=>ty_sha1,
|
||||||
END OF ty_folder .
|
END OF ty_folder .
|
||||||
|
TYPES:
|
||||||
|
ty_folders_tt TYPE STANDARD TABLE OF ty_folder WITH DEFAULT KEY .
|
||||||
|
|
||||||
TYPES: ty_folders_tt TYPE STANDARD TABLE OF ty_folder WITH DEFAULT KEY.
|
CONSTANTS c_zero TYPE zif_abapgit_definitions=>ty_sha1 VALUE '0000000000000000000000000000000000000000' ##NO_TEXT.
|
||||||
|
|
||||||
CONSTANTS: c_zero TYPE zif_abapgit_definitions=>ty_sha1 VALUE '0000000000000000000000000000000000000000'.
|
|
||||||
|
|
||||||
CLASS-METHODS build_trees
|
CLASS-METHODS build_trees
|
||||||
IMPORTING it_expanded TYPE zif_abapgit_definitions=>ty_expanded_tt
|
IMPORTING
|
||||||
RETURNING VALUE(rt_trees) TYPE ty_trees_tt
|
!it_expanded TYPE zif_abapgit_definitions=>ty_expanded_tt
|
||||||
RAISING zcx_abapgit_exception.
|
RETURNING
|
||||||
|
VALUE(rt_trees) TYPE ty_trees_tt
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS find_folders
|
CLASS-METHODS find_folders
|
||||||
IMPORTING it_expanded TYPE zif_abapgit_definitions=>ty_expanded_tt
|
IMPORTING
|
||||||
RETURNING VALUE(rt_folders) TYPE ty_folders_tt.
|
!it_expanded TYPE zif_abapgit_definitions=>ty_expanded_tt
|
||||||
|
RETURNING
|
||||||
|
VALUE(rt_folders) TYPE ty_folders_tt .
|
||||||
CLASS-METHODS walk
|
CLASS-METHODS walk
|
||||||
IMPORTING it_objects TYPE zif_abapgit_definitions=>ty_objects_tt
|
IMPORTING
|
||||||
iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1
|
!it_objects TYPE zif_abapgit_definitions=>ty_objects_tt
|
||||||
iv_path TYPE string
|
!iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1
|
||||||
CHANGING ct_files TYPE zif_abapgit_definitions=>ty_files_tt
|
!iv_path TYPE string
|
||||||
RAISING zcx_abapgit_exception.
|
CHANGING
|
||||||
|
!ct_files TYPE zif_abapgit_definitions=>ty_files_tt
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS walk_tree
|
CLASS-METHODS walk_tree
|
||||||
IMPORTING it_objects TYPE zif_abapgit_definitions=>ty_objects_tt
|
IMPORTING
|
||||||
iv_tree TYPE zif_abapgit_definitions=>ty_sha1
|
!it_objects TYPE zif_abapgit_definitions=>ty_objects_tt
|
||||||
iv_base TYPE string
|
!iv_tree TYPE zif_abapgit_definitions=>ty_sha1
|
||||||
RETURNING VALUE(rt_expanded) TYPE zif_abapgit_definitions=>ty_expanded_tt
|
!iv_base TYPE string
|
||||||
RAISING zcx_abapgit_exception.
|
RETURNING
|
||||||
|
VALUE(rt_expanded) TYPE zif_abapgit_definitions=>ty_expanded_tt
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS receive_pack_push
|
CLASS-METHODS receive_pack_push
|
||||||
IMPORTING is_comment TYPE zif_abapgit_definitions=>ty_comment
|
IMPORTING
|
||||||
io_repo TYPE REF TO zcl_abapgit_repo_online
|
!is_comment TYPE zif_abapgit_definitions=>ty_comment
|
||||||
it_trees TYPE ty_trees_tt
|
!io_repo TYPE REF TO zcl_abapgit_repo_online
|
||||||
it_blobs TYPE zif_abapgit_definitions=>ty_files_tt
|
!it_trees TYPE ty_trees_tt
|
||||||
io_stage TYPE REF TO zcl_abapgit_stage
|
!it_blobs TYPE zif_abapgit_definitions=>ty_files_tt
|
||||||
RETURNING VALUE(rv_branch) TYPE zif_abapgit_definitions=>ty_sha1
|
!io_stage TYPE REF TO zcl_abapgit_stage
|
||||||
RAISING zcx_abapgit_exception.
|
RETURNING
|
||||||
|
VALUE(rv_branch) TYPE zif_abapgit_definitions=>ty_sha1
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS receive_pack_create_tag
|
CLASS-METHODS receive_pack_create_tag
|
||||||
IMPORTING is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
IMPORTING
|
||||||
io_repo TYPE REF TO zcl_abapgit_repo_online
|
!is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
||||||
RAISING zcx_abapgit_exception.
|
!iv_url TYPE string
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS create_annotated_tag
|
CLASS-METHODS create_annotated_tag
|
||||||
IMPORTING
|
IMPORTING
|
||||||
is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
!is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
||||||
io_repo TYPE REF TO zcl_abapgit_repo_online
|
!iv_url TYPE string
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
|
||||||
CLASS-METHODS create_lightweight_tag
|
CLASS-METHODS create_lightweight_tag
|
||||||
IMPORTING
|
IMPORTING
|
||||||
is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
!is_tag TYPE zif_abapgit_definitions=>ty_git_tag
|
||||||
io_repo TYPE REF TO zcl_abapgit_repo_online
|
!iv_url TYPE string
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,7 +206,7 @@ CLASS ZCL_ABAPGIT_GIT_PORCELAIN IMPLEMENTATION.
|
||||||
|
|
||||||
receive_pack_create_tag(
|
receive_pack_create_tag(
|
||||||
is_tag = is_tag
|
is_tag = is_tag
|
||||||
io_repo = io_repo ).
|
iv_url = iv_url ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -234,7 +244,7 @@ CLASS ZCL_ABAPGIT_GIT_PORCELAIN IMPLEMENTATION.
|
||||||
lv_pack = zcl_abapgit_git_pack=>encode( lt_objects ).
|
lv_pack = zcl_abapgit_git_pack=>encode( lt_objects ).
|
||||||
|
|
||||||
zcl_abapgit_git_transport=>receive_pack(
|
zcl_abapgit_git_transport=>receive_pack(
|
||||||
iv_url = io_repo->get_url( )
|
iv_url = iv_url
|
||||||
iv_old = c_zero
|
iv_old = c_zero
|
||||||
iv_new = is_tag-sha1
|
iv_new = is_tag-sha1
|
||||||
iv_branch_name = is_tag-name
|
iv_branch_name = is_tag-name
|
||||||
|
@ -254,13 +264,13 @@ CLASS ZCL_ABAPGIT_GIT_PORCELAIN IMPLEMENTATION.
|
||||||
|
|
||||||
create_annotated_tag(
|
create_annotated_tag(
|
||||||
is_tag = is_tag
|
is_tag = is_tag
|
||||||
io_repo = io_repo ).
|
iv_url = iv_url ).
|
||||||
|
|
||||||
WHEN zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
|
WHEN zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
|
||||||
|
|
||||||
create_lightweight_tag(
|
create_lightweight_tag(
|
||||||
is_tag = is_tag
|
is_tag = is_tag
|
||||||
io_repo = io_repo ).
|
iv_url = iv_url ).
|
||||||
|
|
||||||
WHEN OTHERS.
|
WHEN OTHERS.
|
||||||
|
|
||||||
|
@ -532,7 +542,7 @@ CLASS ZCL_ABAPGIT_GIT_PORCELAIN IMPLEMENTATION.
|
||||||
lv_pack = zcl_abapgit_git_pack=>encode( lt_objects ).
|
lv_pack = zcl_abapgit_git_pack=>encode( lt_objects ).
|
||||||
|
|
||||||
zcl_abapgit_git_transport=>receive_pack(
|
zcl_abapgit_git_transport=>receive_pack(
|
||||||
iv_url = io_repo->get_url( )
|
iv_url = iv_url
|
||||||
iv_old = c_zero
|
iv_old = c_zero
|
||||||
iv_new = lv_new_tag_sha1
|
iv_new = lv_new_tag_sha1
|
||||||
iv_branch_name = is_tag-name
|
iv_branch_name = is_tag-name
|
||||||
|
|
|
@ -60,7 +60,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS zcl_abapgit_gui_page_tag IMPLEMENTATION.
|
CLASS ZCL_ABAPGIT_GUI_PAGE_TAG IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD constructor.
|
METHOD constructor.
|
||||||
|
@ -74,6 +74,105 @@ CLASS zcl_abapgit_gui_page_tag IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD create_tag.
|
||||||
|
|
||||||
|
DATA:
|
||||||
|
ls_tag TYPE zif_abapgit_definitions=>ty_git_tag,
|
||||||
|
lx_error TYPE REF TO zcx_abapgit_exception,
|
||||||
|
lv_text TYPE string.
|
||||||
|
|
||||||
|
parse_tag_request(
|
||||||
|
EXPORTING it_postdata = it_postdata
|
||||||
|
IMPORTING es_fields = ls_tag ).
|
||||||
|
|
||||||
|
IF ls_tag-name IS INITIAL.
|
||||||
|
zcx_abapgit_exception=>raise( |Please supply a tag name| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ls_tag-name = zcl_abapgit_tag=>add_tag_prefix( ls_tag-name ).
|
||||||
|
ASSERT ls_tag-name CP 'refs/tags/+*'.
|
||||||
|
|
||||||
|
CASE mv_selected_type.
|
||||||
|
WHEN co_tag_type-lightweight.
|
||||||
|
|
||||||
|
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
|
||||||
|
|
||||||
|
WHEN co_tag_type-annotated.
|
||||||
|
|
||||||
|
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
|
||||||
|
|
||||||
|
WHEN OTHERS.
|
||||||
|
|
||||||
|
zcx_abapgit_exception=>raise( |Invalid tag type: { mv_selected_type }| ).
|
||||||
|
|
||||||
|
ENDCASE.
|
||||||
|
|
||||||
|
TRY.
|
||||||
|
zcl_abapgit_git_porcelain=>create_tag( iv_url = mo_repo_online->get_url( )
|
||||||
|
is_tag = ls_tag ).
|
||||||
|
|
||||||
|
CATCH zcx_abapgit_exception INTO lx_error.
|
||||||
|
zcx_abapgit_exception=>raise( |Cannot create tag { ls_tag-name }. Error: '{ lx_error->get_text( ) }'| ).
|
||||||
|
ENDTRY.
|
||||||
|
|
||||||
|
IF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
|
||||||
|
lv_text = |Lightweight tag { zcl_abapgit_tag=>remove_tag_prefix( ls_tag-name ) } created| ##NO_TEXT.
|
||||||
|
ELSEIF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
|
||||||
|
lv_text = |Annotated tag { zcl_abapgit_tag=>remove_tag_prefix( ls_tag-name ) } created| ##NO_TEXT.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
MESSAGE lv_text TYPE 'S'.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD parse_change_tag_type_request.
|
||||||
|
|
||||||
|
FIELD-SYMBOLS: <ls_postdata> TYPE cnht_post_data_line.
|
||||||
|
|
||||||
|
READ TABLE it_postdata ASSIGNING <ls_postdata>
|
||||||
|
INDEX 1.
|
||||||
|
IF sy-subrc = 0.
|
||||||
|
FIND FIRST OCCURRENCE OF REGEX `type=(.*)`
|
||||||
|
IN <ls_postdata>
|
||||||
|
SUBMATCHES mv_selected_type.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
mv_selected_type = condense( mv_selected_type ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD parse_tag_request.
|
||||||
|
|
||||||
|
CONSTANTS: lc_replace TYPE string VALUE '<<new>>'.
|
||||||
|
|
||||||
|
DATA: lv_string TYPE string,
|
||||||
|
lt_fields TYPE tihttpnvp.
|
||||||
|
|
||||||
|
FIELD-SYMBOLS <lv_body> TYPE string.
|
||||||
|
|
||||||
|
CLEAR es_fields.
|
||||||
|
|
||||||
|
CONCATENATE LINES OF it_postdata INTO lv_string.
|
||||||
|
REPLACE ALL OCCURRENCES OF zif_abapgit_definitions=>gc_crlf IN lv_string WITH lc_replace.
|
||||||
|
REPLACE ALL OCCURRENCES OF zif_abapgit_definitions=>gc_newline IN lv_string WITH lc_replace.
|
||||||
|
lt_fields = zcl_abapgit_html_action_utils=>parse_fields_upper_case_name( lv_string ).
|
||||||
|
|
||||||
|
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'SHA1' it = lt_fields CHANGING cv = es_fields ).
|
||||||
|
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'NAME' it = lt_fields CHANGING cv = es_fields ).
|
||||||
|
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'TAGGER_NAME' it = lt_fields CHANGING cv = es_fields ).
|
||||||
|
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'TAGGER_EMAIL' it = lt_fields CHANGING cv = es_fields ).
|
||||||
|
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'MESSAGE' it = lt_fields CHANGING cv = es_fields ).
|
||||||
|
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'BODY' it = lt_fields CHANGING cv = es_fields ).
|
||||||
|
|
||||||
|
ASSIGN COMPONENT 'BODY' OF STRUCTURE es_fields TO <lv_body>.
|
||||||
|
ASSERT <lv_body> IS ASSIGNED.
|
||||||
|
REPLACE ALL OCCURRENCES OF lc_replace IN <lv_body> WITH zif_abapgit_definitions=>gc_newline.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD render_content.
|
METHOD render_content.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ro_html.
|
||||||
|
@ -275,103 +374,4 @@ CLASS zcl_abapgit_gui_page_tag IMPLEMENTATION.
|
||||||
ENDCASE.
|
ENDCASE.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD create_tag.
|
|
||||||
|
|
||||||
DATA:
|
|
||||||
ls_tag TYPE zif_abapgit_definitions=>ty_git_tag,
|
|
||||||
lx_error TYPE REF TO zcx_abapgit_exception,
|
|
||||||
lv_text TYPE string.
|
|
||||||
|
|
||||||
parse_tag_request(
|
|
||||||
EXPORTING it_postdata = it_postdata
|
|
||||||
IMPORTING es_fields = ls_tag ).
|
|
||||||
|
|
||||||
IF ls_tag-name IS INITIAL.
|
|
||||||
zcx_abapgit_exception=>raise( |Please supply a tag name| ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ls_tag-name = zcl_abapgit_tag=>add_tag_prefix( ls_tag-name ).
|
|
||||||
ASSERT ls_tag-name CP 'refs/tags/+*'.
|
|
||||||
|
|
||||||
CASE mv_selected_type.
|
|
||||||
WHEN co_tag_type-lightweight.
|
|
||||||
|
|
||||||
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
|
|
||||||
|
|
||||||
WHEN co_tag_type-annotated.
|
|
||||||
|
|
||||||
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
|
|
||||||
|
|
||||||
WHEN OTHERS.
|
|
||||||
|
|
||||||
zcx_abapgit_exception=>raise( |Invalid tag type: { mv_selected_type }| ).
|
|
||||||
|
|
||||||
ENDCASE.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
zcl_abapgit_git_porcelain=>create_tag( io_repo = mo_repo_online
|
|
||||||
is_tag = ls_tag ).
|
|
||||||
|
|
||||||
CATCH zcx_abapgit_exception INTO lx_error.
|
|
||||||
zcx_abapgit_exception=>raise( |Cannot create tag { ls_tag-name }. Error: '{ lx_error->get_text( ) }'| ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
IF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
|
|
||||||
lv_text = |Lightweight tag { zcl_abapgit_tag=>remove_tag_prefix( ls_tag-name ) } created| ##NO_TEXT.
|
|
||||||
ELSEIF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
|
|
||||||
lv_text = |Annotated tag { zcl_abapgit_tag=>remove_tag_prefix( ls_tag-name ) } created| ##NO_TEXT.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
MESSAGE lv_text TYPE 'S'.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD parse_tag_request.
|
|
||||||
|
|
||||||
CONSTANTS: lc_replace TYPE string VALUE '<<new>>'.
|
|
||||||
|
|
||||||
DATA: lv_string TYPE string,
|
|
||||||
lt_fields TYPE tihttpnvp.
|
|
||||||
|
|
||||||
FIELD-SYMBOLS <lv_body> TYPE string.
|
|
||||||
|
|
||||||
CLEAR es_fields.
|
|
||||||
|
|
||||||
CONCATENATE LINES OF it_postdata INTO lv_string.
|
|
||||||
REPLACE ALL OCCURRENCES OF zif_abapgit_definitions=>gc_crlf IN lv_string WITH lc_replace.
|
|
||||||
REPLACE ALL OCCURRENCES OF zif_abapgit_definitions=>gc_newline IN lv_string WITH lc_replace.
|
|
||||||
lt_fields = zcl_abapgit_html_action_utils=>parse_fields_upper_case_name( lv_string ).
|
|
||||||
|
|
||||||
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'SHA1' it = lt_fields CHANGING cv = es_fields ).
|
|
||||||
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'NAME' it = lt_fields CHANGING cv = es_fields ).
|
|
||||||
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'TAGGER_NAME' it = lt_fields CHANGING cv = es_fields ).
|
|
||||||
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'TAGGER_EMAIL' it = lt_fields CHANGING cv = es_fields ).
|
|
||||||
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'MESSAGE' it = lt_fields CHANGING cv = es_fields ).
|
|
||||||
zcl_abapgit_html_action_utils=>get_field( EXPORTING name = 'BODY' it = lt_fields CHANGING cv = es_fields ).
|
|
||||||
|
|
||||||
ASSIGN COMPONENT 'BODY' OF STRUCTURE es_fields TO <lv_body>.
|
|
||||||
ASSERT <lv_body> IS ASSIGNED.
|
|
||||||
REPLACE ALL OCCURRENCES OF lc_replace IN <lv_body> WITH zif_abapgit_definitions=>gc_newline.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD parse_change_tag_type_request.
|
|
||||||
|
|
||||||
FIELD-SYMBOLS: <ls_postdata> TYPE cnht_post_data_line.
|
|
||||||
|
|
||||||
READ TABLE it_postdata ASSIGNING <ls_postdata>
|
|
||||||
INDEX 1.
|
|
||||||
IF sy-subrc = 0.
|
|
||||||
FIND FIRST OCCURRENCE OF REGEX `type=(.*)`
|
|
||||||
IN <ls_postdata>
|
|
||||||
SUBMATCHES mv_selected_type.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
mv_selected_type = condense( mv_selected_type ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user