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

Delta Between Two Patch Sets: build.py

Issue 29562599: Issue 5751 - Removing legacy gecko support (Closed)
Left Patch Set: Removed "="-parsing in import_locales, addressed comments Created Oct. 9, 2017, 11:06 p.m.
Right Patch Set: Rebase against current master ( 489:293593da6033 ) Created Oct. 10, 2017, 9:25 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « LocaleTester.pm ('k') | lib/hooks.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import shutil 9 import shutil
10 from getopt import getopt, GetoptError 10 from getopt import getopt, GetoptError
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 devenv_dir = getDevEnvPath(baseDir, type) 211 devenv_dir = getDevEnvPath(baseDir, type)
212 212
213 shutil.rmtree(devenv_dir, ignore_errors=True) 213 shutil.rmtree(devenv_dir, ignore_errors=True)
214 214
215 file.seek(0) 215 file.seek(0)
216 with ZipFile(file, 'r') as zip_file: 216 with ZipFile(file, 'r') as zip_file:
217 zip_file.extractall(devenv_dir) 217 zip_file.extractall(devenv_dir)
218 218
219 219
220 def readLocaleConfig(baseDir, type, metadata): 220 def readLocaleConfig(baseDir, type, metadata):
221 if type != 'generic': 221 if type != 'generic':
Vasily Kuznetsov 2017/10/10 12:44:33 We could swap the branches of this if statement to
tlucas 2017/10/10 12:50:13 Well, imho the "not generic" platforms are those m
222 import buildtools.packagerChrome as packager 222 import buildtools.packagerChrome as packager
223 localeDir = os.path.join(baseDir, '_locales') 223 localeDir = os.path.join(baseDir, '_locales')
224 localeConfig = { 224 localeConfig = {
225 'default_locale': packager.defaultLocale, 225 'default_locale': packager.defaultLocale,
226 } 226 }
227 else: 227 else:
228 localeDir = os.path.join( 228 localeDir = os.path.join(
229 baseDir, *metadata.get('locales', 'base_path').split('/') 229 baseDir, *metadata.get('locales', 'base_path').split('/')
230 ) 230 )
231 localeConfig = { 231 localeConfig = {
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 if option in ('-h', '--help'): 508 if option in ('-h', '--help'):
509 usage(scriptName, type, command) 509 usage(scriptName, type, command)
510 sys.exit() 510 sys.exit()
511 commands[command](baseDir, scriptName, opts, args, type) 511 commands[command](baseDir, scriptName, opts, args, type)
512 else: 512 else:
513 print 'Command %s is not supported for this application type' % comm and 513 print 'Command %s is not supported for this application type' % comm and
514 usage(scriptName, type) 514 usage(scriptName, type)
515 else: 515 else:
516 print 'Command %s is unrecognized' % command 516 print 'Command %s is unrecognized' % command
517 usage(scriptName, type) 517 usage(scriptName, type)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld