diff --git a/radicle-cli/examples/rad-track.md b/radicle-cli/examples/rad-seed-and-follow.md similarity index 60% rename from radicle-cli/examples/rad-track.md rename to radicle-cli/examples/rad-seed-and-follow.md index 8ea21175..5d01db94 100644 --- a/radicle-cli/examples/rad-track.md +++ b/radicle-cli/examples/rad-seed-and-follow.md @@ -1,12 +1,13 @@ -To configure our node's tracking policy, we can use the `rad track` command. -For example, let's track a remote node we know about, and alias it to "eve": +To configure our node's seeding and follow policy, we can use the `rad seed` +and `rad follow` commands. +For example, let's follow a remote node we know about, and alias it to "eve": ``` $ rad follow did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk --alias eve ✓ Follow policy updated for z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk (eve) ``` -Now let's track one of Eve's repositories: +Now let's seed one of Eve's repositories: ``` $ rad seed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed --no-fetch diff --git a/radicle-cli/src/commands/clean.rs b/radicle-cli/src/commands/clean.rs index 19e099c9..31dd55f6 100644 --- a/radicle-cli/src/commands/clean.rs +++ b/radicle-cli/src/commands/clean.rs @@ -22,7 +22,7 @@ Usage local operator or a delegate of the repository. Note that remotes will still be fetched as long as they are - tracked and/or the tracking scope is "all". + followed and/or the follow scope is "all". Options diff --git a/radicle-cli/src/commands/follow.rs b/radicle-cli/src/commands/follow.rs index f2e7a891..a2fa1eaa 100644 --- a/radicle-cli/src/commands/follow.rs +++ b/radicle-cli/src/commands/follow.rs @@ -100,8 +100,8 @@ pub fn follow( let followed = match node.follow(nid, alias.clone()) { Ok(updated) => updated, Err(e) if e.is_connection_err() => { - let mut config = profile.tracking_mut()?; - config.track_node(&nid, alias.as_deref())? + let mut config = profile.policies_mut()?; + config.follow(&nid, alias.as_deref())? } Err(e) => return Err(e.into()), }; diff --git a/radicle-cli/src/commands/init.rs b/radicle-cli/src/commands/init.rs index 88110b23..7aa9b493 100644 --- a/radicle-cli/src/commands/init.rs +++ b/radicle-cli/src/commands/init.rs @@ -60,7 +60,7 @@ pub struct Options { pub scope: Scope, pub set_upstream: bool, pub verbose: bool, - pub track: bool, + pub seed: bool, } impl Args for Options { @@ -77,7 +77,7 @@ impl Args for Options { let mut set_upstream = false; let mut setup_signing = false; let mut scope = Scope::All; - let mut track = true; + let mut seed = true; let mut verbose = false; let mut visibility = None; @@ -129,8 +129,8 @@ impl Args for Options { Long("no-confirm") => { interactive = Interactive::No; } - Long("no-track") => { - track = false; + Long("no-seed") => { + seed = false; } Long("private") => { visibility = Some(Visibility::private([])); @@ -161,7 +161,7 @@ impl Args for Options { interactive, set_upstream, setup_signing, - track, + seed, visibility, verbose, }, @@ -279,10 +279,10 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()> term::blob(json::to_string_pretty(&proj)?); } - // It's important to track our own repositories to make sure that our node signals + // It's important to seed our own repositories to make sure that our node signals // interest for them. This ensures that messages relating to them are relayed to us. - if options.track { - cli::project::track(id, options.scope, &mut node, profile)?; + if options.seed { + cli::project::seed(id, options.scope, &mut node, profile)?; } if options.set_upstream || git::branch_remote(&repo, proj.default_branch()).is_err() { diff --git a/radicle-cli/src/commands/inspect.rs b/radicle-cli/src/commands/inspect.rs index 7085e9fc..8ed465a4 100644 --- a/radicle-cli/src/commands/inspect.rs +++ b/radicle-cli/src/commands/inspect.rs @@ -173,8 +173,8 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { } } Target::Policy => { - let tracking = profile.tracking()?; - if let Some(repo) = tracking.repo_policy(&rid)? { + let tracking = profile.policies()?; + if let Some(repo) = tracking.seed_policy(&rid)? { let tracking = match repo.policy { Policy::Allow => term::format::positive("tracked"), Policy::Block => term::format::negative("blocked"), diff --git a/radicle-cli/src/commands/ls.rs b/radicle-cli/src/commands/ls.rs index d65310a5..aa94c712 100644 --- a/radicle-cli/src/commands/ls.rs +++ b/radicle-cli/src/commands/ls.rs @@ -17,7 +17,7 @@ Usage rad ls [