Bug 1413928 - [tryselect] Create a new argument group for 'task' arguments draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 02 Nov 2017 16:03:38 -0400
changeset 721649 a6d8b0561c73c8e0b0aa45a4010a8c5123d99d31
parent 721648 7f01b1d20ec09a92aee96e753246fdf122a02a55
child 721650 3a6a4e2040eda4f2451f9e1523daa8ddad2301a7
push id95907
push userahalberstadt@mozilla.com
push dateWed, 17 Jan 2018 16:49:49 +0000
bugs1413928
milestone59.0a1
Bug 1413928 - [tryselect] Create a new argument group for 'task' arguments This simply groups arguments related to generating the list of tasks from taskgraph into their own argument group. MozReview-Commit-ID: IHRXXi5mB4G
tools/tryselect/cli.py
tools/tryselect/selectors/fuzzy.py
--- a/tools/tryselect/cli.py
+++ b/tools/tryselect/cli.py
@@ -53,16 +53,29 @@ COMMON_ARGUMENT_GROUPS = {
         [['--edit-presets'],
          {'action': 'store_const',
           'const': 'edit_presets',
           'dest': 'mod_presets',
           'default': None,
           'help': 'Edit the preset file.',
           }],
     ],
+    'task': [
+        [['--full'],
+         {'action': 'store_true',
+          'default': False,
+          'help': "Use the full set of tasks as input to fzf (instead of "
+                  "target tasks).",
+          }],
+        [['-p', '--parameters'],
+         {'default': None,
+          'help': "Use the given parameters.yml to generate tasks, "
+                  "defaults to latest parameters.yml from mozilla-central",
+          }],
+    ],
 }
 
 
 class BaseTryParser(ArgumentParser):
     name = 'try'
     common_groups = ['push', 'preset']
     arguments = []
     templates = []
--- a/tools/tryselect/selectors/fuzzy.py
+++ b/tools/tryselect/selectors/fuzzy.py
@@ -81,28 +81,18 @@ class FuzzyParser(BaseTryParser):
                   "interface. Equivalent to typing <query><ctrl-a><enter> "
                   "from the interface.",
           }],
         [['-u', '--update'],
          {'action': 'store_true',
           'default': False,
           'help': "Update fzf before running.",
           }],
-        [['--full'],
-         {'action': 'store_true',
-          'default': False,
-          'help': "Use the full set of tasks as input to fzf (instead of "
-                  "target tasks).",
-          }],
-        [['-p', '--parameters'],
-         {'default': None,
-          'help': "Use the given parameters.yml to generate tasks, "
-                  "defaults to latest parameters.yml from mozilla-central",
-          }],
     ]
+    common_groups = ['push', 'task', 'preset']
     templates = ['artifact', 'env', 'rebuild']
 
 
 def run(cmd, cwd=None):
     is_win = platform.system() == 'Windows'
     return subprocess.call(cmd, cwd=cwd, shell=True if is_win else False)