Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions cli/src/command/experimental.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ impl Command for ExperimentalCommand {
ExperimentalCommands::Update(cmd) => cmd.execute(ctx),
ExperimentalCommands::Chown(cmd) => cmd.execute(ctx),
ExperimentalCommands::Chmod(cmd) => cmd.execute(ctx),
ExperimentalCommands::Xattr(cmd) => {
log::warn!(
"`{0} experimental xattr` subcommand was stabilized, use `{0} xattr` instead. this command will be removed in the future.",
std::env::current_exe()
.ok()
.and_then(|it| it.file_name().map(|n| n.to_os_string()))
.unwrap_or_default()
.to_string_lossy()
);
cmd.execute(ctx)
}
ExperimentalCommands::Acl(cmd) => cmd.execute(ctx),
ExperimentalCommands::Migrate(cmd) => cmd.execute(ctx),
ExperimentalCommands::Chunk(cmd) => cmd.execute(ctx),
Expand Down Expand Up @@ -59,10 +48,6 @@ pub(crate) enum ExperimentalCommands {
Chown(command::chown::ChownCommand),
#[command(about = "Change mode")]
Chmod(command::chmod::ChmodCommand),
#[command(
about = "Manipulate extended attributes (stabilized, use `pna xattr` command instead. this command will be removed in the future)"
)]
Xattr(command::xattr::XattrCommand),
#[command(about = "Manipulate ACLs of entries")]
Acl(command::acl::AclCommand),
#[command(about = "Migrate old format to latest format")]
Expand Down
10 changes: 2 additions & 8 deletions cli/tests/cli/xattr/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,13 @@ fn xattr_get_dump() {
}
// Sort entries for stablize entries order.
let mut cmd = cargo_bin_cmd!("pna");
cmd.args([
"--quiet",
"experimental",
"sort",
"xattr_get_dump/xattr_get_dump.pna",
])
.assert();
cmd.args(["--quiet", "sort", "xattr_get_dump/xattr_get_dump.pna"])
.assert();

let mut cmd = cargo_bin_cmd!("pna");
let assert = cmd
.args([
"--quiet",
"experimental",
"xattr",
"get",
"xattr_get_dump/xattr_get_dump.pna",
Expand Down
18 changes: 4 additions & 14 deletions cli/tests/cli/xattr/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,14 @@ fn xattr_get_name_match_encoding() {
.unwrap();

// Sort entries for stablize entries order.
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"sort",
"-f",
"xattr_get_opts/archive.pna",
])
.unwrap()
.execute()
.unwrap();
cli::Cli::try_parse_from(["pna", "--quiet", "sort", "-f", "xattr_get_opts/archive.pna"])
.unwrap()
.execute()
.unwrap();

cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_get_opts/archive.pna",
Expand All @@ -53,7 +45,6 @@ fn xattr_get_name_match_encoding() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_get_opts/archive.pna",
Expand Down Expand Up @@ -98,7 +89,6 @@ fn xattr_get_name_match_encoding() {
let assert = cmd
.args([
"--quiet",
"experimental",
"xattr",
"get",
"xattr_get_opts/archive.pna",
Expand Down
2 changes: 0 additions & 2 deletions cli/tests/cli/xattr/missing_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ fn fail_with_missing_file_get() {
let result = cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"get",
"xattr_missing/archive.pna",
Expand Down Expand Up @@ -53,7 +52,6 @@ fn fail_with_missing_file_set() {
let result = cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_missing_set/archive.pna",
Expand Down
2 changes: 0 additions & 2 deletions cli/tests/cli/xattr/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ fn archive_xattr_remove() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_remove/xattr_remove.pna",
Expand Down Expand Up @@ -50,7 +49,6 @@ fn archive_xattr_remove() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_remove/xattr_remove.pna",
Expand Down
1 change: 0 additions & 1 deletion cli/tests/cli/xattr/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ fn xattr_set_restore() {
));
cmd.args([
"--quiet",
"experimental",
"xattr",
"set",
"xattr_set_restore/xattr_set_restore.pna",
Expand Down
5 changes: 0 additions & 5 deletions cli/tests/cli/xattr/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ fn archive_xattr_set() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_set/xattr_set.pna",
Expand Down Expand Up @@ -70,7 +69,6 @@ fn xattr_long_key_value() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_long/xattr_long.pna",
Expand All @@ -86,7 +84,6 @@ fn xattr_long_key_value() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_long/xattr_long.pna",
Expand Down Expand Up @@ -139,7 +136,6 @@ fn xattr_empty_key() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_empty_key/xattr_empty_key.pna",
Expand Down Expand Up @@ -183,7 +179,6 @@ fn xattr_empty_value() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_empty_value/xattr_empty_value.pna",
Expand Down
3 changes: 0 additions & 3 deletions cli/tests/cli/xattr/set_and_remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ fn xattr_multiple_set_and_remove() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_multi/xattr_multi.pna",
Expand All @@ -40,7 +39,6 @@ fn xattr_multiple_set_and_remove() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_multi/xattr_multi.pna",
Expand All @@ -58,7 +56,6 @@ fn xattr_multiple_set_and_remove() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_multi/xattr_multi.pna",
Expand Down
1 change: 0 additions & 1 deletion cli/tests/cli/xattr/set_base64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ fn xattr_set_base64() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_set_base64/xattr_set_base64.pna",
Expand Down
1 change: 0 additions & 1 deletion cli/tests/cli/xattr/set_hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ fn xattr_set_hex() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_set_hex/xattr_set_hex.pna",
Expand Down
2 changes: 0 additions & 2 deletions cli/tests/cli/xattr/set_overwrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ fn xattr_overwrite() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_overwrite/xattr_overwrite.pna",
Expand All @@ -36,7 +35,6 @@ fn xattr_overwrite() {
cli::Cli::try_parse_from([
"pna",
"--quiet",
"experimental",
"xattr",
"set",
"xattr_overwrite/xattr_overwrite.pna",
Expand Down
Loading