chore(deps): upgrade to jj-lib 0.41.0
This commit is contained in:
@@ -179,20 +179,20 @@ impl JjLib {
|
||||
.map_err(|e| Error::from_revset_resolution_error(revset, e))?
|
||||
.evaluate(&*repo)
|
||||
.map_err(|e| Error::from_revset_evaluation_error(revset, e))?;
|
||||
let mut iter = revision.iter();
|
||||
let commit_id = iter
|
||||
let mut all_ids = revision.commit_change_ids();
|
||||
let commit_id = all_ids
|
||||
.next()
|
||||
.ok_or(Error::RevsetResolutionError {
|
||||
revset: revset.to_string(),
|
||||
revset: revset.into(),
|
||||
context: "No matching revision".to_string(),
|
||||
})?
|
||||
.map_err(|e| Error::from_revset_evaluation_error(revset, e))?;
|
||||
if iter.next().is_some() {
|
||||
return Err(Error::MultipleRevisions {
|
||||
match all_ids.next() {
|
||||
None => Ok(commit_id.0),
|
||||
Some(_) => Err(Error::MultipleRevisions {
|
||||
revset: revset.to_string(),
|
||||
});
|
||||
}),
|
||||
}
|
||||
Ok(commit_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user