Skip to content

Commit

Permalink
downport
Browse files Browse the repository at this point in the history
  • Loading branch information
CI committed Oct 13, 2024
1 parent ecfef67 commit 56af9d6
Show file tree
Hide file tree
Showing 347 changed files with 2,430 additions and 1,702 deletions.
16 changes: 10 additions & 6 deletions src/apack/zcl_abapgit_apack_migration.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ CLASS zcl_abapgit_apack_migration IMPLEMENTATION.

METHOD add_intf_source_and_activate.

DATA: ls_clskey TYPE seoclskey,
TYPES temp1 TYPE TABLE OF dwinactiv.
DATA: ls_clskey TYPE seoclskey,
ls_inactive_object TYPE dwinactiv,
lt_inactive_objects TYPE TABLE OF dwinactiv.
lt_inactive_objects TYPE temp1.

ls_clskey-clsname = zif_abapgit_apack_definitions=>c_apack_interface_cust.

Expand Down Expand Up @@ -244,7 +245,9 @@ CLASS zcl_abapgit_apack_migration IMPLEMENTATION.

SELECT SINGLE clsname FROM seoclass INTO lv_interface_name
WHERE clsname = zif_abapgit_apack_definitions=>c_apack_interface_cust.
rv_interface_exists = xsdbool( sy-subrc = 0 ).
DATA temp1 TYPE xsdboolean.
temp1 = boolc( sy-subrc = 0 ).
rv_interface_exists = temp1.

ENDMETHOD.

Expand All @@ -254,8 +257,9 @@ CLASS zcl_abapgit_apack_migration IMPLEMENTATION.
FIELD-SYMBOLS: <lv_interface_vers> TYPE i.

ASSIGN (zif_abapgit_apack_definitions=>c_apack_interface_cust)=>('CO_INTERFACE_VERSION') TO <lv_interface_vers>.
rv_interface_valid = xsdbool( <lv_interface_vers> IS ASSIGNED
AND <lv_interface_vers> >= c_apack_interface_version ).
DATA temp2 TYPE xsdboolean.
temp2 = boolc( <lv_interface_vers> IS ASSIGNED AND <lv_interface_vers> >= c_apack_interface_version ).
rv_interface_valid = temp2.

ENDMETHOD.

Expand All @@ -275,7 +279,7 @@ CLASS zcl_abapgit_apack_migration IMPLEMENTATION.

DATA: lo_apack_migration TYPE REF TO zcl_abapgit_apack_migration.

lo_apack_migration = NEW #( ).
CREATE OBJECT lo_apack_migration.
lo_apack_migration->perform_migration( ).

ENDMETHOD.
Expand Down
6 changes: 4 additions & 2 deletions src/apack/zcl_abapgit_apack_reader.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ CLASS zcl_abapgit_apack_reader IMPLEMENTATION.
IF sy-subrc <> 0.
ls_instance-package = iv_package_name.

ls_instance-instance = NEW #( iv_package_name = iv_package_name ).
CREATE OBJECT ls_instance-instance EXPORTING iv_package_name = iv_package_name.

INSERT ls_instance INTO TABLE gt_instances.
ENDIF.
Expand Down Expand Up @@ -245,7 +245,9 @@ CLASS zcl_abapgit_apack_reader IMPLEMENTATION.

ls_returned_manifest = get_manifest_descriptor( ).

rv_has_manifest = xsdbool( ls_returned_manifest IS NOT INITIAL ).
DATA temp1 TYPE xsdboolean.
temp1 = boolc( ls_returned_manifest IS NOT INITIAL ).
rv_has_manifest = temp1.

ENDMETHOD.

Expand Down
2 changes: 1 addition & 1 deletion src/apack/zcl_abapgit_apack_writer.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CLASS zcl_abapgit_apack_writer IMPLEMENTATION.


METHOD create_instance.
ro_manifest_writer = NEW #( is_apack_manifest_descriptor = is_apack_manifest_descriptor ).
CREATE OBJECT ro_manifest_writer EXPORTING is_apack_manifest_descriptor = is_apack_manifest_descriptor.
ENDMETHOD.


Expand Down
18 changes: 12 additions & 6 deletions src/apack/zcl_abapgit_apack_writer.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ CLASS ltcl_apack_manifest_writer IMPLEMENTATION.
lv_actual_xml = lo_manifest_writer->serialize( ).
cl_abap_unit_assert=>assert_not_initial( lv_actual_xml ).

lv_bool = xsdbool( contains( val = lv_actual_xml
sub = '<ARTIFACT_ID>abapGit</ARTIFACT_ID>' ) ).
DATA temp1 TYPE xsdboolean.
temp1 = boolc( contains( val = lv_actual_xml
sub = '<ARTIFACT_ID>abapGit</ARTIFACT_ID>' ) ).
lv_bool = temp1.
cl_abap_unit_assert=>assert_equals( act = lv_bool
exp = abap_true ).
lv_bool = xsdbool( contains( val = lv_actual_xml
sub = '<GROUP_ID>github.com/larshp</GROUP_ID>' ) ).
DATA temp2 TYPE xsdboolean.
temp2 = boolc( contains( val = lv_actual_xml
sub = '<GROUP_ID>github.com/larshp</GROUP_ID>' ) ).
lv_bool = temp2.
cl_abap_unit_assert=>assert_equals( act = lv_bool
exp = abap_true ).
lv_bool = xsdbool( contains( val = lv_actual_xml
sub = '<REPOSITORY_TYPE>abapGit</REPOSITORY_TYPE>' ) ).
DATA temp3 TYPE xsdboolean.
temp3 = boolc( contains( val = lv_actual_xml
sub = '<REPOSITORY_TYPE>abapGit</REPOSITORY_TYPE>' ) ).
lv_bool = temp3.
cl_abap_unit_assert=>assert_equals( act = lv_bool
exp = abap_true ).
ENDMETHOD.
Expand Down
4 changes: 2 additions & 2 deletions src/background/zcl_abapgit_background.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ CLASS zcl_abapgit_background IMPLEMENTATION.
RETURN.
ENDTRY.

lo_per = NEW #( ).
CREATE OBJECT lo_per.
lt_list = lo_per->list( ).

WRITE: / 'Background mode'.

LOOP AT lt_list ASSIGNING <ls_list>.
li_log = NEW zcl_abapgit_log( ).
CREATE OBJECT li_log TYPE zcl_abapgit_log.

TRY.
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( <ls_list>-key ).
Expand Down
4 changes: 2 additions & 2 deletions src/background/zcl_abapgit_background_push_au.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ CLASS zcl_abapgit_background_push_au IMPLEMENTATION.
* Fill user details
ls_comment-committer = determine_user_details( lv_changed_by ).

lo_stage = NEW #( ).
CREATE OBJECT lo_stage.

CLEAR ls_user_files.

Expand Down Expand Up @@ -193,7 +193,7 @@ CLASS zcl_abapgit_background_push_au IMPLEMENTATION.

ASSERT lines( is_files-remote ) > 0.

lo_stage = NEW #( ).
CREATE OBJECT lo_stage.

ls_comment-comment = 'BG: Deletion'.

Expand Down
2 changes: 1 addition & 1 deletion src/background/zcl_abapgit_background_push_fi.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CLASS zcl_abapgit_background_push_fi IMPLEMENTATION.
ASSERT lines( ls_files-local ) > 0
OR lines( ls_files-remote ) > 0.

lo_stage = NEW #( ).
CREATE OBJECT lo_stage.

LOOP AT ls_files-local ASSIGNING <ls_local>.
mi_log->add_info( |stage: { <ls_local>-file-path } { <ls_local>-file-filename }| ).
Expand Down
27 changes: 19 additions & 8 deletions src/cts/zcl_abapgit_cts_api.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.

rv_locked = xsdbool( lv_lock_flag <> space ).
DATA temp1 TYPE xsdboolean.
temp1 = boolc( lv_lock_flag <> space ).
rv_locked = temp1.
ENDMETHOD.


Expand All @@ -191,7 +193,9 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
IMPORTING
pe_result = lv_type_check_result.

rv_lockable = xsdbool( lv_type_check_result = 'L' ).
DATA temp2 TYPE xsdboolean.
temp2 = boolc( lv_type_check_result = 'L' ).
rv_lockable = temp2.
ENDMETHOD.


Expand All @@ -209,7 +213,9 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
IMPORTING
pe_result = lv_type_check_result.

rv_transportable = xsdbool( lv_type_check_result CA 'RTL' ).
DATA temp3 TYPE xsdboolean.
temp3 = boolc( lv_type_check_result CA 'RTL' ).
rv_transportable = temp3.
ENDMETHOD.


Expand Down Expand Up @@ -342,7 +348,8 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
METHOD zif_abapgit_cts_api~create_transport_entries.

DATA lt_tables TYPE tredt_objects.
DATA lt_table_keys TYPE STANDARD TABLE OF e071k.
TYPES temp1 TYPE STANDARD TABLE OF e071k.
DATA lt_table_keys TYPE temp1.
DATA lv_with_dialog TYPE abap_bool.

cl_table_utilities_brf=>create_transport_entries(
Expand Down Expand Up @@ -419,7 +426,8 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
METHOD zif_abapgit_cts_api~get_transports_for_list.

DATA lv_request TYPE trkorr.
DATA lt_tlock TYPE SORTED TABLE OF tlock WITH NON-UNIQUE KEY object hikey.
TYPES temp2 TYPE SORTED TABLE OF tlock WITH NON-UNIQUE KEY object hikey.
DATA lt_tlock TYPE temp2.
DATA ls_object_key TYPE e071.
DATA lv_type_check_result TYPE c LENGTH 1.
DATA ls_lock_key TYPE tlock_int.
Expand Down Expand Up @@ -541,7 +549,8 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
trfunction TYPE e070-trfunction,
strkorr TYPE e070-strkorr,
END OF ty_e070.
DATA lt_e070 TYPE STANDARD TABLE OF ty_e070 WITH DEFAULT KEY.
TYPES temp3 TYPE STANDARD TABLE OF ty_e070 WITH DEFAULT KEY.
DATA lt_e070 TYPE temp3.

* find all tasks first
SELECT trkorr trfunction strkorr
Expand Down Expand Up @@ -572,8 +581,10 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
obj_name TYPE e071-obj_name,
END OF ty_contents.

DATA lt_tasks TYPE STANDARD TABLE OF trkorr WITH DEFAULT KEY.
DATA lt_contents TYPE STANDARD TABLE OF ty_contents WITH DEFAULT KEY.
TYPES temp4 TYPE STANDARD TABLE OF trkorr WITH DEFAULT KEY.
DATA lt_tasks TYPE temp4.
TYPES temp5 TYPE STANDARD TABLE OF ty_contents WITH DEFAULT KEY.
DATA lt_contents TYPE temp5.
DATA ls_contents LIKE LINE OF lt_contents.
DATA ls_list LIKE LINE OF rt_list.

Expand Down
2 changes: 1 addition & 1 deletion src/cts/zcl_abapgit_transport.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ CLASS ZCL_ABAPGIT_TRANSPORT IMPLEMENTATION.
lv_message TYPE string.
FIELD-SYMBOLS: <ls_log> TYPE sprot_u.

li_log = NEW zcl_abapgit_log( iv_title = iv_title ).
CREATE OBJECT li_log TYPE zcl_abapgit_log EXPORTING iv_title = iv_title.

LOOP AT it_log ASSIGNING <ls_log>.

Expand Down
4 changes: 2 additions & 2 deletions src/cts/zcl_abapgit_transport_2_branch.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ CLASS zcl_abapgit_transport_2_branch IMPLEMENTATION.

io_repository->create_branch( lv_branch_name ).

lo_stage = NEW #( ).
CREATE OBJECT lo_stage.

ls_stage_objects = zcl_abapgit_factory=>get_stage_logic( )->get( io_repository ).

Expand Down Expand Up @@ -76,7 +76,7 @@ CLASS zcl_abapgit_transport_2_branch IMPLEMENTATION.

METHOD stage_transport_objects.
DATA lo_transport_objects TYPE REF TO zcl_abapgit_transport_objects.
lo_transport_objects = NEW #( it_transport_objects = it_transport_objects ).
CREATE OBJECT lo_transport_objects EXPORTING it_transport_objects = it_transport_objects.

lo_transport_objects->to_stage(
io_stage = io_stage
Expand Down
2 changes: 1 addition & 1 deletion src/cts/zcl_abapgit_transport_mass.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CLASS zcl_abapgit_transport_mass IMPLEMENTATION.
ENDIF.

* Instantiate transport zipper object that will also create the timestamped output folder
lo_transport_zipper = NEW lcl_transport_zipper( iv_folder = lv_folder ).
CREATE OBJECT lo_transport_zipper TYPE lcl_transport_zipper EXPORTING iv_folder = lv_folder.

* Generate the local zip files from the given list of transport requests
lo_transport_zipper->generate_files(
Expand Down
4 changes: 2 additions & 2 deletions src/cts/zcl_abapgit_transport_objects.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ENDCLASS.
CLASS ltcl_transport_objects IMPLEMENTATION.

METHOD setup.
mo_stage = NEW #( ).
CREATE OBJECT mo_stage.
ENDMETHOD.

METHOD add_new_to_local_files.
Expand Down Expand Up @@ -308,7 +308,7 @@ CLASS ltcl_transport_objects IMPLEMENTATION.
ENDMETHOD.

METHOD when_staging.
mo_transport_objects = NEW #( it_transport_objects = mt_transport_objects ).
CREATE OBJECT mo_transport_objects EXPORTING it_transport_objects = mt_transport_objects.
mo_transport_objects->to_stage(
io_stage = mo_stage
is_stage_objects = ms_stage_objects
Expand Down
6 changes: 3 additions & 3 deletions src/data/zcl_abapgit_data_config.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CLASS ltcl_test IMPLEMENTATION.
DATA li_config TYPE REF TO zif_abapgit_data_config.
DATA ls_config TYPE zif_abapgit_data_config=>ty_config.

li_config = NEW zcl_abapgit_data_config( ).
CREATE OBJECT li_config TYPE zcl_abapgit_data_config.

ls_config-name = 'HELLO'.
ls_config-type = zif_abapgit_data_config=>c_data_type-tabu.
Expand All @@ -64,7 +64,7 @@ CLASS ltcl_test IMPLEMENTATION.
DATA lv_json TYPE string.


li_config = NEW zcl_abapgit_data_config( ).
CREATE OBJECT li_config TYPE zcl_abapgit_data_config.
li_config->add_config( ms_config ).

lt_files = li_config->to_json( ).
Expand Down Expand Up @@ -92,7 +92,7 @@ CLASS ltcl_test IMPLEMENTATION.

DATA li_config TYPE REF TO zif_abapgit_data_config.

li_config = NEW zcl_abapgit_data_config( ).
CREATE OBJECT li_config TYPE zcl_abapgit_data_config.

li_config->from_json( it_files ).

Expand Down
10 changes: 5 additions & 5 deletions src/data/zcl_abapgit_data_deserializer.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ CLASS ltcl_test IMPLEMENTATION.
DATA lt_files TYPE zif_abapgit_git_definitions=>ty_files_tt.
DATA ls_config TYPE zif_abapgit_data_config=>ty_config.

li_cut = NEW zcl_abapgit_data_deserializer( ).
li_config = NEW zcl_abapgit_data_config( ).
CREATE OBJECT li_cut TYPE zcl_abapgit_data_deserializer.
CREATE OBJECT li_config TYPE zcl_abapgit_data_config.

ls_config-type = zif_abapgit_data_config=>c_data_type-tabu.
ls_config-name = 'T100'.
Expand Down Expand Up @@ -70,7 +70,7 @@ CLASS ltcl_test IMPLEMENTATION.
ls_t100-text = |abapGit aunit test|.
INSERT ls_t100 INTO TABLE <lt_lc_data>.

li_cut = NEW zcl_abapgit_data_deserializer( ).
CREATE OBJECT li_cut TYPE zcl_abapgit_data_deserializer.
ls_result = li_cut->preview_database_changes(
iv_name = ls_config-name
ir_db_data = lr_db_data
Expand Down Expand Up @@ -138,7 +138,7 @@ CLASS ltcl_test IMPLEMENTATION.
ls_t100-text = |abapGit aunit test UPDATE|.
INSERT ls_t100 INTO TABLE <lt_lc_data>.

li_cut = NEW zcl_abapgit_data_deserializer( ).
CREATE OBJECT li_cut TYPE zcl_abapgit_data_deserializer.
ls_result = li_cut->preview_database_changes(
iv_name = ls_config-name
ir_db_data = lr_db_data
Expand Down Expand Up @@ -200,7 +200,7 @@ CLASS ltcl_test IMPLEMENTATION.
ls_t100-text = |abapGit aunit test DELETE|.
INSERT ls_t100 INTO TABLE <lt_db_data>.

li_cut = NEW zcl_abapgit_data_deserializer( ).
CREATE OBJECT li_cut TYPE zcl_abapgit_data_deserializer.
ls_result = li_cut->preview_database_changes(
iv_name = ls_config-name
ir_db_data = lr_db_data
Expand Down
8 changes: 4 additions & 4 deletions src/data/zcl_abapgit_data_factory.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ CLASS zcl_abapgit_data_factory IMPLEMENTATION.


METHOD get_config.
ri_config = NEW zcl_abapgit_data_config( ).
CREATE OBJECT ri_config TYPE zcl_abapgit_data_config.
ENDMETHOD.


METHOD get_deserializer.

IF gi_deserializer IS INITIAL.
gi_deserializer = NEW zcl_abapgit_data_deserializer( ).
CREATE OBJECT gi_deserializer TYPE zcl_abapgit_data_deserializer.
ENDIF.

ri_deserializer = gi_deserializer.
Expand All @@ -49,7 +49,7 @@ CLASS zcl_abapgit_data_factory IMPLEMENTATION.
METHOD get_serializer.

IF gi_serializer IS INITIAL.
gi_serializer = NEW zcl_abapgit_data_serializer( ).
CREATE OBJECT gi_serializer TYPE zcl_abapgit_data_serializer.
ENDIF.

ri_serializer = gi_serializer.
Expand All @@ -60,7 +60,7 @@ CLASS zcl_abapgit_data_factory IMPLEMENTATION.
METHOD get_supporter.

IF gi_supporter IS INITIAL.
gi_supporter = NEW zcl_abapgit_data_supporter( ).
CREATE OBJECT gi_supporter TYPE zcl_abapgit_data_supporter.
ENDIF.

ri_supporter = gi_supporter.
Expand Down
4 changes: 2 additions & 2 deletions src/data/zcl_abapgit_data_serializer.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ENDCLASS.
CLASS ltcl_test IMPLEMENTATION.

METHOD setup.
mi_cut = NEW zcl_abapgit_data_serializer( ).
mi_config = NEW zcl_abapgit_data_config( ).
CREATE OBJECT mi_cut TYPE zcl_abapgit_data_serializer.
CREATE OBJECT mi_config TYPE zcl_abapgit_data_config.
ENDMETHOD.

METHOD serialize.
Expand Down
4 changes: 2 additions & 2 deletions src/data/zcl_abapgit_data_supporter.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ CLASS ltcl_supporter IMPLEMENTATION.
DATA lv_act TYPE abap_bool.

" Mock sets table T005 to be supported
lo_mock = NEW #( ).
lo_inject = NEW #( ).
CREATE OBJECT lo_mock.
CREATE OBJECT lo_inject.
lo_inject->set_supporter( lo_mock ).

lv_act = zcl_abapgit_data_factory=>get_supporter( )->is_object_supported(
Expand Down
Loading

0 comments on commit 56af9d6

Please sign in to comment.