Closed Bug 1147283 Opened 5 years ago Closed 5 years ago
.path with mozpath
No description provided.
Back when mozpack.path was added, it was used as: import mozpack.path mozpack.path.func() Nowadays, the common idiom is: import mozpack.path as mozpath mozpath.func() because it's shorter. $ git grep mozpath\\. | wc -l 423 $ git grep mozpack.path\\. | wc -l 121 This change was done with: $ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g' $ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/' $ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
This was originally done on top of local changes to l10n.py that removed two uses of mozpack.path. Reordered my patch queue.
Comment on attachment 8583465 [details] [diff] [review] Replace mozpack.path with mozpath >diff --git a/python/mozbuild/mozbuild/backend/mach_commands.py b/python/mozbuild/mozbuild/backend/mach_commands.py >+import mozpack.path as mozpath This one appears to be unused. >diff --git a/python/mozbuild/mozpack/copier.py b/python/mozbuild/mozpack/copier.py > def match(self, pattern): > ''' > Return the list of paths, stored in the container, matching the >- given pattern. See the mozpack.path.match documentation for a >+ given pattern. See the mozpath.match documentation for a Should the comments still reference mozpack.path.match? There's a few of these in a couple different files.
Attachment #8583465 - Flags: review?(mshal) → review+
Comment on attachment 8583465 [details] [diff] [review] Replace mozpack.path with mozpath Ah I missed this one, asking for approval because its required for bug 1147207. See approval comment there for reasoning.
Comment on attachment 8583465 [details] [diff] [review] Replace mozpack.path with mozpath Should be in 38 beta 3
You need to log in before you can comment on or make changes to this bug.