From 9e745b68d12d96a29d9aab3320438a1b231bdd17 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Fri, 16 Feb 2024 15:36:21 +0000 Subject: [PATCH] cli: add caching commands for patch and issue In order to bootstrap the COB cache, and also in case of issues, supply a command for caching a set of patches/issues, or a single patch/issue. This is necessary since reads are not read-thru, it may appear that COBs are missing when in fact they haven't been cached when first moving over to the cache. Signed-off-by: Fintan Halpenny X-Clacks-Overhead: GNU Terry Pratchett --- radicle-cli/src/commands/issue.rs | 14 +++++++++++++ radicle-cli/src/commands/issue/cache.rs | 28 +++++++++++++++++++++++++ radicle-cli/src/commands/patch.rs | 19 ++++++++++++++++- radicle-cli/src/commands/patch/cache.rs | 28 +++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 radicle-cli/src/commands/issue/cache.rs create mode 100644 radicle-cli/src/commands/patch/cache.rs diff --git a/radicle-cli/src/commands/issue.rs b/radicle-cli/src/commands/issue.rs index cacb394c..c2bc8214 100644 --- a/radicle-cli/src/commands/issue.rs +++ b/radicle-cli/src/commands/issue.rs @@ -1,3 +1,6 @@ +#[path = "issue/cache.rs"] +mod cache; + use std::collections::BTreeSet; use std::ffi::OsString; use std::str::FromStr; @@ -44,6 +47,7 @@ Usage rad issue comment [--message ] [--reply-to ] [