Backed out changeset 7fc37806848f (
bug 1400425) for flake8 issues a=backout
MozReview-Commit-ID: 7EI7PgX4YoS
--- a/tools/tryselect/mach_commands.py
+++ b/tools/tryselect/mach_commands.py
@@ -138,31 +138,16 @@ class TrySelect(MachCommandBase):
For example:
^start 'exact | !ignore fuzzy end$
"""
from tryselect.selectors.fuzzy import run_fuzzy_try
return run_fuzzy_try(**kwargs)
@SubCommand('try',
- 'empty',
- description='Push to try without scheduling any tasks.')
- def try_empty(self):
- """Push to try, running no builds or tests
-
- This selector does not prompt you to run anything, it just pushes
- your patches to try, running no builds or tests by default. After
- the push finishes, you can manually add desired jobs to your push
- via Treeherder's Add New Jobs feature, located in the per-push
- menu.
- """
- from tryselect.selectors.empty import run_empty_try
- return run_empty_try()
-
- @SubCommand('try',
'syntax',
description='Select tasks on try using try syntax',
parser=syntax_parser)
def try_syntax(self, **kwargs):
"""Push the current tree to try, with the specified syntax.
Build options, platforms and regression tests may be selected
using the usual try options (-b, -p and -u respectively). In
deleted file mode 100644
--- a/tools/tryselect/selectors/empty.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from __future__ import absolute_import, print_function, unicode_literals
-
-import platform
-import subprocess
-
-from ..vcs import VCSHelper
-
-
-def run_empty_try():
- vcs = VCSHelper.create()
- return vcs.push_to_try("empty", "", [])
--- a/tools/tryselect/vcs.py
+++ b/tools/tryselect/vcs.py
@@ -98,17 +98,17 @@ class VCSHelper(object):
sys.exit(1)
def push_to_try(self, method, msg, labels=None, templates=None, push=True):
commit_message = '%s\n\nPushed via `mach try %s`' % (msg, method)
self.check_working_directory(push)
config = None
- if labels or labels == []:
+ if labels:
config = self.write_task_config(labels, templates)
try:
if not push:
print("Commit message:")
print(commit_message)
if config:
print("Calculated try_task_config.json:")