chore: Fix spelling errors with codespell
This commit is contained in:
parent
f7e57361dc
commit
32d77641ab
|
|
@ -112,7 +112,7 @@ confusing.
|
||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|
||||||
- `rad clone` now supports the flag `--bare` which works analoguously to
|
- `rad clone` now supports the flag `--bare` which works analogously to
|
||||||
`git clone --bare`.
|
`git clone --bare`.
|
||||||
- `rad patch show` now has improved output. It does not distinguish between the
|
- `rad patch show` now has improved output. It does not distinguish between the
|
||||||
original author's updates and other updated, each update is marked as
|
original author's updates and other updated, each update is marked as
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ ohai
|
||||||
`````
|
`````
|
||||||
|
|
||||||
Say this is placed in `kind-echo.md`, this is what the corresponding test case
|
Say this is placed in `kind-echo.md`, this is what the corresponding test case
|
||||||
would look lke:
|
would look like:
|
||||||
|
|
||||||
``` rust
|
``` rust
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ impl TestFormula {
|
||||||
// Add the target dir to the beginning of the list we will use as `PATH`.
|
// Add the target dir to the beginning of the list we will use as `PATH`.
|
||||||
self.bins.insert(0, bins);
|
self.bins.insert(0, bins);
|
||||||
|
|
||||||
// We don't need to re-build everytime the `build` function is called. Once is enough.
|
// We don't need to re-build every time the `build` function is called. Once is enough.
|
||||||
BUILD.call_once(|| {
|
BUILD.call_once(|| {
|
||||||
use escargot::format::Message;
|
use escargot::format::Message;
|
||||||
use radicle::logger::env_level;
|
use radicle::logger::env_level;
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ From rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
* [new tag] v1.0-hotfix -> v1.0-hotfix
|
* [new tag] v1.0-hotfix -> v1.0-hotfix
|
||||||
```
|
```
|
||||||
|
|
||||||
Since Alice crated an annotated tag, resolving the reference on Bob's end yields an object of type 'tag'.
|
Since Alice created an annotated tag, resolving the reference on Bob's end yields an object of type 'tag'.
|
||||||
|
|
||||||
``` ~bob
|
``` ~bob
|
||||||
$ git cat-file -t v1.0-hotfix
|
$ git cat-file -t v1.0-hotfix
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ From rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
* [new tag] v1.0-hotfix -> v1.0-hotfix
|
* [new tag] v1.0-hotfix -> v1.0-hotfix
|
||||||
```
|
```
|
||||||
|
|
||||||
Since Alice crated a lightweight tag, resolving the reference on Bob's end yields an object of type 'commit'.
|
Since Alice created a lightweight tag, resolving the reference on Bob's end yields an object of type 'commit'.
|
||||||
|
|
||||||
``` ~bob
|
``` ~bob
|
||||||
$ git cat-file -t v1.0-hotfix
|
$ git cat-file -t v1.0-hotfix
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ project.
|
||||||
|
|
||||||
For cases where `threshold > 1`, it is necessary to gather a quorum of
|
For cases where `threshold > 1`, it is necessary to gather a quorum of
|
||||||
signatures to update the Radicle identity. To do this, we use the `rad id`
|
signatures to update the Radicle identity. To do this, we use the `rad id`
|
||||||
command. For now, since we are the only delegate, and `treshold` is `1`, we
|
command. For now, since we are the only delegate, and `threshold` is `1`, we
|
||||||
can update the identity ourselves.
|
can update the identity ourselves.
|
||||||
|
|
||||||
Let's add Bob as a delegate using their DID,
|
Let's add Bob as a delegate using their DID,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
If we initialize a public repository without seeding it, it won't be advertized:
|
If we initialize a public repository without seeding it, it won't be advertised:
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public --no-seed
|
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public --no-seed
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ To push changes, run `git push`.
|
||||||
$ rad node inventory
|
$ rad node inventory
|
||||||
```
|
```
|
||||||
|
|
||||||
If we then seed it, it becomes advertized in our inventory:
|
If we then seed it, it becomes advertised in our inventory:
|
||||||
```
|
```
|
||||||
$ rad seed rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
|
$ rad seed rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
|
||||||
✓ Inventory updated with rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
|
✓ Inventory updated with rad:zhbMU4DUXrzB8xT6qAJh6yZ7bFMK
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
Given a private repo `rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu` belonging to Alice,
|
Given a private repo `rad:z2ug5mwNKZB8KGpBDRTrWHAMbvHCu` belonging to Alice,
|
||||||
Alice allows Bob to fetch it, and Bob, without the updated identity document
|
Alice allows Bob to fetch it, and Bob, without the updated identity document
|
||||||
is able to fetch it by specifiying Alice as a seed.
|
is able to fetch it by specifying Alice as a seed.
|
||||||
|
|
||||||
``` ~alice
|
``` ~alice
|
||||||
$ rad id update --title "Allow Bob" --description "" --allow did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk -q
|
$ rad id update --title "Allow Bob" --description "" --allow did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk -q
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ To make it public, run `rad publish`.
|
||||||
To push changes, run `git push`.
|
To push changes, run `git push`.
|
||||||
```
|
```
|
||||||
|
|
||||||
The repository does not show up in our inventory, since it is not advertized,
|
The repository does not show up in our inventory, since it is not advertised,
|
||||||
despite being seeded:
|
despite being seeded:
|
||||||
```
|
```
|
||||||
$ rad node inventory
|
$ rad node inventory
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ pub fn start(
|
||||||
} else {
|
} else {
|
||||||
// Write a hint to the log file, but swallow any errors.
|
// Write a hint to the log file, but swallow any errors.
|
||||||
let mut log_file = log_file;
|
let mut log_file = log_file;
|
||||||
let _ = log_file.write_all(format!("radicle-node started in foreground, no futher log messages are written to '{}' (this file).\n", log_path.display()).as_bytes());
|
let _ = log_file.write_all(format!("radicle-node started in foreground, no further log messages are written to '{}' (this file).\n", log_path.display()).as_bytes());
|
||||||
|
|
||||||
let mut child = process::Command::new(cmd)
|
let mut child = process::Command::new(cmd)
|
||||||
.args(options)
|
.args(options)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
//! +snuffing
|
//! +snuffing
|
||||||
//! omitting
|
//! omitting
|
||||||
//! ```
|
//! ```
|
||||||
//! The `DDiff` will show the what changes are being made, overlayed on to the original diff and
|
//! The `DDiff` will show the what changes are being made, overlaid on to the original diff and
|
||||||
//! the diff's original file as context.
|
//! the diff's original file as context.
|
||||||
//!
|
//!
|
||||||
//! ```text
|
//! ```text
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ impl Environment {
|
||||||
radicle::test::fixtures::repository(self.work(has_alias).as_path())
|
radicle::test::fixtures::repository(self.work(has_alias).as_path())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convenience method for exectuing a test formula with standard configuration.
|
// Convenience method for executing a test formula with standard configuration.
|
||||||
pub fn test(
|
pub fn test(
|
||||||
&self,
|
&self,
|
||||||
test_file: &'static str,
|
test_file: &'static str,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ impl History {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A topological (parents before children) traversal of the dependency
|
/// A topological (parents before children) traversal of the dependency
|
||||||
/// graph of this history. This is analagous to
|
/// graph of this history. This is analogous to
|
||||||
/// [`std::iter::Iterator::fold`] in that it folds every change into an
|
/// [`std::iter::Iterator::fold`] in that it folds every change into an
|
||||||
/// accumulator value of type `A`. However, unlike `fold` the function `f`
|
/// accumulator value of type `A`. However, unlike `fold` the function `f`
|
||||||
/// may prune branches from the dependency graph by returning
|
/// may prune branches from the dependency graph by returning
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ impl Create {
|
||||||
/// software project. Its content-address is stored in the object's
|
/// software project. Its content-address is stored in the object's
|
||||||
/// history.
|
/// history.
|
||||||
///
|
///
|
||||||
/// The `identifier` is a unqiue id that is passed through to the
|
/// The `identifier` is a unique id that is passed through to the
|
||||||
/// [`crate::object::Storage`].
|
/// [`crate::object::Storage`].
|
||||||
///
|
///
|
||||||
/// The `args` are the metadata for this [`CollaborativeObject`]. See
|
/// The `args` are the metadata for this [`CollaborativeObject`]. See
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,11 @@ pub struct Update {
|
||||||
/// The `parents` are other the parents of this object, for example a
|
/// The `parents` are other the parents of this object, for example a
|
||||||
/// code commit.
|
/// code commit.
|
||||||
///
|
///
|
||||||
/// The `identifier` is a unqiue id that is passed through to the
|
/// The `identifier` is a unique id that is passed through to the
|
||||||
/// [`crate::object::Storage`].
|
/// [`crate::object::Storage`].
|
||||||
///
|
///
|
||||||
/// The `args` are the metadata for this [`CollaborativeObject`]
|
/// The `args` are the metadata for this [`CollaborativeObject`]
|
||||||
/// udpate. See [`Update`] for further information.
|
/// update. See [`Update`] for further information.
|
||||||
pub fn update<T, S, G>(
|
pub fn update<T, S, G>(
|
||||||
storage: &S,
|
storage: &S,
|
||||||
signer: &G,
|
signer: &G,
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ mod tests {
|
||||||
let other_secret = store.secret_key(None).unwrap().unwrap();
|
let other_secret = store.secret_key(None).unwrap().unwrap();
|
||||||
|
|
||||||
assert_ne!(secret, other_secret);
|
assert_ne!(secret, other_secret);
|
||||||
// Note that `fp` has not changed since it was initialiazed from `secret`.
|
// Note that `fp` has not changed since it was initialized from `secret`.
|
||||||
assert_eq!(fp.verify(&other_secret), FingerprintVerification::Mismatch);
|
assert_eq!(fp.verify(&other_secret), FingerprintVerification::Mismatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ pub trait WriteAtomic: std::io::Write {
|
||||||
result.as_ref().err().map(|err| err.kind()),
|
result.as_ref().err().map(|err| err.kind()),
|
||||||
Some(Interrupted | WouldBlock | WriteZero)
|
Some(Interrupted | WouldBlock | WriteZero)
|
||||||
),
|
),
|
||||||
"WriteAtomic::write_or_buf must handle erros of kind {Interrupted:?}, {WouldBlock:?}, {WriteZero:?} by buffering",
|
"WriteAtomic::write_or_buf must handle errors of kind {Interrupted:?}, {WouldBlock:?}, {WriteZero:?} by buffering",
|
||||||
);
|
);
|
||||||
|
|
||||||
result
|
result
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ pub enum Error {
|
||||||
/// The operation timed out.
|
/// The operation timed out.
|
||||||
#[error("the operation timed out")]
|
#[error("the operation timed out")]
|
||||||
Timeout,
|
Timeout,
|
||||||
/// An I/O error occured.
|
/// An I/O error occurred.
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Io(#[from] std::io::Error),
|
Io(#[from] std::io::Error),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ where
|
||||||
let local_addr = net::SocketAddr::new(ip, config.rng.u16(..));
|
let local_addr = net::SocketAddr::new(ip, config.rng.u16(..));
|
||||||
let inventory = storage.repositories().unwrap();
|
let inventory = storage.repositories().unwrap();
|
||||||
|
|
||||||
// Make sure the peer address is advertized.
|
// Make sure the peer address is advertised.
|
||||||
config.config.external_addresses.push(local_addr.into());
|
config.config.external_addresses.push(local_addr.into());
|
||||||
for repo in &inventory {
|
for repo in &inventory {
|
||||||
policies.seed(&repo.rid, Scope::Followed).unwrap();
|
policies.seed(&repo.rid, Scope::Followed).unwrap();
|
||||||
|
|
|
||||||
|
|
@ -734,7 +734,7 @@ fn test_refs_announcement_relay_public() {
|
||||||
.elapse(service::GOSSIP_INTERVAL);
|
.elapse(service::GOSSIP_INTERVAL);
|
||||||
assert!(
|
assert!(
|
||||||
alice.messages(eve.id()).next().is_none(),
|
alice.messages(eve.id()).next().is_none(),
|
||||||
"The same ref announement is not relayed"
|
"The same ref announcement is not relayed"
|
||||||
);
|
);
|
||||||
|
|
||||||
alice
|
alice
|
||||||
|
|
|
||||||
|
|
@ -886,7 +886,7 @@ fn test_non_fastforward_sigrefs() {
|
||||||
|
|
||||||
converge([&alice, &bob, &eve]);
|
converge([&alice, &bob, &eve]);
|
||||||
|
|
||||||
// Eve fetches the inital project from Bob.
|
// Eve fetches the initial project from Bob.
|
||||||
eve.handle.fetch(rid, bob.id, DEFAULT_TIMEOUT).unwrap();
|
eve.handle.fetch(rid, bob.id, DEFAULT_TIMEOUT).unwrap();
|
||||||
// Alice fetches it too.
|
// Alice fetches it too.
|
||||||
let old_bob = alice.handle.fetch(rid, bob.id, DEFAULT_TIMEOUT).unwrap();
|
let old_bob = alice.handle.fetch(rid, bob.id, DEFAULT_TIMEOUT).unwrap();
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ where
|
||||||
Ok(Some(last)) => Some(last.to_local_time()),
|
Ok(Some(last)) => Some(last.to_local_time()),
|
||||||
Ok(None) => None,
|
Ok(None) => None,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!(target: "service", "Error getting the lastest gossip message from db: {e}");
|
error!(target: "service", "Error getting the latest gossip message from db: {e}");
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -2069,7 +2069,7 @@ where
|
||||||
|
|
||||||
/// Get our local inventory.
|
/// Get our local inventory.
|
||||||
///
|
///
|
||||||
/// A node's inventory is the advertized list of repositories offered by a node.
|
/// A node's inventory is the advertised list of repositories offered by a node.
|
||||||
///
|
///
|
||||||
/// A node's inventory consists of *public* repositories that are seeded and available locally
|
/// A node's inventory consists of *public* repositories that are seeded and available locally
|
||||||
/// in the node's storage. We use the routing table as the canonical state of all inventories,
|
/// in the node's storage. We use the routing table as the canonical state of all inventories,
|
||||||
|
|
@ -2749,7 +2749,7 @@ where
|
||||||
/// Disconnect reason.
|
/// Disconnect reason.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum DisconnectReason {
|
pub enum DisconnectReason {
|
||||||
/// Error while dialing the remote. This error occures before a connection is
|
/// Error while dialing the remote. This error occurs before a connection is
|
||||||
/// even established. Errors of this kind are usually not transient.
|
/// even established. Errors of this kind are usually not transient.
|
||||||
Dial(Arc<dyn std::error::Error + Sync + Send>),
|
Dial(Arc<dyn std::error::Error + Sync + Send>),
|
||||||
/// Error with an underlying established connection. Sometimes, reconnecting
|
/// Error with an underlying established connection. Sometimes, reconnecting
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ impl Subscribe {
|
||||||
pub struct NodeAnnouncement {
|
pub struct NodeAnnouncement {
|
||||||
/// Supported protocol version.
|
/// Supported protocol version.
|
||||||
pub version: u8,
|
pub version: u8,
|
||||||
/// Advertized features.
|
/// Advertised features.
|
||||||
pub features: node::Features,
|
pub features: node::Features,
|
||||||
/// Monotonic timestamp.
|
/// Monotonic timestamp.
|
||||||
pub timestamp: Timestamp,
|
pub timestamp: Timestamp,
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ impl wire::Decode for Version {
|
||||||
/// bit set to `1` for all streams she creates, while Bob will have it set to `0`.
|
/// bit set to `1` for all streams she creates, while Bob will have it set to `0`.
|
||||||
///
|
///
|
||||||
/// This ensures that Stream IDs never collide.
|
/// This ensures that Stream IDs never collide.
|
||||||
/// Additionally, Stream IDs must never be re-used within a connection.
|
/// Additionally, Stream IDs must never be reused within a connection.
|
||||||
///
|
///
|
||||||
/// +=======+==================================+
|
/// +=======+==================================+
|
||||||
/// | Bits | Stream Type |
|
/// | Bits | Stream Type |
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,9 @@ pub trait Encoding {
|
||||||
fn write_empty_list(&mut self);
|
fn write_empty_list(&mut self);
|
||||||
/// Write the buffer length at the beginning of the buffer.
|
/// Write the buffer length at the beginning of the buffer.
|
||||||
fn write_len(&mut self);
|
fn write_len(&mut self);
|
||||||
/// Push a [`usize`] as an SSH-encoded unsiged 32-bit integer.
|
/// Push a [`usize`] as an SSH-encoded unsigned 32-bit integer.
|
||||||
/// May panic if the argument is greater than [`u32::MAX`].
|
/// May panic if the argument is greater than [`u32::MAX`].
|
||||||
/// This is a convience method, to spare callers casting or converting
|
/// This is a convenience method, to spare callers casting or converting
|
||||||
/// [`usize`] to [`u32`]. If callers end up in a situation where they
|
/// [`usize`] to [`u32`]. If callers end up in a situation where they
|
||||||
/// need to push a 32-bit unisgned integer, but the value they would
|
/// need to push a 32-bit unisgned integer, but the value they would
|
||||||
/// like to push does not fit 32 bits, then the implementation will not
|
/// like to push does not fit 32 bits, then the implementation will not
|
||||||
|
|
|
||||||
|
|
@ -214,13 +214,13 @@ impl Store<Write> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Migrate this database to the latest version.
|
/// Migrate this database to the latest version.
|
||||||
/// Returns the verison migrated to.
|
/// Returns the version migrated to.
|
||||||
pub fn migrate<M: MigrateCallback>(&mut self, callback: M) -> Result<usize, Error> {
|
pub fn migrate<M: MigrateCallback>(&mut self, callback: M) -> Result<usize, Error> {
|
||||||
self.migrate_to(MIGRATIONS.len(), callback)
|
self.migrate_to(MIGRATIONS.len(), callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Migrate this database to the given target version.
|
/// Migrate this database to the given target version.
|
||||||
/// Returns the verison migrated to.
|
/// Returns the version migrated to.
|
||||||
pub fn migrate_to<M: MigrateCallback>(
|
pub fn migrate_to<M: MigrateCallback>(
|
||||||
&mut self,
|
&mut self,
|
||||||
target: usize,
|
target: usize,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
{
|
{
|
||||||
"author": "z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
|
"author": "z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
|
||||||
"timestamp": 1710939751000,
|
"timestamp": 1710939751000,
|
||||||
"body": "Instead of disabeling the Share button, adds a min-width param",
|
"body": "Instead of disabling the Share button, adds a min-width param",
|
||||||
"embeds": []
|
"embeds": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
{
|
{
|
||||||
"author": "z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
|
"author": "z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
|
||||||
"timestamp": 1710939751000,
|
"timestamp": 1710939751000,
|
||||||
"body": "Instead of disabeling the Share button, adds a min-width param",
|
"body": "Instead of disabling the Share button, adds a min-width param",
|
||||||
"embeds": []
|
"embeds": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -940,7 +940,7 @@ pub enum Action {
|
||||||
/// Should be the root [`CommentId`] if it's a top-level comment.
|
/// Should be the root [`CommentId`] if it's a top-level comment.
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
reply_to: Option<CommentId>,
|
reply_to: Option<CommentId>,
|
||||||
/// Embeded content.
|
/// Embedded content.
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
embeds: Vec<Embed<Uri>>,
|
embeds: Vec<Embed<Uri>>,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ pub enum Action {
|
||||||
/// Should be [`Some`] otherwise.
|
/// Should be [`Some`] otherwise.
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
reply_to: Option<CommentId>,
|
reply_to: Option<CommentId>,
|
||||||
/// Embeded content.
|
/// Embedded content.
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
embeds: Vec<Embed<Uri>>,
|
embeds: Vec<Embed<Uri>>,
|
||||||
},
|
},
|
||||||
|
|
@ -265,7 +265,7 @@ pub enum Action {
|
||||||
RevisionEdit {
|
RevisionEdit {
|
||||||
revision: RevisionId,
|
revision: RevisionId,
|
||||||
description: String,
|
description: String,
|
||||||
/// Embeded content.
|
/// Embedded content.
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
embeds: Vec<Embed<Uri>>,
|
embeds: Vec<Embed<Uri>>,
|
||||||
},
|
},
|
||||||
|
|
@ -295,7 +295,7 @@ pub enum Action {
|
||||||
/// Should be the root [`CommentId`] if it's a top-level comment.
|
/// Should be the root [`CommentId`] if it's a top-level comment.
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
reply_to: Option<CommentId>,
|
reply_to: Option<CommentId>,
|
||||||
/// Embeded content.
|
/// Embedded content.
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
embeds: Vec<Embed<Uri>>,
|
embeds: Vec<Embed<Uri>>,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use crate::git;
|
||||||
use crate::prelude::ReadRepository;
|
use crate::prelude::ReadRepository;
|
||||||
|
|
||||||
/// Type name of a thread, as well as the domain for all thread operations.
|
/// Type name of a thread, as well as the domain for all thread operations.
|
||||||
/// Note that threads are not usually used standalone. They are embeded into other COBs.
|
/// Note that threads are not usually used standalone. They are embedded into other COBs.
|
||||||
pub static TYPENAME: LazyLock<cob::TypeName> =
|
pub static TYPENAME: LazyLock<cob::TypeName> =
|
||||||
LazyLock::new(|| FromStr::from_str("xyz.radicle.thread").expect("type name is valid"));
|
LazyLock::new(|| FromStr::from_str("xyz.radicle.thread").expect("type name is valid"));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ impl PartialOrd for Pattern {
|
||||||
/// component i of `ψ`, denoted `ψ[i]`. This is the case if:
|
/// component i of `ψ`, denoted `ψ[i]`. This is the case if:
|
||||||
/// a. `φ[i]` does not contain an asterisk and `ψ[i]` contains an asterisk,
|
/// a. `φ[i]` does not contain an asterisk and `ψ[i]` contains an asterisk,
|
||||||
/// i.e. the symbol `*`, e.g. `a < * and abc < a*`.
|
/// i.e. the symbol `*`, e.g. `a < * and abc < a*`.
|
||||||
/// Note that this is important to capture specificity accross
|
/// Note that this is important to capture specificity across
|
||||||
/// components, i.e. to conclude that `a/b/* < a/*/c`.
|
/// components, i.e. to conclude that `a/b/* < a/*/c`.
|
||||||
/// b. Both `φ[i]` and `ψ[i]` contain an asterisk.
|
/// b. Both `φ[i]` and `ψ[i]` contain an asterisk.
|
||||||
/// A. The asterisk in `φ[i]` is further right than the asterisk in `φ[i]`,
|
/// A. The asterisk in `φ[i]` is further right than the asterisk in `φ[i]`,
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ impl<'de> Deserialize<'de> for Project {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const FIELDS: &[&str] = &["name", "descrption", "defaultBranch"];
|
const FIELDS: &[&str] = &["name", "description", "defaultBranch"];
|
||||||
deserializer.deserialize_struct("Project", FIELDS, ProjectVisitor)
|
deserializer.deserialize_struct("Project", FIELDS, ProjectVisitor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,11 @@ impl<K: hash::Hash + Eq, V> DerefMut for AddressBook<K, V> {
|
||||||
pub struct Node {
|
pub struct Node {
|
||||||
/// Protocol version.
|
/// Protocol version.
|
||||||
pub version: u8,
|
pub version: u8,
|
||||||
/// Advertized alias.
|
/// Advertised alias.
|
||||||
pub alias: Alias,
|
pub alias: Alias,
|
||||||
/// Advertized features.
|
/// Advertised features.
|
||||||
pub features: node::Features,
|
pub features: node::Features,
|
||||||
/// Advertized addresses
|
/// Advertised addresses
|
||||||
pub addrs: Vec<KnownAddress>,
|
pub addrs: Vec<KnownAddress>,
|
||||||
/// Proof-of-work included in node announcement.
|
/// Proof-of-work included in node announcement.
|
||||||
pub pow: u32,
|
pub pow: u32,
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ pub enum Command {
|
||||||
/// Update node's inventory.
|
/// Update node's inventory.
|
||||||
AddInventory { rid: RepoId },
|
AddInventory { rid: RepoId },
|
||||||
|
|
||||||
/// Get the current node condiguration.
|
/// Get the current node configuration.
|
||||||
Config,
|
Config,
|
||||||
|
|
||||||
/// Get the node's listen addresses.
|
/// Get the node's listen addresses.
|
||||||
|
|
@ -203,7 +203,7 @@ impl Default for ConnectOptions {
|
||||||
pub enum CommandResult<T> {
|
pub enum CommandResult<T> {
|
||||||
/// Response on node socket indicating that a command was carried out successfully.
|
/// Response on node socket indicating that a command was carried out successfully.
|
||||||
Okay(T),
|
Okay(T),
|
||||||
/// Response on node socket indicating that an error occured.
|
/// Response on node socket indicating that an error occurred.
|
||||||
Error {
|
Error {
|
||||||
/// The reason for the error.
|
/// The reason for the error.
|
||||||
#[serde(rename = "error")]
|
#[serde(rename = "error")]
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ pub struct Limits {
|
||||||
/// Maximum number of open files.
|
/// Maximum number of open files.
|
||||||
pub max_open_files: LimitMaxOpenFiles,
|
pub max_open_files: LimitMaxOpenFiles,
|
||||||
|
|
||||||
/// Rate limitter settings.
|
/// Rate limiter settings.
|
||||||
pub rate: RateLimits,
|
pub rate: RateLimits,
|
||||||
|
|
||||||
/// Connection limits.
|
/// Connection limits.
|
||||||
|
|
@ -251,7 +251,7 @@ pub struct ConnectionLimits {
|
||||||
pub outbound: LimitConnectionsOutbound,
|
pub outbound: LimitConnectionsOutbound,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Rate limts for a single connection.
|
/// Rate limits for a single connection.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, Display)]
|
#[derive(Debug, Clone, Serialize, Deserialize, Display)]
|
||||||
#[display("RateLimit(fill_rate={fill_rate}, capacity={capacity})")]
|
#[display("RateLimit(fill_rate={fill_rate}, capacity={capacity})")]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
//! # Note on database migrations
|
//! # Note on database migrations
|
||||||
//!
|
//!
|
||||||
//! The `user_version` field in the database SQLite header is used to keep track of the database
|
//! The `user_version` field in the database SQLite header is used to keep track of the database
|
||||||
//! version. It starts with `0`, which means no tables exist yet, and is incremented everytime a
|
//! version. It starts with `0`, which means no tables exist yet, and is incremented every time a
|
||||||
//! migration is applied. In turn, migrations are named after their version numbers, so the first
|
//! migration is applied. In turn, migrations are named after their version numbers, so the first
|
||||||
//! migration is `1.sql`, the second one is `2.sql` and so on.
|
//! migration is `1.sql`, the second one is `2.sql` and so on.
|
||||||
//!
|
//!
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ create table if not exists "nodes" (
|
||||||
--
|
--
|
||||||
) strict;
|
) strict;
|
||||||
|
|
||||||
-- Node addresses. These are adresses advertized by a node.
|
-- Node addresses. These are addresses advertised by a node.
|
||||||
create table if not exists "addresses" (
|
create table if not exists "addresses" (
|
||||||
-- Node ID.
|
-- Node ID.
|
||||||
"node" text not null references "nodes" ("id") on delete cascade,
|
"node" text not null references "nodes" ("id") on delete cascade,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
//! Node features advertized on the network.
|
//! Node features advertised on the network.
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{fmt, ops};
|
use std::{fmt, ops};
|
||||||
|
|
||||||
/// Advertized node features. Signals what services the node supports.
|
/// Advertised node features. Signals what services the node supports.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
|
||||||
#[serde(transparent)]
|
#[serde(transparent)]
|
||||||
pub struct Features(u64);
|
pub struct Features(u64);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ pub enum InsertResult {
|
||||||
SeedAdded,
|
SeedAdded,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An error occuring in peer-to-peer networking code.
|
/// An error occurring in peer-to-peer networking code.
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// An Internal error.
|
/// An Internal error.
|
||||||
|
|
|
||||||
|
|
@ -66,12 +66,12 @@ pub mod env {
|
||||||
// to generate deterministic COB IDs.
|
// to generate deterministic COB IDs.
|
||||||
pub const GIT_COMMITTER_DATE: &str = "GIT_COMMITTER_DATE";
|
pub const GIT_COMMITTER_DATE: &str = "GIT_COMMITTER_DATE";
|
||||||
|
|
||||||
/// Commit timestamp to use. Can be overriden by [`RAD_COMMIT_TIME`].
|
/// Commit timestamp to use. Can be overridden by [`RAD_COMMIT_TIME`].
|
||||||
pub fn commit_time() -> localtime::LocalTime {
|
pub fn commit_time() -> localtime::LocalTime {
|
||||||
time(RAD_COMMIT_TIME).unwrap_or_else(local_time)
|
time(RAD_COMMIT_TIME).unwrap_or_else(local_time)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Local time. Can be overriden by [`RAD_LOCAL_TIME`].
|
/// Local time. Can be overridden by [`RAD_LOCAL_TIME`].
|
||||||
pub fn local_time() -> localtime::LocalTime {
|
pub fn local_time() -> localtime::LocalTime {
|
||||||
time(RAD_LOCAL_TIME).unwrap_or_else(localtime::LocalTime::now)
|
time(RAD_LOCAL_TIME).unwrap_or_else(localtime::LocalTime::now)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -537,7 +537,7 @@ pub trait ReadRepository: Sized + ValidateRepository {
|
||||||
/// Get the root commit of the canonical identity branch.
|
/// Get the root commit of the canonical identity branch.
|
||||||
fn identity_root(&self) -> Result<Oid, RepositoryError>;
|
fn identity_root(&self) -> Result<Oid, RepositoryError>;
|
||||||
|
|
||||||
/// Get the root commit of the identity branch of a sepcific remote.
|
/// Get the root commit of the identity branch of a specific remote.
|
||||||
fn identity_root_of(&self, remote: &RemoteId) -> Result<Oid, RepositoryError>;
|
fn identity_root_of(&self, remote: &RemoteId) -> Result<Oid, RepositoryError>;
|
||||||
|
|
||||||
/// Load the identity history.
|
/// Load the identity history.
|
||||||
|
|
@ -598,7 +598,7 @@ pub trait ReadRepository: Sized + ValidateRepository {
|
||||||
/// Skips references with names that are not parseable into [`Qualified`].
|
/// Skips references with names that are not parseable into [`Qualified`].
|
||||||
///
|
///
|
||||||
/// This function always peels reference to the commit. For tags, this means the [`Oid`] of the
|
/// This function always peels reference to the commit. For tags, this means the [`Oid`] of the
|
||||||
/// commit pointed to by the tag is returned, and not the [`Oid`] of the tag itsself.
|
/// commit pointed to by the tag is returned, and not the [`Oid`] of the tag itself.
|
||||||
fn references_glob(
|
fn references_glob(
|
||||||
&self,
|
&self,
|
||||||
pattern: &crate::git::fmt::refspec::PatternStr,
|
pattern: &crate::git::fmt::refspec::PatternStr,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ pub enum UrlError {
|
||||||
/// A git local transport URL.
|
/// A git local transport URL.
|
||||||
///
|
///
|
||||||
/// * Used to content-address a repository, eg. when sharing projects.
|
/// * Used to content-address a repository, eg. when sharing projects.
|
||||||
/// * Used as a remore url in a git working copy.
|
/// * Used as a remote url in a git working copy.
|
||||||
///
|
///
|
||||||
/// `rad://<repo>[/<namespace>]`
|
/// `rad://<repo>[/<namespace>]`
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now Bob checks out a copy of the `paris` repository and pushes a commit to the
|
// Now Bob checks out a copy of the `paris` repository and pushes a commit to the
|
||||||
// default branch (master). We store the OID of that commti in `bob_head`, as this
|
// default branch (master). We store the OID of that commit in `bob_head`, as this
|
||||||
// is the commit we will try to get the `london` repo to point to.
|
// is the commit we will try to get the `london` repo to point to.
|
||||||
let (bob_paris_sigrefs, bob_head) = {
|
let (bob_paris_sigrefs, bob_head) = {
|
||||||
let bob_working = rad::checkout(
|
let bob_working = rad::checkout(
|
||||||
|
|
|
||||||
|
|
@ -152,10 +152,10 @@ Any other Revision ID will comment on the revision specified.
|
||||||
|
|
||||||
*--message*, *-m <string>*::
|
*--message*, *-m <string>*::
|
||||||
Comment message. If omitted, Radicle will prompt for a comment string via
|
Comment message. If omitted, Radicle will prompt for a comment string via
|
||||||
*$EDITOR*. Multiple messages will be concatinated with a blank line in between.
|
*$EDITOR*. Multiple messages will be concatenated with a blank line in between.
|
||||||
|
|
||||||
*--reply-to <comment-id>*::
|
*--reply-to <comment-id>*::
|
||||||
Optional comment to reply to. If ommitted, the comment is a top-level comment
|
Optional comment to reply to. If omitted, the comment is a top-level comment
|
||||||
on the given revision.
|
on the given revision.
|
||||||
|
|
||||||
== Opening a patch
|
== Opening a patch
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ description and default branch by running:
|
||||||
*~/.radicle*::
|
*~/.radicle*::
|
||||||
|
|
||||||
The _Radicle Home_. This is the default location for Radicle configuration
|
The _Radicle Home_. This is the default location for Radicle configuration
|
||||||
files, keys, and repository storage. Can be controlled by settting the
|
files, keys, and repository storage. Can be controlled by setting the
|
||||||
**RAD_HOME** environment variable.
|
**RAD_HOME** environment variable.
|
||||||
|
|
||||||
*~/.radicle/config.json*::
|
*~/.radicle/config.json*::
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue