mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 04:36:49 +08:00
Merge remote-tracking branch 'refs/remotes/larshp/master'
This commit is contained in:
commit
8bdba26816
|
@ -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.24.5'. "#EC NOTEXT
|
gc_abap_version TYPE string VALUE 'v1.24.7'. "#EC NOTEXT
|
||||||
|
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
|
|
|
@ -503,6 +503,9 @@ table.diff_tab code {
|
||||||
table.diff_tab code span.keyword { color: #0a69ce; }
|
table.diff_tab code span.keyword { color: #0a69ce; }
|
||||||
table.diff_tab code span.text { color: #48ce4f; }
|
table.diff_tab code span.text { color: #48ce4f; }
|
||||||
table.diff_tab code span.comment { color: #808080; font-style: italic; }
|
table.diff_tab code span.comment { color: #808080; font-style: italic; }
|
||||||
|
table.diff_tab code span.xml_tag { color: #3370e0; }
|
||||||
|
table.diff_tab code span.attr { color: #f20707; }
|
||||||
|
table.diff_tab code span.attr_val { color: #7a02f9; }
|
||||||
|
|
||||||
table.diff_tab tbody tr:first-child td { padding-top: 0.5em; }
|
table.diff_tab tbody tr:first-child td { padding-top: 0.5em; }
|
||||||
table.diff_tab tbody tr:last-child td { padding-bottom: 0.5em; }
|
table.diff_tab tbody tr:last-child td { padding-bottom: 0.5em; }
|
||||||
|
@ -597,6 +600,7 @@ div.tutorial {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tutorial hr { border-color: #CCC; }
|
div.tutorial hr { border-color: #CCC; }
|
||||||
|
div.tutorial li { margin: 2px 0px }
|
||||||
div.tutorial h1 {
|
div.tutorial h1 {
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
color: #404040;
|
color: #404040;
|
||||||
|
|
|
@ -17,24 +17,12 @@
|
||||||
<NAME>filename</NAME>
|
<NAME>filename</NAME>
|
||||||
<VALUE>~wwwtmp.css</VALUE>
|
<VALUE>~wwwtmp.css</VALUE>
|
||||||
</WWWPARAMS>
|
</WWWPARAMS>
|
||||||
<WWWPARAMS>
|
|
||||||
<RELID>MI</RELID>
|
|
||||||
<OBJID>ZABAPGIT_CSS_COMMON</OBJID>
|
|
||||||
<NAME>filesize</NAME>
|
|
||||||
<VALUE>12615</VALUE>
|
|
||||||
</WWWPARAMS>
|
|
||||||
<WWWPARAMS>
|
<WWWPARAMS>
|
||||||
<RELID>MI</RELID>
|
<RELID>MI</RELID>
|
||||||
<OBJID>ZABAPGIT_CSS_COMMON</OBJID>
|
<OBJID>ZABAPGIT_CSS_COMMON</OBJID>
|
||||||
<NAME>mimetype</NAME>
|
<NAME>mimetype</NAME>
|
||||||
<VALUE>text/css</VALUE>
|
<VALUE>text/css</VALUE>
|
||||||
</WWWPARAMS>
|
</WWWPARAMS>
|
||||||
<WWWPARAMS>
|
|
||||||
<RELID>MI</RELID>
|
|
||||||
<OBJID>ZABAPGIT_CSS_COMMON</OBJID>
|
|
||||||
<NAME>version</NAME>
|
|
||||||
<VALUE/>
|
|
||||||
</WWWPARAMS>
|
|
||||||
</PARAMS>
|
</PARAMS>
|
||||||
</asx:values>
|
</asx:values>
|
||||||
</asx:abap>
|
</asx:abap>
|
||||||
|
|
|
@ -156,7 +156,8 @@ CONSTANTS: gc_newline TYPE abap_char1 VALUE cl_abap_char_utilities=>newline.
|
||||||
CONSTANTS: gc_english TYPE spras VALUE 'E'.
|
CONSTANTS: gc_english TYPE spras VALUE 'E'.
|
||||||
|
|
||||||
CONSTANTS: gc_root_dir TYPE string VALUE '/',
|
CONSTANTS: gc_root_dir TYPE string VALUE '/',
|
||||||
gc_dot_abapgit TYPE string VALUE '.abapgit.xml' ##NO_TEXT.
|
gc_dot_abapgit TYPE string VALUE '.abapgit.xml' ##NO_TEXT,
|
||||||
|
gc_author_regex TYPE string VALUE '^([\w\s\.@\-_1-9]+) <(.*)> (\d{10}) .\d{4}$' ##NO_TEXT.
|
||||||
|
|
||||||
CONSTANTS: BEGIN OF gc_action,
|
CONSTANTS: BEGIN OF gc_action,
|
||||||
repo_clone TYPE string VALUE 'repo_clone',
|
repo_clone TYPE string VALUE 'repo_clone',
|
||||||
|
|
|
@ -17,24 +17,12 @@
|
||||||
<NAME>filename</NAME>
|
<NAME>filename</NAME>
|
||||||
<VALUE>common.js</VALUE>
|
<VALUE>common.js</VALUE>
|
||||||
</WWWPARAMS>
|
</WWWPARAMS>
|
||||||
<WWWPARAMS>
|
|
||||||
<RELID>MI</RELID>
|
|
||||||
<OBJID>ZABAPGIT_JS_COMMON</OBJID>
|
|
||||||
<NAME>filesize</NAME>
|
|
||||||
<VALUE>6500</VALUE>
|
|
||||||
</WWWPARAMS>
|
|
||||||
<WWWPARAMS>
|
<WWWPARAMS>
|
||||||
<RELID>MI</RELID>
|
<RELID>MI</RELID>
|
||||||
<OBJID>ZABAPGIT_JS_COMMON</OBJID>
|
<OBJID>ZABAPGIT_JS_COMMON</OBJID>
|
||||||
<NAME>mimetype</NAME>
|
<NAME>mimetype</NAME>
|
||||||
<VALUE>text/javascript</VALUE>
|
<VALUE>text/javascript</VALUE>
|
||||||
</WWWPARAMS>
|
</WWWPARAMS>
|
||||||
<WWWPARAMS>
|
|
||||||
<RELID>MI</RELID>
|
|
||||||
<OBJID>ZABAPGIT_JS_COMMON</OBJID>
|
|
||||||
<NAME>version</NAME>
|
|
||||||
<VALUE/>
|
|
||||||
</WWWPARAMS>
|
|
||||||
</PARAMS>
|
</PARAMS>
|
||||||
</asx:values>
|
</asx:values>
|
||||||
</asx:abap>
|
</asx:abap>
|
||||||
|
|
|
@ -195,6 +195,11 @@ CLASS lcl_object_tabl IMPLEMENTATION.
|
||||||
<ls_dd03p>-scrtext_m,
|
<ls_dd03p>-scrtext_m,
|
||||||
<ls_dd03p>-scrtext_l.
|
<ls_dd03p>-scrtext_l.
|
||||||
|
|
||||||
|
IF <ls_dd03p>-masklen = '' OR NOT <ls_dd03p>-masklen CO '0123456789'.
|
||||||
|
* make sure the field contains valid data, or the XML will dump
|
||||||
|
CLEAR <ls_dd03p>-masklen.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
IF <ls_dd03p>-comptype = 'E'.
|
IF <ls_dd03p>-comptype = 'E'.
|
||||||
* type specified via data element
|
* type specified via data element
|
||||||
CLEAR: <ls_dd03p>-domname,
|
CLEAR: <ls_dd03p>-domname,
|
||||||
|
|
|
@ -387,10 +387,7 @@ CLASS lcl_object_tran IMPLEMENTATION.
|
||||||
|
|
||||||
SELECT SINGLE * FROM tstct INTO ls_tstct
|
SELECT SINGLE * FROM tstct INTO ls_tstct
|
||||||
WHERE sprsl = mv_language
|
WHERE sprsl = mv_language
|
||||||
AND tcode = lv_transaction. "#EC CI_GENBUFF
|
AND tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
|
||||||
IF sy-subrc <> 0.
|
|
||||||
lcx_exception=>raise( 'Transaction description not found' ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
SELECT SINGLE * FROM tstcp INTO ls_tstcp
|
SELECT SINGLE * FROM tstcp INTO ls_tstcp
|
||||||
WHERE tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
|
WHERE tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
|
||||||
|
|
|
@ -12,13 +12,20 @@ CLASS lcl_object_w3super DEFINITION INHERITING FROM lcl_objects_super ABSTRACT.
|
||||||
PUBLIC SECTION.
|
PUBLIC SECTION.
|
||||||
INTERFACES lif_object.
|
INTERFACES lif_object.
|
||||||
|
|
||||||
TYPES: ty_wwwparams_tt TYPE STANDARD TABLE OF wwwparams WITH DEFAULT KEY.
|
TYPES ty_wwwparams_tt TYPE STANDARD TABLE OF wwwparams WITH DEFAULT KEY.
|
||||||
|
|
||||||
METHODS:
|
CONSTANTS: BEGIN OF c_param_names,
|
||||||
constructor
|
version TYPE w3_name VALUE 'version',
|
||||||
IMPORTING
|
fileext TYPE w3_name VALUE 'fileextension',
|
||||||
is_item TYPE ty_item
|
filesize TYPE w3_name VALUE 'filesize',
|
||||||
iv_language TYPE spras.
|
filename TYPE w3_name VALUE 'filename',
|
||||||
|
mimetype TYPE w3_name VALUE 'mimetype',
|
||||||
|
END OF c_param_names.
|
||||||
|
|
||||||
|
METHODS constructor
|
||||||
|
IMPORTING
|
||||||
|
is_item TYPE ty_item
|
||||||
|
iv_language TYPE spras.
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
|
|
||||||
|
@ -33,18 +40,19 @@ CLASS lcl_object_w3super DEFINITION INHERITING FROM lcl_objects_super ABSTRACT.
|
||||||
RETURNING VALUE(rv_ext) TYPE string
|
RETURNING VALUE(rv_ext) TYPE string
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
METHODS patch_size
|
METHODS normalize_params
|
||||||
IMPORTING iv_size TYPE i OPTIONAL " Overwrite if given
|
IMPORTING iv_size TYPE i
|
||||||
EXPORTING ev_size TYPE i " Return size as integer
|
|
||||||
CHANGING ct_params TYPE ty_wwwparams_tt " Param table to patch
|
CHANGING ct_params TYPE ty_wwwparams_tt " Param table to patch
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
METHODS patch_filename
|
METHODS strip_params
|
||||||
CHANGING ct_params TYPE ty_wwwparams_tt
|
CHANGING ct_params TYPE ty_wwwparams_tt
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
METHODS clear_version
|
METHODS find_param
|
||||||
CHANGING ct_params TYPE ty_wwwparams_tt
|
IMPORTING it_params TYPE ty_wwwparams_tt
|
||||||
|
iv_name TYPE w3_name
|
||||||
|
RETURNING VALUE(rv_value) TYPE string
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
ENDCLASS. "lcl_object_W3SUPER DEFINITION
|
ENDCLASS. "lcl_object_W3SUPER DEFINITION
|
||||||
|
@ -145,15 +153,9 @@ CLASS lcl_object_w3super IMPLEMENTATION.
|
||||||
lcx_exception=>raise( 'Cannot read W3xx data' ).
|
lcx_exception=>raise( 'Cannot read W3xx data' ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
" Condense size string + get size to local integer
|
lv_size = find_param( it_params = lt_w3params iv_name = c_param_names-filesize ).
|
||||||
patch_size( IMPORTING ev_size = lv_size
|
" Clean params (remove version, filesize & clear filename from path)
|
||||||
CHANGING ct_params = lt_w3params ).
|
strip_params( CHANGING ct_params = lt_w3params ).
|
||||||
|
|
||||||
" Remove file path (for security concerns)
|
|
||||||
patch_filename( CHANGING ct_params = lt_w3params ).
|
|
||||||
|
|
||||||
" Clear version
|
|
||||||
clear_version( CHANGING ct_params = lt_w3params ).
|
|
||||||
|
|
||||||
CASE ms_key-relid.
|
CASE ms_key-relid.
|
||||||
WHEN 'MI'.
|
WHEN 'MI'.
|
||||||
|
@ -264,11 +266,9 @@ CLASS lcl_object_w3super IMPLEMENTATION.
|
||||||
lcx_exception=>raise( 'Wrong W3xx type' ).
|
lcx_exception=>raise( 'Wrong W3xx type' ).
|
||||||
ENDCASE.
|
ENDCASE.
|
||||||
|
|
||||||
" Update size of file (for the case file was actually changed remotely)
|
" Update size of file based on actual data file size, prove param object name
|
||||||
" Will also trigger "stage" at next sync if remote XML
|
normalize_params( EXPORTING iv_size = lv_size
|
||||||
" was not updated with the new file size
|
CHANGING ct_params = lt_w3params ).
|
||||||
patch_size( EXPORTING iv_size = lv_size
|
|
||||||
CHANGING ct_params = lt_w3params ).
|
|
||||||
|
|
||||||
CALL FUNCTION 'WWWPARAMS_UPDATE'
|
CALL FUNCTION 'WWWPARAMS_UPDATE'
|
||||||
TABLES
|
TABLES
|
||||||
|
@ -368,67 +368,60 @@ CLASS lcl_object_w3super IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD get_ext.
|
METHOD get_ext.
|
||||||
|
|
||||||
FIELD-SYMBOLS <param> LIKE LINE OF it_params.
|
rv_ext = find_param( it_params = it_params iv_name = c_param_names-fileext ).
|
||||||
|
|
||||||
READ TABLE it_params ASSIGNING <param> WITH KEY name = 'fileextension'.
|
|
||||||
|
|
||||||
IF sy-subrc > 0.
|
|
||||||
lcx_exception=>raise( |W3xx: Cannot find file ext for { ms_key-objid }| ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
rv_ext = <param>-value.
|
|
||||||
SHIFT rv_ext LEFT DELETING LEADING '.'.
|
SHIFT rv_ext LEFT DELETING LEADING '.'.
|
||||||
|
|
||||||
ENDMETHOD. " get_ext.
|
ENDMETHOD. " get_ext.
|
||||||
|
|
||||||
METHOD patch_size.
|
METHOD normalize_params.
|
||||||
|
|
||||||
FIELD-SYMBOLS <param> LIKE LINE OF ct_params.
|
FIELD-SYMBOLS <param> LIKE LINE OF ct_params.
|
||||||
|
|
||||||
READ TABLE ct_params ASSIGNING <param> WITH KEY name = 'filesize'.
|
" Ensure filesize param exists
|
||||||
|
READ TABLE ct_params ASSIGNING <param> WITH KEY name = c_param_names-filesize.
|
||||||
IF sy-subrc > 0.
|
IF sy-subrc <> 0.
|
||||||
lcx_exception=>raise( |W3xx: Cannot find file size for { ms_key-objid }| ).
|
APPEND INITIAL LINE TO ct_params ASSIGNING <param>.
|
||||||
|
<param>-name = c_param_names-filesize.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_size IS NOT INITIAL.
|
LOOP AT ct_params ASSIGNING <param>.
|
||||||
<param>-value = iv_size.
|
<param>-relid = ms_key-relid. " Ensure param key = object key
|
||||||
ENDIF.
|
<param>-objid = ms_key-objid.
|
||||||
CONDENSE <param>-value.
|
IF <param>-name = c_param_names-filesize. " Patch filesize = real file size
|
||||||
|
<param>-value = iv_size.
|
||||||
|
CONDENSE <param>-value.
|
||||||
|
ENDIF.
|
||||||
|
ENDLOOP.
|
||||||
|
|
||||||
ev_size = <param>-value.
|
ENDMETHOD. " normalize_params.
|
||||||
|
|
||||||
ENDMETHOD. " patch_size.
|
METHOD strip_params.
|
||||||
|
|
||||||
METHOD patch_filename.
|
|
||||||
|
|
||||||
FIELD-SYMBOLS <param> LIKE LINE OF ct_params.
|
FIELD-SYMBOLS <param> LIKE LINE OF ct_params.
|
||||||
|
|
||||||
READ TABLE ct_params ASSIGNING <param> WITH KEY name = 'filename'.
|
" Remove path from filename
|
||||||
|
find_param( it_params = ct_params iv_name = c_param_names-filename ). " Check exists
|
||||||
IF sy-subrc > 0.
|
READ TABLE ct_params ASSIGNING <param> WITH KEY name = c_param_names-filename.
|
||||||
lcx_exception=>raise( |W3xx: Cannot find file name for { ms_key-objid }| ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
" Remove path
|
|
||||||
<param>-value = lcl_path=>get_filename_from_syspath( |{ <param>-value }| ).
|
<param>-value = lcl_path=>get_filename_from_syspath( |{ <param>-value }| ).
|
||||||
|
|
||||||
ENDMETHOD. " patch_filename.
|
" Clear version & filesize
|
||||||
|
DELETE ct_params WHERE name = c_param_names-version.
|
||||||
|
DELETE ct_params WHERE name = c_param_names-filesize.
|
||||||
|
|
||||||
METHOD clear_version.
|
ENDMETHOD. " strip_params.
|
||||||
|
|
||||||
FIELD-SYMBOLS <param> LIKE LINE OF ct_params.
|
METHOD find_param.
|
||||||
|
|
||||||
READ TABLE ct_params ASSIGNING <param> WITH KEY name = 'version'.
|
FIELD-SYMBOLS <param> LIKE LINE OF it_params.
|
||||||
|
|
||||||
|
READ TABLE it_params ASSIGNING <param> WITH KEY name = iv_name.
|
||||||
IF sy-subrc > 0.
|
IF sy-subrc > 0.
|
||||||
lcx_exception=>raise( |W3xx: Cannot find version for { ms_key-objid }| ).
|
lcx_exception=>raise( |W3xx: Cannot find { iv_name } for { ms_key-objid }| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
" Clear version
|
rv_value = <param>-value.
|
||||||
CLEAR <param>-value.
|
|
||||||
|
|
||||||
ENDMETHOD. " clear_version.
|
ENDMETHOD. " find_param.
|
||||||
|
|
||||||
METHOD lif_object~compare_to_remote_version.
|
METHOD lif_object~compare_to_remote_version.
|
||||||
CREATE OBJECT ro_comparison_result TYPE lcl_null_comparison_result.
|
CREATE OBJECT ro_comparison_result TYPE lcl_null_comparison_result.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -768,7 +768,7 @@ CLASS lcl_objects_bridge IMPLEMENTATION.
|
||||||
* No exception in class-contructor possible.
|
* No exception in class-contructor possible.
|
||||||
* Anyway, a shortdump is more appropriate in this case
|
* Anyway, a shortdump is more appropriate in this case
|
||||||
ASSERT 'There must not be' =
|
ASSERT 'There must not be' =
|
||||||
|multiple ABAPGit-Plugins for the same object type {
|
|multiple abapGit-Plugins for the same object type {
|
||||||
ls_objtype_map-obj_typ }|.
|
ls_objtype_map-obj_typ }|.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
|
@ -193,7 +193,7 @@ CLASS lcl_branch_overview IMPLEMENTATION.
|
||||||
SPLIT ls_raw-body AT gc_newline INTO ls_commit-message lv_trash.
|
SPLIT ls_raw-body AT gc_newline INTO ls_commit-message lv_trash.
|
||||||
|
|
||||||
* unix time stamps are in same time zone, so ignore the zone,
|
* unix time stamps are in same time zone, so ignore the zone,
|
||||||
FIND REGEX '^([\w\s\.@]+) <(.*)> (\d{10}) .\d{4}$' IN ls_raw-author
|
FIND REGEX gc_author_regex IN ls_raw-author
|
||||||
SUBMATCHES
|
SUBMATCHES
|
||||||
ls_commit-author
|
ls_commit-author
|
||||||
ls_commit-email
|
ls_commit-email
|
||||||
|
|
|
@ -255,24 +255,21 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD render_lines.
|
METHOD render_lines.
|
||||||
|
|
||||||
DATA: lo_highlighter TYPE REF TO lcl_code_highlighter,
|
DATA: lo_highlighter TYPE REF TO lcl_syntax_highlighter,
|
||||||
lt_diffs TYPE lcl_diff=>ty_diffs_tt,
|
lt_diffs TYPE lcl_diff=>ty_diffs_tt,
|
||||||
lv_local TYPE string,
|
lv_local TYPE string,
|
||||||
lv_remote TYPE string,
|
lv_remote TYPE string,
|
||||||
lv_lattr TYPE string,
|
lv_lattr TYPE string,
|
||||||
lv_rattr TYPE string,
|
lv_rattr TYPE string,
|
||||||
lv_highlight TYPE abap_bool,
|
|
||||||
lv_insert_nav TYPE abap_bool.
|
lv_insert_nav TYPE abap_bool.
|
||||||
|
|
||||||
FIELD-SYMBOLS <ls_diff> LIKE LINE OF lt_diffs.
|
FIELD-SYMBOLS <ls_diff> LIKE LINE OF lt_diffs.
|
||||||
|
|
||||||
CREATE OBJECT lo_highlighter.
|
lo_highlighter = lcl_syntax_highlighter=>create( is_diff-filename ).
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ro_html.
|
||||||
|
|
||||||
lt_diffs = is_diff-o_diff->get( ).
|
lt_diffs = is_diff-o_diff->get( ).
|
||||||
|
|
||||||
lv_highlight = boolc( is_diff-filename CP '*.abap' ).
|
|
||||||
|
|
||||||
LOOP AT lt_diffs ASSIGNING <ls_diff>.
|
LOOP AT lt_diffs ASSIGNING <ls_diff>.
|
||||||
IF <ls_diff>-short = abap_false.
|
IF <ls_diff>-short = abap_false.
|
||||||
lv_insert_nav = abap_true.
|
lv_insert_nav = abap_true.
|
||||||
|
@ -292,7 +289,7 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
|
||||||
lv_remote = <ls_diff>-old.
|
lv_remote = <ls_diff>-old.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF lv_highlight = abap_true.
|
IF lo_highlighter IS BOUND.
|
||||||
lv_local = lo_highlighter->process_line( lv_local ).
|
lv_local = lo_highlighter->process_line( lv_local ).
|
||||||
lv_remote = lo_highlighter->process_line( lv_remote ).
|
lv_remote = lo_highlighter->process_line( lv_remote ).
|
||||||
ELSE.
|
ELSE.
|
||||||
|
|
|
@ -283,7 +283,7 @@ CLASS lcl_merge IMPLEMENTATION.
|
||||||
<ls_ancestor>-commit = lv_commit.
|
<ls_ancestor>-commit = lv_commit.
|
||||||
<ls_ancestor>-tree = ls_commit-tree.
|
<ls_ancestor>-tree = ls_commit-tree.
|
||||||
<ls_ancestor>-body = ls_commit-body.
|
<ls_ancestor>-body = ls_commit-body.
|
||||||
FIND REGEX '^[\w\s]+ <.*> (\d{10}) .\d{4}$' IN ls_commit-author
|
FIND REGEX gc_author_regex IN ls_commit-author
|
||||||
SUBMATCHES <ls_ancestor>-time ##NO_TEXT.
|
SUBMATCHES <ls_ancestor>-time ##NO_TEXT.
|
||||||
ASSERT sy-subrc = 0.
|
ASSERT sy-subrc = 0.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
|
@ -46,6 +46,8 @@ CLASS lcl_repo DEFINITION ABSTRACT FRIENDS lcl_repo_srv.
|
||||||
update_local_checksums
|
update_local_checksums
|
||||||
IMPORTING it_files TYPE ty_file_signatures_tt
|
IMPORTING it_files TYPE ty_file_signatures_tt
|
||||||
RAISING lcx_exception,
|
RAISING lcx_exception,
|
||||||
|
rebuild_local_checksums
|
||||||
|
RAISING lcx_exception,
|
||||||
is_offline
|
is_offline
|
||||||
RETURNING VALUE(rv_offline) TYPE abap_bool
|
RETURNING VALUE(rv_offline) TYPE abap_bool
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
@ -118,8 +120,7 @@ CLASS lcl_repo_online DEFINITION INHERITING FROM lcl_repo FINAL.
|
||||||
RETURNING VALUE(rt_results) TYPE ty_results_tt
|
RETURNING VALUE(rt_results) TYPE ty_results_tt
|
||||||
RAISING lcx_exception,
|
RAISING lcx_exception,
|
||||||
reset_status,
|
reset_status,
|
||||||
rebuild_local_checksums
|
rebuild_local_checksums REDEFINITION,
|
||||||
RAISING lcx_exception,
|
|
||||||
push
|
push
|
||||||
IMPORTING is_comment TYPE ty_comment
|
IMPORTING is_comment TYPE ty_comment
|
||||||
io_stage TYPE REF TO lcl_stage
|
io_stage TYPE REF TO lcl_stage
|
||||||
|
|
|
@ -243,7 +243,7 @@ CLASS lcl_repo_online IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD rebuild_local_checksums.
|
METHOD rebuild_local_checksums. "REMOTE
|
||||||
|
|
||||||
DATA: lt_remote TYPE ty_files_tt,
|
DATA: lt_remote TYPE ty_files_tt,
|
||||||
lt_local TYPE ty_files_item_tt,
|
lt_local TYPE ty_files_item_tt,
|
||||||
|
@ -639,6 +639,40 @@ CLASS lcl_repo IMPLEMENTATION.
|
||||||
rv_yes = ms_data-write_protect.
|
rv_yes = ms_data-write_protect.
|
||||||
ENDMETHOD. "is_write_protected
|
ENDMETHOD. "is_write_protected
|
||||||
|
|
||||||
|
METHOD rebuild_local_checksums. "LOCAL (BASE)
|
||||||
|
|
||||||
|
DATA: lt_local TYPE ty_files_item_tt,
|
||||||
|
ls_last_item TYPE ty_item,
|
||||||
|
lt_checksums TYPE lcl_persistence_repo=>ty_local_checksum_tt.
|
||||||
|
|
||||||
|
FIELD-SYMBOLS: <ls_checksum> LIKE LINE OF lt_checksums,
|
||||||
|
<ls_file_sig> LIKE LINE OF <ls_checksum>-files,
|
||||||
|
<ls_local> LIKE LINE OF lt_local.
|
||||||
|
|
||||||
|
lt_local = get_files_local( ).
|
||||||
|
|
||||||
|
DELETE lt_local " Remove non-code related files except .abapgit
|
||||||
|
WHERE item IS INITIAL
|
||||||
|
AND NOT ( file-path = gc_root_dir AND file-filename = gc_dot_abapgit ).
|
||||||
|
|
||||||
|
SORT lt_local BY item.
|
||||||
|
|
||||||
|
LOOP AT lt_local ASSIGNING <ls_local>.
|
||||||
|
IF ls_last_item <> <ls_local>-item OR sy-tabix = 1. " First or New item reached ?
|
||||||
|
APPEND INITIAL LINE TO lt_checksums ASSIGNING <ls_checksum>.
|
||||||
|
<ls_checksum>-item = <ls_local>-item.
|
||||||
|
ls_last_item = <ls_local>-item.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
APPEND INITIAL LINE TO <ls_checksum>-files ASSIGNING <ls_file_sig>.
|
||||||
|
MOVE-CORRESPONDING <ls_local>-file TO <ls_file_sig>.
|
||||||
|
|
||||||
|
ENDLOOP.
|
||||||
|
|
||||||
|
set( it_checksums = lt_checksums ).
|
||||||
|
|
||||||
|
ENDMETHOD. " rebuild_local_checksums.
|
||||||
|
|
||||||
ENDCLASS. "lcl_repo IMPLEMENTATION
|
ENDCLASS. "lcl_repo IMPLEMENTATION
|
||||||
|
|
||||||
*----------------------------------------------------------------------*
|
*----------------------------------------------------------------------*
|
||||||
|
|
|
@ -37,7 +37,7 @@ CLASS lcl_services_abapgit DEFINITION FINAL.
|
||||||
iv_text TYPE c
|
iv_text TYPE c
|
||||||
iv_url TYPE string
|
iv_url TYPE string
|
||||||
iv_package TYPE devclass
|
iv_package TYPE devclass
|
||||||
RAISING lcx_exception.
|
RAISING lcx_exception.
|
||||||
|
|
||||||
ENDCLASS. "lcl_services_abapgit
|
ENDCLASS. "lcl_services_abapgit
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ CLASS lcl_services_abapgit IMPLEMENTATION.
|
||||||
RETURN.
|
RETURN.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
lv_text = |Confirm to install current version of ABAPGit to package { c_package_abapgit }|.
|
lv_text = |Confirm to install current version of abapGit to package { c_package_abapgit }|.
|
||||||
|
|
||||||
do_install( iv_title = lc_title
|
do_install( iv_title = lc_title
|
||||||
iv_text = lv_text
|
iv_text = lv_text
|
||||||
|
@ -100,7 +100,7 @@ CLASS lcl_services_abapgit IMPLEMENTATION.
|
||||||
RETURN.
|
RETURN.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
lv_text = |Confirm to install current version ABAPGit plugins to package {
|
lv_text = |Confirm to install current version abapGit plugins to package {
|
||||||
c_package_plugins }|.
|
c_package_plugins }|.
|
||||||
|
|
||||||
do_install( iv_title = lc_title
|
do_install( iv_title = lc_title
|
||||||
|
@ -140,6 +140,7 @@ CLASS lcl_services_abapgit IMPLEMENTATION.
|
||||||
|
|
||||||
lo_repo->status( ). " check for errors
|
lo_repo->status( ). " check for errors
|
||||||
lo_repo->deserialize( ).
|
lo_repo->deserialize( ).
|
||||||
|
lcl_services_repo=>toggle_favorite( lo_repo->get_key( ) ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
COMMIT WORK.
|
COMMIT WORK.
|
||||||
|
|
|
@ -265,16 +265,20 @@ CLASS lcl_services_repo IMPLEMENTATION.
|
||||||
|
|
||||||
DATA: lv_answer TYPE c,
|
DATA: lv_answer TYPE c,
|
||||||
lv_question TYPE string,
|
lv_question TYPE string,
|
||||||
lo_repo TYPE REF TO lcl_repo_online.
|
lo_repo TYPE REF TO lcl_repo.
|
||||||
|
|
||||||
lo_repo ?= lcl_app=>repo_srv( )->get( iv_key ).
|
lo_repo ?= lcl_app=>repo_srv( )->get( iv_key ).
|
||||||
|
|
||||||
lv_question = 'This will rebuild and overwrite local repo checksums.'
|
lv_question = 'This will rebuild and overwrite local repo checksums.'.
|
||||||
|
|
||||||
|
IF lo_repo->is_offline( ) = abap_false.
|
||||||
|
lv_question = lv_question
|
||||||
&& ' The logic: if local and remote file differs then:'
|
&& ' The logic: if local and remote file differs then:'
|
||||||
&& ' if remote branch is ahead then assume changes are remote,'
|
&& ' if remote branch is ahead then assume changes are remote,'
|
||||||
&& ' else (branches are equal) assume changes are local.'
|
&& ' else (branches are equal) assume changes are local.'
|
||||||
&& ' This will lead to incorrect state for files changed on both sides.'
|
&& ' This will lead to incorrect state for files changed on both sides.'
|
||||||
&& ' Please make sure you don''t have ones like that.'.
|
&& ' Please make sure you don''t have ones like that.'.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
lv_answer = lcl_popups=>popup_to_confirm(
|
lv_answer = lcl_popups=>popup_to_confirm(
|
||||||
titlebar = 'Warning'
|
titlebar = 'Warning'
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -260,12 +260,12 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
|
||||||
iv_act = |{ gc_action-repo_remote_change }?{ lv_key }| ).
|
iv_act = |{ gc_action-repo_remote_change }?{ lv_key }| ).
|
||||||
lo_tb_advanced->add( iv_txt = 'Make off-line'
|
lo_tb_advanced->add( iv_txt = 'Make off-line'
|
||||||
iv_act = |{ gc_action-repo_remote_detach }?{ lv_key }| ).
|
iv_act = |{ gc_action-repo_remote_detach }?{ lv_key }| ).
|
||||||
lo_tb_advanced->add( iv_txt = 'Update local checksums'
|
|
||||||
iv_act = |{ gc_action-repo_refresh_checksums }?{ lv_key }| ).
|
|
||||||
ELSE.
|
ELSE.
|
||||||
lo_tb_advanced->add( iv_txt = 'Make on-line'
|
lo_tb_advanced->add( iv_txt = 'Make on-line'
|
||||||
iv_act = |{ gc_action-repo_remote_attach }?{ lv_key }| ).
|
iv_act = |{ gc_action-repo_remote_attach }?{ lv_key }| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
lo_tb_advanced->add( iv_txt = 'Update local checksums'
|
||||||
|
iv_act = |{ gc_action-repo_refresh_checksums }?{ lv_key }| ).
|
||||||
lo_tb_advanced->add( iv_txt = 'Remove'
|
lo_tb_advanced->add( iv_txt = 'Remove'
|
||||||
iv_act = |{ gc_action-repo_remove }?{ lv_key }| ).
|
iv_act = |{ gc_action-repo_remove }?{ lv_key }| ).
|
||||||
lo_tb_advanced->add( iv_txt = 'Uninstall'
|
lo_tb_advanced->add( iv_txt = 'Uninstall'
|
||||||
|
|
|
@ -31,14 +31,6 @@ CLASS lcl_gui_view_tutorial IMPLEMENTATION.
|
||||||
_add '<h1>Tutorial</h1>'.
|
_add '<h1>Tutorial</h1>'.
|
||||||
_add '<hr>'.
|
_add '<hr>'.
|
||||||
|
|
||||||
_add '<h2>Repository list and favorites</h2>'.
|
|
||||||
_add '<p><ul>'.
|
|
||||||
_add '<li>To choose a repo press <img src="img/burger"> at the favorite bar.</li>'.
|
|
||||||
_add '<li>To add a repo as favorite'.
|
|
||||||
_add ' click <img src="img/star-grey"> icon at repo toolbar.</li>'.
|
|
||||||
_add '</ul></p>'.
|
|
||||||
|
|
||||||
|
|
||||||
_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 `.
|
||||||
|
@ -51,8 +43,13 @@ CLASS lcl_gui_view_tutorial IMPLEMENTATION.
|
||||||
_add ' or just serialize as a zip file</li>'.
|
_add ' or just serialize as a zip file</li>'.
|
||||||
_add '</ul></p>'.
|
_add '</ul></p>'.
|
||||||
|
|
||||||
_add '<h2>abapGit related repositories</h2>'.
|
_add '<h2>Repository list and favorites</h2>'.
|
||||||
|
_add '<p><ul>'.
|
||||||
|
_add '<li>To choose a repo press <img src="img/burger"> at the favorite bar.</li>'.
|
||||||
|
_add '<li>To favorite a repo click <img src="img/star-grey"> icon at repo toolbar.</li>'.
|
||||||
|
_add '</ul></p>'.
|
||||||
|
|
||||||
|
_add '<h2>abapGit related repositories</h2>'.
|
||||||
_add '<p><ul>'.
|
_add '<p><ul>'.
|
||||||
_add '<li>'.
|
_add '<li>'.
|
||||||
ro_html->add_anchor( iv_txt = 'install abapGit repo' iv_act = gc_action-abapgit_install ).
|
ro_html->add_anchor( iv_txt = 'install abapGit repo' iv_act = gc_action-abapgit_install ).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user