From 9de10ade5ab506585c67ccbad42d10264cc22f09 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Sun, 3 Sep 2023 16:59:22 +0200 Subject: [PATCH] cli: Add `--inventory` mode to `rad sync` This mode allows to announce our inventory. It's not normally needed, but may be suggested by the `rad publish` command in certain cases. --- radicle-cli/src/commands/clone.rs | 2 +- radicle-cli/src/commands/sync.rs | 165 +++++++++++++++++++----------- radicle-cli/src/commands/track.rs | 2 +- radicle/src/node.rs | 7 ++ 4 files changed, 116 insertions(+), 60 deletions(-) diff --git a/radicle-cli/src/commands/clone.rs b/radicle-cli/src/commands/clone.rs index 87c516ae..d1339589 100644 --- a/radicle-cli/src/commands/clone.rs +++ b/radicle-cli/src/commands/clone.rs @@ -224,7 +224,7 @@ pub fn clone( let results = sync::fetch( id, - sync::SyncMode::default(), + sync::RepoSync::default(), time::Duration::from_secs(9), node, )?; diff --git a/radicle-cli/src/commands/sync.rs b/radicle-cli/src/commands/sync.rs index 92bb97ac..48aa65d4 100644 --- a/radicle-cli/src/commands/sync.rs +++ b/radicle-cli/src/commands/sync.rs @@ -19,9 +19,8 @@ pub const HELP: Help = Help { usage: r#" Usage - rad sync [] [