diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd3fd9f0..de6cbb002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). * The following deprecated revset functions have been removed: - `branches()`, `remote_branches()`, `tracked_remote_branches()`, and `untracked_remote_branches()`, which were renamed to "bookmarks". + - `file()` and `conflict()`, which were renamed to plural forms. * The following deprecated template functions have been removed: - `branches()`, `local_branches()`, and `remote_branches()`, which were diff --git a/lib/src/revset.rs b/lib/src/revset.rs index 02af90740..5b8769553 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -871,13 +871,6 @@ static BUILTIN_FUNCTION_MAP: Lazy> = Lazy: Ok(RevsetExpression::is_empty()) }); map.insert("files", |diagnostics, function, context| { - // TODO: Remove in jj 0.28+ - if function.name != "files" { - diagnostics.add_warning(RevsetParseError::expression( - "file() is deprecated; use files() instead", - function.name_span, - )); - } let ctx = context.workspace.as_ref().ok_or_else(|| { RevsetParseError::with_span( RevsetParseErrorKind::FsPathWithoutWorkspace, @@ -898,8 +891,6 @@ static BUILTIN_FUNCTION_MAP: Lazy> = Lazy: let expr = FilesetExpression::union_all(file_expressions); Ok(RevsetExpression::filter(RevsetFilterPredicate::File(expr))) }); - // TODO: Remove in jj 0.28+ - map.insert("file", map["files"]); map.insert("diff_contains", |diagnostics, function, context| { let ([text_arg], [files_opt_arg]) = function.expect_arguments()?; let text = expect_string_pattern(diagnostics, text_arg)?; @@ -920,19 +911,10 @@ static BUILTIN_FUNCTION_MAP: Lazy> = Lazy: RevsetFilterPredicate::DiffContains { text, files }, )) }); - map.insert("conflicts", |diagnostics, function, _context| { - // TODO: Remove in jj 0.28+ - if function.name != "conflicts" { - diagnostics.add_warning(RevsetParseError::expression( - "conflict() is deprecated; use conflicts() instead", - function.name_span, - )); - } + map.insert("conflicts", |_diagnostics, function, _context| { function.expect_no_arguments()?; Ok(RevsetExpression::filter(RevsetFilterPredicate::HasConflict)) }); - // TODO: Remove in jj 0.28+ - map.insert("conflict", map["conflicts"]); map.insert("present", |diagnostics, function, context| { let [arg] = function.expect_exact_arguments()?; let expression = lower_expression(diagnostics, arg, context)?;