From 742f3e5e2c8850b7456fdd2e2a676e5790e11813 Mon Sep 17 00:00:00 2001 From: larshp Date: Sun, 5 Aug 2018 09:33:38 +0000 Subject: [PATCH] Sacrifice HEAD_BRANCH feature in repo Sacrifice HEAD_BRANCH feature in repo, suggest instead implementing a branch list cache later #1757 --- src/ui/zcl_abapgit_gui_chunk_lib.clas.abap | 5 +--- src/zcl_abapgit_repo_online.clas.abap | 34 ++-------------------- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap index 3a26c262c..28769e04b 100644 --- a/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap +++ b/src/ui/zcl_abapgit_gui_chunk_lib.clas.abap @@ -53,10 +53,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION. lv_text = zcl_abapgit_git_branch_list=>get_display_name( iv_branch ). - IF iv_branch = io_repo->get_head_branch_name( ) - 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. + IF zcl_abapgit_git_branch_list=>get_type( iv_branch ) = zif_abapgit_definitions=>c_git_branch_type-branch. lv_class = 'branch branch_branch'. ELSE. lv_class = 'branch'. diff --git a/src/zcl_abapgit_repo_online.clas.abap b/src/zcl_abapgit_repo_online.clas.abap index 22c91872b..43e7dd699 100644 --- a/src/zcl_abapgit_repo_online.clas.abap +++ b/src/zcl_abapgit_repo_online.clas.abap @@ -17,9 +17,6 @@ CLASS zcl_abapgit_repo_online DEFINITION METHODS get_branch_name RETURNING 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 IMPORTING !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 RAISING zcx_abapgit_exception . - METHODS actualize_head_branch - IMPORTING - !io_branch_list TYPE REF TO zcl_abapgit_git_branch_list - RAISING - zcx_abapgit_exception . ENDCLASS. @@ -106,17 +98,6 @@ ENDCLASS. 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. super->constructor( is_data ). @@ -151,11 +132,6 @@ CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION. ENDMETHOD. "get_files - METHOD get_head_branch_name. - rv_name = ms_data-head_branch. - ENDMETHOD. "get_head_branch_name - - METHOD get_objects. initialize( ). @@ -358,9 +334,8 @@ CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION. METHOD refresh. - DATA: lo_progress TYPE REF TO zcl_abapgit_progress, - lx_exception TYPE REF TO zcx_abapgit_exception, - lo_branch_list TYPE REF TO zcl_abapgit_git_branch_list. + DATA: lo_progress TYPE REF TO zcl_abapgit_progress, + lx_exception TYPE REF TO zcx_abapgit_exception. super->refresh( iv_drop_cache ). reset_status( ). @@ -378,10 +353,7 @@ CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION. IMPORTING et_files = mt_remote et_objects = mt_objects - ev_branch = mv_branch - eo_branch_list = lo_branch_list ). - - actualize_head_branch( lo_branch_list ). + ev_branch = mv_branch ). mv_initialized = abap_true.