mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
file status, close #334
"Only Local" will be shown for objects only existing locally "Only Remote" will be shown for objects only existing in remote repository "diff" link will be shown if the file differs and exists both locally and remotely (this part of the code could use some refactoring)
This commit is contained in:
parent
8799542cb9
commit
580eb3d63e
|
@ -3,7 +3,7 @@ REPORT zabapgit LINE-SIZE 100.
|
||||||
* See http://www.abapgit.org
|
* See http://www.abapgit.org
|
||||||
|
|
||||||
CONSTANTS: gc_xml_version TYPE string VALUE 'v1.0.0', "#EC NOTEXT
|
CONSTANTS: gc_xml_version TYPE string VALUE 'v1.0.0', "#EC NOTEXT
|
||||||
gc_abap_version TYPE string VALUE 'v1.17.12'. "#EC NOTEXT
|
gc_abap_version TYPE string VALUE 'v1.17.13'. "#EC NOTEXT
|
||||||
|
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
|
|
|
@ -48,9 +48,10 @@ TYPES: BEGIN OF ty_web_asset,
|
||||||
TYPES tt_web_assets TYPE STANDARD TABLE OF ty_web_asset WITH DEFAULT KEY.
|
TYPES tt_web_assets TYPE STANDARD TABLE OF ty_web_asset WITH DEFAULT KEY.
|
||||||
|
|
||||||
TYPES: BEGIN OF ty_repo_file,
|
TYPES: BEGIN OF ty_repo_file,
|
||||||
path TYPE string,
|
path TYPE string,
|
||||||
filename TYPE string,
|
filename TYPE string,
|
||||||
is_changed TYPE abap_bool,
|
is_changed TYPE abap_bool,
|
||||||
|
remote_only TYPE abap_bool,
|
||||||
END OF ty_repo_file.
|
END OF ty_repo_file.
|
||||||
TYPES tt_repo_files TYPE STANDARD TABLE OF ty_repo_file WITH DEFAULT KEY.
|
TYPES tt_repo_files TYPE STANDARD TABLE OF ty_repo_file WITH DEFAULT KEY.
|
||||||
|
|
||||||
|
@ -86,12 +87,13 @@ TYPES: BEGIN OF ty_tadir,
|
||||||
TYPES: ty_tadir_tt TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY.
|
TYPES: ty_tadir_tt TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY.
|
||||||
|
|
||||||
TYPES: BEGIN OF ty_result,
|
TYPES: BEGIN OF ty_result,
|
||||||
obj_type TYPE tadir-object,
|
obj_type TYPE tadir-object,
|
||||||
obj_name TYPE tadir-obj_name,
|
obj_name TYPE tadir-obj_name,
|
||||||
match TYPE sap_bool,
|
match TYPE sap_bool,
|
||||||
filename TYPE string,
|
filename TYPE string,
|
||||||
package TYPE devclass,
|
package TYPE devclass,
|
||||||
path TYPE string,
|
path TYPE string,
|
||||||
|
remote_only TYPE abap_bool,
|
||||||
END OF ty_result.
|
END OF ty_result.
|
||||||
TYPES: ty_results_tt TYPE STANDARD TABLE OF ty_result WITH DEFAULT KEY.
|
TYPES: ty_results_tt TYPE STANDARD TABLE OF ty_result WITH DEFAULT KEY.
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,8 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
|
|
||||||
IF lt_files[] IS INITIAL.
|
IF lt_files[] IS INITIAL.
|
||||||
* item does not exist locally
|
* item does not exist locally
|
||||||
ls_result-filename = <ls_remote>-filename.
|
ls_result-filename = <ls_remote>-filename.
|
||||||
|
ls_result-remote_only = abap_true.
|
||||||
APPEND ls_result TO rt_results.
|
APPEND ls_result TO rt_results.
|
||||||
CONTINUE. " current loop
|
CONTINUE. " current loop
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -388,9 +388,10 @@ CLASS lcl_gui_page_main IMPLEMENTATION.
|
||||||
ENDAT.
|
ENDAT.
|
||||||
|
|
||||||
IF <ls_result>-filename IS NOT INITIAL.
|
IF <ls_result>-filename IS NOT INITIAL.
|
||||||
ls_file-path = <ls_result>-path.
|
ls_file-path = <ls_result>-path.
|
||||||
ls_file-filename = <ls_result>-filename.
|
ls_file-filename = <ls_result>-filename.
|
||||||
ls_file-is_changed = boolc( NOT <ls_result>-match = abap_true ).
|
ls_file-is_changed = boolc( NOT <ls_result>-match = abap_true ).
|
||||||
|
ls_file-remote_only = <ls_result>-remote_only.
|
||||||
APPEND ls_file TO ls_repo_item-files.
|
APPEND ls_file TO ls_repo_item-files.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
@ -456,10 +457,12 @@ CLASS lcl_gui_page_main IMPLEMENTATION.
|
||||||
|
|
||||||
ro_html->add( '<td class="cmd">' ).
|
ro_html->add( '<td class="cmd">' ).
|
||||||
IF lines( is_item-files ) = 0.
|
IF lines( is_item-files ) = 0.
|
||||||
ro_html->add( '<span class="grey">new</span>' ).
|
ro_html->add( '<span class="grey">Only Local</span>' ).
|
||||||
ELSE.
|
ELSE.
|
||||||
LOOP AT is_item-files INTO ls_file.
|
LOOP AT is_item-files INTO ls_file.
|
||||||
IF ls_file-is_changed = abap_true.
|
IF ls_file-remote_only = abap_true.
|
||||||
|
ro_html->add( '<span class="grey">Only Remote</span>' ).
|
||||||
|
ELSEIF ls_file-is_changed = abap_true.
|
||||||
lv_difflink = lcl_html_action_utils=>file_encode(
|
lv_difflink = lcl_html_action_utils=>file_encode(
|
||||||
iv_key = io_repo->get_key( )
|
iv_key = io_repo->get_key( )
|
||||||
ig_file = ls_file ).
|
ig_file = ls_file ).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user