anchor.diff:  
   ENDCLASS.                    "lcl_repo_offline IMPLEMENTATION
   
  -CLASS lcl_persistence_db DEFINITION FINAL.
  -
  -  PUBLIC SECTION.
  -    CONSTANTS:
  -      c_tabname TYPE tabname VALUE 'ZABAPGIT',
  -      c_lock    TYPE viewname VALUE 'EZABAPGIT'.
  -
  -    TYPES: ty_type  TYPE c LENGTH 12.
  -    TYPES: ty_value TYPE c LENGTH 12.
  -
  -    TYPES: BEGIN OF ty_content,
  -             type     TYPE ty_type,
  -             value    TYPE ty_value,
  -             data_str TYPE string,
  -           END OF ty_content,
  -           tt_content TYPE SORTED TABLE OF ty_content WITH UNIQUE KEY value.
  -
  -    METHODS list_by_type
  -      IMPORTING iv_type           TYPE ty_type
  -      RETURNING VALUE(rt_content) TYPE tt_content.
  -
  -    METHODS list
  -      RETURNING VALUE(rt_content) TYPE tt_content.
  -
  -    METHODS add
  -      IMPORTING iv_type  TYPE ty_type
  -                iv_value TYPE ty_content-value
  -                iv_data  TYPE ty_content-data_str
  -      RAISING   lcx_exception.
  -
  -    METHODS delete
  -      IMPORTING iv_type  TYPE ty_type
  -                iv_value TYPE ty_content-value
  -      RAISING   lcx_exception.
  -
  -    METHODS update
  -      IMPORTING iv_type  TYPE ty_type
  -                iv_value TYPE ty_content-value
  -                iv_data  TYPE ty_content-data_str
  -      RAISING   lcx_exception.
  -
  -    METHODS modify
  -      IMPORTING iv_type  TYPE ty_type
  -                iv_value TYPE ty_content-value
  -                iv_data  TYPE ty_content-data_str
  -      RAISING   lcx_exception.
  -
  -    METHODS read
  -      IMPORTING iv_type        TYPE ty_type
  -                iv_value       TYPE ty_content-value
  -      RETURNING VALUE(rv_data) TYPE ty_content-data_str
  -      RAISING   lcx_not_found.
  -
  -    METHODS lock
  -      IMPORTING iv_mode  TYPE enqmode DEFAULT 'E'
  -                iv_type  TYPE ty_type
  -                iv_value TYPE ty_content-value
  -      RAISING   lcx_exception.
  -
  -ENDCLASS.
  -
  -CLASS lcl_persistence_repo DEFINITION FINAL.
  -
  -  PUBLIC SECTION.
  -    TYPES: BEGIN OF ty_repo,
  -             url         TYPE string,
  -             branch_name TYPE string,
  -             sha1        TYPE ty_sha1,
  -             package     TYPE devclass,
  -             offline     TYPE sap_bool,
  -           END OF ty_repo.
  -    TYPES: tt_repo TYPE STANDARD TABLE OF ty_repo WITH DEFAULT KEY.
  -
  -    TYPES: ty_repo_id TYPE c LENGTH 12.
  -
  -    METHODS constructor.
  -
  -    METHODS list
  -      RETURNING VALUE(rt_repos) TYPE tt_repo
  -      RAISING   lcx_exception.
  -
  -    METHODS update
  -      IMPORTING iv_url         TYPE ty_repo-url
  -                iv_branch_sha1 TYPE ty_sha1
  -      RAISING   lcx_exception.
  -
  -    METHODS add
  -      IMPORTING iv_url         TYPE string
  -                iv_branch_name TYPE string
  -                iv_branch      TYPE ty_sha1 OPTIONAL
  -                iv_package     TYPE devclass
  -                iv_offline     TYPE sap_bool DEFAULT abap_false
  -      RAISING   lcx_exception.
  -
  -    METHODS delete
  -      IMPORTING iv_url TYPE ty_repo-url
  -      RAISING   lcx_exception.
  -
  -    METHODS read
  -      IMPORTING iv_url         TYPE ty_repo-url
  -      RETURNING VALUE(rs_repo) TYPE ty_repo
  -      RAISING   lcx_exception
  -                lcx_not_found.
  -
  -    METHODS lock
  -      IMPORTING iv_mode TYPE enqmode
  -                iv_url  TYPE ty_repo-url
  -      RAISING   lcx_exception.
  -
  -  PRIVATE SECTION.
  -
  -    CONSTANTS c_type_repo TYPE lcl_persistence_db=>ty_type VALUE 'REPO'.
  -
  -    DATA: mo_db TYPE REF TO lcl_persistence_db.
  -
  -    METHODS from_xml
  -      IMPORTING iv_repo_xml_string TYPE string
  -      RETURNING VALUE(rs_repo)     TYPE ty_repo
  -      RAISING   lcx_exception.
  -
  -    METHODS to_xml
  -      IMPORTING is_repo                   TYPE ty_repo
  -      RETURNING VALUE(rv_repo_xml_string) TYPE string.
  -
  -    METHODS get_next_id
  -      RETURNING VALUE(rv_next_repo_id) TYPE lcl_persistence_db=>ty_content-value
  -      RAISING   lcx_exception.
  -
  -    METHODS url_to_id
  -      IMPORTING iv_url       TYPE ty_repo-url
  -      RETURNING VALUE(rv_id) TYPE lcl_persistence_db=>ty_content-value
  -      RAISING   lcx_exception.
  -
  -ENDCLASS.
  -
   *----------------------------------------------------------------------*
   *       CLASS lcl_repo_srv DEFINITION
   *----------------------------------------------------------------------*
  
positive.code:   METHOD validate_package.
  
      DATA: lv_devclass TYPE tdevc-devclass,
            lt_repos    TYPE lcl_persistence=>ty_repos_persi_tt.
  
  
      IF iv_package IS INITIAL.
  
negative.code:            END OF ty_repo_persi.
      TYPES: ty_repos_persi_tt TYPE STANDARD TABLE OF ty_repo_persi WITH DEFAULT KEY.
  
      METHODS list
        RETURNING VALUE(rt_repos) TYPE ty_repos_persi_tt
        RAISING   lcx_exception.
  