All files / src/repo zcl_abapgit_repo_offline.clas.abap

58.33% Statements 21/36
100% Branches 0/0
0% Functions 0/1
58.33% Lines 21/36

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 371x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                               1x  
CLASS zcl_abapgit_repo_offline DEFINITION
  PUBLIC
  INHERITING FROM zcl_abapgit_repo
  FINAL
  CREATE PUBLIC .
 
  PUBLIC SECTION.
  PROTECTED SECTION.
 
    METHODS reset_remote
        REDEFINITION .
  PRIVATE SECTION.
ENDCLASS.
 
 
 
CLASS zcl_abapgit_repo_offline IMPLEMENTATION.
 
 
  METHOD reset_remote.

    DATA lt_backup LIKE mt_remote.

    " online repo has online source to renew data from, offline does not
    " so offline repo preserves the remote
    " in case of partial pull failure the user will immediately see the new difference
    " UI will detect "pullable" content based on mt_status
    " in the uniform way both for online and offline repos
    " for more details see discussion in 2096 and 1953

    lt_backup = mt_remote.
    super->reset_remote( ).
    set_files_remote( lt_backup ).

  ENDMETHOD.
ENDCLASS.