diff --git a/src/zabapgit_file_status.prog.abap b/src/zabapgit_file_status.prog.abap index 04d87585d..11d8d36a8 100644 --- a/src/zabapgit_file_status.prog.abap +++ b/src/zabapgit_file_status.prog.abap @@ -281,6 +281,12 @@ CLASS lcl_file_status IMPLEMENTATION. ELSE. rs_result-rstate = gc_state-modified. ENDIF. + + " Item is in state and in cache but with no package - it was deleted + IF ls_item-devclass IS INITIAL. + rs_result-match = abap_false. + rs_result-lstate = gc_state-deleted. + ENDIF. ENDIF. ELSE. " Completely unknown file, probably non-abapgit diff --git a/src/zabapgit_page_main.prog.abap b/src/zabapgit_page_main.prog.abap index 590197280..9edb929db 100644 --- a/src/zabapgit_page_main.prog.abap +++ b/src/zabapgit_page_main.prog.abap @@ -369,6 +369,11 @@ CLASS lcl_gui_page_main IMPLEMENTATION. _add ' color: white;'. _add '}'. _add '.repo_tab td.cmd span.state-block span.mixed {'. + _add ' background-color: #e0c150;'. + _add ' border-color: #579e64;'. + _add ' color: #69ad74;'. + _add '}'. + _add '.repo_tab td.cmd span.state-block span.deleted {'. _add ' background-color: #c0729a;'. _add ' border-color: #b8618e;'. _add ' color: white;'. diff --git a/src/zabapgit_tadir.prog.abap b/src/zabapgit_tadir.prog.abap index 1632b6866..42ca99fcd 100644 --- a/src/zabapgit_tadir.prog.abap +++ b/src/zabapgit_tadir.prog.abap @@ -67,9 +67,17 @@ CLASS lcl_tadir IMPLEMENTATION. METHOD get_object_package. - rv_devclass = read_single( iv_pgmid = iv_pgmid - iv_object = iv_object - iv_obj_name = iv_obj_name )-devclass. + DATA ls_tadir TYPE tadir. + + ls_tadir = read_single( iv_pgmid = iv_pgmid + iv_object = iv_object + iv_obj_name = iv_obj_name ). + + IF ls_tadir-delflag = 'X'. + RETURN. "Mark for deletion -> return nothing + ENDIF. + + rv_devclass = ls_tadir-devclass. ENDMETHOD. "get_object_package. diff --git a/src/zabapgit_unit_test.prog.abap b/src/zabapgit_unit_test.prog.abap index 5a09f8278..49a09ee1e 100644 --- a/src/zabapgit_unit_test.prog.abap +++ b/src/zabapgit_unit_test.prog.abap @@ -1822,6 +1822,7 @@ CLASS ltcl_file_status IMPLEMENTATION. _append_state 'zdoma6.doma.xml' 'D6'. " doma7 is not in state - emulate brocken cache " doma8 is not in state - emulate brocken cache + _append_state 'zdoma9.doma.xml' 'D9'. _append_state 'xfeld.doma.xml' 'XFELD'. " from different package _append_state 'num01.doma.xml' 'NUM01'. " another from different package @@ -1835,6 +1836,7 @@ CLASS ltcl_file_status IMPLEMENTATION. _append_local 'DOMA' 'ZDOMA6' 'zdoma6.doma.xml' 'D6_CHANGED_L'. _append_local 'DOMA' 'ZDOMA7' 'zdoma7.doma.xml' 'D7'. _append_local 'DOMA' 'ZDOMA8' 'zdoma8.doma.xml' 'D8'. + " dome9 was deleted from local system. Can be found by existing state "REMOTE FILE SHA1 _append_remote 'textfile.txt' 'T1'. @@ -1849,6 +1851,7 @@ CLASS ltcl_file_status IMPLEMENTATION. _append_remote 'zdoma6.doma.xml' 'D6_CHANGED_R'. _append_remote 'zdoma7.doma.xml' 'D7'. _append_remote 'zdoma8.doma.xml' 'D8_CHANGED_R'. " This one is changed + _append_remote 'zdoma9.doma.xml' 'D9'. " This one is deleted locally _append_remote 'xfeld.doma.xml' 'XFELD'. " Object from different package _append_remote 'num01.doma.xml' 'NUM01_CHANGED'. " Changed object from different package @@ -1869,6 +1872,7 @@ CLASS ltcl_file_status IMPLEMENTATION. _append_result 'DOMA' 'ZDOMA6' ' ' 'M' 'M' '$Z$' 'zdoma6.doma.xml'. _append_result 'DOMA' 'ZDOMA7' 'X' ' ' ' ' '$Z$' 'zdoma7.doma.xml'. _append_result 'DOMA' 'ZDOMA8' ' ' 'M' 'M' '$Z$' 'zdoma8.doma.xml'. + _append_result 'DOMA' 'ZDOMA9' ' ' 'D' ' ' '' 'zdoma9.doma.xml'. lt_results = lcl_file_status=>calculate_status( it_local = lt_local diff --git a/src/zabapgit_view_repo.prog.abap b/src/zabapgit_view_repo.prog.abap index 4d6114392..60316d45b 100644 --- a/src/zabapgit_view_repo.prog.abap +++ b/src/zabapgit_view_repo.prog.abap @@ -720,7 +720,7 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION. CASE . WHEN gc_state-unchanged. "None or unchanged IF iv1 = gc_state-added OR iv2 = gc_state-added. - rv_html = rv_html && |×|. + rv_html = rv_html && |X|. ELSE. rv_html = rv_html && | |. ENDIF. @@ -728,8 +728,10 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION. rv_html = rv_html && 'M'. WHEN gc_state-added. "Added new rv_html = rv_html && 'A'. - WHEN gc_state-mixed. "Added and changed (multifile) - rv_html = rv_html && '~'. + WHEN gc_state-mixed. "Multiple changes (multifile) + rv_html = rv_html && ''. + WHEN gc_state-deleted. "Deleted + rv_html = rv_html && 'X'. ENDCASE. ENDDO.