Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
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 123 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 commit is contained in:
@@ -48,13 +48,13 @@ class CompareLocales(MachCommandBase):
|
||||
try:
|
||||
self.substs # explicitly check
|
||||
if not l10n_ini:
|
||||
l10n_ini = mozpack.path.join(
|
||||
l10n_ini = mozpath.join(
|
||||
self.topsrcdir,
|
||||
self.substs['MOZ_BUILD_APP'],
|
||||
'locales', 'l10n.ini'
|
||||
)
|
||||
if not l10n_base:
|
||||
l10n_base = mozpack.path.join(
|
||||
l10n_base = mozpath.join(
|
||||
self.topsrcdir,
|
||||
self.substs['L10NBASEDIR']
|
||||
)
|
||||
@@ -67,7 +67,7 @@ class CompareLocales(MachCommandBase):
|
||||
try:
|
||||
# self.substs is raising an Exception if we're not configured
|
||||
# don't merge if we're not
|
||||
merge_dir = mozpack.path.join(
|
||||
merge_dir = mozpath.join(
|
||||
self.topobjdir,
|
||||
self.substs['MOZ_BUILD_APP'],
|
||||
'locales', 'merge-{ab_CD}'
|
||||
|
||||
Reference in New Issue
Block a user