Commit Graph
177 Commits
Author SHA1 Message Date
Alexis Sellier 9db63a8801 cli: Cleanup patch, checkout and clone output
Remove extra whitespace, start moving away from sprout.
2023-04-12 12:02:38 +02:00
Adam Szkoda 0f47dc9057 cli: Make rad rm work without a fork 2023-04-10 10:42:22 +02:00
Alexis Sellier 3d40a606f7 cli: Fix rad track help output
Even though we accept `did:key` as a substitute for NIDs, we don't
generally accept DIDs in this command.
2023-04-10 10:28:46 +02:00
Alexis Sellier c1face7cd8 cli: Fix and simplify rad review
* Properly remove review help message from review
* Remove `--no-confirm` and confirmation step

The CLI should be mostly non-interactive for day-to-day commands,
keeping the interactivity for the TUI.
2023-04-10 10:27:52 +02:00
Alexis Sellier f999a62da2 cli: Show patch status in color in patch show 2023-04-10 10:17:38 +02:00
Alexis Sellier 7d1e3d489b cli: Add patch archive sub-command 2023-04-10 10:17:37 +02:00
xphoniex 414477a316 cli: Unify format of help messages
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-04-10 10:06:45 +02:00
Alexis Sellier 33461e4be1 Set patch status to merged automatically
When a merge is applied to a patch, we check whether the threshold
of delegates has been reached, at which point we set the patch status
to `merged`.

This requires threading the identity document oid through the "apply"
process.
2023-04-05 10:32:45 +02:00
Alexis Sellier 6b44955cd9 cli: Show timeline in patch show 2023-04-04 21:19:50 +02:00
Alexis Sellier 9e50d9053a cli: Additional fixes in the merge process 2023-04-03 16:06:24 +02:00
Alexis Sellier b6fa4a4b2a cli: Some improvements to rad merge 2023-04-03 16:06:24 +02:00
Alexis Sellier cf37950828 node: Rename control socket
The old name, `radicle.sock` didn't tell us much about the purpose
of this socket.
2023-03-31 17:29:58 +02:00
Slack Coder 0b7f169c8b cli: Support revision id in rad merge
Revision IDs are globally unique.  Users will be able to use the
Revision ID in place of its patch ID.

Make `rad merge` refuse to merge an older revision unless the `--force`
option is given.
2023-03-31 17:24:55 +02:00
Sebastian Martinez 87f47cdc67 Reduce pub accessors in patch and issue cob structs
Replaces pub accessors to struct fields with methods
Also creates some methods to compute necessary information

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-31 13:44:37 +02:00
Alexis Sellier 6fb6cff708 term: Add border support for tables 2023-03-27 17:46:32 +02:00
Alexis Sellier 8dba01d6ae cli: Improve patch command output
* Fix timeline ordering
* Remove spinner noise
* Add revisions to timeline
2023-03-24 13:04:52 +01:00
Alexis Sellier 577a232a68 cli: Fix multiline patch show description output 2023-03-23 14:43:21 +01:00
Alexis Sellier 6c1e2d0ddd cli: Don't strip initial message from editor
This was problematic when the initial message was a valid default.
2023-03-23 14:43:21 +01:00
Alexis Sellier 63fc06c817 cli: Don't have blank line if no description
Changes `rad patch show` to not have a blank line when there is no
description.
2023-03-23 14:43:21 +01:00
Sebastian Martinez 8e3b629178 cli: Enable rad tag and rad untag for patches as well
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-23 11:53:11 +01:00
Vincenzo Palazzo 654a21b2b3 cli: Allow git revision parameters as COB IDs
This commit allows any git revision to be used instead
of the full SHA-1, when specifying COBs.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-22 15:38:14 +01:00
Adam Szkoda b4c3bee39d cli: Add CLI commit SHA-1 to help 2023-03-22 08:52:35 +01:00
Alexis Sellier db8ec5735f cli: Use new widgets for patch list 2023-03-21 12:43:44 +01:00
Alexis Sellier ab74e54949 term: Implement new output widget system
We implement a new `Element` trait which allows for more complex output
to be drawn, such as vertical and horizontal stacks.

We adapt `Table` to work within this system.

We refresh the output of `rad patch show` to use these new tools.
2023-03-21 12:43:44 +01:00
Alexis Sellier 5ccf38079c cli: Make patch checkout fetch missing objects
Before this change, `rad patch checkout` would fail if the patch commits
were not in the working copy.
2023-03-18 12:24:17 +01:00
Alexis Sellier 8f57d60706 cli: Don't rely on working copy for patch show
Since the patch may not have been pulled into the working copy,
we shouldn't rely on it for displaying patch information.
2023-03-18 12:24:17 +01:00
Alexis Sellier cf1acf7e24 Fix patch description method
The description is not actually optional, so don't return an `Option`.
2023-03-18 12:24:17 +01:00
Alexis Sellier bd436d4369 cli: Open tracking DB in read-only mode 2023-03-15 12:59:49 +01:00
Alexis Sellier caaa7581e6 node: Remove Routing command
Replaced by direct DB access.
2023-03-15 12:59:49 +01:00
Alexis Sellier b558c742e6 node: Rename repo_entries to repo_policies
Do the same thing for `node_entries` etc.
2023-03-15 12:59:49 +01:00
Alexis Sellier 9b6ede8fc5 cli: Use tracking DB access for node command 2023-03-15 12:59:49 +01:00
Alexis Sellier 13998dcf46 cli: Flesh out rad self 2023-03-15 10:25:23 +01:00
Alexis Sellier 9c77332cba cli: Implement tag and untag
These commands are added at the top level because they will eventually
also work on patches.
2023-03-13 15:08:14 +01:00
Alexis Sellier 2737369910 cli: Fix missing patch announcement 2023-03-13 14:37:01 +01:00
Alexis Sellier f7aac06a8f cli: Polish assign and unassign commands 2023-03-13 12:27:47 +01:00
Alexis Sellier 8e5627d28a node: Rename tracked_repo -> repo_policies
I was finding the current naming misleading, as the returned entries
could be for blocked repos/nodes.
2023-03-13 11:41:07 +01:00
Vincenzo Palazzo f8aa1daedb cli: show the issue when it is created
Show the issue when it is created to give feedback to the user.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-12 19:26:28 +01:00
Slack Coder 166f7e7cc2 cli: Minimize patch info on creation
Reduce noise when showing patch information to the user on creation by
only showing the git branch name and not the commit reference.
2023-03-11 18:38:54 +01:00
Alexis Sellier 34a2d1a9dc cli: use canonical head for patch target
Correct assumptions made about how patching work in `rad patch`.  Make
the default Patch target a `git ref` in place of a target 'peer'.

Use the canonical head as the git reference.  This is head of the
project's master branch which project delegates have concensus on.
2023-03-11 18:38:54 +01:00
Alexis Sellier adbf6f5bf5 cli: Improve patch command
Cleanup and simplify output of patch command.
2023-03-08 20:23:49 +01:00
Alexis Sellier 1168f2ddb5 cli: Update track command
Allows the `track` command to be used to track nodes and repos.
2023-03-08 15:32:34 +01:00
Fintan Halpenny 3b015a9325 radicle: accept Scope as track_repo argument
The method `track_repo` only accepted the RID as the argument for
tracking.

Instead, allow passing Scope as an argument for tracking a
repository.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-08 11:29:34 +00:00
Fintan Halpenny 39be7db1e9 radicle: make alias optional
Previously the alias field was simply a string which could possibly be
empty. Some checks were made to see if this string was empty.

Instead, make the logic more obvious by making the alias field
optional.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-08 11:29:34 +00:00
Vincenzo Palazzo 0e491fae79 cli: fix command line silent abort
Fix the command line silents abort when the
the `EDITOR` variable is not specified.

With this commit the result is reported below

```
➜  rio git:(main) RAD_PASSPHRASE=12345 rad issue open
✗ Issue failed: editor not configured: the `EDITOR` environment variable is not set
```

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-08 12:25:11 +01:00
Fintan Halpenny ed985f6fe0 cli: rad node
This adds a rad node subcommand to the CLI.

The subcommand aims to fulfill the following requirements:

- Checking the node status (rad node status)
- Connecting to the node's control socket (rad node connect)
- Printing out our routing table (rad node routing)
- Printing out our tracking policies (rad node tracking)

The following are yet to be implemented:

- Starting the node (rad node start)
- Stopping the node (rad node stop)

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-07 15:38:41 +01:00
Alexis Sellier 5fb5df2e61 cli: Update inquire crate 2023-03-07 10:39:45 +01:00
Alexis Sellier 85df613682 cli: Implement automatic issue announcement 2023-03-07 08:40:20 +01:00
Alexis Sellier cb3b7a3765 cli: Implement patch delete 2023-03-06 15:45:54 +01:00
Alexis Sellier fb2c388a5d cli: Properly trim patch message 2023-03-06 15:39:07 +01:00
Alexis Sellier 35f22ba37a cli: Update init help for consistency 2023-03-06 15:38:42 +01:00