mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Add refresh after failed uninstall (#4334)
* Add refresh after failed uninstall If uninstall does not complete successfully, the old state of the repo will be shown. This will refresh the state and properly show which objects were deleted and which still remain. * Update src/zcl_abapgit_repo_srv.clas.abap Co-authored-by: Lars Hvam <larshp@hotmail.com> Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
a0736db371
commit
4402ed8cab
|
@ -527,6 +527,7 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
||||||
* todo, this should be a method on the repo instead?
|
* todo, this should be a method on the repo instead?
|
||||||
|
|
||||||
DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt.
|
DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt.
|
||||||
|
DATA: lx_error TYPE REF TO zcx_abapgit_exception.
|
||||||
|
|
||||||
CREATE OBJECT ri_log TYPE zcl_abapgit_log.
|
CREATE OBJECT ri_log TYPE zcl_abapgit_log.
|
||||||
ri_log->set_title( 'Uninstall Log' ).
|
ri_log->set_title( 'Uninstall Log' ).
|
||||||
|
@ -539,9 +540,15 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
|
||||||
|
|
||||||
lt_tadir = zcl_abapgit_factory=>get_tadir( )->read( io_repo->get_package( ) ).
|
lt_tadir = zcl_abapgit_factory=>get_tadir( )->read( io_repo->get_package( ) ).
|
||||||
|
|
||||||
|
TRY.
|
||||||
zcl_abapgit_objects=>delete( it_tadir = lt_tadir
|
zcl_abapgit_objects=>delete( it_tadir = lt_tadir
|
||||||
is_checks = is_checks
|
is_checks = is_checks
|
||||||
ii_log = ri_log ).
|
ii_log = ri_log ).
|
||||||
|
CATCH zcx_abapgit_exception INTO lx_error.
|
||||||
|
" If uninstall fails, repo needs a refresh to show which objects where deleted and which not
|
||||||
|
io_repo->refresh( ).
|
||||||
|
RAISE EXCEPTION lx_error.
|
||||||
|
ENDTRY.
|
||||||
|
|
||||||
delete( io_repo ).
|
delete( io_repo ).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user