Last active
February 26, 2019 19:29
-
-
Save staktrace/2bc58aa07c8ea45f14d5695578d0da1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./mach try fuzzy -q "'linux 'wdspec" | |
migrating saved presets from '/home/kats/.mozbuild/autotry.ini' to '/home/kats/.mozbuild/try_presets.yml' | |
warning: unknown section 'syntax', the following presets were not migrated: | |
qr-reftests = -b do -p linux64 -u reftest-e10s[linux64-qr] -t none | |
reftests = -b o -p all -u reftest -t none | |
buildall = -b do -p all -u none -t none | |
qrd-reftests = -b d -p linux64 -u reftest-e10s[linux64-qr] -t none | |
buildallopt = -b o -p all -u none -t none | |
everything = -b do -p all -u all -t all | |
fpush-linux-android = -b do -p all -u all[linux64,linux64-qr,android-em-4.3-arm7-api-16] -t none | |
linux64all = -b do -p linux64 -u all -t all | |
qr-mochi = -b do -p linux64 -u mochitest[linux64-qr] -t none | |
all = -b do -p all -u all -t none | |
mochitests = -b do -p all -u mochitest[linux64,linux64-qr,windows10-64,windows10-64-qr,macosx64,android-em-4.3-arm7-api-16] -t none | |
qr-all = -b do -p win64,linux64,macosx64 -u all[linux64-qr,windows10-64-qr,macosx64-qr] -t none | |
qr-everything = -b do -p win64,linux64,macosx64 -u all[linux64-qr,windows10-64-qr,macosx64-qr] -t all[linux64-qr,windows10-64-qr,macosx64-qr] | |
qr-try = -b do -p macosx64,linux,linux64,win64,linux64-base-toolchains -u all[linux64-qr,windows10-64-qr,macosx64-qr] -t all[linux64-qr,windows10-64-qr,macosx64-qr] | |
Task configuration changed, generating target task graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tools/tryselect/preset.py b/tools/tryselect/preset.py | |
index 93a3e22355e4..e0f6aaf44489 100644 | |
--- a/tools/tryselect/preset.py | |
+++ b/tools/tryselect/preset.py | |
@@ -71,30 +71,31 @@ def migrate_old_presets(): | |
print("migrating saved presets from '{}' to '{}'".format(old_preset_path, presets.config_path)) | |
config = ConfigParser.ConfigParser() | |
config.read(old_preset_path) | |
unknown = defaultdict(list) | |
for section in config.sections(): | |
for name, value in config.items(section): | |
kwargs = {} | |
+ selector = section | |
if section == 'fuzzy': # try fuzzy | |
kwargs['query'] = [value] | |
elif section == 'try': # try syntax | |
- section = 'syntax' | |
+ selector = 'syntax' | |
parser = SyntaxParser() | |
kwargs = vars(parser.parse_args(AutoTry.split_try_string(value))) | |
kwargs = {k: v for k, v in kwargs.items() if v != parser.get_default(k)} | |
else: | |
unknown[section].append("{} = {}".format(name, value)) | |
continue | |
- presets.save(name, selector=section, **kwargs) | |
+ presets.save(name, selector=selector, **kwargs) | |
os.remove(old_preset_path) | |
if unknown: | |
for section, values in unknown.items(): | |
print(""" | |
warning: unknown section '{}', the following presets were not migrated: | |
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment