mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 13:03:01 +08:00
Merge pull request #2 from larshp/master
update larshp/abapGit-master version
This commit is contained in:
commit
436775edbe
|
@ -3,7 +3,7 @@ REPORT zabapgit LINE-SIZE 100.
|
||||||
* See http://www.abapgit.org
|
* See http://www.abapgit.org
|
||||||
|
|
||||||
CONSTANTS: gc_xml_version TYPE string VALUE 'v1.0.0', "#EC NOTEXT
|
CONSTANTS: gc_xml_version TYPE string VALUE 'v1.0.0', "#EC NOTEXT
|
||||||
gc_abap_version TYPE string VALUE 'v1.26.1'. "#EC NOTEXT
|
gc_abap_version TYPE string VALUE 'v1.26.2'. "#EC NOTEXT
|
||||||
|
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
|
|
|
@ -53,7 +53,8 @@ FORM branch_popup TABLES tt_fields TYPE ty_sval_tt
|
||||||
DATA: lv_url TYPE string,
|
DATA: lv_url TYPE string,
|
||||||
lx_error TYPE REF TO lcx_exception,
|
lx_error TYPE REF TO lcx_exception,
|
||||||
ls_package_data TYPE scompkdtln,
|
ls_package_data TYPE scompkdtln,
|
||||||
ls_branch TYPE lcl_git_branch_list=>ty_git_branch.
|
ls_branch TYPE lcl_git_branch_list=>ty_git_branch,
|
||||||
|
lv_create TYPE boolean.
|
||||||
|
|
||||||
FIELD-SYMBOLS: <ls_furl> LIKE LINE OF tt_fields,
|
FIELD-SYMBOLS: <ls_furl> LIKE LINE OF tt_fields,
|
||||||
<ls_fbranch> LIKE LINE OF tt_fields.
|
<ls_fbranch> LIKE LINE OF tt_fields.
|
||||||
|
@ -88,24 +89,9 @@ FORM branch_popup TABLES tt_fields TYPE ty_sval_tt
|
||||||
ELSEIF pv_code = 'COD2'.
|
ELSEIF pv_code = 'COD2'.
|
||||||
cv_show_popup = abap_true.
|
cv_show_popup = abap_true.
|
||||||
|
|
||||||
CALL FUNCTION 'FUNCTION_EXISTS'
|
lcl_popups=>popup_to_create_package( IMPORTING es_package_data = ls_package_data
|
||||||
EXPORTING
|
ev_create = lv_create ).
|
||||||
funcname = 'PB_POPUP_PACKAGE_CREATE'
|
IF lv_create = abap_false.
|
||||||
EXCEPTIONS
|
|
||||||
function_not_exist = 1
|
|
||||||
OTHERS = 2.
|
|
||||||
IF sy-subrc = 1.
|
|
||||||
* looks like the function module used does not exist on all
|
|
||||||
* versions since 702, so show an error
|
|
||||||
lcx_exception=>raise( 'Function module PB_POPUP_PACKAGE_CREATE does not exist' ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
CALL FUNCTION 'PB_POPUP_PACKAGE_CREATE'
|
|
||||||
CHANGING
|
|
||||||
p_object_data = ls_package_data
|
|
||||||
EXCEPTIONS
|
|
||||||
action_cancelled = 1.
|
|
||||||
IF sy-subrc = 1.
|
|
||||||
RETURN.
|
RETURN.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
@ -119,6 +105,38 @@ FORM branch_popup TABLES tt_fields TYPE ty_sval_tt
|
||||||
|
|
||||||
ENDFORM. "branch_popup
|
ENDFORM. "branch_popup
|
||||||
|
|
||||||
|
FORM package_popup TABLES tt_fields TYPE ty_sval_tt
|
||||||
|
USING pv_code TYPE clike
|
||||||
|
CHANGING cs_error TYPE svale
|
||||||
|
cv_show_popup TYPE c
|
||||||
|
RAISING lcx_exception ##called ##needed.
|
||||||
|
* called dynamically from function module POPUP_GET_VALUES_USER_BUTTONS
|
||||||
|
|
||||||
|
DATA: ls_package_data TYPE scompkdtln,
|
||||||
|
lv_create TYPE boolean.
|
||||||
|
|
||||||
|
FIELD-SYMBOLS: <ls_fbranch> LIKE LINE OF tt_fields.
|
||||||
|
|
||||||
|
CLEAR cs_error.
|
||||||
|
|
||||||
|
IF pv_code = 'COD1'.
|
||||||
|
cv_show_popup = abap_true.
|
||||||
|
|
||||||
|
lcl_popups=>popup_to_create_package( IMPORTING es_package_data = ls_package_data
|
||||||
|
ev_create = lv_create ).
|
||||||
|
IF lv_create = abap_false.
|
||||||
|
RETURN.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
lcl_sap_package=>create( ls_package_data ).
|
||||||
|
COMMIT WORK.
|
||||||
|
|
||||||
|
READ TABLE tt_fields ASSIGNING <ls_fbranch> WITH KEY tabname = 'TDEVC'.
|
||||||
|
ASSERT sy-subrc = 0.
|
||||||
|
<ls_fbranch>-value = ls_package_data-devclass.
|
||||||
|
ENDIF.
|
||||||
|
ENDFORM. "package_popup
|
||||||
|
|
||||||
FORM output.
|
FORM output.
|
||||||
DATA: lt_ucomm TYPE TABLE OF sy-ucomm.
|
DATA: lt_ucomm TYPE TABLE OF sy-ucomm.
|
||||||
PERFORM set_pf_status IN PROGRAM rsdbrunt IF FOUND.
|
PERFORM set_pf_status IN PROGRAM rsdbrunt IF FOUND.
|
||||||
|
|
|
@ -363,7 +363,6 @@ CLASS lcl_gui_page_branch_overview IMPLEMENTATION.
|
||||||
METHOD constructor.
|
METHOD constructor.
|
||||||
super->constructor( ).
|
super->constructor( ).
|
||||||
ms_control-page_title = 'BRANCH_OVERVIEW'.
|
ms_control-page_title = 'BRANCH_OVERVIEW'.
|
||||||
ms_control-page_menu = build_menu( ).
|
|
||||||
mo_repo = io_repo.
|
mo_repo = io_repo.
|
||||||
refresh( ).
|
refresh( ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
@ -429,6 +428,9 @@ CLASS lcl_gui_page_branch_overview IMPLEMENTATION.
|
||||||
|
|
||||||
ro_html->add( render_merge( ) ).
|
ro_html->add( render_merge( ) ).
|
||||||
|
|
||||||
|
ro_html->add( '<br>' ).
|
||||||
|
ro_html->add( build_menu( )->render( ) ).
|
||||||
|
|
||||||
* see http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element
|
* see http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element
|
||||||
_add '<canvas id="gitGraph"></canvas>'.
|
_add '<canvas id="gitGraph"></canvas>'.
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,11 @@ CLASS lcl_popups DEFINITION FINAL.
|
||||||
IMPORTING
|
IMPORTING
|
||||||
titlebar TYPE clike
|
titlebar TYPE clike
|
||||||
text_message TYPE clike
|
text_message TYPE clike
|
||||||
|
RAISING lcx_exception,
|
||||||
|
popup_to_create_package
|
||||||
|
EXPORTING es_package_data TYPE scompkdtln
|
||||||
|
ev_create TYPE boolean
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
CLASS lcl_popups IMPLEMENTATION.
|
CLASS lcl_popups IMPLEMENTATION.
|
||||||
|
@ -241,7 +243,10 @@ CLASS lcl_popups IMPLEMENTATION.
|
||||||
METHOD repo_new_offline.
|
METHOD repo_new_offline.
|
||||||
|
|
||||||
DATA: lv_returncode TYPE c,
|
DATA: lv_returncode TYPE c,
|
||||||
lt_fields TYPE TABLE OF sval.
|
lt_fields TYPE TABLE OF sval,
|
||||||
|
lv_icon_ok TYPE icon-name,
|
||||||
|
lv_button1 TYPE svalbutton-buttontext,
|
||||||
|
lv_icon1 TYPE icon-name.
|
||||||
|
|
||||||
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
|
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
|
||||||
|
|
||||||
|
@ -250,10 +255,21 @@ CLASS lcl_popups IMPLEMENTATION.
|
||||||
_add_dialog_fld 'ABAPTXT255' 'LINE' 'Name' '' ''.
|
_add_dialog_fld 'ABAPTXT255' 'LINE' 'Name' '' ''.
|
||||||
_add_dialog_fld 'TDEVC' 'DEVCLASS' 'Package' '' ''.
|
_add_dialog_fld 'TDEVC' 'DEVCLASS' 'Package' '' ''.
|
||||||
|
|
||||||
CALL FUNCTION 'POPUP_GET_VALUES'
|
lv_icon_ok = icon_okay.
|
||||||
|
lv_button1 = 'Create package' ##NO_TEXT.
|
||||||
|
lv_icon1 = icon_folder.
|
||||||
|
|
||||||
|
CALL FUNCTION 'POPUP_GET_VALUES_USER_BUTTONS'
|
||||||
EXPORTING
|
EXPORTING
|
||||||
no_value_check = abap_true
|
popup_title = 'New Offline Project'
|
||||||
popup_title = 'New Offline Project' "#EC NOTEXT
|
programname = sy-repid
|
||||||
|
formname = 'PACKAGE_POPUP'
|
||||||
|
ok_pushbuttontext = ''
|
||||||
|
icon_ok_push = lv_icon_ok
|
||||||
|
first_pushbutton = lv_button1
|
||||||
|
icon_button_1 = lv_icon1
|
||||||
|
second_pushbutton = ''
|
||||||
|
icon_button_2 = ''
|
||||||
IMPORTING
|
IMPORTING
|
||||||
returncode = lv_returncode
|
returncode = lv_returncode
|
||||||
TABLES
|
TABLES
|
||||||
|
@ -482,4 +498,29 @@ CLASS lcl_popups IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD. " popup_to_inform.
|
ENDMETHOD. " popup_to_inform.
|
||||||
|
|
||||||
|
METHOD popup_to_create_package.
|
||||||
|
CALL FUNCTION 'FUNCTION_EXISTS'
|
||||||
|
EXPORTING
|
||||||
|
funcname = 'PB_POPUP_PACKAGE_CREATE'
|
||||||
|
EXCEPTIONS
|
||||||
|
function_not_exist = 1
|
||||||
|
OTHERS = 2.
|
||||||
|
IF sy-subrc = 1.
|
||||||
|
* looks like the function module used does not exist on all
|
||||||
|
* versions since 702, so show an error
|
||||||
|
lcx_exception=>raise( 'Function module PB_POPUP_PACKAGE_CREATE does not exist' ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
CALL FUNCTION 'PB_POPUP_PACKAGE_CREATE'
|
||||||
|
CHANGING
|
||||||
|
p_object_data = es_package_data
|
||||||
|
EXCEPTIONS
|
||||||
|
action_cancelled = 1.
|
||||||
|
IF sy-subrc = 0.
|
||||||
|
ev_create = abap_true.
|
||||||
|
ELSE.
|
||||||
|
ev_create = abap_false.
|
||||||
|
ENDIF.
|
||||||
|
ENDMETHOD. " popup_to_create_package
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -201,7 +201,7 @@ CLASS lcl_services_git IMPLEMENTATION.
|
||||||
ls_comment-comment = is_commit-comment.
|
ls_comment-comment = is_commit-comment.
|
||||||
|
|
||||||
IF NOT is_commit-body IS INITIAL.
|
IF NOT is_commit-body IS INITIAL.
|
||||||
CONCATENATE ls_comment-comment is_commit-body
|
CONCATENATE ls_comment-comment '' is_commit-body
|
||||||
INTO ls_comment-comment SEPARATED BY gc_newline.
|
INTO ls_comment-comment SEPARATED BY gc_newline.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,21 @@ CLASS lcl_gui_view_tutorial IMPLEMENTATION.
|
||||||
|
|
||||||
_add '<h2>Adding and cloning repos</h2>'.
|
_add '<h2>Adding and cloning repos</h2>'.
|
||||||
_add '<p><ul>'.
|
_add '<p><ul>'.
|
||||||
|
|
||||||
_add `<li>To clone a remote repo (e.g. from github) click `.
|
_add `<li>To clone a remote repo (e.g. from github) click `.
|
||||||
ro_html->add_a( iv_txt = '+ Clone' iv_act = gc_action-repo_clone ).
|
ro_html->add_a( iv_txt = '+ Clone' iv_act = gc_action-repo_clone ).
|
||||||
_add ' from the top menu. This will copy a remote repo to your system.</li>'.
|
_add ' from the top menu. This will copy a remote repo to your system.</li>'.
|
||||||
|
|
||||||
_add `<li>To add a local package as a repo click `.
|
_add `<li>To add a local package as a repo click `.
|
||||||
ro_html->add_a( iv_txt = '+ Offline' iv_act = gc_action-repo_newoffline ).
|
ro_html->add_a( iv_txt = '+ Offline' iv_act = gc_action-repo_newoffline ).
|
||||||
_add ' from the top menu. This will track a repo which already exist in'.
|
_add ' from the top menu. This will track a repo which already exist in'.
|
||||||
_add ' the system with abapGit. You''ll be able to attach it to remote origin'.
|
_add ' the system with abapGit. You''ll be able to attach it to remote origin'.
|
||||||
_add ' or just serialize as a zip file</li>'.
|
_add ' or just serialize as a zip file</li>'.
|
||||||
|
|
||||||
|
_add `<li>Go `.
|
||||||
|
ro_html->add_a( iv_txt = 'Explore' iv_act = gc_action-go_explore ).
|
||||||
|
_add ' to find projects using abapGit</li>'.
|
||||||
|
|
||||||
_add '</ul></p>'.
|
_add '</ul></p>'.
|
||||||
|
|
||||||
_add '<h2>Repository list and favorites</h2>'.
|
_add '<h2>Repository list and favorites</h2>'.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user