Merge branch 'main' into mbtools/change_package_feature

This commit is contained in:
Lars Hvam 2025-03-13 16:14:16 +01:00 committed by GitHub
commit 83b86bfd6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 21 deletions

View File

@ -3,8 +3,7 @@
[![License](https://img.shields.io/github/license/abapGit/abapGit?label=License&color=green)](LICENSE) [![License](https://img.shields.io/github/license/abapGit/abapGit?label=License&color=green)](LICENSE)
[![REUSE Status](https://api.reuse.software/badge/github.com/abapGit/abapGit?color=success)](https://api.reuse.software/info/github.com/abapGit/abapGit) [![REUSE Status](https://api.reuse.software/badge/github.com/abapGit/abapGit?color=success)](https://api.reuse.software/info/github.com/abapGit/abapGit)
[![Slack](https://img.shields.io/badge/Join-Slack-blue)](https://communityinviter.com/apps/abapgit/abap) [![Slack](https://img.shields.io/badge/Join-Slack-blue)](https://communityinviter.com/apps/abapgit/abap)
[![abap package version](https://img.shields.io/endpoint?url=https://shield.abap.space/version-shield-json/github/abapGit/abapGit/src/zif_abapgit_version.intf.abap/c_abap_version&label=version)](https://github.com/abapGit/abapGit/blob/main/src/zif_abapgit_version.intf.abap) [![abap package version](https://img.shields.io/endpoint?url=https://shield.abappm.com/github/abapGit/abapGit/-main/src/zif_abapgit_version.intf.abap/c_abap_version&label=version)](https://github.com/abapGit/abapGit/blob/main/src/zif_abapgit_version.intf.abap)
<!-- <!--
<picture> <picture>

View File

@ -34,6 +34,11 @@ CLASS zcl_abapgit_object_http DEFINITION
object_state TYPE c LENGTH 1, object_state TYPE c LENGTH 1,
END OF ty_gs_object_version. END OF ty_gs_object_version.
TYPES: BEGIN OF ty_icf_node,
icfname TYPE c LENGTH 15,
icfparguid TYPE c LENGTH 25,
END OF ty_icf_node.
ENDCLASS. ENDCLASS.
@ -84,8 +89,7 @@ CLASS zcl_abapgit_object_http IMPLEMENTATION.
lo_http TYPE REF TO object, lo_http TYPE REF TO object,
ls_abap_lang TYPE ty_gs_object_version, ls_abap_lang TYPE ty_gs_object_version,
lo_instance TYPE REF TO object, lo_instance TYPE REF TO object,
lv_tadir_name TYPE tadir-obj_name, lv_icfnode TYPE ty_icf_node.
lt_ret TYPE STANDARD TABLE OF bapiret2.
TRY. TRY.
io_xml->read( io_xml->read(
@ -98,6 +102,14 @@ CLASS zcl_abapgit_object_http IMPLEMENTATION.
EXPORTING iv_name = 'HTTPHDL' EXPORTING iv_name = 'HTTPHDL'
CHANGING cg_data = lt_handler ). CHANGING cg_data = lt_handler ).
TRY.
"link to icf node (in releases older than 757, a http service requires a icf node to function)
io_xml->read(
EXPORTING iv_name = 'HTTPICFNODE'
CHANGING cg_data = lv_icfnode ).
CATCH cx_root.
ENDTRY.
SELECT SINGLE id FROM ('UCONHTTPSERVHEAD') INTO lv_id WHERE id = lv_http_servid AND version = 'A'. SELECT SINGLE id FROM ('UCONHTTPSERVHEAD') INTO lv_id WHERE id = lv_http_servid AND version = 'A'.
IF sy-subrc = 0. IF sy-subrc = 0.
"update "update
@ -152,6 +164,9 @@ CLASS zcl_abapgit_object_http IMPLEMENTATION.
CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~SET_DESCRIPTION') CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~SET_DESCRIPTION')
EXPORTING EXPORTING
texts = ls_description. texts = ls_description.
CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~SET_ICF_SERVICE')
EXPORTING
iv_icfservice = lv_icfnode.
CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~SAVE') CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~SAVE')
EXPORTING EXPORTING
run_dark = abap_true run_dark = abap_true
@ -159,16 +174,6 @@ CLASS zcl_abapgit_object_http IMPLEMENTATION.
korrnum = iv_transport. korrnum = iv_transport.
CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~FREE'). CALL METHOD lo_http->('IF_UCON_API_HTTP_SERVICE~FREE').
lv_tadir_name = lv_http_servid.
CALL METHOD ('CL_AUTH_START_TOOLS')=>('SUSH_CREATE')
EXPORTING
iv_type = 'HTTP'
iv_name = lv_tadir_name
iv_silent = abap_true
iv_task = iv_transport
IMPORTING
et_log = lt_ret.
CATCH cx_root INTO lx_root. CATCH cx_root INTO lx_root.
zcx_abapgit_exception=>raise_with_text( lx_root ). zcx_abapgit_exception=>raise_with_text( lx_root ).
ENDTRY. ENDTRY.
@ -241,6 +246,7 @@ CLASS zcl_abapgit_object_http IMPLEMENTATION.
lt_handler TYPE TABLE OF ty_uconservhttphandler, lt_handler TYPE TABLE OF ty_uconservhttphandler,
ls_description TYPE ty_uconhttpservtext, ls_description TYPE ty_uconhttpservtext,
lx_root TYPE REF TO cx_root, lx_root TYPE REF TO cx_root,
lv_icfnode TYPE ty_icf_node,
lv_name TYPE c LENGTH 30. lv_name TYPE c LENGTH 30.
TRY. TRY.
@ -275,6 +281,15 @@ CLASS zcl_abapgit_object_http IMPLEMENTATION.
iv_name = 'HTTPHDL' iv_name = 'HTTPHDL'
ig_data = lt_handler ). ig_data = lt_handler ).
TRY.
"link to icf node (in releases older than 757, a http service requires a icf node to function)
CALL METHOD lo_serv->('IF_UCON_API_HTTP_SERVICE~GET_ICF_SERVICE') IMPORTING ev_icfservice = lv_icfnode.
io_xml->add(
iv_name = 'HTTPICFNODE'
ig_data = lv_icfnode ).
CATCH cx_root.
ENDTRY.
CATCH cx_root INTO lx_root. CATCH cx_root INTO lx_root.
zcx_abapgit_exception=>raise_with_text( lx_root ). zcx_abapgit_exception=>raise_with_text( lx_root ).
ENDTRY. ENDTRY.

View File

@ -282,7 +282,10 @@ CLASS zcl_abapgit_syntax_highlighter IMPLEMENTATION.
rv_line = iv_line. rv_line = iv_line.
IF mv_hidden_chars = abap_true. IF mv_hidden_chars = abap_true.
" The order of these replacements matters to properly show CR, LF, and CRLF
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN rv_line WITH '&nbsp;&rarr;&nbsp;'. REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN rv_line WITH '&nbsp;&rarr;&nbsp;'.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN rv_line WITH '&para;'.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline IN rv_line WITH '&crarr;'.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf(1) IN rv_line WITH '&para;'. REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf(1) IN rv_line WITH '&para;'.
REPLACE ALL OCCURRENCES OF ` ` IN rv_line WITH '&middot;'. REPLACE ALL OCCURRENCES OF ` ` IN rv_line WITH '&middot;'.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>form_feed IN rv_line REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>form_feed IN rv_line

View File

@ -137,7 +137,7 @@ ENDCLASS.
CLASS zcl_abapgit_gui_page_stage IMPLEMENTATION. CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION.
METHOD check_selected. METHOD check_selected.
@ -154,13 +154,16 @@ CLASS zcl_abapgit_gui_page_stage IMPLEMENTATION.
" Check all added files if the exist in different paths (packages) without being removed " Check all added files if the exist in different paths (packages) without being removed
LOOP AT io_files->mt_entries ASSIGNING <ls_item> WHERE v = zif_abapgit_definitions=>c_method-add. LOOP AT io_files->mt_entries ASSIGNING <ls_item> WHERE v = zif_abapgit_definitions=>c_method-add.
" Allow mixed case path, but check filename to lower case
zcl_abapgit_path=>split_file_location( zcl_abapgit_path=>split_file_location(
EXPORTING EXPORTING
iv_fullpath = to_lower( <ls_item>-k ) iv_fullpath = <ls_item>-k
IMPORTING IMPORTING
ev_path = ls_file-path ev_path = ls_file-path
ev_filename = ls_file-filename ). ev_filename = ls_file-filename ).
ls_file-filename = to_lower( ls_file-filename ).
" Skip packages since they all have identical filenames " Skip packages since they all have identical filenames
IF ls_file-filename <> 'package.devc.xml'. IF ls_file-filename <> 'package.devc.xml'.
lv_pattern = '*/' && to_upper( ls_file-filename ). lv_pattern = '*/' && to_upper( ls_file-filename ).
@ -738,13 +741,16 @@ CLASS zcl_abapgit_gui_page_stage IMPLEMENTATION.
"Ignore Files that we don't want to stage, so any errors don't stop the staging process "Ignore Files that we don't want to stage, so any errors don't stop the staging process
WHERE v <> zif_abapgit_definitions=>c_method-skip. WHERE v <> zif_abapgit_definitions=>c_method-skip.
" Allow mixed case path, but check filename to lower case
zcl_abapgit_path=>split_file_location( zcl_abapgit_path=>split_file_location(
EXPORTING EXPORTING
iv_fullpath = to_lower( <ls_item>-k ) " filename is lower cased iv_fullpath = <ls_item>-k
IMPORTING IMPORTING
ev_path = ls_file-path ev_path = ls_file-path
ev_filename = ls_file-filename ). ev_filename = ls_file-filename ).
ls_file-filename = to_lower( ls_file-filename ).
READ TABLE ms_files-status ASSIGNING <ls_status> READ TABLE ms_files-status ASSIGNING <ls_status>
WITH TABLE KEY WITH TABLE KEY
path = ls_file-path path = ls_file-path

View File

@ -27,6 +27,8 @@ CLASS zcl_abapgit_path DEFINITION
IMPORTING iv_path TYPE string IMPORTING iv_path TYPE string
RETURNING VALUE(rv_filename) TYPE string. RETURNING VALUE(rv_filename) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS. ENDCLASS.