mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
Do not delete repo at pull error #1675
Some time ago, the repo was pulled immediately after creation, this has been changed, so we do not need this workaround anymore. Also see #843
This commit is contained in:
parent
01c2cfb610
commit
640839ad0e
|
@ -87,29 +87,27 @@ CLASS zcl_abapgit_repo_online DEFINITION
|
||||||
METHODS refresh
|
METHODS refresh
|
||||||
REDEFINITION .
|
REDEFINITION .
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
DATA:
|
|
||||||
mt_objects TYPE zif_abapgit_definitions=>ty_objects_tt,
|
|
||||||
mv_branch TYPE zif_abapgit_definitions=>ty_sha1,
|
|
||||||
mv_initialized TYPE abap_bool,
|
|
||||||
mo_branches TYPE REF TO zcl_abapgit_git_branch_list,
|
|
||||||
mt_status TYPE zif_abapgit_definitions=>ty_results_tt,
|
|
||||||
mv_code_inspector_successful TYPE abap_bool.
|
|
||||||
|
|
||||||
METHODS:
|
DATA mt_objects TYPE zif_abapgit_definitions=>ty_objects_tt .
|
||||||
handle_stage_ignore
|
DATA mv_branch TYPE zif_abapgit_definitions=>ty_sha1 .
|
||||||
IMPORTING io_stage TYPE REF TO zcl_abapgit_stage
|
DATA mv_initialized TYPE abap_bool .
|
||||||
RAISING zcx_abapgit_exception,
|
DATA mo_branches TYPE REF TO zcl_abapgit_git_branch_list .
|
||||||
actualize_head_branch
|
DATA mt_status TYPE zif_abapgit_definitions=>ty_results_tt .
|
||||||
RAISING zcx_abapgit_exception,
|
DATA mv_code_inspector_successful TYPE abap_bool .
|
||||||
delete_initial_online_repo
|
|
||||||
IMPORTING iv_commit TYPE flag
|
|
||||||
RAISING zcx_abapgit_exception.
|
|
||||||
|
|
||||||
|
METHODS handle_stage_ignore
|
||||||
|
IMPORTING
|
||||||
|
!io_stage TYPE REF TO zcl_abapgit_stage
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
|
METHODS actualize_head_branch
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS zcl_abapgit_repo_online IMPLEMENTATION.
|
CLASS ZCL_ABAPGIT_REPO_ONLINE IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD actualize_head_branch.
|
METHOD actualize_head_branch.
|
||||||
|
@ -132,21 +130,6 @@ CLASS zcl_abapgit_repo_online IMPLEMENTATION.
|
||||||
ENDMETHOD. "constructor
|
ENDMETHOD. "constructor
|
||||||
|
|
||||||
|
|
||||||
METHOD delete_initial_online_repo.
|
|
||||||
|
|
||||||
IF me->is_offline( ) = abap_false AND me->get_sha1_remote( ) IS INITIAL.
|
|
||||||
|
|
||||||
zcl_abapgit_repo_srv=>get_instance( )->delete( me ).
|
|
||||||
|
|
||||||
IF iv_commit = abap_true.
|
|
||||||
COMMIT WORK.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ENDMETHOD. " delete_initial_online_repo
|
|
||||||
|
|
||||||
|
|
||||||
METHOD deserialize.
|
METHOD deserialize.
|
||||||
|
|
||||||
initialize( ).
|
initialize( ).
|
||||||
|
@ -392,7 +375,6 @@ CLASS zcl_abapgit_repo_online IMPLEMENTATION.
|
||||||
lo_progress->show( iv_current = 1
|
lo_progress->show( iv_current = 1
|
||||||
iv_text = 'Fetch remote files' ) ##NO_TEXT.
|
iv_text = 'Fetch remote files' ) ##NO_TEXT.
|
||||||
|
|
||||||
TRY.
|
|
||||||
zcl_abapgit_git_porcelain=>pull(
|
zcl_abapgit_git_porcelain=>pull(
|
||||||
EXPORTING
|
EXPORTING
|
||||||
io_repo = me
|
io_repo = me
|
||||||
|
@ -401,14 +383,6 @@ CLASS zcl_abapgit_repo_online IMPLEMENTATION.
|
||||||
et_objects = mt_objects
|
et_objects = mt_objects
|
||||||
ev_branch = mv_branch ).
|
ev_branch = mv_branch ).
|
||||||
|
|
||||||
CATCH zcx_abapgit_exception INTO lx_exception.
|
|
||||||
|
|
||||||
delete_initial_online_repo( abap_true ).
|
|
||||||
|
|
||||||
RAISE EXCEPTION lx_exception.
|
|
||||||
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
mo_branches = zcl_abapgit_git_transport=>branches( get_url( ) ).
|
mo_branches = zcl_abapgit_git_transport=>branches( get_url( ) ).
|
||||||
actualize_head_branch( ).
|
actualize_head_branch( ).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user