Commit Graph
955 Commits
Author SHA1 Message Date
Alexis Sellier 6346931ce2 cli: Add canonical remote to init and checkout
Add a remote that points to the canonical upstream.
2023-04-24 15:42:00 +02:00
Alexis Sellier d6cebf613f cli: Remove rad fetch command
The command is replaced with `rad sync --fetch`. Soon, it will be called
from the git-remote-helper, so users won't have to call it explicitly.
2023-04-24 14:19:31 +02:00
Alexis Sellier a285943166 cli: Remove rad push command
Users should use `git push` or `git push rad` instead.
2023-04-24 14:19:24 +02:00
Alexis Sellier 671c169244 node: Implement rad sync command
This command announces refs to peers and waits for them to be
in sync.

Adds a subscribe method to `Handle` so that we can get the events
from the seed to allow us to confirm that the configured seeds fetched
from us.
2023-04-24 11:39:37 +02:00
Alexis Sellier 86feebe4d8 cli: Add --quiet flag to rad issue 2023-04-24 11:29:42 +02:00
Alexis Sellier d74535a5a5 Update license for radicle-cob
Now that we've obtained permission from the original author, we're
able to update the license to MIT/Apache.
2023-04-23 15:20:35 +02:00
Alexis Sellier 7f8526ff76 Update yanked version of inquire
Version 0.6.0 was yanked from crates.io.
2023-04-23 15:14:19 +02:00
Alexis Sellier fd3a6583d0 node: Improve framing code
Thanks to @fintohaps for these suggestions.
2023-04-23 15:10:42 +02:00
Vincenzo Palazzo 5a4d0fff3f tests: add radicle command test for the rad remote
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-22 14:10:23 +02:00
Vincenzo Palazzo d55861572d cli: accept from the cli the remote subcommand
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-22 14:09:30 +02:00
Vincenzo Palazzo fb44af9653 cli: implement the rad remote rm command
Implementing the `rad remote rm` command in order to be able
to remote a remote inside the radicle remote list.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-22 14:09:30 +02:00
Vincenzo Palazzo 027ccb943e cli: implement the rad remote list command
Implementing the `rad remote list` command in order to be able to
list all the radicle remotes added to the repository

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-22 14:09:30 +02:00
Vincenzo Palazzo 33547c9c3c cli: implement the rad remote add command
implementing the `rad remote add` command in order
to be able to add rad remotes from the command
line.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-22 14:09:30 +02:00
Vincenzo Palazzo 0468a1a757 rad: preparation for the rad remote commands
This commits introduces just a couple of helper functions in order
to work with the `rad remote *` commands.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-22 14:09:30 +02:00
Alexis Sellier 442e8a7128 cli: Cleanup patch examples a little 2023-04-22 13:59:18 +02:00
Alexis Sellier ff56843fcc cli: Render rad issue list with a nice table 2023-04-22 13:59:18 +02:00
Alexis Sellier 2ff5ad97f3 cli: Error out if we wrongly pass a <patch-id>
It was previously possible to call `rad patch open` with a patch-id
and get no error. This fixes it.
2023-04-22 13:57:58 +02:00
Alexis Sellier bf8653b6c2 node: Fix keep-alive delta
By having the keep-alive delta be the same as the ping timeout,
we essentially disconnected peers right after we sent them our
first ping.

This fixes that issue by setting the ping timeout to double the
keep-alive delta.
2023-04-21 16:54:03 +02:00
Alexis Sellier 4bac839e0a scripts: Update import-issue
Make it remove image links.
2023-04-21 15:31:56 +02:00
Alexis Sellier 9fd3527196 cli: Add --tag option to rad issue open
Also include a simple script for importing GitHub issues.
2023-04-21 11:10:07 +02:00
Sebastian Martinez 8667553740 httpd: Add cob state to listing endpoints
This commit adds the cob state of either patches or issues to the
corresponding endpoint.

So we can either query a cob listing with the required state or expect
the default state.
And once filtered by cob state we paginate.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-04-20 20:38:15 +02:00
Alexis Sellier 6f17a4db67 cli: Don't show patch diff by default
It can be re-enabled with `-p`, which is what git uses usually.
2023-04-20 16:56:06 +02:00
Alexis Sellier 04e95b45fc cli: Fix verdict output in patch timeline 2023-04-20 16:56:06 +02:00
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