From e38a47f25a77d6627c3e332840e50373e381227b Mon Sep 17 00:00:00 2001 From: sbcgua Date: Thu, 19 Jan 2017 19:03:44 +0200 Subject: [PATCH 1/2] fix #532, deleted objects didn't display correctly --- src/zabapgit_file_status.prog.abap | 17 +++++++++++------ src/zabapgit_unit_test.prog.abap | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/zabapgit_file_status.prog.abap b/src/zabapgit_file_status.prog.abap index d30919b97..2bc1e77de 100644 --- a/src/zabapgit_file_status.prog.abap +++ b/src/zabapgit_file_status.prog.abap @@ -21,7 +21,8 @@ CLASS lcl_file_status DEFINITION FINAL PRIVATE SECTION. CLASS-METHODS calculate_status - IMPORTING it_local TYPE ty_files_item_tt + IMPORTING iv_devclass TYPE devclass + it_local TYPE ty_files_item_tt it_remote TYPE ty_files_tt it_cur_state TYPE ty_file_signatures_tt RETURNING VALUE(rt_results) TYPE ty_results_tt. @@ -36,7 +37,8 @@ CLASS lcl_file_status DEFINITION FINAL IMPORTING is_local TYPE ty_file_item RETURNING VALUE(rs_result) TYPE ty_result, build_new_remote - IMPORTING is_remote TYPE ty_file + IMPORTING iv_devclass TYPE devclass + is_remote TYPE ty_file it_items TYPE ty_items_ts it_state TYPE ty_file_signatures_ts RETURNING VALUE(rs_result) TYPE ty_result, @@ -61,6 +63,7 @@ CLASS lcl_file_status IMPLEMENTATION. rt_results = calculate_status( + iv_devclass = io_repo->get_package( ) it_local = io_repo->get_files_local( io_log ) it_remote = io_repo->get_files_remote( ) it_cur_state = io_repo->get_local_checksums_per_file( ) ). @@ -147,9 +150,10 @@ CLASS lcl_file_status IMPLEMENTATION. " Process new remote files (marked above with empty SHA1) LOOP AT lt_remote ASSIGNING WHERE sha1 IS NOT INITIAL. APPEND INITIAL LINE TO rt_results ASSIGNING . - = build_new_remote( is_remote = - it_items = lt_items_idx - it_state = lt_state_idx ). + = build_new_remote( iv_devclass = iv_devclass + is_remote = + it_items = lt_items_idx + it_state = lt_state_idx ). ENDLOOP. SORT rt_results BY @@ -278,7 +282,8 @@ CLASS lcl_file_status IMPLEMENTATION. ENDIF. " Item is in state and in cache but with no package - it was deleted - IF ls_item-devclass IS INITIAL. + " OR devclass is the same as repo package (see #532) + IF ls_item-devclass IS INITIAL OR ls_item-devclass = iv_devclass. rs_result-match = abap_false. rs_result-lstate = gc_state-deleted. ENDIF. diff --git a/src/zabapgit_unit_test.prog.abap b/src/zabapgit_unit_test.prog.abap index 98f84d9ef..e9df1bc1c 100644 --- a/src/zabapgit_unit_test.prog.abap +++ b/src/zabapgit_unit_test.prog.abap @@ -1917,6 +1917,7 @@ CLASS ltcl_file_status IMPLEMENTATION. lt_results_exp = lt_results. lt_results = lcl_file_status=>calculate_status( + iv_devclass = '$Z$' it_local = lt_local it_remote = lt_remote it_cur_state = lt_state ). From 21388867c9f274b4cc96986b96a400ff2533b1ad Mon Sep 17 00:00:00 2001 From: EduardoCopat Date: Fri, 20 Jan 2017 15:51:00 +0100 Subject: [PATCH 2/2] Disable popup delete table --- src/zabapgit_object_tabl.prog.abap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zabapgit_object_tabl.prog.abap b/src/zabapgit_object_tabl.prog.abap index c956017d5..de2f10201 100644 --- a/src/zabapgit_object_tabl.prog.abap +++ b/src/zabapgit_object_tabl.prog.abap @@ -106,7 +106,7 @@ CLASS lcl_object_tabl IMPLEMENTATION. CALL FUNCTION 'RS_DD_DELETE_OBJ' EXPORTING - no_ask = abap_false + no_ask = abap_true objname = lv_objname objtype = 'T' EXCEPTIONS @@ -433,4 +433,4 @@ CLASS lcl_object_tabl IMPLEMENTATION. ENDIF. ENDMETHOD. -ENDCLASS. "lcl_object_TABL IMPLEMENTATION \ No newline at end of file +ENDCLASS. "lcl_object_TABL IMPLEMENTATION