mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
fix staging .abapgit.xml close #423
This commit is contained in:
parent
7c4f834bc9
commit
71976a3307
|
@ -3,7 +3,7 @@ REPORT zabapgit LINE-SIZE 100.
|
|||
* See http://www.abapgit.org
|
||||
|
||||
CONSTANTS: gc_xml_version TYPE string VALUE 'v1.0.0', "#EC NOTEXT
|
||||
gc_abap_version TYPE string VALUE 'v1.21.0'. "#EC NOTEXT
|
||||
gc_abap_version TYPE string VALUE 'v1.21.1'. "#EC NOTEXT
|
||||
|
||||
********************************************************************************
|
||||
* The MIT License (MIT)
|
||||
|
|
|
@ -71,15 +71,6 @@ CLASS lcl_file_status IMPLEMENTATION.
|
|||
LOOP AT rt_results ASSIGNING <ls_result>.
|
||||
lv_index = sy-tabix.
|
||||
|
||||
" Crutch for .abapgit -> it is always match as generated dynamically
|
||||
" However this is probably the place to compare it when .abapgit editing
|
||||
" tool will be implemented
|
||||
IF <ls_result>-path = gc_root_dir AND <ls_result>-filename = gc_dot_abapgit.
|
||||
<ls_result>-match = abap_true.
|
||||
CLEAR: <ls_result>-lstate, <ls_result>-rstate.
|
||||
CONTINUE.
|
||||
ENDIF.
|
||||
|
||||
IF lo_dot_abapgit->is_ignored(
|
||||
iv_path = <ls_result>-path
|
||||
iv_filename = <ls_result>-filename ) = abap_true.
|
||||
|
@ -108,6 +99,7 @@ CLASS lcl_file_status IMPLEMENTATION.
|
|||
<ls_result> LIKE LINE OF rt_results,
|
||||
<ls_local> LIKE LINE OF it_local.
|
||||
|
||||
|
||||
lt_state_idx = it_cur_state. " Force sort it
|
||||
lt_remote = it_remote.
|
||||
SORT lt_remote BY path filename.
|
||||
|
|
|
@ -41,8 +41,8 @@ CLASS lcl_repo_content_browser DEFINITION FINAL.
|
|||
RETURNING VALUE(ro_log) TYPE REF TO lcl_log.
|
||||
|
||||
PRIVATE SECTION.
|
||||
DATA mo_repo TYPE REF TO lcl_repo.
|
||||
DATA mo_log TYPE REF TO lcl_log.
|
||||
DATA: mo_repo TYPE REF TO lcl_repo,
|
||||
mo_log TYPE REF TO lcl_log.
|
||||
|
||||
METHODS get_local
|
||||
RETURNING VALUE(rt_repo_items) TYPE tt_repo_items
|
||||
|
@ -85,6 +85,7 @@ CLASS lcl_repo_content_browser IMPLEMENTATION.
|
|||
|
||||
METHOD list.
|
||||
|
||||
* todo, create mo_log in constuctor instead?
|
||||
CREATE OBJECT mo_log.
|
||||
|
||||
IF mo_repo->is_offline( ) = abap_true.
|
||||
|
@ -103,7 +104,10 @@ CLASS lcl_repo_content_browser IMPLEMENTATION.
|
|||
filter_changes( CHANGING ct_repo_items = rt_repo_items ).
|
||||
ENDIF.
|
||||
|
||||
SORT rt_repo_items BY sortkey obj_type obj_name ASCENDING.
|
||||
SORT rt_repo_items BY
|
||||
sortkey ASCENDING
|
||||
obj_type ASCENDING
|
||||
obj_name ASCENDING.
|
||||
|
||||
ENDMETHOD. "list
|
||||
|
||||
|
@ -170,12 +174,14 @@ CLASS lcl_repo_content_browser IMPLEMENTATION.
|
|||
ENDMETHOD. "filter_changes
|
||||
|
||||
METHOD get_local.
|
||||
* todo, should this method be part of lcl_repo instead?
|
||||
|
||||
DATA: lt_tadir TYPE ty_tadir_tt.
|
||||
|
||||
FIELD-SYMBOLS: <ls_repo_item> LIKE LINE OF rt_repo_items,
|
||||
<ls_tadir> LIKE LINE OF lt_tadir.
|
||||
|
||||
|
||||
lt_tadir = lcl_tadir=>read( mo_repo->get_package( ) ).
|
||||
LOOP AT lt_tadir ASSIGNING <ls_tadir>.
|
||||
APPEND INITIAL LINE TO rt_repo_items ASSIGNING <ls_repo_item>.
|
||||
|
@ -188,6 +194,8 @@ CLASS lcl_repo_content_browser IMPLEMENTATION.
|
|||
ENDMETHOD. "get_local
|
||||
|
||||
METHOD get_remote.
|
||||
* todo, name "get_remote" is misleading? it does a lot more than just fetching
|
||||
* remote objects
|
||||
|
||||
DATA: lo_repo_online TYPE REF TO lcl_repo_online,
|
||||
ls_file TYPE ty_repo_file,
|
||||
|
@ -196,6 +204,7 @@ CLASS lcl_repo_content_browser IMPLEMENTATION.
|
|||
FIELD-SYMBOLS: <status> LIKE LINE OF lt_status,
|
||||
<ls_repo_item> LIKE LINE OF rt_repo_items.
|
||||
|
||||
|
||||
lo_repo_online ?= mo_repo.
|
||||
lt_status = lo_repo_online->status( mo_log ).
|
||||
|
||||
|
@ -352,6 +361,7 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
|
|||
|
||||
FIELD-SYMBOLS <ls_item> LIKE LINE OF lt_repo_items.
|
||||
|
||||
|
||||
" Reinit, for the case of type change
|
||||
mo_repo = lcl_app=>repo_srv( )->get( mo_repo->get_key( ) ).
|
||||
|
||||
|
@ -359,7 +369,10 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
|
|||
|
||||
TRY.
|
||||
|
||||
CREATE OBJECT lo_browser EXPORTING io_repo = mo_repo.
|
||||
CREATE OBJECT lo_browser
|
||||
EXPORTING
|
||||
io_repo = mo_repo.
|
||||
|
||||
lt_repo_items = lo_browser->list( iv_path = mv_cur_dir
|
||||
iv_by_folders = mv_show_folders
|
||||
iv_changes_only = mv_changes_only ).
|
||||
|
@ -369,7 +382,8 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
|
|||
_reduce_state lv_rstate <ls_item>-rstate.
|
||||
ENDLOOP.
|
||||
|
||||
ro_html->add( render_head_menu( iv_lstate = lv_lstate iv_rstate = lv_rstate ) ).
|
||||
ro_html->add( render_head_menu( iv_lstate = lv_lstate
|
||||
iv_rstate = lv_rstate ) ).
|
||||
|
||||
lo_log = lo_browser->get_log( ).
|
||||
IF mo_repo->is_offline( ) = abap_false AND lo_log->count( ) > 0.
|
||||
|
|
Loading…
Reference in New Issue
Block a user