mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 13:03:01 +08:00
add new advanced menu option for online repositories to contain remove uninstall plus new features from #264 #265 #266 code inspector fixes
This commit is contained in:
parent
0761564040
commit
2a08209e91
|
@ -3,7 +3,7 @@ REPORT zabapgit.
|
||||||
* 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.11.13'. "#EC NOTEXT
|
gc_abap_version TYPE string VALUE 'v1.11.14'. "#EC NOTEXT
|
||||||
|
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
|
@ -106,16 +106,16 @@ CONSTANTS: BEGIN OF gc_event_state,
|
||||||
go_back_to_bookmark VALUE 6,
|
go_back_to_bookmark VALUE 6,
|
||||||
END OF gc_event_state.
|
END OF gc_event_state.
|
||||||
|
|
||||||
CONSTANTS: BEGIN OF html_opt,
|
CONSTANTS: BEGIN OF gc_html_opt,
|
||||||
emphas TYPE c VALUE 'E',
|
emphas TYPE c VALUE 'E',
|
||||||
cancel TYPE c VALUE 'C',
|
cancel TYPE c VALUE 'C',
|
||||||
END OF html_opt.
|
END OF gc_html_opt.
|
||||||
|
|
||||||
CONSTANTS: BEGIN OF action_type,
|
CONSTANTS: BEGIN OF gc_action_type,
|
||||||
sapevent TYPE c VALUE 'E',
|
sapevent TYPE c VALUE 'E',
|
||||||
url TYPE c VALUE 'U',
|
url TYPE c VALUE 'U',
|
||||||
onclick TYPE c VALUE 'C',
|
onclick TYPE c VALUE 'C',
|
||||||
END OF action_type.
|
END OF gc_action_type.
|
||||||
|
|
||||||
CONSTANTS: gc_newline TYPE abap_char1 VALUE cl_abap_char_utilities=>newline.
|
CONSTANTS: gc_newline TYPE abap_char1 VALUE cl_abap_char_utilities=>newline.
|
||||||
|
|
||||||
|
@ -123,8 +123,8 @@ CONSTANTS: gc_english TYPE spras VALUE 'E'.
|
||||||
|
|
||||||
CONSTANTS: gc_abapgit_homepage TYPE string VALUE 'http://www.abapgit.org'.
|
CONSTANTS: gc_abapgit_homepage TYPE string VALUE 'http://www.abapgit.org'.
|
||||||
|
|
||||||
CONSTANTS: c_root_dir TYPE string VALUE '/',
|
CONSTANTS: gc_root_dir TYPE string VALUE '/',
|
||||||
c_dot_abapgit TYPE string VALUE '.abapgit.xml'.
|
gc_dot_abapgit TYPE string VALUE '.abapgit.xml'.
|
||||||
|
|
||||||
DEFINE _raise.
|
DEFINE _raise.
|
||||||
RAISE EXCEPTION TYPE lcx_exception
|
RAISE EXCEPTION TYPE lcx_exception
|
||||||
|
@ -320,7 +320,7 @@ CLASS lcl_html_helper DEFINITION FINAL.
|
||||||
METHODS add_anchor IMPORTING iv_txt TYPE string
|
METHODS add_anchor IMPORTING iv_txt TYPE string
|
||||||
iv_act TYPE string
|
iv_act TYPE string
|
||||||
iv_opt TYPE char1 OPTIONAL
|
iv_opt TYPE char1 OPTIONAL
|
||||||
iv_typ TYPE char1 DEFAULT action_type-sapevent
|
iv_typ TYPE char1 DEFAULT gc_action_type-sapevent
|
||||||
iv_class TYPE string OPTIONAL.
|
iv_class TYPE string OPTIONAL.
|
||||||
|
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
@ -419,10 +419,10 @@ CLASS lcl_html_helper IMPLEMENTATION.
|
||||||
|
|
||||||
lv_class = iv_class.
|
lv_class = iv_class.
|
||||||
|
|
||||||
IF iv_opt = html_opt-emphas.
|
IF iv_opt = gc_html_opt-emphas.
|
||||||
lv_class = lv_class && ' emphasis' ##NO_TEXT.
|
lv_class = lv_class && ' emphasis' ##NO_TEXT.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
IF iv_opt = html_opt-cancel.
|
IF iv_opt = gc_html_opt-cancel.
|
||||||
lv_class = lv_class && ' attention' ##NO_TEXT.
|
lv_class = lv_class && ' attention' ##NO_TEXT.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
IF lv_class IS NOT INITIAL.
|
IF lv_class IS NOT INITIAL.
|
||||||
|
@ -432,11 +432,11 @@ CLASS lcl_html_helper IMPLEMENTATION.
|
||||||
|
|
||||||
IF iv_act IS NOT INITIAL.
|
IF iv_act IS NOT INITIAL.
|
||||||
CASE iv_typ.
|
CASE iv_typ.
|
||||||
WHEN action_type-url.
|
WHEN gc_action_type-url.
|
||||||
lv_href = | href="{ iv_act }"|.
|
lv_href = | href="{ iv_act }"|.
|
||||||
WHEN action_type-sapevent.
|
WHEN gc_action_type-sapevent.
|
||||||
lv_href = | href="sapevent:{ iv_act }"|.
|
lv_href = | href="sapevent:{ iv_act }"|.
|
||||||
WHEN action_type-onclick.
|
WHEN gc_action_type-onclick.
|
||||||
lv_href = | onclick="{ iv_act }"|.
|
lv_href = | onclick="{ iv_act }"|.
|
||||||
WHEN OTHERS.
|
WHEN OTHERS.
|
||||||
ENDCASE.
|
ENDCASE.
|
||||||
|
@ -457,7 +457,7 @@ CLASS lcl_html_toolbar DEFINITION FINAL.
|
||||||
io_sub TYPE REF TO lcl_html_toolbar OPTIONAL
|
io_sub TYPE REF TO lcl_html_toolbar OPTIONAL
|
||||||
iv_act TYPE string OPTIONAL
|
iv_act TYPE string OPTIONAL
|
||||||
iv_opt TYPE c OPTIONAL
|
iv_opt TYPE c OPTIONAL
|
||||||
iv_typ TYPE c DEFAULT action_type-sapevent.
|
iv_typ TYPE c DEFAULT gc_action_type-sapevent.
|
||||||
|
|
||||||
METHODS render IMPORTING iv_as_droplist_with_label TYPE string OPTIONAL
|
METHODS render IMPORTING iv_as_droplist_with_label TYPE string OPTIONAL
|
||||||
iv_no_separator TYPE abap_bool OPTIONAL
|
iv_no_separator TYPE abap_bool OPTIONAL
|
||||||
|
@ -539,7 +539,8 @@ CLASS lcl_html_toolbar IMPLEMENTATION.
|
||||||
IF <ls_item>-sub IS INITIAL.
|
IF <ls_item>-sub IS INITIAL.
|
||||||
CLEAR lv_class.
|
CLEAR lv_class.
|
||||||
IF iv_no_separator = abap_true
|
IF iv_no_separator = abap_true
|
||||||
OR lv_last = abap_true AND iv_as_droplist_with_label IS INITIAL.
|
OR lv_last = abap_true
|
||||||
|
AND iv_as_droplist_with_label IS INITIAL.
|
||||||
lv_class = 'menu_end'.
|
lv_class = 'menu_end'.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ro_html->add_anchor( iv_txt = <ls_item>-txt
|
ro_html->add_anchor( iv_txt = <ls_item>-txt
|
||||||
|
@ -548,7 +549,8 @@ CLASS lcl_html_toolbar IMPLEMENTATION.
|
||||||
iv_typ = <ls_item>-typ
|
iv_typ = <ls_item>-typ
|
||||||
iv_class = lv_class ).
|
iv_class = lv_class ).
|
||||||
ELSE.
|
ELSE.
|
||||||
ro_html->add( <ls_item>-sub->render( iv_as_droplist_with_label = <ls_item>-txt
|
ro_html->add( <ls_item>-sub->render(
|
||||||
|
iv_as_droplist_with_label = <ls_item>-txt
|
||||||
iv_no_separator = lv_last ) ).
|
iv_no_separator = lv_last ) ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
@ -2741,7 +2743,7 @@ CLASS lcl_diff IMPLEMENTATION.
|
||||||
DEFINE _add_regex.
|
DEFINE _add_regex.
|
||||||
CREATE OBJECT lo_regex
|
CREATE OBJECT lo_regex
|
||||||
EXPORTING pattern = &1
|
EXPORTING pattern = &1
|
||||||
ignore_case = abap_true.
|
ignore_case = abap_true ##NO_TEXT.
|
||||||
APPEND lo_regex TO lt_regex_set.
|
APPEND lo_regex TO lt_regex_set.
|
||||||
END-OF-DEFINITION.
|
END-OF-DEFINITION.
|
||||||
|
|
||||||
|
@ -13225,59 +13227,59 @@ CLASS lcl_object_shi3 IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD strip_stamps.
|
METHOD strip_stamps.
|
||||||
|
|
||||||
FIELD-SYMBOLS <node> LIKE LINE OF ct_nodes.
|
FIELD-SYMBOLS <ls_node> LIKE LINE OF ct_nodes.
|
||||||
|
|
||||||
CLEAR: cs_head-luser, cs_head-ldate, cs_head-ltime.
|
CLEAR: cs_head-luser, cs_head-ldate, cs_head-ltime.
|
||||||
CLEAR: cs_head-fuser, cs_head-fdate, cs_head-ftime.
|
CLEAR: cs_head-fuser, cs_head-fdate, cs_head-ftime.
|
||||||
CLEAR: cs_head-responsibl.
|
CLEAR: cs_head-responsibl.
|
||||||
|
|
||||||
LOOP AT ct_nodes ASSIGNING <node>.
|
LOOP AT ct_nodes ASSIGNING <ls_node>.
|
||||||
CLEAR: <node>-luser, <node>-ldate, <node>-ltime.
|
CLEAR: <ls_node>-luser, <ls_node>-ldate, <ls_node>-ltime.
|
||||||
CLEAR: <node>-fuser, <node>-fdate, <node>-ftime.
|
CLEAR: <ls_node>-fuser, <ls_node>-fdate, <ls_node>-ftime.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
ENDMETHOD. "strip_stamps
|
ENDMETHOD. "strip_stamps
|
||||||
|
|
||||||
METHOD regenerate_ids.
|
METHOD regenerate_ids.
|
||||||
|
|
||||||
DATA: l_uid TYPE sys_uid,
|
DATA: ls_uid TYPE sys_uid,
|
||||||
lt_map TYPE tt_id_map.
|
lt_map TYPE tt_id_map.
|
||||||
|
|
||||||
FIELD-SYMBOLS: <node> LIKE LINE OF ct_nodes,
|
FIELD-SYMBOLS: <ls_node> LIKE LINE OF ct_nodes,
|
||||||
<ref> LIKE LINE OF ct_refs,
|
<ls_ref> LIKE LINE OF ct_refs,
|
||||||
<text> LIKE LINE OF ct_texts,
|
<ls_text> LIKE LINE OF ct_texts,
|
||||||
<map> LIKE LINE OF mt_map.
|
<ls_map> LIKE LINE OF mt_map.
|
||||||
|
|
||||||
"Build map
|
"Build map
|
||||||
LOOP AT ct_nodes ASSIGNING <node>.
|
LOOP AT ct_nodes ASSIGNING <ls_node>.
|
||||||
APPEND INITIAL LINE TO lt_map ASSIGNING <map>.
|
APPEND INITIAL LINE TO lt_map ASSIGNING <ls_map>.
|
||||||
IF <node>-parent_id IS INITIAL.
|
IF <ls_node>-parent_id IS INITIAL.
|
||||||
<map>-old = <node>-node_id.
|
<ls_map>-old = <ls_node>-node_id.
|
||||||
<map>-new = <node>-node_id. "Root node
|
<ls_map>-new = <ls_node>-node_id. "Root node
|
||||||
ELSE.
|
ELSE.
|
||||||
CALL FUNCTION 'STREE_GET_UNIQUE_ID'
|
CALL FUNCTION 'STREE_GET_UNIQUE_ID'
|
||||||
IMPORTING
|
IMPORTING
|
||||||
unique_id = l_uid.
|
unique_id = ls_uid.
|
||||||
|
|
||||||
<map>-old = <node>-node_id.
|
<ls_map>-old = <ls_node>-node_id.
|
||||||
<map>-new = l_uid-id.
|
<ls_map>-new = ls_uid-id.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
<node>-node_id = <map>-new. "Replace id
|
<ls_node>-node_id = <ls_map>-new. "Replace id
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
mt_map = lt_map. "Sort
|
mt_map = lt_map. "Sort
|
||||||
|
|
||||||
LOOP AT ct_nodes ASSIGNING <node>.
|
LOOP AT ct_nodes ASSIGNING <ls_node>.
|
||||||
<node>-parent_id = replace_id( <node>-parent_id ).
|
<ls_node>-parent_id = replace_id( <ls_node>-parent_id ).
|
||||||
<node>-brother_id = replace_id( <node>-brother_id ).
|
<ls_node>-brother_id = replace_id( <ls_node>-brother_id ).
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
LOOP AT ct_refs ASSIGNING <ref>.
|
LOOP AT ct_refs ASSIGNING <ls_ref>.
|
||||||
<ref>-node_id = replace_id( <ref>-node_id ).
|
<ls_ref>-node_id = replace_id( <ls_ref>-node_id ).
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
LOOP AT ct_texts ASSIGNING <text>.
|
LOOP AT ct_texts ASSIGNING <ls_text>.
|
||||||
<text>-node_id = replace_id( <text>-node_id ).
|
<ls_text>-node_id = replace_id( <ls_text>-node_id ).
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
ENDMETHOD. "regenerate_ids
|
ENDMETHOD. "regenerate_ids
|
||||||
|
@ -13528,13 +13530,13 @@ CLASS lcl_html_action_utils DEFINITION FINAL.
|
||||||
|
|
||||||
CLASS-METHODS file_encode
|
CLASS-METHODS file_encode
|
||||||
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
||||||
is_file TYPE any "ty_repo_file
|
ig_file TYPE any "ty_repo_file
|
||||||
RETURNING VALUE(rv_string) TYPE string.
|
RETURNING VALUE(rv_string) TYPE string.
|
||||||
|
|
||||||
CLASS-METHODS file_decode
|
CLASS-METHODS file_decode
|
||||||
IMPORTING iv_string TYPE clike
|
IMPORTING iv_string TYPE clike
|
||||||
EXPORTING ev_key TYPE lcl_persistence_repo=>ty_repo-key
|
EXPORTING ev_key TYPE lcl_persistence_repo=>ty_repo-key
|
||||||
es_file TYPE any "ty_repo_file
|
eg_file TYPE any "ty_repo_file
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
CLASS-METHODS dbkey_encode
|
CLASS-METHODS dbkey_encode
|
||||||
|
@ -13614,22 +13616,22 @@ CLASS lcl_html_action_utils IMPLEMENTATION.
|
||||||
DATA: lt_fields TYPE tihttpnvp,
|
DATA: lt_fields TYPE tihttpnvp,
|
||||||
ls_field LIKE LINE OF lt_fields.
|
ls_field LIKE LINE OF lt_fields.
|
||||||
|
|
||||||
FIELD-SYMBOLS <field> TYPE string.
|
FIELD-SYMBOLS <lv_field> TYPE string.
|
||||||
|
|
||||||
ls_field-name = 'KEY'.
|
ls_field-name = 'KEY'.
|
||||||
ls_field-value = iv_key.
|
ls_field-value = iv_key.
|
||||||
APPEND ls_field TO lt_fields.
|
APPEND ls_field TO lt_fields.
|
||||||
|
|
||||||
ls_field-name = 'PATH'.
|
ls_field-name = 'PATH'.
|
||||||
ASSIGN COMPONENT ls_field-name OF STRUCTURE is_file TO <field>.
|
ASSIGN COMPONENT ls_field-name OF STRUCTURE ig_file TO <lv_field>.
|
||||||
ASSERT <field> IS ASSIGNED.
|
ASSERT <lv_field> IS ASSIGNED.
|
||||||
ls_field-value = <field>.
|
ls_field-value = <lv_field>.
|
||||||
APPEND ls_field TO lt_fields.
|
APPEND ls_field TO lt_fields.
|
||||||
|
|
||||||
ls_field-name = 'FILENAME'.
|
ls_field-name = 'FILENAME'.
|
||||||
ASSIGN COMPONENT ls_field-name OF STRUCTURE is_file TO <field>.
|
ASSIGN COMPONENT ls_field-name OF STRUCTURE ig_file TO <lv_field>.
|
||||||
ASSERT <field> IS ASSIGNED.
|
ASSERT <lv_field> IS ASSIGNED.
|
||||||
ls_field-value = <field>.
|
ls_field-value = <lv_field>.
|
||||||
APPEND ls_field TO lt_fields.
|
APPEND ls_field TO lt_fields.
|
||||||
|
|
||||||
rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ).
|
rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ).
|
||||||
|
@ -13642,9 +13644,9 @@ CLASS lcl_html_action_utils IMPLEMENTATION.
|
||||||
lv_string TYPE string.
|
lv_string TYPE string.
|
||||||
|
|
||||||
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields,
|
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields,
|
||||||
<field> TYPE string.
|
<lv_field> TYPE string.
|
||||||
|
|
||||||
CLEAR: ev_key, es_file.
|
CLEAR: ev_key, eg_file.
|
||||||
lv_string = iv_string. " type conversion
|
lv_string = iv_string. " type conversion
|
||||||
lt_fields = cl_http_utility=>if_http_utility~string_to_fields( lv_string ).
|
lt_fields = cl_http_utility=>if_http_utility~string_to_fields( lv_string ).
|
||||||
|
|
||||||
|
@ -13655,16 +13657,16 @@ CLASS lcl_html_action_utils IMPLEMENTATION.
|
||||||
|
|
||||||
READ TABLE lt_fields ASSIGNING <ls_field> WITH KEY name = 'PATH'.
|
READ TABLE lt_fields ASSIGNING <ls_field> WITH KEY name = 'PATH'.
|
||||||
IF sy-subrc = 0.
|
IF sy-subrc = 0.
|
||||||
ASSIGN COMPONENT 'PATH' OF STRUCTURE es_file TO <field>.
|
ASSIGN COMPONENT 'PATH' OF STRUCTURE eg_file TO <lv_field>.
|
||||||
ASSERT <field> IS ASSIGNED.
|
ASSERT <lv_field> IS ASSIGNED.
|
||||||
<field> = <ls_field>-value.
|
<lv_field> = <ls_field>-value.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
READ TABLE lt_fields ASSIGNING <ls_field> WITH KEY name = 'FILENAME'.
|
READ TABLE lt_fields ASSIGNING <ls_field> WITH KEY name = 'FILENAME'.
|
||||||
IF sy-subrc = 0.
|
IF sy-subrc = 0.
|
||||||
ASSIGN COMPONENT 'FILENAME' OF STRUCTURE es_file TO <field>.
|
ASSIGN COMPONENT 'FILENAME' OF STRUCTURE eg_file TO <lv_field>.
|
||||||
ASSERT <field> IS ASSIGNED.
|
ASSERT <lv_field> IS ASSIGNED.
|
||||||
<field> = <ls_field>-value.
|
<lv_field> = <ls_field>-value.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDMETHOD. "file_decode
|
ENDMETHOD. "file_decode
|
||||||
|
@ -14535,7 +14537,7 @@ CLASS lcl_sap_package IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
SELECT devclass INTO TABLE rt_list
|
SELECT devclass INTO TABLE rt_list
|
||||||
FROM tdevc WHERE parentcl = iv_package.
|
FROM tdevc WHERE parentcl = iv_package. "#EC CI_GENBUFF
|
||||||
|
|
||||||
* note the recursion, since packages are added to the list
|
* note the recursion, since packages are added to the list
|
||||||
LOOP AT rt_list INTO lv_devclass.
|
LOOP AT rt_list INTO lv_devclass.
|
||||||
|
@ -16834,6 +16836,18 @@ CLASS lcl_gui_router DEFINITION FINAL.
|
||||||
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
|
METHODS change_branch
|
||||||
|
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
||||||
|
RAISING lcx_exception.
|
||||||
|
|
||||||
|
METHODS reset
|
||||||
|
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
||||||
|
RAISING lcx_exception.
|
||||||
|
|
||||||
|
METHODS create_branch
|
||||||
|
IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key
|
||||||
|
RAISING lcx_exception.
|
||||||
|
|
||||||
METHODS db_delete
|
METHODS db_delete
|
||||||
IMPORTING iv_getdata TYPE clike
|
IMPORTING iv_getdata TYPE clike
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
@ -17308,8 +17322,8 @@ CLASS lcl_repo IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
READ TABLE mt_remote ASSIGNING <ls_remote>
|
READ TABLE mt_remote ASSIGNING <ls_remote>
|
||||||
WITH KEY path = c_root_dir
|
WITH KEY path = gc_root_dir
|
||||||
filename = c_dot_abapgit.
|
filename = gc_dot_abapgit.
|
||||||
IF sy-subrc = 0.
|
IF sy-subrc = 0.
|
||||||
mo_dot_abapgit = lcl_dot_abapgit=>deserialize( <ls_remote>-data ).
|
mo_dot_abapgit = lcl_dot_abapgit=>deserialize( <ls_remote>-data ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -17413,8 +17427,8 @@ CLASS lcl_repo IMPLEMENTATION.
|
||||||
mo_dot_abapgit = lcl_dot_abapgit=>build_default( ms_data-master_language ).
|
mo_dot_abapgit = lcl_dot_abapgit=>build_default( ms_data-master_language ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
APPEND INITIAL LINE TO rt_files ASSIGNING <ls_return>.
|
APPEND INITIAL LINE TO rt_files ASSIGNING <ls_return>.
|
||||||
<ls_return>-file-path = c_root_dir.
|
<ls_return>-file-path = gc_root_dir.
|
||||||
<ls_return>-file-filename = c_dot_abapgit.
|
<ls_return>-file-filename = gc_dot_abapgit.
|
||||||
<ls_return>-file-data = mo_dot_abapgit->serialize( ).
|
<ls_return>-file-data = mo_dot_abapgit->serialize( ).
|
||||||
|
|
||||||
lt_tadir = lcl_tadir=>read( get_package( ) ).
|
lt_tadir = lcl_tadir=>read( get_package( ) ).
|
||||||
|
@ -17787,8 +17801,8 @@ ENDCLASS.
|
||||||
CLASS ltcl_login_manager DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
|
CLASS ltcl_login_manager DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
|
||||||
|
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
CONSTANTS: c_username TYPE string VALUE 'Aladdin',
|
CONSTANTS: c_username TYPE string VALUE 'Aladdin' ##NO_TEXT,
|
||||||
c_password TYPE string VALUE 'OpenSesame'.
|
c_password TYPE string VALUE 'OpenSesame' ##NO_TEXT.
|
||||||
|
|
||||||
METHODS:
|
METHODS:
|
||||||
setup,
|
setup,
|
||||||
|
@ -17871,7 +17885,8 @@ CLASS lcl_login_manager IMPLEMENTATION.
|
||||||
|
|
||||||
rv_auth = cl_http_utility=>if_http_utility~encode_base64( lv_concat ).
|
rv_auth = cl_http_utility=>if_http_utility~encode_base64( lv_concat ).
|
||||||
|
|
||||||
CONCATENATE 'Basic' rv_auth INTO rv_auth SEPARATED BY space.
|
CONCATENATE 'Basic' rv_auth INTO rv_auth
|
||||||
|
SEPARATED BY space ##NO_TEXT.
|
||||||
|
|
||||||
append( iv_uri = iv_uri
|
append( iv_uri = iv_uri
|
||||||
iv_auth = rv_auth ).
|
iv_auth = rv_auth ).
|
||||||
|
@ -19370,7 +19385,7 @@ CLASS lcl_gui IMPLEMENTATION.
|
||||||
METHOD back.
|
METHOD back.
|
||||||
|
|
||||||
DATA: lv_index TYPE i,
|
DATA: lv_index TYPE i,
|
||||||
ls_stack TYPE ty_page_stack.
|
ls_stack LIKE LINE OF mt_stack.
|
||||||
|
|
||||||
lv_index = lines( mt_stack ).
|
lv_index = lines( mt_stack ).
|
||||||
|
|
||||||
|
@ -20325,21 +20340,22 @@ CLASS lcl_stage IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD update_and_add_dot_abapgit.
|
METHOD update_and_add_dot_abapgit.
|
||||||
|
|
||||||
FIELD-SYMBOLS <dot_abapgit> LIKE LINE OF mt_workarea.
|
FIELD-SYMBOLS <ls_dot_abapgit> LIKE LINE OF mt_workarea.
|
||||||
|
|
||||||
READ TABLE mt_workarea ASSIGNING <dot_abapgit>
|
READ TABLE mt_workarea ASSIGNING <ls_dot_abapgit>
|
||||||
WITH KEY file-path = c_root_dir
|
WITH KEY file-path = gc_root_dir
|
||||||
file-filename = c_dot_abapgit.
|
file-filename = gc_dot_abapgit.
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
APPEND INITIAL LINE TO mt_workarea ASSIGNING <dot_abapgit>.
|
APPEND INITIAL LINE TO mt_workarea ASSIGNING <ls_dot_abapgit>.
|
||||||
<dot_abapgit>-type = c_wftype-local.
|
<ls_dot_abapgit>-type = c_wftype-local.
|
||||||
<dot_abapgit>-file-path = c_root_dir.
|
<ls_dot_abapgit>-file-path = gc_root_dir.
|
||||||
<dot_abapgit>-file-filename = c_dot_abapgit.
|
<ls_dot_abapgit>-file-filename = gc_dot_abapgit.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
<dot_abapgit>-file-data = iv_data.
|
<ls_dot_abapgit>-file-data = iv_data.
|
||||||
|
|
||||||
add( iv_path = c_root_dir iv_filename = c_dot_abapgit ).
|
add( iv_path = gc_root_dir
|
||||||
|
iv_filename = gc_dot_abapgit ).
|
||||||
|
|
||||||
ENDMETHOD. "update_and_add_dot_abapgit
|
ENDMETHOD. "update_and_add_dot_abapgit
|
||||||
|
|
||||||
|
@ -20481,14 +20497,17 @@ CLASS lcl_gui_page_background IMPLEMENTATION.
|
||||||
ro_html->add( '<input type="radio" name="method" value="pull"' &&
|
ro_html->add( '<input type="radio" name="method" value="pull"' &&
|
||||||
lv_pull && '>Automatic pull<br>' ).
|
lv_pull && '>Automatic pull<br>' ).
|
||||||
ro_html->add( '<br>' ).
|
ro_html->add( '<br>' ).
|
||||||
ro_html->add( 'Authentication, optional(password will be saved in clear text)<br>' ).
|
ro_html->add( 'Authentication, optional<br>' ).
|
||||||
|
ro_html->add( '(password will be saved in clear text)<br>' ).
|
||||||
ro_html->add( '<table>' ).
|
ro_html->add( '<table>' ).
|
||||||
ro_html->add( '<tr>' ).
|
ro_html->add( '<tr>' ).
|
||||||
ro_html->add( '<td>Username:</td><td><input type="text" name="username" value="' &&
|
ro_html->add( '<td>Username:</td>' ).
|
||||||
|
ro_html->add( '<td><input type="text" name="username" value="' &&
|
||||||
ls_per-username && '"></td>' ).
|
ls_per-username && '"></td>' ).
|
||||||
ro_html->add( '</tr>' ).
|
ro_html->add( '</tr>' ).
|
||||||
ro_html->add( '<tr>' ).
|
ro_html->add( '<tr>' ).
|
||||||
ro_html->add( '<td>Password:</td><td><input type="text" name="password" value="' &&
|
ro_html->add( '<td>Password:</td>' ).
|
||||||
|
ro_html->add( '<td><input type="text" name="password" value="' &&
|
||||||
ls_per-password && '"></td>' ).
|
ls_per-password && '"></td>' ).
|
||||||
ro_html->add( '</tr>' ).
|
ro_html->add( '</tr>' ).
|
||||||
ro_html->add( '<tr><td colspan="2" align="right">' ).
|
ro_html->add( '<tr><td colspan="2" align="right">' ).
|
||||||
|
@ -20658,12 +20677,12 @@ CLASS lcl_gui_page_commit IMPLEMENTATION.
|
||||||
|
|
||||||
lo_toolbar->add( iv_act = 'submitCommit();'
|
lo_toolbar->add( iv_act = 'submitCommit();'
|
||||||
iv_txt = 'Commit'
|
iv_txt = 'Commit'
|
||||||
iv_typ = action_type-onclick
|
iv_typ = gc_action_type-onclick
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
|
|
||||||
lo_toolbar->add( iv_act = 'commit_cancel'
|
lo_toolbar->add( iv_act = 'commit_cancel'
|
||||||
iv_txt = 'Cancel'
|
iv_txt = 'Cancel'
|
||||||
iv_opt = html_opt-cancel ).
|
iv_opt = gc_html_opt-cancel ).
|
||||||
|
|
||||||
ro_html->add( '<div class="paddings">' ).
|
ro_html->add( '<div class="paddings">' ).
|
||||||
ro_html->add( lo_toolbar->render( ) ).
|
ro_html->add( lo_toolbar->render( ) ).
|
||||||
|
@ -20843,7 +20862,7 @@ CLASS lcl_gui_page_stage IMPLEMENTATION.
|
||||||
lv_method = mo_stage->lookup( iv_path = <ls_file>-file-path
|
lv_method = mo_stage->lookup( iv_path = <ls_file>-file-path
|
||||||
iv_filename = <ls_file>-file-filename ).
|
iv_filename = <ls_file>-file-filename ).
|
||||||
lv_param = lcl_html_action_utils=>file_encode( iv_key = mo_repo->get_key( )
|
lv_param = lcl_html_action_utils=>file_encode( iv_key = mo_repo->get_key( )
|
||||||
is_file = <ls_file>-file ).
|
ig_file = <ls_file>-file ).
|
||||||
|
|
||||||
lo_toolbar->reset( ). " Build line actions
|
lo_toolbar->reset( ). " Build line actions
|
||||||
IF <ls_file>-type = lcl_stage=>c_wftype-local.
|
IF <ls_file>-type = lcl_stage=>c_wftype-local.
|
||||||
|
@ -20912,7 +20931,7 @@ CLASS lcl_gui_page_stage IMPLEMENTATION.
|
||||||
IF mo_stage->count( ) > 0.
|
IF mo_stage->count( ) > 0.
|
||||||
lo_toolbar->add( iv_act = |stage_commit?{ lv_action }|
|
lo_toolbar->add( iv_act = |stage_commit?{ lv_action }|
|
||||||
iv_txt = 'Commit'
|
iv_txt = 'Commit'
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
ELSEIF mo_stage->mv_local_cnt > 0.
|
ELSEIF mo_stage->mv_local_cnt > 0.
|
||||||
lo_toolbar->add( iv_act = |stage_all?{ lv_action }|
|
lo_toolbar->add( iv_act = |stage_all?{ lv_action }|
|
||||||
iv_txt = 'Add all and commit').
|
iv_txt = 'Add all and commit').
|
||||||
|
@ -21119,6 +21138,7 @@ CLASS lcl_gui_page_main IMPLEMENTATION.
|
||||||
|
|
||||||
DATA: lo_toolbar TYPE REF TO lcl_html_toolbar,
|
DATA: lo_toolbar TYPE REF TO lcl_html_toolbar,
|
||||||
lv_key TYPE lcl_persistence_db=>ty_value,
|
lv_key TYPE lcl_persistence_db=>ty_value,
|
||||||
|
lo_sub TYPE REF TO lcl_html_toolbar,
|
||||||
lo_repo_online TYPE REF TO lcl_repo_online.
|
lo_repo_online TYPE REF TO lcl_repo_online.
|
||||||
|
|
||||||
|
|
||||||
|
@ -21134,33 +21154,45 @@ CLASS lcl_gui_page_main IMPLEMENTATION.
|
||||||
IF io_repo->is_offline( ) = abap_true.
|
IF io_repo->is_offline( ) = abap_true.
|
||||||
lo_toolbar->add( iv_txt = 'Import ZIP'
|
lo_toolbar->add( iv_txt = 'Import ZIP'
|
||||||
iv_act = |zipimport?{ lv_key }|
|
iv_act = |zipimport?{ lv_key }|
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
lo_toolbar->add( iv_txt = 'Export ZIP'
|
lo_toolbar->add( iv_txt = 'Export ZIP'
|
||||||
iv_act = |zipexport?{ lv_key }|
|
iv_act = |zipexport?{ lv_key }|
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
lo_toolbar->add( iv_txt = 'Export&Commit'
|
lo_toolbar->add( iv_txt = 'Export&Commit'
|
||||||
iv_act = |files_commit?{ lv_key }|
|
iv_act = |files_commit?{ lv_key }|
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
ELSE.
|
ELSE.
|
||||||
lo_repo_online ?= io_repo.
|
lo_repo_online ?= io_repo.
|
||||||
TRY.
|
TRY.
|
||||||
IF lo_repo_online->get_sha1_remote( ) <> lo_repo_online->get_sha1_local( ).
|
IF lo_repo_online->get_sha1_remote( ) <> lo_repo_online->get_sha1_local( ).
|
||||||
lo_toolbar->add( iv_txt = 'Pull'
|
lo_toolbar->add( iv_txt = 'Pull'
|
||||||
iv_act = |pull?{ lv_key }|
|
iv_act = |pull?{ lv_key }|
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
ELSEIF lcl_stage_logic=>count( lo_repo_online ) > 0.
|
ELSEIF lcl_stage_logic=>count( lo_repo_online ) > 0.
|
||||||
lo_toolbar->add( iv_txt = 'Stage'
|
lo_toolbar->add( iv_txt = 'Stage'
|
||||||
iv_act = |stage?{ lv_key }|
|
iv_act = |stage?{ lv_key }|
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
CATCH lcx_exception.
|
CATCH lcx_exception ##NO_HANDLER.
|
||||||
" authorization error or repository does not exist
|
* authorization error or repository does not exist
|
||||||
|
* ignore error
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
lo_toolbar->add( iv_txt = 'Remove'
|
|
||||||
|
CREATE OBJECT lo_sub.
|
||||||
|
lo_sub->add( iv_txt = 'Remove'
|
||||||
iv_act = |remove?{ lv_key }| ).
|
iv_act = |remove?{ lv_key }| ).
|
||||||
lo_toolbar->add( iv_txt = 'Uninstall'
|
lo_sub->add( iv_txt = 'Uninstall'
|
||||||
iv_act = |uninstall?{ lv_key }| ).
|
iv_act = |uninstall?{ lv_key }| ).
|
||||||
|
lo_sub->add( iv_txt = 'Change branch'
|
||||||
|
iv_act = |change_branch?{ lv_key }| ).
|
||||||
|
lo_sub->add( iv_txt = 'Reset'
|
||||||
|
iv_act = |reset?{ lv_key }| ).
|
||||||
|
lo_sub->add( iv_txt = 'Create branch'
|
||||||
|
iv_act = |create_branch?{ lv_key }| ).
|
||||||
|
lo_toolbar->add( iv_txt = 'Advanced'
|
||||||
|
io_sub = lo_sub ).
|
||||||
|
|
||||||
lo_toolbar->add( iv_txt = 'Refresh'
|
lo_toolbar->add( iv_txt = 'Refresh'
|
||||||
iv_act = |refresh?{ lv_key }| ).
|
iv_act = |refresh?{ lv_key }| ).
|
||||||
lo_toolbar->add( iv_txt = 'Hide'
|
lo_toolbar->add( iv_txt = 'Hide'
|
||||||
|
@ -21372,9 +21404,12 @@ CLASS lcl_gui_page_main IMPLEMENTATION.
|
||||||
ELSE.
|
ELSE.
|
||||||
LOOP AT is_item-files INTO ls_file.
|
LOOP AT is_item-files INTO ls_file.
|
||||||
IF ls_file-is_changed = abap_true.
|
IF ls_file-is_changed = abap_true.
|
||||||
lv_difflink = lcl_html_action_utils=>file_encode( iv_key = io_repo->get_key( )
|
lv_difflink = lcl_html_action_utils=>file_encode(
|
||||||
is_file = ls_file ).
|
iv_key = io_repo->get_key( )
|
||||||
ro_html->add_anchor( iv_txt = 'diff' iv_act = |diff?{ lv_difflink }| ).
|
ig_file = ls_file ).
|
||||||
|
ro_html->add_anchor(
|
||||||
|
iv_txt = 'diff'
|
||||||
|
iv_act = |diff?{ lv_difflink }| ).
|
||||||
ELSE.
|
ELSE.
|
||||||
ro_html->add( |<span> </span>| ).
|
ro_html->add( |<span> </span>| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -23928,8 +23963,8 @@ CLASS lcl_gui_page_db_edit IMPLEMENTATION.
|
||||||
" Menu
|
" Menu
|
||||||
lo_toolbar->add( iv_act = 'submitDBForm();'
|
lo_toolbar->add( iv_act = 'submitDBForm();'
|
||||||
iv_txt = 'Save'
|
iv_txt = 'Save'
|
||||||
iv_typ = action_type-onclick
|
iv_typ = gc_action_type-onclick
|
||||||
iv_opt = html_opt-emphas ).
|
iv_opt = gc_html_opt-emphas ).
|
||||||
|
|
||||||
ro_html->add( '<div class="paddings">' ).
|
ro_html->add( '<div class="paddings">' ).
|
||||||
ro_html->add( lo_toolbar->render( ) ).
|
ro_html->add( lo_toolbar->render( ) ).
|
||||||
|
@ -24191,6 +24226,18 @@ CLASS lcl_gui_router IMPLEMENTATION.
|
||||||
lv_key = iv_getdata.
|
lv_key = iv_getdata.
|
||||||
ei_page = get_page_stage( lv_key ).
|
ei_page = get_page_stage( lv_key ).
|
||||||
ev_state = gc_event_state-new_page_w_bookmark.
|
ev_state = gc_event_state-new_page_w_bookmark.
|
||||||
|
WHEN 'change_branch'.
|
||||||
|
lv_key = iv_getdata.
|
||||||
|
change_branch( lv_key ).
|
||||||
|
ev_state = gc_event_state-re_render.
|
||||||
|
WHEN 'reset'.
|
||||||
|
lv_key = iv_getdata.
|
||||||
|
reset( lv_key ).
|
||||||
|
ev_state = gc_event_state-re_render.
|
||||||
|
WHEN 'create_branch'.
|
||||||
|
lv_key = iv_getdata.
|
||||||
|
create_branch( lv_key ).
|
||||||
|
ev_state = gc_event_state-re_render.
|
||||||
|
|
||||||
" Stage
|
" Stage
|
||||||
WHEN 'stage_commit'.
|
WHEN 'stage_commit'.
|
||||||
|
@ -24267,7 +24314,7 @@ CLASS lcl_gui_router IMPLEMENTATION.
|
||||||
|
|
||||||
lcl_html_action_utils=>file_decode( EXPORTING iv_string = iv_getdata
|
lcl_html_action_utils=>file_decode( EXPORTING iv_string = iv_getdata
|
||||||
IMPORTING ev_key = lv_key
|
IMPORTING ev_key = lv_key
|
||||||
es_file = ls_file ).
|
eg_file = ls_file ).
|
||||||
|
|
||||||
lo_repo ?= lcl_app=>repo_srv( )->get( lv_key ).
|
lo_repo ?= lcl_app=>repo_srv( )->get( lv_key ).
|
||||||
lt_remote = lo_repo->get_files_remote( ).
|
lt_remote = lo_repo->get_files_remote( ).
|
||||||
|
@ -24625,6 +24672,48 @@ CLASS lcl_gui_router IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD. "repo_package_zip
|
ENDMETHOD. "repo_package_zip
|
||||||
|
|
||||||
|
METHOD change_branch.
|
||||||
|
|
||||||
|
DATA: lo_repo TYPE REF TO lcl_repo_online.
|
||||||
|
|
||||||
|
lo_repo ?= lcl_app=>repo_srv( )->get( iv_key ).
|
||||||
|
|
||||||
|
CALL FUNCTION 'POPUP_TO_INFORM'
|
||||||
|
EXPORTING
|
||||||
|
titel = 'todo'
|
||||||
|
txt1 = 'see https://github.com/larshp/abapGit/issues/265'
|
||||||
|
txt2 = '' ##NO_TEXT.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD reset.
|
||||||
|
|
||||||
|
DATA: lo_repo TYPE REF TO lcl_repo_online.
|
||||||
|
|
||||||
|
lo_repo ?= lcl_app=>repo_srv( )->get( iv_key ).
|
||||||
|
|
||||||
|
CALL FUNCTION 'POPUP_TO_INFORM'
|
||||||
|
EXPORTING
|
||||||
|
titel = 'todo'
|
||||||
|
txt1 = 'see https://github.com/larshp/abapGit/issues/264'
|
||||||
|
txt2 = '' ##NO_TEXT.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD create_branch.
|
||||||
|
|
||||||
|
DATA: lo_repo TYPE REF TO lcl_repo_online.
|
||||||
|
|
||||||
|
lo_repo ?= lcl_app=>repo_srv( )->get( iv_key ).
|
||||||
|
|
||||||
|
CALL FUNCTION 'POPUP_TO_INFORM'
|
||||||
|
EXPORTING
|
||||||
|
titel = 'todo'
|
||||||
|
txt1 = 'see https://github.com/larshp/abapGit/issues/266'
|
||||||
|
txt2 = '' ##NO_TEXT.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD repo_pull.
|
METHOD repo_pull.
|
||||||
|
|
||||||
DATA: lo_repo TYPE REF TO lcl_repo_online.
|
DATA: lo_repo TYPE REF TO lcl_repo_online.
|
||||||
|
@ -24799,7 +24888,7 @@ CLASS lcl_gui_router IMPLEMENTATION.
|
||||||
ELSE.
|
ELSE.
|
||||||
lcl_html_action_utils=>file_decode( EXPORTING iv_string = iv_getdata
|
lcl_html_action_utils=>file_decode( EXPORTING iv_string = iv_getdata
|
||||||
IMPORTING ev_key = lv_key
|
IMPORTING ev_key = lv_key
|
||||||
es_file = ls_file ).
|
eg_file = ls_file ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
lo_stage = lcl_app=>repo_srv( )->get_stage( lv_key ).
|
lo_stage = lcl_app=>repo_srv( )->get_stage( lv_key ).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user