From 3535f3f6c25b6e380d190559a5ca03ea70282fe0 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 30 May 2016 09:34:51 +0200 Subject: [PATCH] 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. --- python/servo/testing_commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 4a3e0b844bc..e42663b75e6 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -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)