Use "repository" consistently over "project"

We were using the two pretty interchangeably. "Project" should only be
used to refer to the repository payload. "Repository" should be used
when referring to the resource that is fetched, synced, cloned, checked
out etc.
This commit is contained in:
cloudhead 2024-01-19 17:06:02 +01:00
parent f87dfba9cd
commit 7feb3e3b10
No known key found for this signature in database
32 changed files with 102 additions and 100 deletions

View File

@ -164,7 +164,7 @@ a working copy and run the *rad init* command:
$ cd my-repo $ cd my-repo
$ rad init $ rad init
You will be prompted to enter a project name and default branch. Once the You will be prompted to enter a repository name and default branch. Once the
repository is created, the Repository Identifier (RID) will be printed. repository is created, the Repository Identifier (RID) will be printed.
Share this with collaborators so that they can clone your repository. Share this with collaborators so that they can clone your repository.

View File

@ -10,8 +10,8 @@ Initializing your radicle 👾 identity
✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times. ✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times.
✓ You're all set. ✓ You're all set.
To create a radicle project, run `rad init` from a Git repository with at least one commit. To create a Radicle repository, run `rad init` from a Git repository with at least one commit.
To clone a project, run `rad clone <rid>`. For example, `rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5` clones the Radicle 'heartwood' project. To clone a repository, run `rad clone <rid>`. For example, `rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5` clones the Radicle 'heartwood' repository.
To get a list of all commands, run `rad help`. To get a list of all commands, run `rad help`.
``` ```

View File

@ -11,7 +11,7 @@ $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope all
│ Radicle Heartwood Protocol & Stack │ │ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
``` ```
We can now have a look at the new working copy that was created from the cloned We can now have a look at the new working copy that was created from the cloned

View File

@ -17,5 +17,5 @@ $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
│ Radicle Heartwood Protocol & Stack │ │ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
``` ```

View File

@ -14,7 +14,7 @@ $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed Developer/Radicle
│ Radicle Heartwood Protocol & Stack │ │ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd [..]/Developer/Radicle` to go to the project directory. Run `cd [..]/Developer/Radicle` to go to the repository directory.
``` ```
Note that attempting to clone into a directory that already exists, Note that attempting to clone into a directory that already exists,

View File

@ -14,7 +14,7 @@ $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed
│ Radicle Heartwood Protocol & Stack │ │ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
``` ```
We can now have a look at the new working copy that was created from the cloned We can now have a look at the new working copy that was created from the cloned

View File

@ -22,7 +22,7 @@ wish to fork:
``` ```
$ rad fork rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji $ rad fork rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
✓ Forked project rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji for z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk ✓ Forked repository rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji for z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
``` ```
Now, if we `rad inspect` the project's refs again we will see that we Now, if we `rad inspect` the project's refs again we will see that we

View File

@ -20,7 +20,7 @@ $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed
│ Radicle Heartwood Protocol & Stack │ │ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
$ cd ./heartwood $ cd ./heartwood
$ git push rad master $ git push rad master
``` ```
@ -78,7 +78,7 @@ $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed
│ Radicle Heartwood Protocol & Stack │ │ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
$ cd ./heartwood $ cd ./heartwood
$ git push rad master $ git push rad master
``` ```

View File

@ -41,5 +41,5 @@ $ rad clone rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu --seed z6MknSLrJoTcukLrE435hVNQT4J
│ radicle heartwood protocol & stack │ │ radicle heartwood protocol & stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
``` ```

View File

@ -3,11 +3,11 @@ Alice can initialize a *private* repo using the `--private` flag.
``` ```
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --private $ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --private
Initializing private radicle 👾 project in . Initializing private radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu. Your Repository ID (RID) is rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
You have created a private repository. You have created a private repository.

View File

@ -1,18 +1,18 @@
When initializing a project without any peer connections, we get this output: When initializing a repository without any peer connections, we get this output:
``` ```
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed $ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji. Your Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
✗ Announcing.. <canceled> ✗ Announcing.. <canceled>
You are not connected to any peers. Your project will be announced as soon as your node establishes a connection with the network. You are not connected to any peers. Your repository will be announced as soon as your node establishes a connection with the network.
Check for peer connections with `rad node status`. Check for peer connections with `rad node status`.
To push changes, run `git push`. To push changes, run `git push`.

View File

@ -1,18 +1,18 @@
Let's try initializing a new project with a preferred seed configured. Let's try initializing a new repository with a preferred seed configured.
``` ```
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed $ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW. Your Repository ID (RID) is rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
Project successfully synced to 1 node(s). Repository successfully synced to 1 node(s).
Your project has been synced to the network and is now discoverable by peers. Your repository has been synced to the network and is now discoverable by peers.
View it in your browser at: View it in your browser at:
https://app.radicle.xyz/nodes/[...]/rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW https://app.radicle.xyz/nodes/[...]/rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW

View File

@ -4,17 +4,17 @@ as the node will keep attempting to sync in the background.
``` ```
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed $ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW. Your Repository ID (RID) is rad:z3Rry7rpdWuGpfjPYGzdJKQADsoNW.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
Project successfully announced to the network. Repository successfully announced to the network.
Your project has been announced to the network and is now discoverable by peers. Your repository has been announced to the network and is now discoverable by peers.
You can check for any nodes that have replicated your project by running `rad sync status`. You can check for any nodes that have replicated your repository by running `rad sync status`.
To push changes, run `git push`. To push changes, run `git push`.
``` ```

View File

@ -1,21 +1,21 @@
To create your first radicle project, navigate to a git repository, and run To create your first radicle repository, navigate to a git repository, and run
the `init` command: the `init` command:
``` ```
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed $ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji. Your Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
Project successfully announced to the network. Repository successfully announced to the network.
Your project has been announced to the network and is now discoverable by peers. Your repository has been announced to the network and is now discoverable by peers.
You can check for any nodes that have replicated your project by running `rad sync status`. You can check for any nodes that have replicated your repository by running `rad sync status`.
To push changes, run `git push`. To push changes, run `git push`.
``` ```

View File

@ -22,14 +22,14 @@ Then we initialize.
``` ```
$ rad init --name heartwood --description "Heartwood Protocol & Stack" --no-confirm --public $ rad init --name heartwood --description "Heartwood Protocol & Stack" --no-confirm --public
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:z2D6wQnKapY7dn5meBnbH2rUKNZbT. Your Repository ID (RID) is rad:z2D6wQnKapY7dn5meBnbH2rUKNZbT.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
Your project will be announced to the network when you start your node. Your repository will be announced to the network when you start your node.
You can start your node with `rad node start`. You can start your node with `rad node start`.
To push changes, run `git push rad master`. To push changes, run `git push rad master`.
``` ```

View File

@ -1,23 +1,23 @@
To create your first radicle project, navigate to a git repository, and run the To create your first radicle repository, navigate to a git repository, and run the
`init` command. Make sure you have [authenticated](../rad-auth.md) beforehand. `init` command. Make sure you have [authenticated](../rad-auth.md) beforehand.
``` ```
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public -v $ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public -v
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
{ {
"name": "heartwood", "name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack", "description": "Radicle Heartwood Protocol & Stack",
"defaultBranch": "master" "defaultBranch": "master"
} }
Your project's Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji. Your Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
Your project will be announced to the network when you start your node. Your repository will be announced to the network when you start your node.
You can start your node with `rad node start`. You can start your node with `rad node start`.
To push changes, run `git push`. To push changes, run `git push`.
``` ```

View File

@ -1,21 +1,21 @@
Let's look at how patch updates work. Let's look at how patch updates work.
Alice creates a project and Bob clones it. Alice creates a repository and Bob clones it.
``` ~alice ``` ~alice
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public $ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public
Initializing public radicle 👾 project in . Initializing public radicle 👾 repository in .
Project heartwood created. Repository heartwood created.
Your project's Repository ID (RID) is rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK. Your Repository ID (RID) is rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK.
You can show it any time by running `rad .` from this directory. You can show it any time by running `rad .` from this directory.
Project successfully announced to the network. Repository successfully announced to the network.
Your project has been announced to the network and is now discoverable by peers. Your repository has been announced to the network and is now discoverable by peers.
You can check for any nodes that have replicated your project by running `rad sync status`. You can check for any nodes that have replicated your repository by running `rad sync status`.
To push changes, run `git push`. To push changes, run `git push`.
``` ```
@ -33,7 +33,7 @@ $ rad clone rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
│ radicle heartwood protocol & stack │ │ radicle heartwood protocol & stack │
│ 0 issues · 0 patches │ │ 0 issues · 0 patches │
╰────────────────────────────────────╯ ╰────────────────────────────────────╯
Run `cd ./heartwood` to go to the project directory. Run `cd ./heartwood` to go to the repository directory.
``` ```
We fork the repository by pushing to `master`, and wait for Alice to sync We fork the repository by pushing to `master`, and wait for Alice to sync

View File

@ -139,11 +139,11 @@ pub fn init(options: Options) -> anyhow::Result<()> {
term::success!("You're all set."); term::success!("You're all set.");
term::blank(); term::blank();
term::info!( term::info!(
"To create a radicle project, run {} from a Git repository with at least one commit.", "To create a Radicle repository, run {} from a Git repository with at least one commit.",
term::format::command("rad init") term::format::command("rad init")
); );
term::info!( term::info!(
"To clone a project, run {}. For example, {} clones the Radicle 'heartwood' project.", "To clone a repository, run {}. For example, {} clones the Radicle 'heartwood' repository.",
term::format::command("rad clone <rid>"), term::format::command("rad clone <rid>"),
term::format::command("rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5") term::format::command("rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5")
); );

View File

@ -16,13 +16,15 @@ use crate::terminal::args::{Args, Error, Help};
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "checkout", name: "checkout",
description: "Checkout a project into the local directory", description: "Checkout a repository into the local directory",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage
rad checkout <rid> [--remote <did>] [<option>...] rad checkout <rid> [--remote <did>] [<option>...]
Creates a working copy from a repository in local storage.
Options Options
--remote <did> Remote peer to checkout --remote <did> Remote peer to checkout
@ -63,7 +65,7 @@ impl Args for Options {
Ok(( Ok((
Options { Options {
id: id.ok_or_else(|| anyhow!("a project to checkout must be provided"))?, id: id.ok_or_else(|| anyhow!("a repository to checkout must be provided"))?,
remote, remote,
}, },
vec![], vec![],
@ -85,7 +87,7 @@ fn execute(options: Options, profile: &Profile) -> anyhow::Result<PathBuf> {
let doc: Doc<_> = storage let doc: Doc<_> = storage
.repository(id)? .repository(id)?
.identity_doc() .identity_doc()
.context("project could not be found in local storage")? .context("repository could not be found in local storage")?
.into(); .into();
let payload = doc.project()?; let payload = doc.project()?;
let path = PathBuf::from(payload.name()); let path = PathBuf::from(payload.name());

View File

@ -11,7 +11,7 @@ use crate::terminal::args::{Args, Error, Help};
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "clean", name: "clean",
description: "Clean a project", description: "Clean a repository",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage

View File

@ -29,7 +29,7 @@ use crate::terminal::Element as _;
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "clone", name: "clone",
description: "Clone a project", description: "Clone a Radicle repository",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage
@ -167,7 +167,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let default_branch = proj.default_branch().clone(); let default_branch = proj.default_branch().clone();
let path = working.workdir().unwrap(); // SAFETY: The working copy is not bare. let path = working.workdir().unwrap(); // SAFETY: The working copy is not bare.
// Configure repository and setup tracking for project delegates. // Configure repository and setup tracking for repository delegates.
radicle::git::configure_repository(&working)?; radicle::git::configure_repository(&working)?;
checkout::setup_remotes( checkout::setup_remotes(
project::SetupRemote { project::SetupRemote {
@ -205,7 +205,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
.directory .directory
.map_or(proj.name().to_string(), |loc| loc.display().to_string()); .map_or(proj.name().to_string(), |loc| loc.display().to_string());
term::info!( term::info!(
"Run {} to go to the project directory.", "Run {} to go to the repository directory.",
term::format::command(format!("cd ./{location}")), term::format::command(format!("cd ./{location}")),
); );
@ -264,7 +264,7 @@ pub fn clone<G: Signer>(
let results = sync::fetch(id, mode, timeout, node)?; let results = sync::fetch(id, mode, timeout, node)?;
let Ok(repository) = storage.repository(id) else { let Ok(repository) = storage.repository(id) else {
// If we don't have the project locally, even after attempting to fetch, // If we don't have the repository locally, even after attempting to fetch,
// there's nothing we can do. // there's nothing we can do.
if results.is_empty() { if results.is_empty() {
return Err(CloneError::NoSeeds(id)); return Err(CloneError::NoSeeds(id));

View File

@ -11,7 +11,7 @@ use crate::terminal::args::{Args, Error, Help};
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "fork", name: "fork",
description: "Create a fork of a project", description: "Create a fork of a repository",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage
@ -60,14 +60,14 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
Some(rid) => rid, Some(rid) => rid,
None => { None => {
let (_, rid) = let (_, rid) =
radicle::rad::cwd().context("Current directory is not a radicle project")?; radicle::rad::cwd().context("Current directory is not a Radicle repository")?;
rid rid
} }
}; };
rad::fork(rid, &signer, &storage)?; rad::fork(rid, &signer, &storage)?;
term::success!("Forked project {rid} for {}", profile.id()); term::success!("Forked repository {rid} for {}", profile.id());
Ok(()) Ok(())
} }

View File

@ -28,7 +28,7 @@ use crate::terminal::Interactive;
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "init", name: "init",
description: "Initialize a project from a git repository", description: "Initialize Radicle repositories",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage
@ -37,9 +37,9 @@ Usage
Options Options
--name <string> Name of the project --name <string> Name of the repository
--description <string> Description of the project --description <string> Description of the repository
--default-branch <name> The default branch of the project --default-branch <name> The default branch of the repository
--scope <scope> Repository follow scope (default: all) --scope <scope> Repository follow scope (default: all)
--private Set repository visibility to *private* --private Set repository visibility to *private*
--public Set repository visibility to *public* --public Set repository visibility to *public*
@ -98,7 +98,7 @@ impl Args for Options {
.all(|c| c.is_alphanumeric() || allowed.contains(&c)) .all(|c| c.is_alphanumeric() || allowed.contains(&c))
{ {
anyhow::bail!( anyhow::bail!(
"invalid project name specified with `--name`, \ "invalid repository name specified with `--name`, \
only alphanumeric characters, '-', '_' and '.' are allowed" only alphanumeric characters, '-', '_' and '.' are allowed"
); );
} }
@ -109,7 +109,7 @@ impl Args for Options {
.value()? .value()?
.to_str() .to_str()
.ok_or(anyhow::anyhow!( .ok_or(anyhow::anyhow!(
"invalid project description specified with `--description`" "invalid repository description specified with `--description`"
))? ))?
.to_owned(); .to_owned();
@ -213,7 +213,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
.ok_or_else(|| anyhow!("repository head must point to a commit"))?; .ok_or_else(|| anyhow!("repository head must point to a commit"))?;
term::headline(format!( term::headline(format!(
"Initializing{}radicle 👾 project in {}", "Initializing{}radicle 👾 repository in {}",
if let Some(visibility) = &options.visibility { if let Some(visibility) = &options.visibility {
term::format::spaced(term::format::visibility(visibility)) term::format::spaced(term::format::visibility(visibility))
} else { } else {
@ -281,7 +281,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
let proj = doc.project()?; let proj = doc.project()?;
spinner.message(format!( spinner.message(format!(
"Project {} created.", "Repository {} created.",
term::format::highlight(proj.name()) term::format::highlight(proj.name())
)); ));
spinner.finish(); spinner.finish();
@ -315,7 +315,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
term::blank(); term::blank();
term::info!( term::info!(
"Your project's Repository ID {} is {}.", "Your Repository ID {} is {}.",
term::format::dim("(RID)"), term::format::dim("(RID)"),
term::format::highlight(rid.urn()) term::format::highlight(rid.urn())
); );
@ -329,7 +329,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
if let Err(e) = announce(rid, doc, &mut node, &profile.config) { if let Err(e) = announce(rid, doc, &mut node, &profile.config) {
term::blank(); term::blank();
term::warning(format!( term::warning(format!(
"There was an error announcing your project to the network: {e}" "There was an error announcing your repository to the network: {e}"
)); ));
term::warning("Try again with `rad sync --announce`, or check your logs with `rad node logs`."); term::warning("Try again with `rad sync --announce`, or check your logs with `rad node logs`.");
term::blank(); term::blank();
@ -416,7 +416,7 @@ fn sync(
if !replicas.is_empty() { if !replicas.is_empty() {
spinner.message(format!( spinner.message(format!(
"Project successfully synced to {} node(s).", "Repository successfully synced to {} node(s).",
replicas.len() replicas.len()
)); ));
spinner.finish(); spinner.finish();
@ -430,7 +430,7 @@ fn sync(
} }
Ok(SyncResult::Synced { result: None }) Ok(SyncResult::Synced { result: None })
} else { } else {
spinner.message("Project successfully announced to the network."); spinner.message("Repository successfully announced to the network.");
spinner.finish(); spinner.finish();
Ok(SyncResult::NotSynced) Ok(SyncResult::NotSynced)
@ -450,7 +450,7 @@ pub fn announce(
}) => { }) => {
term::blank(); term::blank();
term::info!( term::info!(
"Your project has been synced to the network and is \ "Your repository has been synced to the network and is \
now discoverable by peers.", now discoverable by peers.",
); );
term::info!("View it in your browser at:"); term::info!("View it in your browser at:");
@ -461,12 +461,12 @@ pub fn announce(
Ok(SyncResult::Synced { result: None, .. }) => { Ok(SyncResult::Synced { result: None, .. }) => {
term::blank(); term::blank();
term::info!( term::info!(
"Your project has been synced to the network and is \ "Your repository has been synced to the network and is \
now discoverable by peers.", now discoverable by peers.",
); );
if !config.preferred_seeds.is_empty() { if !config.preferred_seeds.is_empty() {
term::info!( term::info!(
"Unfortunately, you were unable to replicate your project to \ "Unfortunately, you were unable to replicate your repository to \
your preferred seeds." your preferred seeds."
); );
} }
@ -474,11 +474,11 @@ pub fn announce(
Ok(SyncResult::NotSynced) => { Ok(SyncResult::NotSynced) => {
term::blank(); term::blank();
term::info!( term::info!(
"Your project has been announced to the network and is \ "Your repository has been announced to the network and is \
now discoverable by peers.", now discoverable by peers.",
); );
term::info!( term::info!(
"You can check for any nodes that have replicated your project by running \ "You can check for any nodes that have replicated your repository by running \
`rad sync status`." `rad sync status`."
); );
term::blank(); term::blank();
@ -486,14 +486,14 @@ pub fn announce(
Ok(SyncResult::NoPeersConnected) => { Ok(SyncResult::NoPeersConnected) => {
term::blank(); term::blank();
term::info!( term::info!(
"You are not connected to any peers. Your project will be announced as soon as \ "You are not connected to any peers. Your repository will be announced as soon as \
your node establishes a connection with the network."); your node establishes a connection with the network.");
term::info!("Check for peer connections with `rad node status`."); term::info!("Check for peer connections with `rad node status`.");
term::blank(); term::blank();
} }
Ok(SyncResult::NodeStopped) => { Ok(SyncResult::NodeStopped) => {
term::info!( term::info!(
"Your project will be announced to the network when you start your node." "Your repository will be announced to the network when you start your node."
); );
term::info!( term::info!(
"You can start your node with {}.", "You can start your node with {}.",

View File

@ -134,7 +134,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
Some(rid) => rid, Some(rid) => rid,
None => radicle::rad::cwd() None => radicle::rad::cwd()
.map(|(_, rid)| rid) .map(|(_, rid)| rid)
.context("Current directory is not a radicle project")?, .context("Current directory is not a Radicle repository")?,
}; };
if options.target == Target::RepoId { if options.target == Target::RepoId {
@ -146,7 +146,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let storage = &profile.storage; let storage = &profile.storage;
let repo = storage let repo = storage
.repository(rid) .repository(rid)
.context("No project with the given RID exists")?; .context("No repository with the given RID exists")?;
let project = repo.identity_doc()?; let project = repo.identity_doc()?;
match options.target { match options.target {

View File

@ -9,7 +9,7 @@ use term::Element;
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "ls", name: "ls",
description: "List projects", description: "List repositories",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage

View File

@ -655,7 +655,7 @@ impl Args for Options {
pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let (workdir, id) = radicle::rad::cwd() let (workdir, id) = radicle::rad::cwd()
.map_err(|_| anyhow!("this command must be run in the context of a project"))?; .map_err(|_| anyhow!("this command must be run in the context of a repository"))?;
let profile = ctx.profile()?; let profile = ctx.profile()?;
let repository = profile.storage.repository(id)?; let repository = profile.storage.repository(id)?;

View File

@ -58,7 +58,7 @@ pub fn run(
) -> anyhow::Result<()> { ) -> anyhow::Result<()> {
let signer = term::signer(profile)?; let signer = term::signer(profile)?;
let _project = repository.identity_doc().context(format!( let _project = repository.identity_doc().context(format!(
"couldn't load project {} from local state", "couldn't load repository {} from local state",
repository.id repository.id
))?; ))?;
let mut patches = Patches::open(repository)?; let mut patches = Patches::open(repository)?;

View File

@ -72,7 +72,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
Some(rid) => rid, Some(rid) => rid,
None => radicle::rad::cwd() None => radicle::rad::cwd()
.map(|(_, rid)| rid) .map(|(_, rid)| rid)
.context("Current directory is not a radicle project")?, .context("Current directory is not a Radicle repository")?,
}; };
let repo = profile.storage.repository_mut(rid)?; let repo = profile.storage.repository_mut(rid)?;

View File

@ -20,7 +20,7 @@ use crate::terminal::{Args, Context, Help};
pub const HELP: Help = Help { pub const HELP: Help = Help {
name: "remote", name: "remote",
description: "Manage a project's remotes", description: "Manage a repository's remotes",
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
usage: r#" usage: r#"
Usage Usage
@ -177,7 +177,7 @@ impl Args for Options {
pub fn run(options: Options, ctx: impl Context) -> anyhow::Result<()> { pub fn run(options: Options, ctx: impl Context) -> anyhow::Result<()> {
let (working, rid) = radicle::rad::cwd() let (working, rid) = radicle::rad::cwd()
.map_err(|_| anyhow!("this command must be run in the context of a project"))?; .map_err(|_| anyhow!("this command must be run in the context of a repository"))?;
let profile = ctx.profile()?; let profile = ctx.profile()?;
match options.op { match options.op {

View File

@ -263,7 +263,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
Some(rid) => rid, Some(rid) => rid,
None => { None => {
let (_, rid) = let (_, rid) =
radicle::rad::cwd().context("Current directory is not a radicle project")?; radicle::rad::cwd().context("Current directory is not a Radicle repository")?;
rid rid
} }

View File

@ -130,7 +130,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
Some(rid) => rid, Some(rid) => rid,
None => { None => {
let (_, rid) = let (_, rid) =
radicle::rad::cwd().context("Current directory is not a radicle project")?; radicle::rad::cwd().context("Current directory is not a Radicle repository")?;
rid rid
} }
}; };

View File

@ -126,7 +126,7 @@ pub enum ForkError {
Storage(#[from] storage::Error), Storage(#[from] storage::Error),
#[error("payload: {0}")] #[error("payload: {0}")]
Payload(#[from] doc::PayloadError), Payload(#[from] doc::PayloadError),
#[error("project `{0}` was not found in storage")] #[error("repository `{0}` was not found in storage")]
NotFound(RepoId), NotFound(RepoId),
#[error("repository: {0}")] #[error("repository: {0}")]
Repository(#[from] RepositoryError), Repository(#[from] RepositoryError),
@ -197,7 +197,7 @@ pub enum CheckoutError {
Git(#[from] git2::Error), Git(#[from] git2::Error),
#[error("payload: {0}")] #[error("payload: {0}")]
Payload(#[from] doc::PayloadError), Payload(#[from] doc::PayloadError),
#[error("project `{0}` was not found in storage")] #[error("repository `{0}` was not found in storage")]
NotFound(RepoId), NotFound(RepoId),
#[error("repository: {0}")] #[error("repository: {0}")]
Repository(#[from] RepositoryError), Repository(#[from] RepositoryError),
@ -295,7 +295,7 @@ pub fn remove_remote(repo: &git2::Repository) -> Result<(), RemoteError> {
Ok(()) Ok(())
} }
/// Get the Id of project in current working directory /// Get the RID of the repository in current working directory
/// ///
/// It will atempt to search parent directories if `path` did not find /// It will atempt to search parent directories if `path` did not find
/// a git repository. /// a git repository.