deleted marker, fine tuning

This commit is contained in:
sbcgua 2016-11-09 12:30:06 +02:00
parent 966852cc2b
commit 0c0d07ef63
5 changed files with 31 additions and 6 deletions

View File

@ -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

View File

@ -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;'.

View File

@ -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.

View File

@ -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

View File

@ -720,7 +720,7 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
CASE <state>.
WHEN gc_state-unchanged. "None or unchanged
IF iv1 = gc_state-added OR iv2 = gc_state-added.
rv_html = rv_html && |<span class="none" title="Not exists">&#x00d7;</span>|.
rv_html = rv_html && |<span class="none" title="Not exists">X</span>|.
ELSE.
rv_html = rv_html && |<span class="none" title="No changes">&nbsp;</span>|.
ENDIF.
@ -728,8 +728,10 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
rv_html = rv_html && '<span class="changed" title="Modified">M</span>'.
WHEN gc_state-added. "Added new
rv_html = rv_html && '<span class="added" title="Added new">A</span>'.
WHEN gc_state-mixed. "Added and changed (multifile)
rv_html = rv_html && '<span class="mixed" title="Added and modified">~</span>'.
WHEN gc_state-mixed. "Multiple changes (multifile)
rv_html = rv_html && '<span class="mixed" title="Multiple changes">&#x25A0;</span>'.
WHEN gc_state-deleted. "Deleted
rv_html = rv_html && '<span class="deleted" title="Deleted">X</span>'.
ENDCASE.
ENDDO.