Menu

#1499 Locally delete remotely deleted files

5.4
closed-fixed
5
2021-02-23
2020-07-02
No

With team projects, when a file is deleted by the admin, and others get the updated team project, the deleted files are not deleted from the local OmegaT project. This has to happen manually.

Let this happen automatically.

Implementation:
the current code doesn't really do 'update's in the repo, but it just resets to HEAD. So it is not easy to fetch a list of deleted files from version control.
But it should be possible to save the list of files before and after the update, diff them to get the deletes, and then delete those files in the project too (taking into account the includes/excludes)

Related

Bugs: #1025
Bugs: #1036

Discussion

  • Briac Pilpré

    Briac Pilpré - 2020-07-03

    This feature is tricky to add automatically as it conflicts with the ability to commit new source files within the application: the uncommited new sources risk to be detected as local files to be deleted before they are added to the repo.

    Here's a script I wrote that should delete the local files (more precisely, move them to a backup dir, to be safe). It should take into account the different project mappings.

    Now that I think about it, we could dry-run this script (or a java version of it) after each team sync, and if there are files to be deleted, ask the translator wether or not to keep them. That would also require saving his choice to avoid asking them each time the project is synced.

     
    • Martin Fleurke

      Martin Fleurke - 2020-07-03

      Hi Briac,
      it is also possible to have extra local files, and if I'm correct, even mappings can overlap.
      Therefore I 'monitor' changes in the repos, and if there are deletes, then I propagate the deletion to the project.
      I made a first implementation, see topic/mfl/1499-sync-deletes if you want to try it out. Basic functionality is there, but I need further (unit)testing.

       
  • Martin Fleurke

    Martin Fleurke - 2020-09-16
    • status: open --> open-fixed
    • Group: 5.3 --> 5.4
     
  • Aaron Madlon-Kay

    • status: open-fixed --> closed-fixed
     
  • Aaron Madlon-Kay

    Released in 5.4.0.

     
  • Aaron Madlon-Kay

    • summary: locally delete remotely deleted files --> Locally delete remotely deleted files
     

Log in to post a comment.

MongoDB Logo MongoDB