Warn me when I try to sync upstream tests without requesting a commit.

This default invariably wastes my time, and I'm about the only person using
the sync argument.
This commit is contained in:
Ms2ger 2016-05-30 09:34:51 +02:00
parent b11648903b
commit 3535f3f6c2

View file

@ -348,6 +348,11 @@ class MachCommands(CommandBase):
self.ensure_bootstrapped()
run_file = path.abspath(path.join("tests", "wpt", "update.py"))
kwargs["no_patch"] = not patch
if kwargs["no_patch"] and kwargs["sync"]:
print("Are you sure you don't want a patch?")
return 1
run_globals = {"__file__": run_file}
execfile(run_file, run_globals)
return run_globals["update_tests"](**kwargs)
@ -403,6 +408,11 @@ class MachCommands(CommandBase):
self.ensure_bootstrapped()
run_file = path.abspath(path.join("tests", "wpt", "update_css.py"))
kwargs["no_patch"] = not patch
if kwargs["no_patch"] and kwargs["sync"]:
print("Are you sure you don't want a patch?")
return 1
run_globals = {"__file__": run_file}
execfile(run_file, run_globals)
return run_globals["update_tests"](**kwargs)