[sync] Add support for removing files from VCS

RESOLVED FIXED

Status

Webtools
Pontoon
P2
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: mathjazz, Assigned: jotes, Mentored)

Tracking

Trunk

Firefox Tracking Flags

(firefox43 affected)

Details

(Reporter)

Description

3 years ago
In vcs.py, we only add new and modify existing files on commit/push. We should also remove all missing files.

This is required for asymmetric formats where files can get obsolete.
(Reporter)

Updated

2 years ago
Summary: Add support for removing files from VCS → [sync] Add support for removing files from VCS
(Reporter)

Updated

2 years ago
Priority: -- → P2

Comment 1

2 years ago
Commits pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/2892c36b378f7f6ef58803e72adfe57953cc23b6
Bug 1201431: remove missing files & folders from HG

https://github.com/mozilla/pontoon/commit/4cda77addade52b0319a7f427096053309cc5655
Merge pull request #243 from mathjazz/bug-1201431-remove-missing-from-vcs

Bug 1201431: remove missing files & folders from HG
(Reporter)

Updated

2 years ago
Assignee: nobody → m
(Reporter)

Comment 2

2 years ago
Our VCS interface is now capable of removing files.

We need to modify sync so that it removes obsolete files from the filesystem (before pushing to VCS).
Assignee: m → nobody

Comment 3

2 years ago
What's the next steps here?
(Reporter)

Updated

2 years ago
Assignee: nobody → m
(Reporter)

Comment 4

2 years ago
We can detect deleted files during sync_project:
https://github.com/mozilla/pontoon/blob/master/pontoon/sync/core.py#L96

Next, we need to bring that list to sync_project_repo, maybe like this:
https://github.com/mozilla/pontoon/blob/master/pontoon/sync/tasks.py#L72

And then finally, we need to delete these files from the filesystem.

Also make sure locales_to_commit is set properly:
https://github.com/mozilla/pontoon/blob/master/pontoon/sync/changeset.py#L117
Assignee: m → jot
(Reporter)

Updated

2 years ago
Mentor: m@owca.info

Comment 5

2 years ago
Commits pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/5dbb78bfbcb4cd17cac801bc521d45b6c2934117
Fix bug 1201431. Remove the obsolete resources.

https://github.com/mozilla/pontoon/commit/1333dd510c70bd5860a3a8a58c4bf88c0d83e2d4
Merge pull request #370 from jotes/bug_1201431_remove_obsolete_files

Fix bug 1201431. Remove the obsolete resources.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.