rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood6c2648501e7e7596171e9fb1281adfd709bc8e0d
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "8686f4baa288ad2d10d7c99617c5a07dd7a0b255",
"author": {
"id": "did:key:z6MkqLaY4fyQUyrQ263g9Ckccs8hUs1PepsVEAgtvjr8xo5K",
"alias": "stemporus"
},
"title": "Allow specifying multiple rids to the unseed the command",
"state": {
"status": "merged",
"conflicts": []
},
"before": "f13afe491d169004159a033c4ad7548a7ba76271",
"after": "6c2648501e7e7596171e9fb1281adfd709bc8e0d",
"commits": [
"6c2648501e7e7596171e9fb1281adfd709bc8e0d",
"9319eb11ef17fd42ac0bcad79da2a748a2ba7566"
],
"target": "7e1cb406bb935c3de008d2171e8961f57b4336ea",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "8686f4baa288ad2d10d7c99617c5a07dd7a0b255",
"author": {
"id": "did:key:z6MkqLaY4fyQUyrQ263g9Ckccs8hUs1PepsVEAgtvjr8xo5K",
"alias": "stemporus"
},
"description": "To keep expectations similar to the seed command after the changes in\nthe companion patch:\n\n```\nrad patch show 3be0e68b8948e65431a288f225454bafd93de34a\n```",
"base": "f13afe491d169004159a033c4ad7548a7ba76271",
"oid": "9319eb11ef17fd42ac0bcad79da2a748a2ba7566",
"timestamp": 1745620387
},
{
"id": "e230fc4b0cd436a1e2d8938135d27453602c8862",
"author": {
"id": "did:key:z6MkqLaY4fyQUyrQ263g9Ckccs8hUs1PepsVEAgtvjr8xo5K",
"alias": "stemporus"
},
"description": "Fix wording in rad-unseed-many example to be plural",
"base": "f13afe491d169004159a033c4ad7548a7ba76271",
"oid": "6c2648501e7e7596171e9fb1281adfd709bc8e0d",
"timestamp": 1745620521
},
{
"id": "771c2d90e17e6b3b92c3730c6b383b9af72a83cd",
"author": {
"id": "did:key:z6MkqLaY4fyQUyrQ263g9Ckccs8hUs1PepsVEAgtvjr8xo5K",
"alias": "stemporus"
},
"description": "Rebase",
"base": "6bbe919c4b6ab9639b1130b12f83457f9fafa61c",
"oid": "3018223328d566c003e2bf37959302c6f314be42",
"timestamp": 1745654532
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "23aa7dcb-9fca-45f0-b4af-39fbe0808663"
},
"info_url": "https://cci.rad.levitte.org//23aa7dcb-9fca-45f0-b4af-39fbe0808663.html"
}
Started at: 2026-09-09 00:02:21.601106+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/23aa7dcb-9fca-45f0-b4af-39fbe0808663/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 189 issues · 39 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 8686f4baa288ad2d10d7c99617c5a07dd7a0b255
✓ Switched to branch patch/8686f4b at revision e230fc4
✓ Branch patch/8686f4b setup to track rad/patches/8686f4baa288ad2d10d7c99617c5a07dd7a0b255
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 6c2648501e7e7596171e9fb1281adfd709bc8e0d
HEAD is now at 6c264850 Fix wording in rad-unseed-many example to be plural
Exit code: 0
$ rad patch show 8686f4baa288ad2d10d7c99617c5a07dd7a0b255 -p
╭───────────────────────────────────────────────────────────────────────────────╮
│ Title Allow specifying multiple rids to the unseed the command │
│ Patch 8686f4baa288ad2d10d7c99617c5a07dd7a0b255 │
│ Author stemporus z6MkqLa…jr8xo5K │
│ Head 6c2648501e7e7596171e9fb1281adfd709bc8e0d │
│ Base f13afe491d169004159a033c4ad7548a7ba76271 │
│ Target master │
│ Branches patch/8686f4b │
│ Commits ahead 2, behind 1086 │
│ Status merged │
│ │
│ To keep expectations similar to the seed command after the changes in │
│ the companion patch: │
│ │
│ ``` │
│ rad patch show 3be0e68b8948e65431a288f225454bafd93de34a │
│ ``` │
├───────────────────────────────────────────────────────────────────────────────┤
│ 6c26485 Fix wording in rad-unseed-many example to be plural │
│ 9319eb1 Allow specifying multiple rids to the unseed the command │
├───────────────────────────────────────────────────────────────────────────────┤
│ ● Revision 8686f4b @ f13afe4..9319eb1 by stemporus z6MkqLa…jr8xo5K 1 year ago │
│ ↑ Revision e230fc4 @ f13afe4..6c26485 by stemporus z6MkqLa…jr8xo5K 1 year ago │
│ ↑ Revision 771c2d9 @ 6bbe919..3018223 by lorenz z6MkkPv…WX5sTEz 1 year ago │
│ └─ ✓ merged by lorenz z6MkkPv…WX5sTEz │
╰───────────────────────────────────────────────────────────────────────────────╯
commit 6c2648501e7e7596171e9fb1281adfd709bc8e0d
Author: Sekhat Temporus <sekhat@temporus.me>
Date: Fri Apr 25 23:35:12 2025 +0100
Fix wording in rad-unseed-many example to be plural
diff --git a/radicle-cli/examples/rad-unseed-many.md b/radicle-cli/examples/rad-unseed-many.md
index 8781f8ec4b..edeca073f4 100644
--- a/radicle-cli/examples/rad-unseed-many.md
+++ b/radicle-cli/examples/rad-unseed-many.md
@@ -13,7 +13,7 @@ $ rad ls
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
-We could stop seeding it if we didn't want other nodes to fetch it from us:
+We could stop seeding them if we didn't want other nodes to fetch them from us:
```
$ rad unseed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh
commit 9319eb11ef17fd42ac0bcad79da2a748a2ba7566
Author: Sekhat Temporus <sekhat@temporus.me>
Date: Fri Apr 25 23:28:19 2025 +0100
Allow specifying multiple rids to the unseed the command
To keep expectations similar to the seed command after the changes in
the companion patch:
```
rad patch show 3be0e68b8948e65431a288f225454bafd93de34a
```
diff --git a/radicle-cli/examples/rad-unseed-many.md b/radicle-cli/examples/rad-unseed-many.md
new file mode 100644
index 0000000000..8781f8ec4b
--- /dev/null
+++ b/radicle-cli/examples/rad-unseed-many.md
@@ -0,0 +1,22 @@
+It is possible to use the `rad unseed` command to specify multiple RIDs at the
+same time, where each repository specified will stop being seeded.
+
+Let's say we have multiple local repositories we've initialized:
+
+```
+$ rad ls
+╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
+│ Name RID Visibility Head Description │
+├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
+│ heartwood rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji public f2de534 Radicle Heartwood Protocol & Stack │
+│ nixpkgs rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh public f2de534 Home for Nix Packages │
+╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+```
+
+We could stop seeding it if we didn't want other nodes to fetch it from us:
+
+```
+$ rad unseed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh
+✓ Seeding policy for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji removed
+✓ Seeding policy for rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh removed
+```
diff --git a/radicle-cli/src/commands/unseed.rs b/radicle-cli/src/commands/unseed.rs
index ca4c7df8fe..04d64fc72d 100644
--- a/radicle-cli/src/commands/unseed.rs
+++ b/radicle-cli/src/commands/unseed.rs
@@ -1,6 +1,7 @@
use std::ffi::OsString;
use anyhow::anyhow;
+use nonempty::NonEmpty;
use radicle::{prelude::*, Node};
@@ -14,10 +15,10 @@ pub const HELP: Help = Help {
usage: r#"
Usage
- rad unseed <rid> [<option>...]
+ rad unseed <rid>... [<option>...]
The `unseed` command removes the seeding policy, if found,
- for the given repository.
+ for the given repositories.
Options
@@ -27,7 +28,7 @@ Options
#[derive(Debug)]
pub struct Options {
- rid: RepoId,
+ rids: NonEmpty<RepoId>,
}
impl Args for Options {
@@ -35,12 +36,13 @@ impl Args for Options {
use lexopt::prelude::*;
let mut parser = lexopt::Parser::from_args(args);
- let mut rid: Option<RepoId> = None;
+ let mut rids: Vec<RepoId> = Vec::new();
while let Some(arg) = parser.next()? {
match &arg {
Value(val) => {
- rid = Some(term::args::rid(val)?);
+ let rid = term::args::rid(val)?;
+ rids.push(rid);
}
Long("help") | Short('h') => {
return Err(Error::Help.into());
@@ -53,8 +55,8 @@ impl Args for Options {
Ok((
Options {
- rid: rid.ok_or(anyhow!(
- "A Repository ID must be provided; see `rad unseed --help`"
+ rids: NonEmpty::from_vec(rids).ok_or(anyhow!(
+ "At least one Repository ID must be provided; see `rad unseed --help`"
))?,
},
vec![],
@@ -66,7 +68,9 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let profile = ctx.profile()?;
let mut node = radicle::Node::new(profile.socket());
- delete(options.rid, &mut node, &profile)?;
+ for rid in options.rids {
+ delete(rid, &mut node, &profile)?;
+ }
Ok(())
}
diff --git a/radicle-cli/tests/commands.rs b/radicle-cli/tests/commands.rs
index d0520b6883..3e3e19556f 100644
--- a/radicle-cli/tests/commands.rs
+++ b/radicle-cli/tests/commands.rs
@@ -1360,6 +1360,20 @@ fn rad_unseed() {
test("examples/rad-unseed.md", working, Some(&alice.home), []).unwrap();
}
+#[test]
+fn rad_unseed_many() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node(Config::test(Alias::new("alice")));
+ let working = tempfile::tempdir().unwrap();
+
+ // Setup a test project.
+ alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+ alice.project("nixpkgs", "Home for Nix Packages");
+ let alice = alice.spawn();
+
+ test("examples/rad-unseed-many.md", working, Some(&alice.home), []).unwrap();
+}
+
#[test]
fn rad_block() {
let mut environment = Environment::new();
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 23aa7dcb-9fca-45f0-b4af-39fbe0808663 -v /opt/radcis/ci.rad.levitte.org/cci/state/23aa7dcb-9fca-45f0-b4af-39fbe0808663/s:/23aa7dcb-9fca-45f0-b4af-39fbe0808663/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/23aa7dcb-9fca-45f0-b4af-39fbe0808663/w:/23aa7dcb-9fca-45f0-b4af-39fbe0808663/w -w /23aa7dcb-9fca-45f0-b4af-39fbe0808663/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /23aa7dcb-9fca-45f0-b4af-39fbe0808663/s/script.sh
+ cargo --version
info: syncing channel updates for '1.85-x86_64-unknown-linux-gnu'
info: latest update on 2025-03-18, rust version 1.85.1 (4eb161250 2025-03-15)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.85.1 (d73d2caf9 2024-12-31)
+ rustc --version
rustc 1.85.1 (4eb161250 2025-03-15)
+ cargo fmt --check
Diff in /23aa7dcb-9fca-45f0-b4af-39fbe0808663/w/radicle-cli/tests/commands.rs:1371:
alice.project("nixpkgs", "Home for Nix Packages");
let alice = alice.spawn();
- test("examples/rad-unseed-many.md", working, Some(&alice.home), []).unwrap();
+ test(
+ "examples/rad-unseed-many.md",
+ working,
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
}
#[test]
Exit code: 1
{
"response": "finished",
"result": "failure"
}