chore: Update to radicle 0.16.1

This commit is contained in:
Erik Kundt
2025-07-29 10:52:37 +02:00
parent 227bd3b15b
commit 2057d49a96
9 changed files with 585 additions and 206 deletions
Generated
+550 -159
View File
File diff suppressed because it is too large Load Diff
+18 -9
View File
@@ -24,7 +24,10 @@ required-features = ["bin"]
[dependencies]
ansi-to-tui = { version = "7.0.0" }
anyhow = { version = "1" }
inquire = { version = "0.7.4", default-features = false, features = ["termion", "editor"] }
inquire = { version = "0.7.4", default-features = false, features = [
"termion",
"editor",
] }
lexopt = { version = "0.3.0" }
fuzzy-matcher = "0.3.7"
homedir = { version = "0.3.3" }
@@ -32,12 +35,16 @@ lazy_static = { version = "1.5.0" }
libc = { version = "^0.2" }
log = { version = "0.4.19" }
nom = { version = "^7.1.0" }
radicle = { version = "0.14.0" }
radicle-term = { version = "0.12.0" }
radicle-cli = { version = "0.12.1" }
radicle = { version = "0.16.1" }
radicle-term = { version = "0.13.0" }
radicle-cli = { version = "0.14.0" }
radicle-surf = { version = "0.22.0" }
radicle-signals = { version = "0.10.0" }
ratatui = { version = "0.29.0", default-features = false, features = ["all-widgets", "termion", "serde"] }
radicle-signals = { version = "0.11.0" }
ratatui = { version = "0.29.0", default-features = false, features = [
"all-widgets",
"termion",
"serde",
] }
md5 = { version = "0.7.0" }
simple-logging = { version = "2.0.2" }
serde = { version = "1.0", features = ["derive"] }
@@ -50,18 +57,20 @@ textwrap = { version = "0.16.0" }
thiserror = { version = "1" }
tokio = { version = "1.32.0", features = ["full"] }
tokio-stream = { version = "0.1.14" }
tui-textarea = { version = "0.7.0", default-features = false, features = ["termion"] }
tui-textarea = { version = "0.7.0", default-features = false, features = [
"termion",
] }
tui-tree-widget = { version = "0.23.0" }
[dev-dependencies]
assert_cmd = "2.0.14"
predicates = "3.1.0"
pretty_assertions = "^1.4.1"
radicle = { version = "0.14.0", features = ["test"]}
radicle = { version = "0.16.1", features = ["test"] }
radicle-git-ext = { version = "0.8.0", features = ["serde"] }
[dev-dependencies.git2]
version = "0.19.0"
default-features = false
features = ["vendored-libgit2"]
features = ["vendored-libgit2"]
+1 -24
View File
@@ -4,10 +4,9 @@ use std::fmt::Write as _;
use anyhow::Result;
use radicle::cob::issue::{Issue, IssueId};
use radicle::cob::Label;
use radicle::issue::cache::Issues;
use radicle::issue::State;
use radicle::prelude::{Did, Signer};
use radicle::prelude::Did;
use radicle::storage::git::Repository;
use radicle::Profile;
@@ -81,28 +80,6 @@ pub fn all(profile: &Profile, repository: &Repository) -> Result<Vec<(IssueId, I
Ok(issues.flatten().collect())
}
#[allow(dead_code)]
pub fn find(profile: &Profile, repository: &Repository, id: &IssueId) -> Result<Option<Issue>> {
let cache = profile.issues(repository)?;
Ok(cache.get(id)?)
}
#[allow(dead_code)]
pub fn create<G: Signer>(
profile: &Profile,
repository: &Repository,
signer: &G,
title: String,
description: String,
labels: &[Label],
assignees: &[Did],
) -> Result<IssueId> {
let mut issues = profile.issues_mut(repository)?;
let issue = issues.create(title, description.trim(), labels, assignees, [], signer)?;
Ok(*issue.id())
}
#[cfg(test)]
mod tests {
use std::str::FromStr;
+3 -3
View File
@@ -4,8 +4,8 @@ use std::fmt::Write as _;
use anyhow::Result;
use radicle::cob::patch::{Patch, PatchId};
use radicle::crypto::Signer;
use radicle::identity::Did;
use radicle::node::device::Device;
use radicle::patch::cache::Patches;
use radicle::patch::{Review, ReviewId, Revision, Status};
use radicle::storage::git::Repository;
@@ -86,10 +86,10 @@ pub fn find(profile: &Profile, repository: &Repository, id: &PatchId) -> Result<
Ok(cache.get(id)?)
}
pub fn find_review<'a, G: Signer>(
pub fn find_review<'a, G>(
patch: &'a Patch,
revision: &Revision,
signer: &G,
signer: &Device<G>,
) -> Option<(ReviewId, &'a Review)> {
patch
.reviews_of(revision.id())
+2 -3
View File
@@ -46,7 +46,7 @@ List options
The MODE argument can be 'operation' or 'id'. 'operation' selects a patch id and
an operation, whereas 'id' selects a patch id only.
Other options
@@ -93,7 +93,7 @@ impl ReviewOptions {
&'a self,
patch: &'a Patch,
repo: &Repository,
) -> anyhow::Result<(RevisionId, &Revision)> {
) -> anyhow::Result<(RevisionId, &'a Revision)> {
let revision_id = self
.revision_id
.as_ref()
@@ -322,7 +322,6 @@ mod interface {
use radicle::cob;
use radicle::cob::ObjectId;
use radicle::crypto::Signer;
use radicle::identity::RepoId;
use radicle::patch::PatchId;
use radicle::patch::Verdict;
+1 -2
View File
@@ -640,7 +640,7 @@ A terminal interface for reviewing patch revisions.
Starts a new or resumes an existing review for a given revision (default: latest). When the
review is done, it needs to be finalized via `rad patch review --accept | --reject <id>`.
# Keybindings
`←,h` move cursor to the left
@@ -688,7 +688,6 @@ mod test {
use radicle::cob::cache::NoCache;
use radicle::patch::{Cache, PatchMut, Review, ReviewId, Revision, Verdict};
use radicle::prelude::Signer;
use radicle::storage::git::cob::DraftStore;
use radicle::storage::git::Repository;
+9 -4
View File
@@ -123,9 +123,11 @@ pub mod fixtures {
use anyhow::Result;
use radicle::cob::cache::NoCache;
use radicle::crypto::{Signer, Verified};
use radicle::crypto;
use radicle::crypto::Verified;
use radicle::git;
use radicle::identity::{RepoId, Visibility};
use radicle::node::device::Device;
use radicle::patch::{Cache, MergeTarget, PatchMut, Patches};
use radicle::rad;
use radicle::storage::git::Repository;
@@ -232,11 +234,14 @@ fn main() {
}
/// Create a new repository at the given path, and initialize it into a project.
pub fn project<P: AsRef<Path>, G: Signer>(
pub fn project<P: AsRef<Path>, G>(
path: P,
storage: &Storage,
signer: &G,
) -> Result<(RepoId, SignedRefs<Verified>, git2::Repository, git2::Oid), rad::InitError> {
signer: &Device<G>,
) -> Result<(RepoId, SignedRefs<Verified>, git2::Repository, git2::Oid), rad::InitError>
where
G: crypto::signature::Signer<crypto::Signature>,
{
radicle::storage::git::transport::local::register(storage.clone());
let (working, head) = repository(path);
-1
View File
@@ -1965,7 +1965,6 @@ mod tests {
use std::path::PathBuf;
use anyhow::Result;
use radicle::crypto::Signer;
use crate::test;
+1 -1
View File
@@ -1 +1 @@
1.80
1.85