From 6839f81c939b09a88afeb5a2d5d1b83832e9647e Mon Sep 17 00:00:00 2001 From: sandra rossi Date: Fri, 29 Mar 2019 14:10:29 +0100 Subject: [PATCH] DIFF shown after pull ENHO of implicit enh. #2579 Issue #2579: diff still shown after pull of ENHO hooks (implicit enhancements i.e. code added at start/end of existing methods, etc.) Reason: if the author has created and deleted implicit enhancements in the original system, the numbering doesn't start from 1 (this is the numbering we can see for the statement ENHANCEMENT, for instance ENHANCEMENT 1. ... ENDENHANCEMENT.) When pulling in another system, the numbering will start from 1, so it will differ from the source. As this enhancement number is serialized by abapGit in the XML, it will detect a difference. Correction: the method SERIALIZE of class ZCL_ABAPGIT_OBJECT_ENHO_HOOK is changed so that to not serialize the enhancement number. --- src/objects/zcl_abapgit_object_enho_hook.clas.abap | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/objects/zcl_abapgit_object_enho_hook.clas.abap b/src/objects/zcl_abapgit_object_enho_hook.clas.abap index 61f642f78..30a1f4fe2 100644 --- a/src/objects/zcl_abapgit_object_enho_hook.clas.abap +++ b/src/objects/zcl_abapgit_object_enho_hook.clas.abap @@ -45,6 +45,8 @@ CLASS zcl_abapgit_object_enho_hook IMPLEMENTATION. lt_spaces TYPE ty_spaces_tt, lt_enhancements TYPE enh_hook_impl_it. + FIELD-SYMBOLS: LIKE LINE OF lt_enhancements. + lo_hook_impl ?= ii_enh_tool. @@ -60,6 +62,11 @@ CLASS zcl_abapgit_object_enho_hook IMPLEMENTATION. ls_original_object-include_bound = lo_hook_impl->get_include_bound( ). lt_enhancements = lo_hook_impl->get_hook_impls( ). + LOOP AT lt_enhancements ASSIGNING . + CLEAR: -extid, + -id. + ENDLOOP. + hook_impl_serialize( IMPORTING et_spaces = lt_spaces CHANGING ct_impl = lt_enhancements ).