forked from mirrors/jj
cli: status: evaluate conflicts revset as a user expression
Otherwise, it would panic if immutable_heads() contained unresolved symbols.
This commit is contained in:
parent
76b6d031d7
commit
c1d934a08a
1 changed files with 10 additions and 8 deletions
|
@ -95,14 +95,16 @@ pub(crate) fn cmd_status(
|
|||
|
||||
let wc_revset = RevsetExpression::commit(wc_commit.id().clone());
|
||||
// Ancestors with conflicts, excluding the current working copy commit.
|
||||
let ancestors_conflicts = RevsetExpression::filter(RevsetFilterPredicate::HasConflict)
|
||||
.intersection(&wc_revset.ancestors())
|
||||
.minus(&wc_revset)
|
||||
.minus(&revset_util::parse_immutable_expression(
|
||||
&workspace_command.revset_parse_context(),
|
||||
)?)
|
||||
.evaluate_programmatic(repo.as_ref())?
|
||||
.iter()
|
||||
let ancestors_conflicts = workspace_command
|
||||
.attach_revset_evaluator(
|
||||
RevsetExpression::filter(RevsetFilterPredicate::HasConflict)
|
||||
.intersection(&wc_revset.ancestors())
|
||||
.minus(&wc_revset)
|
||||
.minus(&revset_util::parse_immutable_expression(
|
||||
&workspace_command.revset_parse_context(),
|
||||
)?),
|
||||
)?
|
||||
.evaluate_to_commit_ids()?
|
||||
.collect();
|
||||
workspace_command.report_repo_conflicts(formatter, repo, ancestors_conflicts)?;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue