radicle: Implement migration callback mechanism
Add the ability to have native migrations and progress callback functions in migration code for the COB cache.
31 files changed
+183
-83
08833985
→
6c8ee433
modified radicle-cli/src/commands/clone.rs
@@ -9,6 +9,7 @@ use radicle::issue::cache::Issues as _;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -182,8 +183,8 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/cob.rs
@@ -5,6 +5,7 @@ use anyhow::anyhow;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -180,13 +181,13 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/inbox.rs
@@ -6,6 +6,7 @@ use anyhow::anyhow;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -271,8 +272,8 @@ where
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -535,7 +536,7 @@ fn show(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -546,7 +547,7 @@ fn show(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/issue.rs
@@ -8,9 +8,8 @@ use std::str::FromStr;
|
|
|
|
|
|
| - | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -461,7 +460,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/issue/cache.rs
@@ -1,5 +1,6 @@
|
|
|
|
| + | |
|
|
|
|
|
@@ -37,8 +38,9 @@ pub fn run(mode: CacheMode, profile: &Profile) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -48,7 +50,7 @@ fn cache(id: Option<IssueId>, repository: &Repository, profile: &Profile) -> any
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch.rs
@@ -37,7 +37,7 @@ use std::ffi::OsString;
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -928,7 +928,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/archive.rs
@@ -1,5 +1,6 @@
|
|
|
|
| + | |
|
|
|
|
|
@@ -10,7 +11,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/assign.rs
@@ -2,6 +2,7 @@ use std::collections::BTreeSet;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -15,7 +16,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/cache.rs
@@ -1,5 +1,6 @@
|
|
|
|
| + | |
|
|
|
|
|
@@ -37,7 +38,7 @@ pub fn run(mode: CacheMode, profile: &Profile) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -48,7 +49,7 @@ fn cache(id: Option<PatchId>, repository: &Repository, profile: &Profile) -> any
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/checkout.rs
@@ -1,6 +1,7 @@
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -38,7 +39,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/comment.rs
@@ -1,8 +1,8 @@
|
|
|
|
|
|
| - | |
|
|
| + | |
|
|
|
|
|
@@ -20,7 +20,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/delete.rs
@@ -1,3 +1,4 @@
| + | |
|
|
|
|
|
@@ -5,7 +6,7 @@ use super::*;
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/diff.rs
@@ -1,6 +1,6 @@
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -11,7 +11,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/edit.rs
@@ -1,6 +1,7 @@
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -15,7 +16,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/label.rs
@@ -1,5 +1,6 @@
|
|
|
|
| + | |
|
|
|
|
|
@@ -12,7 +13,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/list.rs
@@ -1,7 +1,7 @@
|
|
|
|
| - | |
|
|
| + | |
|
|
|
|
|
@@ -21,7 +21,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/ready.rs
@@ -1,5 +1,6 @@
|
|
|
|
| + | |
|
|
|
|
|
@@ -10,7 +11,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/redact.rs
@@ -1,4 +1,4 @@
| - | |
| + | |
|
|
|
|
|
@@ -13,7 +13,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/resolve.rs
@@ -1,4 +1,5 @@
|
|
| + | |
|
|
|
|
|
@@ -15,7 +16,7 @@ pub fn resolve(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -32,7 +33,7 @@ pub fn unresolve(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/review.rs
@@ -3,6 +3,7 @@ mod builder;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -61,7 +62,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/show.rs
@@ -1,6 +1,6 @@
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -32,7 +32,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/patch/update.rs
@@ -1,4 +1,4 @@
| - | |
| + | |
|
|
|
|
|
@@ -19,7 +19,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/stats.rs
@@ -3,6 +3,7 @@ use std::path::Path;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -95,8 +96,8 @@ pub fn run(_options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified radicle-remote-helper/src/list.rs
@@ -3,6 +3,7 @@ use radicle::profile;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -87,7 +88,7 @@ fn patch_refs<R: ReadRepository + cob::Store + 'static>(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-remote-helper/src/push.rs
@@ -9,8 +9,8 @@ use thiserror::Error;
|
|
|
|
|
|
| - | |
|
|
| + | |
|
|
|
|
|
@@ -227,7 +227,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -247,7 +247,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -320,7 +320,7 @@ pub fn run(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-tools/src/rad-merge.rs
@@ -2,6 +2,7 @@ use std::collections::HashSet;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -26,7 +27,7 @@ fn main() -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/cob.rs
@@ -12,6 +12,7 @@ pub mod thread;
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle/src/cob/cache.rs
@@ -23,7 +23,58 @@ const DB_WRITE_TIMEOUT: time::Duration = time::Duration::from_secs(6);
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -97,7 +148,7 @@ impl Store<Write> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -108,7 +159,7 @@ impl Store<Write> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -164,17 +215,34 @@ fn bump(db: &sql::Connection) -> Result<usize, Error> {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -283,20 +351,28 @@ impl<T> Remove<T> for NoCache {
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
| - | |
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -304,9 +380,9 @@ impl WriteAllProgress {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -315,6 +391,6 @@ impl WriteAllProgress {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
modified radicle/src/cob/issue/cache.rs
@@ -143,10 +143,7 @@ impl<'a, R, C> Cache<super::Issues<'a, R>, C> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -158,7 +155,7 @@ impl<'a, R, C> Cache<super::Issues<'a, R>, C> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/cob/patch/cache.rs
@@ -210,10 +210,7 @@ impl<'a, R, C> Cache<super::Patches<'a, R>, C> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -225,7 +222,7 @@ impl<'a, R, C> Cache<super::Patches<'a, R>, C> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/profile.rs
@@ -562,58 +562,70 @@ impl Home {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|