Merge changes from topic "aconfig-remove-format-aliases" into main am: 85c9c5b81a am: ba83c9f999

Original change: https://android-review.googlesource.com/c/platform/build/+/2882368

Change-Id: I064cec5b779dc11fe86fe46a5d02761a9fa1cff5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mårten Kongstad
2023-12-21 08:14:02 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 13 deletions

View File

@@ -36,12 +36,6 @@ impl TryFrom<&str> for DumpFormat {
// protobuf formats
"protobuf" => Ok(Self::Protobuf),
"textproto" => Ok(Self::Textproto),
// old formats now implemented as aliases to custom format
"text" => Ok(Self::Custom(
"{fully_qualified_name} [{container}]: {permission} + {state}".to_owned(),
)),
// custom format
_ => Ok(Self::Custom(value.to_owned())),
}
@@ -265,12 +259,6 @@ mod tests {
"{fully_qualified_name}={permission} + {state}",
"com.android.aconfig.test.enabled_ro=READ_ONLY + ENABLED"
);
// aliases
assert_dump_parsed_flags_custom_format_contains!(
"text",
"com.android.aconfig.test.enabled_ro [system]: READ_ONLY + ENABLED"
);
}
#[test]

View File

@@ -114,7 +114,9 @@ fn cli() -> Command {
Arg::new("format")
.long("format")
.value_parser(|s: &str| DumpFormat::try_from(s))
.default_value("text"),
.default_value(
"{fully_qualified_name} [{container}]: {permission} + {state}",
),
)
.arg(
Arg::new("filter")