Commit Graph
538 Commits
Author SHA1 Message Date
cloudhead 752656fbfa cli: Fix output of rad auth
The `rad help` command was not the right one.
2024-03-15 10:20:28 +01:00
cloudhead de0b9ae44d cli: Don't highlight unknown languages
Previously, we'd show "Empty file".
2024-03-12 16:12:16 +01:00
cloudhead eb1ae13e68 cli: Use correct styling for revision id 2024-03-12 15:46:55 +01:00
Michael Raitza f0b8446515 cli: Handle message editor corner cases
1. Split on double newline fails when description is empty
2. Title must be a single line
2024-03-12 15:44:26 +01:00
cloudhead 93ff59ae25 cli: Add rad version --json flag
This will be used to automatically populated metadata around releases
for the homepage.
2024-03-11 17:36:31 +01:00
Fintan Halpenny 14ce5fe7b1 cli: show reviews on rad patch list
When running `rad patch list`, show the set of delegate reviews for
each patch, with the following meaning for the symbols:

- ✔: delegate has accepted the patch
- ✗: delegate has rejected the patch
- -: delegate has not made a verdict on the patch

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 13:22:14 +01:00
josibake ce1e1f71ae cli: Improve rad init wording
If the user passes a <path> argument to init, it is incorrect and a
bit confusing to reference the "current directory" or "this directory"
e.g. "run rad . in current directory" when the repo was not created in the
current directory and was created with a path argument instead.

Use the path provided by the user in help text, otherwise reference
the current directory.
2024-03-11 13:08:03 +01:00
Fintan Halpenny 18fc41c53f cli: error on no id update
If `rad id` is called with no arguments, or just `--title` and
`--description`, then it will fail because there were no changes made
to the identity.

Check if the `proposal` document is the same the `current` document,
and if so supply a hint and a better error.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 13:05:01 +01:00
Fintan Halpenny 864ca656c0 cli: add Unknown variant for NotificationKind
When the `rad inbox` command would come across a reference name that
it did not recognise as a `Cob` or `Branch`, then it would fail with
an `Unknown` error.

Instead, add an `Unknown` variant to `NotificationKind` which can be
displayed in the `inbox` CLI, by using the `--show-unknown`
flag. Otherwise, it will be skipped and the inbox will work as usual.

While refactoring, the `TypedId` type is used for the `Cob` variant to
simplify some of its uses.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 12:57:53 +01:00
Fintan Halpenny 2fe0cca6d9 cli: ref_update should take a ref
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 12:57:53 +01:00
Fintan Halpenny 7ddb1119a5 cli: show revision on rad patch checkout
Help the user know which revision they currently have checked out when
running `rad patch checkout`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:56:11 +01:00
Sebastian Martinez 9950182ee0 cli: Remove rad-web from help
Due to it not being stable, and eventually the auth flow to be
rewritten, it should be removed.
2024-03-11 11:06:32 +01:00
cloudhead b917c1b411 cli: Rename rad ls --seeds flag
Rename to `--seeded` as per our discussion in Zulip.
2024-03-11 10:46:09 +01:00
Zlatan Todoric acf71fceaa cli: Update help output 2024-03-09 13:51:30 +01:00
Fintan Halpenny cac6c0aad7 cli: add name to rad seed output
If the name is available to show for the repository -- it may not be
if it hasn't been replicated yet -- then add it to the output of the
`rad seed` command.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-09 13:45:35 +01:00
Christopher Fredén 13d5b4f620 cli: fix issue command asking for passphrase
Only require `signer` when doing a write operation.
2024-03-09 00:03:24 +01:00
Fintan Halpenny 50833d88d9 cli: document rad inbox further
The documentation for `rad inbox show` and `rad inbox clear` were
missing.

Add documentation into the help message for both.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-09 00:01:26 +01:00
Lars Wirzenius ccec3f80dc cli: add "debug" subcommand
This writes out information that may be useful when debugging Radicle
remotely on a user's machine. Things like versions of programs, and
values of relevant environment variables.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-08 23:50:01 +01:00
Fintan Halpenny 96c65eb2b3 cli: add replies to patch show output
If any replies to patches were made, it was not possible to see them
in the output of `rad patch show`.

Add the replies to show output, but only if the `--verbose` flag is
set.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-08 23:43:19 +01:00
Fintan Halpenny 3a2e06e498 cli: document --reply-to option
The option to reply to a comment was undocumented in the `rad patch
comment` command.

Add the option to the "Comment options" section of the help message.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-08 23:43:19 +01:00
cloudhead a48081f271 cli: Move node addresses command
To make things a little more consistent, move the `rad self --address`
command to `rad node config --addresses`, since it's more about
externally-facing configuration of the node, rather than your local user
or profile.
2024-02-26 14:23:13 +01:00
cloudhead 9c96b46c59 cli: Show full path in rad init
Instead of showing a '.'
2024-02-26 12:40:17 +01:00
cloudhead 9c9bbbe7bb node: Expose listen addresses 2024-02-26 12:35:20 +01:00
cloudhead d86d99e002 cli: Fix rad config bugs
The command was unable to deal with an invalid config. We fix this by
introducing a way to load the user's home without loading the config.
2024-02-26 12:10:34 +01:00
cloudhead 0726754b0e cli: Add --repo option to issue and patch
Allows users to operate on a repo without a checkout.
2024-02-23 18:16:52 +01:00
Fintan Halpenny 9e745b68d1 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 <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-02-23 16:03:26 +01:00
Fintan Halpenny 985b0af3f6 radicle: implement caching for issues and patches
Implement caching for the `Issue` and `Patch` COB. This is achieved by
having the `Transaction::initial` and `Transaction::commit` methods
take a cache which can update the newly created/updated object. The
`Store::remove` method also takes the cache for removing the object
from the cache, as well as the repository.

This meant that the `*Mut` types for the respective COBs are required
to carry a cache alongside the repository store. Identities will not
be cached, and so this is always set to `NoCache` -- which performs no
caching, and always succeeds.

To perform cache reading for issues and patches, the `cache::Issues`
and `cache::Patches` traits are introduced. They capture the minimal
amount of methods that are needed for the `rad issue` and `rad patch`
CLI commands.

The implementor for each of these traits is there respective `Cache`
types, which combines their backing repository store and the SQLite
database. They both provide convenience methods:
- `create` (and `draft` for patches)
- `get_mut`
- `remove`
which can be used instead of their repository store counterparts.

All uses of the repository stores (where needed) are replaced with
`Cache` types.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-02-23 16:03:21 +01:00
cloudhead c63aaaceac cli: Fix id COB notifications in rad inbox 2024-02-23 11:35:54 +01:00
cloudhead eff40166c9 cli: Add rad unseed command
This replaces the `-d` flag of `rad seed`, making it more like `rad
unfollow`.
2024-02-22 16:02:40 +01:00
cloudhead 0d18a8fd9e cli: Better error message in rad id 2024-02-22 16:02:40 +01:00
cloudhead e06dd208f4 cli: rad seed output improvement
Better colors, and re-order fields to have policy before scope.
2024-02-22 16:02:38 +01:00
cloudhead 9767b485c2 cli: Improve rad inbox output
* Add change authors
* Add object status
* Add colors
2024-02-12 14:03:14 +01:00
cloudhead b477864b83 cli: Stabilize sort order of inbox repos
Sort repositories before displaying them.
2024-02-12 12:01:54 +01:00
cloudhead 137961c1f7 cli: Add rad config get
Gets a specific config value.
2024-02-07 17:12:45 +01:00
cloudhead e5fcbba4c0 cli: Implement rad block command
Blocks repos & nodes from beeing seeded/followed.
2024-02-07 15:51:05 +01:00
cloudhead d37c52aade cli: Allow rad inspect without repo existing
To check the seeding policy of a repo without it being in storage.
2024-02-07 15:51:00 +01:00
cloudhead 565e3b889c cli: Fix output of rad seed when empty 2024-02-07 15:45:50 +01:00
cloudhead 1130608331 cli: Document rad init --no-seed 2024-02-07 13:57:08 +01:00
cloudhead fe55de181d cli: Add new rad inbox command
Shows you updates on local repositories.

Included here is a basic implementation of a notification system. A new
database is created and updated after every fetch, with refs that have
changed.

The `rad inbox` command can then list items in the database and delete
them.
2024-02-06 11:40:58 +01:00
cloudhead bb06663d1c cli: Organize patch functions better
Move patch showing and timeline to a shared library so we can use it for
`rad inbox`.
2024-02-06 10:36:22 +01:00
cloudhead 8928c5ee26 cli: Fix node file rotation with rad node start
This was causing issues (error 22) on macOS and some Linux systems.
2024-02-05 16:26:55 +01:00
Lars Wirzenius 5abd7bf55a cli: fix formatting of warning of unconnected node
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-05 12:53:36 +01:00
cloudhead 0a3da17fad cli: Add --seeds option to ls
Small addition that is useful.
2024-01-31 17:24:59 +01:00
cloudhead 71bba29c9a cli: Add log rotation to node start
Very simple log rotation with two files.
2024-01-31 14:23:43 +01:00
cloudhead 1ece339eac cli: Hint to install ssh-agent 2024-01-31 14:07:28 +01:00
cloudhead 4e9e438f41 cli: Don't error if ssh-agent isn't running 2024-01-31 13:54:39 +01:00
cloudhead b5b9a55306 cli: Add --path option to rad node start
Useful for debugging and running nodes from different locations.
2024-01-31 13:40:13 +01:00
Sebastian Martinez 921f9f2d76 cli: Display rad-web in rad --help
Only show `rad-web` in help, if we are able to run the binary.
2024-01-31 13:30:40 +01:00
cloudhead e58419a9b0 cli: Fix capitalization of "Radicle" 2024-01-29 11:30:30 +01:00
cloudhead 3ff1ddd5e3 cli: Improve rad config 2024-01-29 11:28:37 +01:00