Backed out changeset a57aed49dc58 (bug 1524639) for beetmover bustages. a=backout
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import io
|
||||
import os.path
|
||||
import json
|
||||
from datetime import datetime
|
||||
@@ -23,9 +22,6 @@ from voluptuous import (
|
||||
Schema,
|
||||
)
|
||||
|
||||
import six
|
||||
from six import text_type
|
||||
|
||||
from . import GECKO
|
||||
from .util.attributes import release_level
|
||||
|
||||
@@ -36,11 +32,11 @@ class ParameterMismatch(Exception):
|
||||
|
||||
@memoize
|
||||
def get_head_ref():
|
||||
return six.ensure_text(get_repository_object(GECKO).head_ref)
|
||||
return get_repository_object(GECKO).head_ref
|
||||
|
||||
|
||||
def get_contents(path):
|
||||
with io.open(path, "r") as fh:
|
||||
with open(path, "r") as fh:
|
||||
contents = fh.readline().rstrip()
|
||||
return contents
|
||||
|
||||
@@ -58,48 +54,48 @@ def get_app_version(product_dir='browser'):
|
||||
|
||||
|
||||
base_schema = {
|
||||
Required('app_version'): text_type,
|
||||
Required('base_repository'): text_type,
|
||||
Required('app_version'): basestring,
|
||||
Required('base_repository'): basestring,
|
||||
Required('build_date'): int,
|
||||
Required('build_number'): int,
|
||||
Inclusive('comm_base_repository', 'comm'): text_type,
|
||||
Inclusive('comm_head_ref', 'comm'): text_type,
|
||||
Inclusive('comm_head_repository', 'comm'): text_type,
|
||||
Inclusive('comm_head_rev', 'comm'): text_type,
|
||||
Required('do_not_optimize'): [text_type],
|
||||
Required('existing_tasks'): {text_type: text_type},
|
||||
Required('filters'): [text_type],
|
||||
Required('head_ref'): text_type,
|
||||
Required('head_repository'): text_type,
|
||||
Required('head_rev'): text_type,
|
||||
Required('hg_branch'): text_type,
|
||||
Required('level'): text_type,
|
||||
Required('message'): text_type,
|
||||
Required('moz_build_date'): text_type,
|
||||
Required('next_version'): Any(None, text_type),
|
||||
Inclusive('comm_base_repository', 'comm'): basestring,
|
||||
Inclusive('comm_head_ref', 'comm'): basestring,
|
||||
Inclusive('comm_head_repository', 'comm'): basestring,
|
||||
Inclusive('comm_head_rev', 'comm'): basestring,
|
||||
Required('do_not_optimize'): [basestring],
|
||||
Required('existing_tasks'): {basestring: basestring},
|
||||
Required('filters'): [basestring],
|
||||
Required('head_ref'): basestring,
|
||||
Required('head_repository'): basestring,
|
||||
Required('head_rev'): basestring,
|
||||
Required('hg_branch'): basestring,
|
||||
Required('level'): basestring,
|
||||
Required('message'): basestring,
|
||||
Required('moz_build_date'): basestring,
|
||||
Required('next_version'): Any(None, basestring),
|
||||
Required('optimize_target_tasks'): bool,
|
||||
Required('owner'): text_type,
|
||||
Required('phabricator_diff'): Any(None, text_type),
|
||||
Required('project'): text_type,
|
||||
Required('owner'): basestring,
|
||||
Required('phabricator_diff'): Any(None, basestring),
|
||||
Required('project'): basestring,
|
||||
Required('pushdate'): int,
|
||||
Required('pushlog_id'): text_type,
|
||||
Required('pushlog_id'): basestring,
|
||||
Required('release_enable_emefree'): bool,
|
||||
Required('release_enable_partners'): bool,
|
||||
Required('release_eta'): Any(None, text_type),
|
||||
Required('release_history'): {text_type: dict},
|
||||
Required('release_partners'): Any(None, [text_type]),
|
||||
Required('release_eta'): Any(None, basestring),
|
||||
Required('release_history'): {basestring: dict},
|
||||
Required('release_partners'): Any(None, [basestring]),
|
||||
Required('release_partner_config'): Any(None, dict),
|
||||
Required('release_partner_build_number'): int,
|
||||
Required('release_type'): text_type,
|
||||
Required('release_product'): Any(None, text_type),
|
||||
Required('required_signoffs'): [text_type],
|
||||
Required('release_type'): basestring,
|
||||
Required('release_product'): Any(None, basestring),
|
||||
Required('required_signoffs'): [basestring],
|
||||
Required('signoff_urls'): dict,
|
||||
Required('target_tasks_method'): text_type,
|
||||
Required('tasks_for'): text_type,
|
||||
Required('try_mode'): Any(None, text_type),
|
||||
Required('target_tasks_method'): basestring,
|
||||
Required('tasks_for'): basestring,
|
||||
Required('try_mode'): Any(None, basestring),
|
||||
Required('try_options'): Any(None, dict),
|
||||
Required('try_task_config'): dict,
|
||||
Required('version'): text_type,
|
||||
Required('version'): basestring,
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +139,7 @@ class Parameters(ReadOnlyDict):
|
||||
'hg_branch': 'default',
|
||||
'level': '3',
|
||||
'message': '',
|
||||
'moz_build_date': six.ensure_text(now.strftime("%Y%m%d%H%M%S")),
|
||||
'moz_build_date': now.strftime("%Y%m%d%H%M%S"),
|
||||
'next_version': None,
|
||||
'optimize_target_tasks': True,
|
||||
'owner': 'nobody@mozilla.com',
|
||||
@@ -204,10 +200,10 @@ class Parameters(ReadOnlyDict):
|
||||
Determine the VCS URL for viewing a file in the tree, suitable for
|
||||
viewing by a human.
|
||||
|
||||
:param text_type path: The path, relative to the root of the repository.
|
||||
:param basestring path: The path, relative to the root of the repository.
|
||||
:param bool pretty: Whether to return a link to a formatted version of the
|
||||
file, or the raw file version.
|
||||
:return text_type: The URL displaying the given path.
|
||||
:return basestring: The URL displaying the given path.
|
||||
"""
|
||||
if path.startswith('comm/'):
|
||||
path = path[len('comm/'):]
|
||||
|
||||
Reference in New Issue
Block a user