mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Update heartwood crates to commit 2d13591
- Add `migrate::ignore` callback to `cob::cache` calls - Remove the `Verified` trait from the `Doc` struct - Update `Doc` fields with read-only methods
This commit is contained in:
Generated
+6
-6
@@ -3748,7 +3748,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "radicle"
|
||||
version = "0.13.0"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#855327d303566aac1d3e065d4ba7e16d9ccd18e6"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#2d13591ec21e6ce04678e2965f08d145cf2d76ae"
|
||||
dependencies = [
|
||||
"amplify",
|
||||
"base64 0.21.7",
|
||||
@@ -3778,7 +3778,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "radicle-cob"
|
||||
version = "0.12.0"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#855327d303566aac1d3e065d4ba7e16d9ccd18e6"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#2d13591ec21e6ce04678e2965f08d145cf2d76ae"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"git2",
|
||||
@@ -3796,7 +3796,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "radicle-crypto"
|
||||
version = "0.11.0"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#855327d303566aac1d3e065d4ba7e16d9ccd18e6"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#2d13591ec21e6ce04678e2965f08d145cf2d76ae"
|
||||
dependencies = [
|
||||
"amplify",
|
||||
"cyphernet",
|
||||
@@ -3814,7 +3814,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "radicle-dag"
|
||||
version = "0.9.0"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#855327d303566aac1d3e065d4ba7e16d9ccd18e6"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#2d13591ec21e6ce04678e2965f08d145cf2d76ae"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
]
|
||||
@@ -3836,7 +3836,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "radicle-ssh"
|
||||
version = "0.9.0"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#855327d303566aac1d3e065d4ba7e16d9ccd18e6"
|
||||
source = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git#2d13591ec21e6ce04678e2965f08d145cf2d76ae"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"log",
|
||||
@@ -6063,7 +6063,7 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use radicle::cob::migrate;
|
||||
use radicle::cob::object::Storage;
|
||||
use radicle::storage::refs::draft;
|
||||
use radicle::storage::{self, ReadStorage};
|
||||
@@ -58,7 +59,7 @@ pub trait Cobs: Profile {
|
||||
&draft_oid.into(),
|
||||
)?;
|
||||
|
||||
let mut patches = profile.patches_mut(&repo)?;
|
||||
let mut patches = profile.patches_mut(&repo, migrate::ignore)?;
|
||||
patches.write(&cob_id.into())?;
|
||||
|
||||
storage::git::cob::DraftStore::new(&repo, *signer.public_key()).remove(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use radicle::cob::migrate;
|
||||
use radicle::issue::cache::Issues as _;
|
||||
use radicle::node::Handle;
|
||||
use radicle::storage::ReadStorage;
|
||||
@@ -16,7 +17,7 @@ pub trait Issues: Profile {
|
||||
let profile = self.profile();
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let status = status.unwrap_or_default();
|
||||
let issues = profile.issues(&repo)?;
|
||||
let issues = profile.issues(&repo, migrate::ignore)?;
|
||||
let mut issues: Vec<_> = issues
|
||||
.list()?
|
||||
.filter_map(|r| {
|
||||
@@ -42,7 +43,7 @@ pub trait Issues: Profile {
|
||||
) -> Result<Option<cobs::issue::Issue>, Error> {
|
||||
let profile = self.profile();
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let issues = profile.issues(&repo)?;
|
||||
let issues = profile.issues(&repo, migrate::ignore)?;
|
||||
let issue = issues.get(&id.into())?;
|
||||
|
||||
let aliases = &profile.aliases();
|
||||
@@ -58,7 +59,7 @@ pub trait Issues: Profile {
|
||||
) -> Result<Option<Vec<cobs::thread::Thread>>, Error> {
|
||||
let profile = self.profile();
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let issues = profile.issues(&repo)?;
|
||||
let issues = profile.issues(&repo, migrate::ignore)?;
|
||||
let issue = issues.get(&id.into())?;
|
||||
|
||||
let aliases = &profile.aliases();
|
||||
@@ -103,7 +104,7 @@ pub trait IssuesMut: Profile {
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let signer = profile.signer()?;
|
||||
let aliases = profile.aliases();
|
||||
let mut issues = profile.issues_mut(&repo)?;
|
||||
let mut issues = profile.issues_mut(&repo, migrate::ignore)?;
|
||||
let issue = issues.create(
|
||||
new.title,
|
||||
new.description,
|
||||
@@ -132,7 +133,7 @@ pub trait IssuesMut: Profile {
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let signer = profile.signer()?;
|
||||
let aliases = profile.aliases();
|
||||
let mut issues = profile.issues_mut(&repo)?;
|
||||
let mut issues = profile.issues_mut(&repo, migrate::ignore)?;
|
||||
let mut issue = issues.get_mut(&cob_id.into())?;
|
||||
|
||||
match action {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use radicle::cob::migrate;
|
||||
use radicle::node::Handle;
|
||||
use radicle::patch::cache::Patches as _;
|
||||
use radicle::storage;
|
||||
@@ -21,7 +22,7 @@ pub trait Patches: Profile {
|
||||
let take = take.unwrap_or(20);
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let aliases = &profile.aliases();
|
||||
let cache = profile.patches(&repo)?;
|
||||
let cache = profile.patches(&repo, migrate::ignore)?;
|
||||
let patches = match status {
|
||||
None => cache.list()?.collect::<Vec<_>>(),
|
||||
Some(s) => cache.list_by_status(&s.into())?.collect::<Vec<_>>(),
|
||||
@@ -54,7 +55,7 @@ pub trait Patches: Profile {
|
||||
) -> Result<Option<cobs::patch::Patch>, Error> {
|
||||
let profile = self.profile();
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let patches = profile.patches(&repo)?;
|
||||
let patches = profile.patches(&repo, migrate::ignore)?;
|
||||
let patch = patches.get(&id.into())?;
|
||||
let aliases = &profile.aliases();
|
||||
let patches = patch.map(|patch| cobs::patch::Patch::new(id.into(), &patch, aliases));
|
||||
@@ -69,7 +70,7 @@ pub trait Patches: Profile {
|
||||
) -> Result<Option<Vec<cobs::patch::Revision>>, Error> {
|
||||
let profile = self.profile();
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let patches = profile.patches(&repo)?;
|
||||
let patches = profile.patches(&repo, migrate::ignore)?;
|
||||
let revisions = patches.get(&id.into())?.map(|patch| {
|
||||
let aliases = &profile.aliases();
|
||||
|
||||
@@ -90,7 +91,7 @@ pub trait Patches: Profile {
|
||||
) -> Result<Option<cobs::patch::Revision>, Error> {
|
||||
let profile = self.profile();
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let patches = profile.patches(&repo)?;
|
||||
let patches = profile.patches(&repo, migrate::ignore)?;
|
||||
let revision = patches.get(&id.into())?.and_then(|patch| {
|
||||
let aliases = &profile.aliases();
|
||||
|
||||
@@ -116,7 +117,7 @@ pub trait PatchesMut: Profile {
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let signer = profile.signer()?;
|
||||
let aliases = profile.aliases();
|
||||
let mut patches = profile.patches_mut(&repo)?;
|
||||
let mut patches = profile.patches_mut(&repo, migrate::ignore)?;
|
||||
let mut patch = patches.get_mut(&cob_id.into())?;
|
||||
|
||||
match action {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use radicle::cob::migrate;
|
||||
use radicle_surf as surf;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use radicle::crypto::Verified;
|
||||
use radicle::identity::{doc, Doc, DocAt};
|
||||
use radicle::issue::cache::Issues as _;
|
||||
use radicle::node::routing::Store;
|
||||
@@ -40,7 +40,7 @@ pub trait Repo: Profile {
|
||||
continue;
|
||||
}
|
||||
|
||||
if !doc.delegates.contains(&profile.public_key.into()) && show == Show::Delegate {
|
||||
if !doc.delegates().contains(&profile.public_key.into()) && show == Show::Delegate {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ pub trait Repo: Profile {
|
||||
fn repo_info(
|
||||
&self,
|
||||
repo: &storage::git::Repository,
|
||||
doc: &Doc<Verified>,
|
||||
doc: &Doc,
|
||||
) -> Result<repo::RepoInfo, Error> {
|
||||
let profile = self.profile();
|
||||
let aliases = profile.aliases();
|
||||
@@ -100,14 +100,14 @@ pub trait Repo: Profile {
|
||||
let db = profile.database()?;
|
||||
let seeding = db.count(&repo.id).unwrap_or_default();
|
||||
let project = doc
|
||||
.payload
|
||||
.payload()
|
||||
.get(&doc::PayloadId::project())
|
||||
.and_then(|payload| {
|
||||
let (_, head) = repo.head().ok()?;
|
||||
let commit = repo.commit(head).ok()?;
|
||||
let patches = profile.patches(repo).ok()?;
|
||||
let patches = profile.patches(repo, migrate::ignore).ok()?;
|
||||
let patches = patches.counts().ok()?;
|
||||
let issues = profile.issues(repo).ok()?;
|
||||
let issues = profile.issues(repo, migrate::ignore).ok()?;
|
||||
let issues = issues.counts().ok()?;
|
||||
|
||||
let data: repo::ProjectPayloadData = (*payload).clone().try_into().ok()?;
|
||||
@@ -124,8 +124,8 @@ pub trait Repo: Profile {
|
||||
Ok::<_, Error>(repo::RepoInfo {
|
||||
payloads: repo::SupportedPayloads { project },
|
||||
delegates,
|
||||
threshold: doc.threshold,
|
||||
visibility: doc.visibility.clone().into(),
|
||||
threshold: doc.threshold(),
|
||||
visibility: doc.visibility().clone().into(),
|
||||
rid: repo.id,
|
||||
seeding,
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@ use base64::{engine::general_purpose::STANDARD, Engine as _};
|
||||
use localtime::LocalTime;
|
||||
|
||||
use radicle::cob;
|
||||
use radicle::cob::cache::migrate;
|
||||
use radicle::git;
|
||||
use radicle::identity;
|
||||
use radicle::node::Handle;
|
||||
@@ -46,7 +47,7 @@ pub trait Thread: Profile {
|
||||
let mut node = Node::new(profile.socket());
|
||||
let signer = profile.signer()?;
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let mut issues = profile.issues_mut(&repo)?;
|
||||
let mut issues = profile.issues_mut(&repo, migrate::ignore)?;
|
||||
let mut issue = issues.get_mut(&new.id.into())?;
|
||||
let id = new.reply_to.unwrap_or_else(|| {
|
||||
let (root_id, _) = issue.root();
|
||||
@@ -89,7 +90,7 @@ pub trait Thread: Profile {
|
||||
let mut node = Node::new(profile.socket());
|
||||
let signer = profile.signer()?;
|
||||
let repo = profile.storage.repository(rid)?;
|
||||
let mut patches = profile.patches_mut(&repo)?;
|
||||
let mut patches = profile.patches_mut(&repo, migrate::ignore)?;
|
||||
let mut patch = patches.get_mut(&new.id.into())?;
|
||||
let n = new.clone();
|
||||
let oid = patch.comment(
|
||||
|
||||
Reference in New Issue
Block a user