aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar twerth <twerth@google.com>2018-07-12 01:28:01 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-12 01:29:16 -0700
commit1fdcd74798a3ed44bcfc90e22b4c65d59765aa82 (patch)
tree0ec303f473e0233b39375b30347fcb09f3a0ae4c
parentce8f52060e2cf1e5a49a522039f0cba2a340f7e3 (diff)
Move output option down to specific query option.
They're different anyway and we will need this to set a different default value for aquery. RELNOTES: None PiperOrigin-RevId: 204259933
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java12
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/output/CqueryOptions.java12
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/output/QueryOptions.java11
3 files changed, 23 insertions, 12 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java
index 027f8e4eb6..a87719f4d2 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java
@@ -32,18 +32,6 @@ import java.util.Set;
public class CommonQueryOptions extends OptionsBase {
@Option(
- name = "output",
- defaultValue = "label",
- documentationCategory = OptionDocumentationCategory.QUERY,
- effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
- help =
- "The format in which the query results should be printed. Allowed values for query are: "
- + "build, graph, label, label_kind, locations, maxrank, minrank, package, proto, xml."
- + "Currently you should never explicitly set this flag for cquery."
- )
- public String outputFormat;
-
- @Option(
name = "universe_scope",
defaultValue = "",
documentationCategory = OptionDocumentationCategory.QUERY,
diff --git a/src/main/java/com/google/devtools/build/lib/query2/output/CqueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/output/CqueryOptions.java
index 860e3ca9ae..c12005101a 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/output/CqueryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/output/CqueryOptions.java
@@ -37,6 +37,18 @@ public class CqueryOptions extends CommonQueryOptions {
}
@Option(
+ name = "output",
+ defaultValue = "label",
+ documentationCategory = OptionDocumentationCategory.QUERY,
+ effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
+ help =
+ "The format in which the cquery results should be printed. Allowed values for cquery "
+ + "are: label, transitions, proto. If you select 'transitions', you also have to "
+ + "specify the --transitions=(lite|full) option."
+ )
+ public String outputFormat;
+
+ @Option(
name = "transitions",
converter = TransitionsConverter.class,
defaultValue = "none",
diff --git a/src/main/java/com/google/devtools/build/lib/query2/output/QueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/output/QueryOptions.java
index fbd2644d51..862dde3001 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/output/QueryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/output/QueryOptions.java
@@ -32,6 +32,17 @@ public class QueryOptions extends CommonQueryOptions {
}
@Option(
+ name = "output",
+ defaultValue = "label",
+ documentationCategory = OptionDocumentationCategory.QUERY,
+ effectTags = {OptionEffectTag.TERMINAL_OUTPUT},
+ help =
+ "The format in which the query results should be printed. Allowed values for query are: "
+ + "build, graph, label, label_kind, locations, maxrank, minrank, package, proto, xml."
+ )
+ public String outputFormat;
+
+ @Option(
name = "null",
defaultValue = "null",
expansion = {"--line_terminator_null=true"},