mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
cherrypick cache repo results (#280)
This commit is contained in:
parent
7f3a665756
commit
a6a7523b0b
|
@ -37,15 +37,12 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
METHOD compare_files.
|
METHOD compare_files.
|
||||||
|
|
||||||
READ TABLE it_repo WITH KEY
|
READ TABLE it_repo WITH KEY
|
||||||
path = is_gen-path
|
path = is_gen-path
|
||||||
filename = is_gen-filename
|
filename = is_gen-filename
|
||||||
data = is_gen-data
|
sha1 = is_gen-sha1
|
||||||
TRANSPORTING NO FIELDS.
|
TRANSPORTING NO FIELDS.
|
||||||
IF sy-subrc <> 0.
|
|
||||||
rv_match = abap_false.
|
rv_match = boolc( sy-subrc = 0 ).
|
||||||
ELSE.
|
|
||||||
rv_match = abap_true.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ENDMETHOD. "compare_files
|
ENDMETHOD. "compare_files
|
||||||
|
|
||||||
|
@ -70,7 +67,7 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
lt_remote = io_repo->get_files_remote( ).
|
lt_remote = io_repo->get_files_remote( ).
|
||||||
lt_local = io_repo->get_files_local( io_log ).
|
lt_local = io_repo->get_files_local( io_log ).
|
||||||
|
|
||||||
LOOP AT lt_remote ASSIGNING <ls_remote>.
|
LOOP AT lt_remote ASSIGNING <ls_remote>.
|
||||||
lcl_progress=>show( iv_key = 'Status'
|
lcl_progress=>show( iv_key = 'Status'
|
||||||
|
@ -112,8 +109,8 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
|
|
||||||
LOOP AT lt_files ASSIGNING <ls_gen>.
|
LOOP AT lt_files ASSIGNING <ls_gen>.
|
||||||
ls_result-filename = <ls_gen>-filename.
|
ls_result-filename = <ls_gen>-filename.
|
||||||
ls_result-match = compare_files( it_repo = lt_remote
|
ls_result-match = compare_files( it_repo = lt_remote
|
||||||
is_gen = <ls_gen> ).
|
is_gen = <ls_gen> ).
|
||||||
APPEND ls_result TO rt_results.
|
APPEND ls_result TO rt_results.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
@ -124,7 +121,7 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
TRANSPORTING NO FIELDS.
|
TRANSPORTING NO FIELDS.
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
IF io_repo->get_dot_abapgit( )->is_ignored(
|
IF io_repo->get_dot_abapgit( )->is_ignored(
|
||||||
iv_path = <ls_remote>-path
|
iv_path = <ls_remote>-path
|
||||||
iv_filename = <ls_remote>-filename ) = abap_true.
|
iv_filename = <ls_remote>-filename ) = abap_true.
|
||||||
CONTINUE.
|
CONTINUE.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -149,7 +146,7 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
LOOP AT lt_tadir ASSIGNING <ls_tadir>.
|
LOOP AT lt_tadir ASSIGNING <ls_tadir>.
|
||||||
READ TABLE rt_results
|
READ TABLE rt_results
|
||||||
WITH KEY obj_type = <ls_tadir>-object
|
WITH KEY obj_type = <ls_tadir>-object
|
||||||
obj_name = <ls_tadir>-obj_name
|
obj_name = <ls_tadir>-obj_name
|
||||||
TRANSPORTING NO FIELDS.
|
TRANSPORTING NO FIELDS.
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
ls_item-obj_type = <ls_tadir>-object.
|
ls_item-obj_type = <ls_tadir>-object.
|
||||||
|
@ -168,8 +165,8 @@ CLASS lcl_file_status IMPLEMENTATION.
|
||||||
|
|
||||||
LOOP AT rt_results ASSIGNING <ls_result>
|
LOOP AT rt_results ASSIGNING <ls_result>
|
||||||
WHERE obj_type = <ls_tadir>-object
|
WHERE obj_type = <ls_tadir>-object
|
||||||
AND obj_name = <ls_tadir>-obj_name
|
AND obj_name = <ls_tadir>-obj_name
|
||||||
AND path IS INITIAL.
|
AND path IS INITIAL.
|
||||||
* new file added locally to existing object
|
* new file added locally to existing object
|
||||||
<ls_result>-path = io_repo->get_dot_abapgit( )->get_starting_folder( ) && <ls_tadir>-path.
|
<ls_result>-path = io_repo->get_dot_abapgit( )->get_starting_folder( ) && <ls_tadir>-path.
|
||||||
<ls_result>-new = gc_new-local.
|
<ls_result>-new = gc_new-local.
|
||||||
|
|
|
@ -121,7 +121,8 @@ CLASS lcl_repo_online DEFINITION INHERITING FROM lcl_repo FINAL.
|
||||||
mt_objects TYPE ty_objects_tt,
|
mt_objects TYPE ty_objects_tt,
|
||||||
mv_branch TYPE ty_sha1,
|
mv_branch TYPE ty_sha1,
|
||||||
mv_initialized TYPE abap_bool,
|
mv_initialized TYPE abap_bool,
|
||||||
mo_branches TYPE REF TO lcl_git_branch_list.
|
mo_branches TYPE REF TO lcl_git_branch_list,
|
||||||
|
mt_status TYPE ty_results_tt.
|
||||||
|
|
||||||
METHODS:
|
METHODS:
|
||||||
handle_stage_ignore
|
handle_stage_ignore
|
||||||
|
|
|
@ -42,8 +42,11 @@ CLASS lcl_repo_online IMPLEMENTATION.
|
||||||
|
|
||||||
initialize( ).
|
initialize( ).
|
||||||
|
|
||||||
rt_results = lcl_file_status=>status( io_repo = me
|
IF lines( mt_status ) = 0.
|
||||||
io_log = io_log ).
|
mt_status = lcl_file_status=>status( io_repo = me
|
||||||
|
io_log = io_log ).
|
||||||
|
ENDIF.
|
||||||
|
rt_results = mt_status.
|
||||||
|
|
||||||
ENDMETHOD. "status
|
ENDMETHOD. "status
|
||||||
|
|
||||||
|
@ -66,6 +69,7 @@ CLASS lcl_repo_online IMPLEMENTATION.
|
||||||
METHOD refresh.
|
METHOD refresh.
|
||||||
|
|
||||||
super->refresh( ).
|
super->refresh( ).
|
||||||
|
CLEAR mt_status.
|
||||||
|
|
||||||
lcl_progress=>show( iv_key = 'Fetch'
|
lcl_progress=>show( iv_key = 'Fetch'
|
||||||
iv_current = 1
|
iv_current = 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user