diff --git a/cli/src/commands/log.rs b/cli/src/commands/log.rs index db12f6959..1b981fb89 100644 --- a/cli/src/commands/log.rs +++ b/cli/src/commands/log.rs @@ -14,7 +14,7 @@ use jj_lib::backend::CommitId; use jj_lib::repo::Repo; -use jj_lib::revset::{self, RevsetExpression, RevsetFilterPredicate, RevsetIteratorExt}; +use jj_lib::revset::{RevsetExpression, RevsetFilterPredicate, RevsetIteratorExt}; use jj_lib::revset_graph::{ ReverseRevsetGraphIterator, RevsetGraphEdgeType, TopoGroupedRevsetGraphIterator, }; @@ -262,7 +262,9 @@ pub(crate) fn cmd_log( working copy commit, pass -r '@' instead." )?; } else if revset.is_empty() - && revset::parse(only_path, &workspace_command.revset_parse_context()).is_ok() + && workspace_command + .parse_revset(&RevisionArg::from(only_path.to_owned())) + .is_ok() { writeln!( ui.warning_default(), diff --git a/cli/src/commands/squash.rs b/cli/src/commands/squash.rs index a76c2adbf..825666351 100644 --- a/cli/src/commands/squash.rs +++ b/cli/src/commands/squash.rs @@ -18,7 +18,6 @@ use jj_lib::matchers::Matcher; use jj_lib::merged_tree::MergedTree; use jj_lib::object_id::ObjectId; use jj_lib::repo::Repo; -use jj_lib::revset; use jj_lib::settings::UserSettings; use tracing::instrument; @@ -234,11 +233,10 @@ from the source will be moved into the destination. if let [only_path] = path_arg { if no_rev_arg - && revset::parse( - only_path, - &tx.base_workspace_helper().revset_parse_context(), - ) - .is_ok() + && tx + .base_workspace_helper() + .parse_revset(&RevisionArg::from(only_path.to_owned())) + .is_ok() { writeln!( ui.warning_default(),