Commit Graph
37 Commits
Author SHA1 Message Date
Alexis Sellier b25c2e452b cli: Setup tracking branch on rad patch checkout
Just like when opening a new patch, we setup a tracking branch on patch
checkout, so that patches can be updated via a push.
2023-06-21 17:01:56 +02:00
Alexis Sellier ec064891cd cli: Setup tracking branch on rad remote add 2023-06-13 11:09:42 +02:00
Alexis Sellier e9ef0f4aa4 cli: Consolidate working copy remote setup
We consolidate the setup done by `rad checkout`, `rad clone` and `rad
remote add`, so that they all check for node aliases, and are all
capable of setting up tracking branches etc.
2023-06-13 11:09:42 +02:00
Alexis Sellier 3d803b2498 cli: Remove rad patch open
Remove this command in favor of the `git push` flow.

We also remove the `rad/patches` remote configuration which wasn't
working properly with `git fetch --all`.
2023-06-07 15:57:11 +02:00
Sebastian Martinez 6578fedfbb cli: Add issue id to show_issue function
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-06 11:11:20 +02:00
Alexis Sellier ac60069a33 cob: Remove description from Patch
Since patches always have a "root" revision, use that revision's description
as the patch description.
2023-05-26 10:31:00 +02:00
Alexis Sellier 8e89976937 cli: Verify merge, remove rad merge command
When applying a `Merge` action, we verify that the commit is in the
history of the default branch of that user.

Since this is not the case when issuing a `rad merge`, and since that
command is no longer needed with the push-based merge, we remove the
`rad merge` command completely.
2023-05-23 16:11:42 +02:00
xphoniex 95e3b9673d cli: Show alias on rad issue and rad patch
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-05-22 15:13:28 +02:00
Alexis Sellier 90237e8e9d cli: Fix some tests that are no longer valid 2023-05-17 16:54:30 +02:00
Slack Coder ad48514ddd cli: Fix workflow test
'git pull' in workflow/6-pulling-contributor causes a message to be
emitted for some git versions.  It asks to configure 'git pull's default
action.

Use '--ff' as a workaround as a git config file is unsupported, and no
environment variable exists for this configuration.
2023-05-14 13:50:20 +02:00
Alexis Sellier 103ee4e23d cli: Show commit listing in rad patch show 2023-05-12 12:43:44 +02:00
Alexis Sellier fd1237b2db cli: Use git push to open or update patches
This adds the ability to the git-remote-helper to open and update
patches via a `git push` to the magic ref `refs/patches` and
`refs/heads/patches/<patch-id>`.

The main change is that we had to move away from offering the `connect`
capability in the remote helper, to offering `push` and `fetch`
individually.

To get a feel for how this works, see the `rad-patch-via-push.md`
example.
2023-05-12 12:22:08 +02:00
Slack Coder 3e2cf83f9b cli: List patches by last update
To help users notice changes to patches, make `rad patch` order patches
by revision timestamp instead of patch timestamp.
2023-05-08 10:32:48 +02:00
Alexis Sellier 649d59f143 cob: Include head in initial patch entry in DAG
This change ensures that we include as a parent to the initial commit
of a patch COB, the head of the branch we are proposing as a patch.

This was already happening for patch updates, but we forgot to also
include it for the initial patch revision.

This ensures that the code is always fetched alongside the patch.
2023-05-02 09:18:17 +02:00
Vincenzo Palazzo 730eaa00ca cli: Improve rad issue show output
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-27 11:48:11 +02:00
Alexis Sellier 3b20d45d80 cli: Display patches like issues, in rad patch
We also make sure not to bail if one of the patches fails to load.
2023-04-26 12:29:32 +02:00
Alexis Sellier 7a08a1d459 cli: Get fetch after track working
When tracking a repository with the `--fetch` option, we run a fetch
once the tracking is done.

When tracking nodes, we don't accept the `--fetch` flag, as there may
not be a repository to fetch.
2023-04-26 09:49:37 +02:00
Alexis Sellier 3ea7541d55 cli: Replace seedling emoji with alien invader
To match the new branding, we remove seedlings and sometimes replace
them with alien invaders.
2023-04-25 12:47:36 +02:00
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 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 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
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
Alexis Sellier eecea67ffd cob: Deduplicate change parents 2023-04-14 13:54:27 +02:00
Alexis Sellier 97f076e3cf Include dependencies for certain COB actions
We ensure that for example, the given commits are fetched before the
revision or merge actions in a patch.
2023-04-14 13:22:10 +02:00
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
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 b6fa4a4b2a cli: Some improvements to rad merge 2023-04-03 16:06:24 +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
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 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
Slack Coder b6c1560a0a cli: add workflow example with two peers
Make the documentation more realistic by using two peers, a maintainer
and a contributor, for the client examples.  Define them as 'workflow'
examples, ordering them in their own directory to aid user navigation.
2023-03-20 18:27:58 +01:00