Skip to content

Commit

Permalink
Add include/excluded suffixes args to changesSince CLI
Browse files Browse the repository at this point in the history
Summary:
# Context

We are introducing EdenFS notifications to support scalable and ergonomic file system notifications for EdenFS mounts.

# This Diff

This diff updates the CLI to include the suffix arguments. Currently they are not being used inside the trhift call

# Technical Details
Adds new args to the rust CLI

# Discussion Points

Reviewed By: jdelliot

Differential Revision: D67715737

fbshipit-source-id: 86f038deb0be0b0936c09357e45a497d0af1bb81
  • Loading branch information
Chris Dinh authored and facebook-github-bot committed Jan 2, 2025
1 parent fe01965 commit 9711d39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eden/fs/cli_rs/edenfs-client/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ impl EdenFsInstance {
include_vcs_roots: bool,
included_roots: &Option<Vec<PathBuf>>,
excluded_roots: &Option<Vec<PathBuf>>,
included_suffixes: &Option<Vec<String>>,
excluded_suffixes: &Option<Vec<String>>,
timeout: Option<Duration>,
) -> Result<crate::types::ChangesSinceV2Result> {
let client = self.get_connected_thrift_client(timeout).await?;
Expand All @@ -290,6 +292,8 @@ impl EdenFsInstance {
.map(|er| bytes_from_path(er.to_path_buf()).expect("Invalid excluded_roots"))
.collect::<Vec<_>>()
}),
includedSuffixes: included_suffixes.clone(),
excludedSuffixes: excluded_suffixes.clone(),
..Default::default()
};
client
Expand Down
14 changes: 14 additions & 0 deletions eden/fs/cli_rs/edenfs-commands/src/notify/changes_since.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ pub struct ChangesSinceCmd {
)]
excluded_roots: Option<Vec<PathBuf>>,

#[clap(
long,
help = "Included suffixes in the output. None means include all suffixes"
)]
included_suffixes: Option<Vec<String>>,

#[clap(
long,
help = "Excluded suffixes in the output. None means exclude no suffixes"
)]
excluded_suffixes: Option<Vec<String>>,

#[clap(long, help = "Print the output in JSON format")]
json: bool,
}
Expand All @@ -67,6 +79,8 @@ impl crate::Subcommand for ChangesSinceCmd {
self.include_vcs_roots,
&self.included_roots,
&self.excluded_roots,
&self.included_suffixes,
&self.excluded_suffixes,
None,
)
.await?;
Expand Down

0 comments on commit 9711d39

Please sign in to comment.