mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 20:32:26 +08:00
Merge pull request #557 from christian-94/issue553
Don't serialize unnecessary objects #553
This commit is contained in:
commit
90289099fa
|
@ -63,8 +63,9 @@ 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_local = io_repo->get_files_local( io_log = io_log )
|
||||
it_remote = io_repo->get_files_remote( )
|
||||
it_cur_state = io_repo->get_local_checksums_per_file( ) ).
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ CLASS lcl_repo DEFINITION ABSTRACT FRIENDS lcl_repo_srv.
|
|||
RAISING lcx_exception,
|
||||
get_files_local
|
||||
IMPORTING io_log TYPE REF TO lcl_log OPTIONAL
|
||||
it_filter TYPE scts_tadir OPTIONAL
|
||||
RETURNING VALUE(rt_files) TYPE ty_files_item_tt
|
||||
RAISING lcx_exception,
|
||||
get_local_checksums
|
||||
|
|
|
@ -504,10 +504,13 @@ CLASS lcl_repo IMPLEMENTATION.
|
|||
|
||||
DATA: lt_tadir TYPE ty_tadir_tt,
|
||||
ls_item TYPE ty_item,
|
||||
lt_files TYPE ty_files_tt.
|
||||
lt_files TYPE ty_files_tt,
|
||||
lt_cache TYPE SORTED TABLE OF ty_file_item
|
||||
WITH NON-UNIQUE KEY item.
|
||||
|
||||
DATA: lt_cache TYPE SORTED TABLE OF ty_file_item
|
||||
WITH NON-UNIQUE KEY item.
|
||||
DATA: lt_filter TYPE SORTED TABLE OF tadir
|
||||
WITH NON-UNIQUE KEY object obj_name,
|
||||
lv_filter_exist TYPE abap_bool.
|
||||
|
||||
FIELD-SYMBOLS: <ls_file> LIKE LINE OF lt_files,
|
||||
<ls_return> LIKE LINE OF rt_files,
|
||||
|
@ -533,7 +536,19 @@ CLASS lcl_repo IMPLEMENTATION.
|
|||
|
||||
lt_cache = mt_local.
|
||||
lt_tadir = lcl_tadir=>read( get_package( ) ).
|
||||
|
||||
lt_filter = it_filter.
|
||||
lv_filter_exist = boolc( lines( lt_filter ) > 0 ) .
|
||||
|
||||
LOOP AT lt_tadir ASSIGNING <ls_tadir>.
|
||||
IF lv_filter_exist = abap_true.
|
||||
READ TABLE lt_filter TRANSPORTING NO FIELDS WITH KEY object = <ls_tadir>-object
|
||||
obj_name = <ls_tadir>-obj_name
|
||||
BINARY SEARCH.
|
||||
IF sy-subrc <> 0.
|
||||
CONTINUE.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
|
||||
lcl_progress=>show( iv_key = 'Serialize'
|
||||
iv_current = sy-tabix
|
||||
|
|
|
@ -404,25 +404,13 @@ CLASS lcl_zip IMPLEMENTATION.
|
|||
|
||||
CREATE OBJECT lo_log.
|
||||
|
||||
lt_zip = io_repo->get_files_local( lo_log ).
|
||||
lt_zip = io_repo->get_files_local( io_log = lo_log
|
||||
it_filter = it_filter ).
|
||||
|
||||
IF lo_log->count( ) > 0.
|
||||
lo_log->show( ).
|
||||
ENDIF.
|
||||
|
||||
IF lines( it_filter ) > 0.
|
||||
LOOP AT lt_zip ASSIGNING <ls_zip>.
|
||||
lv_index = sy-tabix.
|
||||
READ TABLE it_filter WITH KEY
|
||||
object = <ls_zip>-item-obj_type
|
||||
obj_name = <ls_zip>-item-obj_name
|
||||
TRANSPORTING NO FIELDS.
|
||||
IF sy-subrc <> 0.
|
||||
DELETE lt_zip INDEX lv_index.
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
ENDIF.
|
||||
|
||||
file_download( iv_package = io_repo->get_package( )
|
||||
iv_xstr = encode_files( lt_zip ) ).
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user