diff --git a/src/zabapgit_migrations.prog.abap b/src/zabapgit_migrations.prog.abap index 30cd12307..b99db4d51 100644 --- a/src/zabapgit_migrations.prog.abap +++ b/src/zabapgit_migrations.prog.abap @@ -35,7 +35,8 @@ CLASS lcl_migrations IMPLEMENTATION. DATA: lt_repos TYPE lcl_repo_srv=>ty_repo_tt, lv_shown TYPE abap_bool, - lo_dot_abapgit TYPE REF TO lcl_dot_abapgit. + lo_dot_abapgit TYPE REF TO lcl_dot_abapgit, + lx_exception TYPE REF TO lcx_exception. FIELD-SYMBOLS: LIKE LINE OF lt_repos. @@ -56,7 +57,23 @@ CLASS lcl_migrations IMPLEMENTATION. txt2 = 'Login to remote repositories if needed'. lv_shown = abap_true. ENDIF. - ->refresh( ). + + " Skip repos that cannot be fetched. + " Particuarly useful on systems where users do not allow + " everybody to fetch their repos. + TRY. + ->refresh( ). + CATCH lcx_exception INTO lx_exception. + CALL FUNCTION 'POPUP_TO_INFORM' + EXPORTING + titel = 'Migration has failed' + txt1 = lx_exception->mv_text + txt2 = 'Please do not use the ''' && ->get_name( ) && ''' repository until migrated.' + txt3 = 'You will be prompted to migrate the repository every time you run abapGit.' + txt4 = 'You can safely remove the repository in its ''Advanced -> Remove'' menu.'. + CONTINUE. + ENDTRY. + lo_dot_abapgit = ->find_remote_dot_abapgit( ). IF lo_dot_abapgit IS INITIAL. * .abapgit.xml is not in the remote repo yet