mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 04:08:27 +08:00
Merge pull request #1163 from larshp/issue_1162
background mode: when moving files rm the old
This commit is contained in:
commit
a501d12693
|
@ -128,6 +128,7 @@ CLASS lcl_background IMPLEMENTATION.
|
|||
lo_stage TYPE REF TO zcl_abapgit_stage.
|
||||
|
||||
FIELD-SYMBOLS: <ls_changed> LIKE LINE OF lt_changed,
|
||||
<ls_remote> LIKE LINE OF ls_files-remote,
|
||||
<ls_local> LIKE LINE OF ls_files-local.
|
||||
|
||||
|
||||
|
@ -174,6 +175,21 @@ CLASS lcl_background IMPLEMENTATION.
|
|||
iv_data = <ls_local>-file-data ).
|
||||
|
||||
APPEND <ls_local> TO ls_user_files-local.
|
||||
|
||||
LOOP AT ls_files-remote ASSIGNING <ls_remote>
|
||||
WHERE filename = <ls_local>-file-filename
|
||||
AND path <> <ls_local>-file-path
|
||||
AND filename <> 'package.devc.xml'.
|
||||
WRITE: / 'rm' ##NO_TEXT,
|
||||
<ls_remote>-path,
|
||||
<ls_remote>-filename.
|
||||
|
||||
* rm old file when object has moved
|
||||
lo_stage->rm(
|
||||
iv_path = <ls_remote>-path
|
||||
iv_filename = <ls_remote>-filename ).
|
||||
EXIT. " assumption: only one file
|
||||
ENDLOOP.
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user