mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Merge branch 'main' into mbtools/tabu_transport
This commit is contained in:
commit
5620f29dc3
|
@ -1,4 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
CLASS ltcl_apack_manifest_reader DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
|
||||
PRIVATE SECTION.
|
||||
METHODS:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
CLASS ltcl_apack_manifest_writer DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
|
||||
PRIVATE SECTION.
|
||||
METHODS: the_serializator FOR TESTING RAISING cx_static_check.
|
||||
|
|
|
@ -26,11 +26,12 @@ CLASS zcl_abapgit_background DEFINITION
|
|||
PROTECTED SECTION.
|
||||
PRIVATE SECTION.
|
||||
CONSTANTS c_enq_type TYPE c LENGTH 12 VALUE 'BACKGROUND'.
|
||||
CONSTANTS c_interface TYPE seoclskey VALUE 'ZIF_ABAPGIT_BACKGROUND'.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS zcl_abapgit_background IMPLEMENTATION.
|
||||
CLASS ZCL_ABAPGIT_BACKGROUND IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD dequeue.
|
||||
|
@ -59,36 +60,69 @@ CLASS zcl_abapgit_background IMPLEMENTATION.
|
|||
|
||||
METHOD list_methods.
|
||||
|
||||
DATA: ls_method LIKE LINE OF rt_methods,
|
||||
ls_key TYPE seoclskey,
|
||||
lt_implementing TYPE seor_implementing_keys,
|
||||
ls_implementing LIKE LINE OF lt_implementing.
|
||||
DATA: ls_method LIKE LINE OF rt_methods,
|
||||
lt_implementing TYPE seor_implementing_keys,
|
||||
ls_implementing LIKE LINE OF lt_implementing,
|
||||
lt_interf TYPE abap_intfdescr_tab,
|
||||
lt_local_classes TYPE STANDARD TABLE OF scompo,
|
||||
lv_classname TYPE string,
|
||||
lr_typedescr TYPE REF TO cl_abap_typedescr,
|
||||
lr_typedescr_class TYPE REF TO cl_abap_classdescr.
|
||||
|
||||
FIELD-SYMBOLS: <ls_method> LIKE LINE OF rt_methods.
|
||||
FIELD-SYMBOLS: <ls_local_class> LIKE LINE OF lt_local_classes,
|
||||
<ls_method> LIKE LINE OF rt_methods.
|
||||
|
||||
IF zcl_abapgit_factory=>get_environment( )->is_merged( ) = abap_true.
|
||||
" Assume the standalone version runs.
|
||||
CALL FUNCTION 'WB_TREE_GET_OBJECTS'
|
||||
EXPORTING
|
||||
include = ' '
|
||||
otype = 'L'
|
||||
program = sy-repid
|
||||
TABLES
|
||||
olist = lt_local_classes.
|
||||
|
||||
* in order to handle local classes in the compiled report
|
||||
ls_method-class = 'ZCL_ABAPGIT_BACKGROUND_PULL'.
|
||||
INSERT ls_method INTO TABLE rt_methods.
|
||||
ls_method-class = 'ZCL_ABAPGIT_BACKGROUND_PUSH_AU'.
|
||||
INSERT ls_method INTO TABLE rt_methods.
|
||||
ls_method-class = 'ZCL_ABAPGIT_BACKGROUND_PUSH_FI'.
|
||||
INSERT ls_method INTO TABLE rt_methods.
|
||||
LOOP AT lt_local_classes ASSIGNING <ls_local_class>.
|
||||
lv_classname = |\\PROGRAM={ sy-repid }\\CLASS={ <ls_local_class>-name }|.
|
||||
cl_abap_typedescr=>describe_by_name(
|
||||
EXPORTING
|
||||
p_name = lv_classname
|
||||
RECEIVING
|
||||
p_descr_ref = lr_typedescr
|
||||
EXCEPTIONS
|
||||
type_not_found = 1
|
||||
OTHERS = 2 ).
|
||||
|
||||
ls_key-clsname = 'ZIF_ABAPGIT_BACKGROUND'.
|
||||
IF sy-subrc = 0 AND lr_typedescr IS BOUND.
|
||||
lr_typedescr_class ?= lr_typedescr.
|
||||
IF lr_typedescr_class IS BOUND.
|
||||
lt_interf = lr_typedescr_class->interfaces.
|
||||
READ TABLE lt_interf WITH TABLE KEY name = c_interface TRANSPORTING NO FIELDS.
|
||||
IF sy-subrc = 0.
|
||||
ls_method-class = <ls_local_class>-name.
|
||||
INSERT ls_method INTO TABLE rt_methods.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
|
||||
CALL FUNCTION 'SEO_INTERFACE_IMPLEM_GET_ALL'
|
||||
EXPORTING
|
||||
intkey = ls_key
|
||||
IMPORTING
|
||||
impkeys = lt_implementing
|
||||
EXCEPTIONS
|
||||
not_existing = 1
|
||||
OTHERS = 2 ##FM_SUBRC_OK.
|
||||
LOOP AT lt_implementing INTO ls_implementing.
|
||||
ls_method-class = ls_implementing-clsname.
|
||||
INSERT ls_method INTO TABLE rt_methods.
|
||||
ENDLOOP.
|
||||
ELSE.
|
||||
" Assume the developer version runs.
|
||||
CALL FUNCTION 'SEO_INTERFACE_IMPLEM_GET_ALL'
|
||||
EXPORTING
|
||||
intkey = c_interface
|
||||
IMPORTING
|
||||
impkeys = lt_implementing
|
||||
EXCEPTIONS
|
||||
not_existing = 1
|
||||
OTHERS = 2.
|
||||
IF sy-subrc = 0.
|
||||
LOOP AT lt_implementing INTO ls_implementing.
|
||||
ls_method-class = ls_implementing-clsname.
|
||||
INSERT ls_method INTO TABLE rt_methods.
|
||||
ENDLOOP.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
|
||||
LOOP AT rt_methods ASSIGNING <ls_method>.
|
||||
CALL METHOD (<ls_method>-class)=>zif_abapgit_background~get_description
|
||||
|
@ -136,12 +170,17 @@ CLASS zcl_abapgit_background IMPLEMENTATION.
|
|||
iv_username = <ls_list>-username
|
||||
iv_password = <ls_list>-password ).
|
||||
|
||||
CREATE OBJECT li_background TYPE (<ls_list>-method).
|
||||
TRY.
|
||||
CREATE OBJECT li_background TYPE (<ls_list>-method).
|
||||
|
||||
li_background->run(
|
||||
io_repo = lo_repo
|
||||
ii_log = li_log
|
||||
it_settings = <ls_list>-settings ).
|
||||
li_background->run(
|
||||
io_repo = lo_repo
|
||||
ii_log = li_log
|
||||
it_settings = <ls_list>-settings ).
|
||||
CATCH cx_sy_create_object_error.
|
||||
li_log->add_warning( |{ <ls_list>-method } could not be executed,|
|
||||
& | as it is not accessible (local/global class).| ).
|
||||
ENDTRY.
|
||||
|
||||
" Decrease memory usage for repository already processed (but keep log)
|
||||
lo_repo->refresh(
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
|
||||
CLASS ltcl_test DEFINITION DEFERRED.
|
||||
CLASS zcl_abapgit_exit DEFINITION LOCAL FRIENDS ltcl_test.
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
|
||||
CLASS ltcl_calculate_patch DEFINITION FINAL FOR TESTING
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
*"* use this source file for any type of declarations (class
|
||||
*"* definitions, interfaces or type declarations) you need for
|
||||
*"* components in the private section
|
||||
|
||||
CLASS lcl_stream DEFINITION FINAL.
|
||||
PUBLIC SECTION.
|
||||
TYPES: ty_hex TYPE x LENGTH 1.
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
*"* use this source file for the definition and implementation of
|
||||
*"* local helper classes, interface definitions and type
|
||||
*"* declarations
|
||||
|
||||
CLASS lcl_stream IMPLEMENTATION.
|
||||
|
||||
METHOD constructor.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
|
||||
CLASS ltcl_adjust_filter DEFINITION FINAL FOR TESTING INHERITING FROM zcl_abapgit_object_filter_tran
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
CLASS ltcl_find_remote_dot_abapgit DEFINITION FINAL FOR TESTING
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
*"* use this source file for the definition and implementation of
|
||||
*"* local helper classes, interface definitions and type
|
||||
*"* declarations
|
||||
|
||||
CLASS lcl_sha1_stack DEFINITION.
|
||||
PUBLIC SECTION.
|
||||
METHODS clear
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
CLASS ltcl_normalize_program_name DEFINITION FINAL FOR TESTING
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
|
|
@ -66,7 +66,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS zcl_abapgit_gui_page_sett_bckg IMPLEMENTATION.
|
||||
CLASS ZCL_ABAPGIT_GUI_PAGE_SETT_BCKG IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD constructor.
|
||||
|
@ -210,9 +210,13 @@ CLASS zcl_abapgit_gui_page_sett_bckg IMPLEMENTATION.
|
|||
|
||||
" skip invalid values, from old background logic
|
||||
IF ls_per-method <> 'push' AND ls_per-method <> 'pull' AND ls_per-method <> 'nothing'.
|
||||
CALL METHOD (ls_per-method)=>zif_abapgit_background~get_settings
|
||||
CHANGING
|
||||
ct_settings = lt_settings.
|
||||
TRY.
|
||||
CALL METHOD (ls_per-method)=>zif_abapgit_background~get_settings
|
||||
CHANGING
|
||||
ct_settings = lt_settings.
|
||||
CATCH cx_sy_dyn_call_illegal_class.
|
||||
CLEAR lt_settings.
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
|
||||
LOOP AT lt_settings INTO ls_settings.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
|
||||
CLASS ltd_git_transport DEFINITION FINAL FOR TESTING.
|
||||
|
||||
PUBLIC SECTION.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
*"* use this source file for your ABAP unit test classes
|
||||
|
||||
CLASS ltcl_get_patch_data DEFINITION FINAL FOR TESTING
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
|
|
@ -44,6 +44,11 @@ INCLUDE zabapgit_authorizations_exit IF FOUND.
|
|||
* place the object in a different package than ZABAPGIT
|
||||
INCLUDE zabapgit_user_exit IF FOUND.
|
||||
|
||||
* place all implementations of ZIF_ABAPGIT_BACKGROUND in following include,
|
||||
* if using the development version of abapGit create a global classes instead
|
||||
* place the object in a different package than ZABAPGIT
|
||||
INCLUDE zabapgit_background_user_exit IF FOUND.
|
||||
|
||||
INCLUDE zabapgit_gui_pages_userexit IF FOUND.
|
||||
|
||||
INCLUDE zabapgit_forms.
|
||||
|
|
Loading…
Reference in New Issue
Block a user