mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 17:41:14 +00:00
cli: map RevsetError to CommandError early
I'm going to split RevsetError into symbol resolution and evaluation errors, and evaluate_revset() is the only place where CLI crate explicitly specifies RevsetError type.
This commit is contained in:
parent
6c5947181d
commit
f2e0836b1e
1 changed files with 2 additions and 2 deletions
|
@ -865,13 +865,13 @@ impl WorkspaceCommandHelper {
|
|||
pub fn evaluate_revset<'repo>(
|
||||
&'repo self,
|
||||
revset_expression: Rc<RevsetExpression>,
|
||||
) -> Result<Box<dyn Revset<'repo> + 'repo>, RevsetError> {
|
||||
) -> Result<Box<dyn Revset<'repo> + 'repo>, CommandError> {
|
||||
let revset_expression = resolve_symbols(
|
||||
self.repo.as_ref(),
|
||||
revset_expression,
|
||||
Some(&self.revset_context()),
|
||||
)?;
|
||||
revset_expression.evaluate(self.repo.as_ref())
|
||||
Ok(revset_expression.evaluate(self.repo.as_ref())?)
|
||||
}
|
||||
|
||||
fn revset_context(&self) -> RevsetWorkspaceContext {
|
||||
|
|
Loading…
Reference in a new issue