Fix "repo not found" error (#3416)

Fix for https://github.com/larshp/abapGit/issues/2938

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2020-05-27 15:06:52 +02:00 committed by GitHub
parent 63ab2d276c
commit 6d0861a7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,12 +242,18 @@ CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
refresh( ). refresh( ).
ENDIF. ENDIF.
LOOP AT mt_list ASSIGNING <lo_list>. DO 2 TIMES.
IF <lo_list>->get_key( ) = iv_key. " Repo might have been created in another session. Try again after refresh
ro_repo = <lo_list>. IF sy-index = 2.
RETURN. refresh( ).
ENDIF. ENDIF.
ENDLOOP. LOOP AT mt_list ASSIGNING <lo_list>.
IF <lo_list>->get_key( ) = iv_key.
ro_repo = <lo_list>.
RETURN.
ENDIF.
ENDLOOP.
ENDDO.
zcx_abapgit_exception=>raise( 'repo not found, get' ). zcx_abapgit_exception=>raise( 'repo not found, get' ).