Closed
Bug 884569
Opened 12 years ago
Closed 12 years ago
mozpack support for removing untracked files
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla24
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(1 file)
6.62 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
I'm splitting off the mozpack work from bug 850380.
Essentially we want code in mozpack to remove "untracked" files from a directory. Essentially, the build system will be able to say "only these files should exist" and this code will purge files that don't belong. This is very similar to how version control systems clean or purge the working directory.
Assignee | ||
Comment 1•12 years ago
|
||
Since the XPIDL patch, I renamed DirectoryPruner to FilePurger and added a
class to hold the results of the operation. That class is still minimal.
It can expand as needed.
Attachment #764424 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → gps
Comment 2•12 years ago
|
||
Comment on attachment 764424 [details] [diff] [review]
Support for removing untracked files from a directory
Review of attachment 764424 [details] [diff] [review]:
-----------------------------------------------------------------
::: python/mozbuild/mozpack/copier.py
@@ +202,5 @@
> + return FileCopier.add(self, path, FilePurger.FakeFile())
> +
> + def purge(self, dest):
> + """Deletes all files and empty directories not in the registry."""
> + return FileCopier.copy(self, dest)
Not sure how to do that properly in python, but you may want to make FilePurger.copy not do anything.
::: python/mozbuild/mozpack/test/test_copier.py
@@ +136,5 @@
> + def setUp(self):
> + self.tmpdir = mkdtemp()
> +
> + def tearDown(self):
> + shutil.rmtree(self.tmpdir)
You can import TestWithTmpDir from test_files.
Attachment #764424 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•