Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mozharness/mozilla/l10n/multi_locale_build.py

Issue 29327949: Issue 3047 - Change default search engines (Closed)
Patch Set: Limit search.order entries to 3. Created Sept. 15, 2015, 5:35 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mozharness/abb/abb_transform_locales.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # ***** BEGIN LICENSE BLOCK ***** 2 # ***** BEGIN LICENSE BLOCK *****
3 # This Source Code Form is subject to the terms of the Mozilla Public 3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 # You can obtain one at http://mozilla.org/MPL/2.0/. 5 # You can obtain one at http://mozilla.org/MPL/2.0/.
6 # ***** END LICENSE BLOCK ***** 6 # ***** END LICENSE BLOCK *****
7 """multi_locale_build.py 7 """multi_locale_build.py
8 8
9 This should be a mostly generic multilocale build script. 9 This should be a mostly generic multilocale build script.
10 """ 10 """
11 11
12 from copy import deepcopy 12 from copy import deepcopy
13 import os 13 import os
14 import sys 14 import sys
15 15
16 sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0]))) 16 sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0])))
17 17
18 from mozharness.base.errors import MakefileErrorList, SSHErrorList 18 from mozharness.base.errors import MakefileErrorList, SSHErrorList
19 from mozharness.base.log import FATAL 19 from mozharness.base.log import FATAL
20 from mozharness.base.vcs.vcsbase import MercurialScript 20 from mozharness.base.vcs.vcsbase import MercurialScript
21 from mozharness.mozilla.l10n.locales import LocalesMixin 21 from mozharness.mozilla.l10n.locales import LocalesMixin
22 from mozharness.abb.abb_transform_locales import abb_transform_locales_impl
22 23
23 24
24 # MultiLocaleBuild {{{1 25 # MultiLocaleBuild {{{1
25 class MultiLocaleBuild(LocalesMixin, MercurialScript): 26 class MultiLocaleBuild(LocalesMixin, MercurialScript):
26 """ This class targets Fennec multilocale builds. 27 """ This class targets Fennec multilocale builds.
27 We were considering this for potential Firefox desktop multilocale. 28 We were considering this for potential Firefox desktop multilocale.
28 Now that we have a different approach for B2G multilocale, 29 Now that we have a different approach for B2G multilocale,
29 it's most likely misnamed. """ 30 it's most likely misnamed. """
30 config_options = [[ 31 config_options = [[
31 ["--locale"], 32 ["--locale"],
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 def __init__(self, require_config_file=True): 97 def __init__(self, require_config_file=True):
97 LocalesMixin.__init__(self) 98 LocalesMixin.__init__(self)
98 MercurialScript.__init__(self, config_options=self.config_options, 99 MercurialScript.__init__(self, config_options=self.config_options,
99 all_actions=['clobber', 'pull-build-source', 100 all_actions=['clobber', 'pull-build-source',
100 'pull-locale-source', 101 'pull-locale-source',
101 'build', 'package-en-US', 102 'build', 'package-en-US',
102 'upload-en-US', 103 'upload-en-US',
103 'backup-objdir', 104 'backup-objdir',
104 'restore-objdir', 105 'restore-objdir',
105 'add-locales', 'package-multi', 106 'add-locales',
107 'abb-transform-locales',
108 'package-multi',
106 'upload-multi', 'summary'], 109 'upload-multi', 'summary'],
107 require_config_file=require_config_file) 110 require_config_file=require_config_file)
108 111
109 def clobber(self): 112 def clobber(self):
110 c = self.config 113 c = self.config
111 if c['work_dir'] != '.': 114 if c['work_dir'] != '.':
112 path = os.path.join(c['base_work_dir'], c['work_dir']) 115 path = os.path.join(c['base_work_dir'], c['work_dir'])
113 if os.path.exists(path): 116 if os.path.exists(path):
114 self.rmtree(path, error_level=FATAL) 117 self.rmtree(path, error_level=FATAL)
115 else: 118 else:
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 # TODO 242 # TODO
240 self.info("Not written yet.") 243 self.info("Not written yet.")
241 244
242 def _process_command(self, **kwargs): 245 def _process_command(self, **kwargs):
243 """Stub wrapper function that allows us to call scratchbox in 246 """Stub wrapper function that allows us to call scratchbox in
244 MaemoMultiLocaleBuild. 247 MaemoMultiLocaleBuild.
245 248
246 """ 249 """
247 return self.run_command(**kwargs) 250 return self.run_command(**kwargs)
248 251
252
253 def abb_transform_locales(self):
254 dirs = self.query_abs_dirs()
255 abb_transform_locales_impl(dirs['abs_objdir'], self)
256
249 # __main__ {{{1 257 # __main__ {{{1
250 if __name__ == '__main__': 258 if __name__ == '__main__':
251 pass 259 pass
OLDNEW
« no previous file with comments | « mozharness/abb/abb_transform_locales.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld