зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset efec1285a2a1 (bug 1281570) as part of the backout of bug 1258451
MozReview-Commit-ID: KaUcqC4Es6Z
This commit is contained in:
Родитель
d15aac196c
Коммит
a035970fe6
|
@ -485,7 +485,6 @@ class JsapiTestsCommand(MachCommandBase):
|
|||
return jsapi_tests_result
|
||||
|
||||
def autotry_parser():
|
||||
print("mach try is under development, please file bugs blocking 1149670.")
|
||||
from autotry import arg_parser
|
||||
return arg_parser()
|
||||
|
||||
|
@ -615,6 +614,8 @@ class PushToTry(MachCommandBase):
|
|||
from mozbuild.testing import TestResolver
|
||||
from autotry import AutoTry
|
||||
|
||||
print("mach try is under development, please file bugs blocking 1149670.")
|
||||
|
||||
resolver_func = lambda: self._spawn(TestResolver)
|
||||
at = AutoTry(self.topsrcdir, resolver_func, self._mach_context)
|
||||
|
||||
|
|
|
@ -9,29 +9,16 @@ import re
|
|||
import subprocess
|
||||
import sys
|
||||
import which
|
||||
import difflib
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
import ConfigParser
|
||||
|
||||
def validate_choices(values, choices):
|
||||
valid = True
|
||||
for value in values:
|
||||
corrections = difflib.get_close_matches(value, choices)
|
||||
if len(corrections) == 0:
|
||||
print 'Potentially invalid choice {v!r}. Neither the requested value nor a similar value was found.'.format(v=value)
|
||||
print 'List of possible values: {c!r}'.format(c=choices)
|
||||
result = raw_input('Are you sure you want to continue? [y/N] ').strip()
|
||||
if not 'y' in result.lower():
|
||||
valid = False
|
||||
elif corrections[0] == value:
|
||||
continue
|
||||
else:
|
||||
valid = False
|
||||
print 'Invalid choice {v!r}. Some suggestions (limit three): {c!r}?'.format(v=value, c=corrections)
|
||||
if not valid:
|
||||
sys.exit(1)
|
||||
if value not in choices:
|
||||
print 'Invalid choice {v!r}. Allowed choices: {c!r}'.format(v=value, c=choices)
|
||||
sys.exit(1)
|
||||
|
||||
class ValidatePlatforms(argparse.Action):
|
||||
def __call__(self, parser, args, values, option_string=None):
|
||||
|
|
Загрузка…
Ссылка в новой задаче