Sacrifice HEAD_BRANCH feature in repo

Sacrifice  HEAD_BRANCH feature in repo, suggest instead implementing a branch list cache later

#1757
This commit is contained in:
larshp 2018-08-05 09:33:38 +00:00 committed by Lars Hvam
parent d0838c0f54
commit 742f3e5e2c
2 changed files with 4 additions and 35 deletions

View File

@ -53,10 +53,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_text = zcl_abapgit_git_branch_list=>get_display_name( iv_branch ). lv_text = zcl_abapgit_git_branch_list=>get_display_name( iv_branch ).
IF iv_branch = io_repo->get_head_branch_name( ) IF zcl_abapgit_git_branch_list=>get_type( iv_branch ) = zif_abapgit_definitions=>c_git_branch_type-branch.
OR iv_branch = zif_abapgit_definitions=>c_head_name.
lv_class = 'branch branch_head'.
ELSEIF zcl_abapgit_git_branch_list=>get_type( iv_branch ) = zif_abapgit_definitions=>c_git_branch_type-branch.
lv_class = 'branch branch_branch'. lv_class = 'branch branch_branch'.
ELSE. ELSE.
lv_class = 'branch'. lv_class = 'branch'.

View File

@ -17,9 +17,6 @@ CLASS zcl_abapgit_repo_online DEFINITION
METHODS get_branch_name METHODS get_branch_name
RETURNING RETURNING
VALUE(rv_name) TYPE zif_abapgit_persistence=>ty_repo-branch_name . VALUE(rv_name) TYPE zif_abapgit_persistence=>ty_repo-branch_name .
METHODS get_head_branch_name
RETURNING
VALUE(rv_name) TYPE zif_abapgit_persistence=>ty_repo-head_branch .
METHODS set_url METHODS set_url
IMPORTING IMPORTING
!iv_url TYPE zif_abapgit_persistence=>ty_repo-url !iv_url TYPE zif_abapgit_persistence=>ty_repo-url
@ -94,11 +91,6 @@ CLASS zcl_abapgit_repo_online DEFINITION
!io_stage TYPE REF TO zcl_abapgit_stage !io_stage TYPE REF TO zcl_abapgit_stage
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
METHODS actualize_head_branch
IMPORTING
!io_branch_list TYPE REF TO zcl_abapgit_git_branch_list
RAISING
zcx_abapgit_exception .
ENDCLASS. ENDCLASS.
@ -106,17 +98,6 @@ ENDCLASS.
CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION. CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION.
METHOD actualize_head_branch.
DATA lv_branch_name TYPE string.
lv_branch_name = io_branch_list->get_head( )-name.
IF lv_branch_name <> ms_data-head_branch.
set( iv_head_branch = lv_branch_name ).
ENDIF.
ENDMETHOD. "actualize_head_branch
METHOD constructor. METHOD constructor.
super->constructor( is_data ). super->constructor( is_data ).
@ -151,11 +132,6 @@ CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION.
ENDMETHOD. "get_files ENDMETHOD. "get_files
METHOD get_head_branch_name.
rv_name = ms_data-head_branch.
ENDMETHOD. "get_head_branch_name
METHOD get_objects. METHOD get_objects.
initialize( ). initialize( ).
@ -358,9 +334,8 @@ CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION.
METHOD refresh. METHOD refresh.
DATA: lo_progress TYPE REF TO zcl_abapgit_progress, DATA: lo_progress TYPE REF TO zcl_abapgit_progress,
lx_exception TYPE REF TO zcx_abapgit_exception, lx_exception TYPE REF TO zcx_abapgit_exception.
lo_branch_list TYPE REF TO zcl_abapgit_git_branch_list.
super->refresh( iv_drop_cache ). super->refresh( iv_drop_cache ).
reset_status( ). reset_status( ).
@ -378,10 +353,7 @@ CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION.
IMPORTING IMPORTING
et_files = mt_remote et_files = mt_remote
et_objects = mt_objects et_objects = mt_objects
ev_branch = mv_branch ev_branch = mv_branch ).
eo_branch_list = lo_branch_list ).
actualize_head_branch( lo_branch_list ).
mv_initialized = abap_true. mv_initialized = abap_true.