anchor.diff:          RAISING   lcx_exception.
   
   ENDCLASS.                    "lcl_repo_online DEFINITION
  +
  +CLASS lcl_stage_logic DEFINITION FINAL.
  +
  +  PUBLIC SECTION.
  +    TYPES: BEGIN OF ty_stage_files,
  +             local  TYPE ty_files_tt,
  +             remote TYPE ty_files_tt,
  +           END OF ty_stage_files.
  +
  +    CLASS-METHODS:
  +      get
  +        IMPORTING io_repo         TYPE REF TO lcl_repo_online
  +        RETURNING VALUE(rs_files) TYPE ty_stage_files
  +        RAISING   lcx_exception.
  +
  +  PRIVATE SECTION.
  +    CLASS-METHODS:
  +      remove_identical
  +        CHANGING cs_files TYPE ty_stage_files.
  +
  +ENDCLASS.
  +
  +CLASS lcl_stage_logic IMPLEMENTATION.
  +
  +  METHOD get.
  +    rs_files-local = io_repo->get_files_local( ).
  +    rs_files-remote = io_repo->get_files_remote( ).
  +    remove_identical( CHANGING cs_files = rs_files ).
  +  ENDMETHOD.
  +
  +  METHOD remove_identical.
  +
  +    DATA: lv_index  TYPE i,
  +          ls_remote LIKE LINE OF cs_files-remote.
  +
  +    FIELD-SYMBOLS: <ls_local> LIKE LINE OF cs_files-local.
  +
  +
  +    LOOP AT cs_files-local ASSIGNING <ls_local>.
  +      lv_index = sy-tabix.
  +
  +      READ TABLE cs_files-remote INTO ls_remote
  +        WITH KEY path = <ls_local>-path
  +        filename = <ls_local>-filename.
  +      IF sy-subrc = 0.
  +        DELETE cs_files-remote INDEX sy-tabix.
  +        IF ls_remote-data = <ls_local>-data.
  +          DELETE cs_files-local INDEX lv_index.
  +        ENDIF.
  +      ENDIF.
  +    ENDLOOP.
  +
  +  ENDMETHOD.
  +
  +ENDCLASS.
   
   *----------------------------------------------------------------------*
   *       CLASS lcl_repo_offline DEFINITION
  
positive.code:         RAISING lcx_exception,
        call_commit
          RAISING lcx_exception,
        remove_identical,
        render_local
          RETURNING VALUE(ro_html) TYPE REF TO lcl_html_helper,
        render_remote
  
negative.code: 
    METHOD refresh.
  
      DATA: ls_files TYPE lcl_stage_logic=>ty_stage_files.
  
      CREATE OBJECT mo_stage.
  
      ls_files = lcl_stage_logic=>get( mo_repo ).
      mt_local = ls_files-local.
      mt_remote = ls_files-remote.
  
    ENDMETHOD.
  
  