Backed out changeset efec1285a2a1 (bug 1281570) as part of the backout of bug 1258451

MozReview-Commit-ID: KaUcqC4Es6Z
This commit is contained in:
Chris Manchester 2016-06-29 13:12:17 -07:00
Родитель d15aac196c
Коммит a035970fe6
2 изменённых файлов: 5 добавлений и 17 удалений

Просмотреть файл

@ -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):