Commit Graph
1582 Commits
Author SHA1 Message Date
Slack Coder 11d10b4e47 cli-test: Support '[..]'s which preserve spacing
By mapping all '[.. ]'s  with any number of spaces inside them into
'[..]'s, examples can preserve text formatting while using this glob
pattern.

The downside is failed output will show '[..]' in place of the original
version with spaces.
2023-04-20 16:52:20 +02:00
Fintan Halpenny f11991737f remote-helper: allow fetching from canonical refs
There is no mechanism for fetching the canonical `refs/heads/master`
from a project's repository into a local working copy.

Allow setting up a remote in the working copy, e.g.

    [remote "canon"]
	url = rad://z3gqcJUoA1n9HaHKufZs5FCSGazv5
	fetch = +refs/heads/master:refs/remotes/canon/master

Such that it can fetch the `master` branch, but disallows push to the
canonical reference namespace.

This is achieved by allowing the namespace in `radicle::git::Url` to
be `None` when the radicle-remote-helper is called. It disallows the
namespace to be None during a `git-receive-pack` -- also keeping the
check for the namespace being equal to the local operator's key.

When the namespace is `None` then `GIT_NAMESPACE` is set to the empty
string.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-20 16:34:02 +02:00
Alexis Sellier a16be24517 node: Fix log output in --help
The logs were being output in the help text.
2023-04-20 16:32:41 +02:00
Alexis Sellier 26ee6d26dc node: Reduce log messages when sending messages 2023-04-20 16:32:41 +02:00
Alexis Sellier 9120db4ddb node: Reduce log verbosity when receiving messages 2023-04-20 16:32:41 +02:00
Alexis Sellier 189eb3f201 node: Cleanup logging 2023-04-20 16:32:41 +02:00
Fintan Halpenny 75bf7beedd cli: add verbose flag to rad ls
A repository may fail to load when trying to run `rad ls`, but the
failure will be hidden from the output.

Add a `--verbose` flag to add warning information to stdout when a
repository fails to load.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-20 16:31:05 +02:00
Alexis Sellier b51d491ad9 node: Preserve tracking policy on startup
We were needlessly overwriting the policy if it was set to "trusted".
2023-04-20 16:29:55 +02:00
Slack Coder bd04826223 Fix rad --version output
Write `rad --version` on its own line.
2023-04-19 09:08:59 -05:00
Fintan Halpenny f26adabdbf cli: add rad fork example test
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 12:58:18 +02:00
Fintan Halpenny 3b49a7911b cli: add rad fetch example test
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 12:58:18 +02:00
Fintan Halpenny ea03e8a38b cli: add rad fork command
Add a `rad fork` command to create a forked namespace, using the local
peer, for the given repository.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 12:58:18 +02:00
Fintan Halpenny 92a14b671f cli: use Doc::canonical in rad inspect
A project may exist within storage without the local operator not
having a fork of the project.

Use Doc::canonical in rad inspect to retrieve the canonical identity
document for use during inspection.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 12:58:18 +02:00
Slack Coder 327ebd4d2a cli: remove unused cli::git methods
The methods appear not to be called anywhere.
2023-04-19 12:56:02 +02:00
Slack Coder 82d190f64f cli: fetch if commmit missing when rad mergeing
Reduce friction when merging patches by automatically fetching the
Patch's commit head if its missing.

The calls git directly due to difficulties fetch the revision
anonymously with existing method.  Its important to fetch the commit
anonymously to remove dependency on how the local 'git remote's are
configured.
2023-04-19 12:56:02 +02:00
Slack Coder 3e87e5f9eb cli: reduce rad ls dependency
Fetch project information using the delegates fork of the project.  This
avoids expecting a user's fork to exist locally.

Delegate project information is expected to remain in sync.
2023-04-19 12:50:07 +02:00
Alexis Sellier 2598886018 node: Delete unsigned refs on fetch 2023-04-19 11:32:46 +02:00
Erik Kundt e13bf0b75b tui: Move shortcuts to root widget 2023-04-19 10:40:05 +02:00
Erik Kundt 95b0029267 tui: Add dashboard widget 2023-04-19 10:40:05 +02:00
Erik Kundt 38c9f0a1c0 tui: Re-render only if message received
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-19 10:40:05 +02:00
Erik Kundt 1bde528a1b tui: Add placeholder for issue browser
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-19 10:40:05 +02:00
Alexis Sellier f7799e1474 tui: Fix clippy warnings 2023-04-19 10:37:39 +02:00
Slack Coder d79e97cf3b cli: Note '--version' output as API
Consider our command line version output part of our API via a function
comment.

Test the first two fields of the version output are the program name and
a semantic version.
2023-04-19 10:35:20 +02:00
Fintan Halpenny 256471fa5e radicle: add test for removing review fields
Add a test case showing that when a review is made with a None value
to an already set field, it will remove the original value.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 10:34:01 +02:00
Erik Kundt 0381aa3281 tui: Add context bar to patch view page 2023-04-18 16:30:05 +02:00
Erik Kundt 0f52af8b2e tui: Implement patch view page
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:30:05 +02:00
Erik Kundt f0ef4efe6c tui: Implement view pages
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:23:55 +02:00
Erik Kundt 52222939ae tui: Introduce subscription module
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:23:55 +02:00
Erik Kundt 594b63197c tui: Fix incorrect component focus
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:55 +02:00
Erik Kundt a0695005f5 tui: Pass widget props to command handler
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 8325eb69d7 tui: Implement patches workspace
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 80c1e45a99 tui: Add ui wrapper for patches
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 3ce1e1147a tui: Add module providing access to patch cob
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 85fad7aee0 tui: Implement generic table component
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt ceb1f8e700 tui: Change content handling for labels
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:14:22 +02:00
Erik Kundt 708e202dcc tui: Restructure component modules
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:12:41 +02:00
Alexis Sellier 0d98b84861 node: Skip trusted peers that aren't local 2023-04-18 14:49:13 +02:00
Alexis Sellier b2f9ca61d5 tools: Add tool to set canonical refs
It's possible to delete these refs, or for old repos not to have them.
2023-04-17 22:10:20 +02:00
Alexis Sellier f41f092778 seed: Update default tracking policy for seed 2023-04-17 21:16:56 +02:00
Alexis Sellier 94bef61944 node: Return only remotes that were fetched from
Instead of returning the namespaces that we fetched with,
we return the remotes that were actually fetched from.

This can differ if some trusted peers were not available
on the remote node.

Previously, if that was the case, it would cause errors
since the remotes were looked up and that lookup failed.
2023-04-17 18:58:56 +02:00
Alexis Sellier bb07e25571 node: Emit event when refs are synced
This will help us give the user feedback when he pushes.
2023-04-17 16:18:34 +02:00
Alexis Sellier 4b2bc365ef node: Better differentiate fetch results
We use an enum to separate initiator vs. responder results.
2023-04-17 16:18:34 +02:00
Alexis Sellier 636d9e55ee ci: Remove ci.yaml
We are no longer relying on GitHub CI.
2023-04-17 15:58:55 +02:00
Alexis Sellier 51b372ecad node: Share channel type between modules
Shares the `Channels` type between the `wire::protocol` and
`worker` modules.
2023-04-17 15:56:24 +02:00
Alexis Sellier d0e24bd0ce node: Simplify worker data piping 2023-04-17 15:55:31 +02:00
Alexis Sellier c99497eb21 Update netservices to 0.2.2
This includes a small change in how the EOF is sent as well.
2023-04-17 15:53:31 +02:00
Alexis Sellier cb79ebef76 Fix storage documentation
The link was invalid.
2023-04-17 12:08:47 +02:00
Alexis Sellier a8f0329391 node: Downgrade some logs to trace level
These logs were a bit noisy and don't help much.
2023-04-17 11:21:22 +02:00
Alexis Sellier 0e7ffcc916 node: Properly validate signed refs on fetch
With this change, we not only verify the signed refs before
the repository "transfer", but also validate that all refs in the
repo are signed and there is no discrepancy with the signed refs
file.
2023-04-15 00:17:17 +02:00
Alexis Sellier d9dd28b347 scripts: Add delete-remote-refs.sh
Useful for deleting refs of a corrupted remote.
2023-04-15 00:15:02 +02:00