chore(deps): upgrade jj-lib to 0.42.0
Run checks and build archives / coverage-and-sonar (push) Successful in 7m31s
Run checks and build archives / build (windows-x86_64) (push) Successful in 6m19s
Run checks and build archives / build (linux-aarch64) (push) Successful in 4m45s
Run checks and build archives / build (linux-x86_64) (push) Successful in 8m13s
Run checks and build archives / coverage-and-sonar (push) Successful in 7m31s
Run checks and build archives / build (windows-x86_64) (push) Successful in 6m19s
Run checks and build archives / build (linux-aarch64) (push) Successful in 4m45s
Run checks and build archives / build (linux-x86_64) (push) Successful in 8m13s
This commit is contained in:
@@ -10,6 +10,7 @@ use std::{
|
||||
};
|
||||
|
||||
use etcetera::BaseStrategy;
|
||||
use futures_util::StreamExt;
|
||||
use jj_lib::{
|
||||
backend::CommitId,
|
||||
config::{ConfigSource, StackedConfig},
|
||||
@@ -151,7 +152,7 @@ impl JjLib {
|
||||
}
|
||||
|
||||
/// Resolve a revset string to a commit ID
|
||||
fn get_commit_id(&self, revset: &str) -> Result<CommitId, Error> {
|
||||
async fn get_commit_id(&self, revset: &str) -> Result<CommitId, Error> {
|
||||
let context = RevsetParseContext {
|
||||
workspace: Some(RevsetWorkspaceContext {
|
||||
workspace_name: &self.workspace_name,
|
||||
@@ -182,12 +183,13 @@ impl JjLib {
|
||||
let mut all_ids = revision.commit_change_ids();
|
||||
let commit_id = all_ids
|
||||
.next()
|
||||
.await
|
||||
.ok_or(Error::RevsetResolutionError {
|
||||
revset: revset.into(),
|
||||
context: "No matching revision".to_string(),
|
||||
})?
|
||||
.map_err(|e| Error::from_revset_evaluation_error(revset, e))?;
|
||||
match all_ids.next() {
|
||||
match all_ids.next().await {
|
||||
None => Ok(commit_id.0),
|
||||
Some(_) => Err(Error::MultipleRevisions {
|
||||
revset: revset.to_string(),
|
||||
@@ -212,7 +214,7 @@ impl JjExecutor for JjLib {
|
||||
}
|
||||
|
||||
async fn describe(&self, revset: &str, message: &str) -> Result<(), Error> {
|
||||
let commit_id = self.get_commit_id(revset)?;
|
||||
let commit_id = self.get_commit_id(revset).await?;
|
||||
let repo = self.repo.lock()?.clone();
|
||||
let mut tx = repo.start_transaction();
|
||||
let commit = tx
|
||||
@@ -251,7 +253,7 @@ impl JjExecutor for JjLib {
|
||||
}
|
||||
|
||||
async fn get_description(&self, revset: &str) -> Result<String, Error> {
|
||||
let commit_id = self.get_commit_id(revset)?;
|
||||
let commit_id = self.get_commit_id(revset).await?;
|
||||
let repo = self.repo.lock()?.clone();
|
||||
let commit = repo
|
||||
.store()
|
||||
|
||||
Reference in New Issue
Block a user