mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
Wire up the `radicle-fetch` crate to the fetch logic in the `radicle-node` worker. Any required traits for storage, identity, tracking, and transport used by `radicle-fetch`. The worker adds a new module to run the `git upload-pack` process and pipes the `stdout`/`stdin` to the respective channels. The `Worker` type required adding a `FetchConfig` to easily allow the configuration of fetches and passing the signer and tracking store location through to the fetch `Handle`. The channels code is adapted to have a new writer that always flushes when a call to `write_all` is made. This is necessary since the Gitoxide code never calls `flush`, and so it will hang since no data is sent until `flush` is called. Since `UserInfo` is used to set up a newly cloned repository, this changed some of the SHA1 hashes output in the CLI test examples. It was also necessary to update the CLI's clone code to be deterministic in its output for tests. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
6.5 KiB
6.5 KiB
Back to being the project maintainer.
Changes have been proposed by another person (or peer) via a radicle patch. To follow changes by another, we must 'track' them.
$ rad track did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk --alias bob
✓ Tracking policy updated for z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk (bob)
Additionally, we need to add a new 'git remote' to our working copy for the peer. Upcoming versions of radicle will not require this step.
$ rad remote add z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk --name bob
✓ Remote bob added
✓ Remote-tracking branch bob/master created for z6Mkt67…v4N1tRk
$ git fetch bob
✓ Synced with 1 peer(s)
From rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
* [new branch] master -> bob/master
* [new branch] patches/f5e2be41827ee9f80bcdcd02f4f0451287b36229 -> bob/patches/f5e2be41827ee9f80bcdcd02f4f0451287b36229
The contributor's changes are now visible to us.
$ git branch -r
bob/master
bob/patches/f5e2be41827ee9f80bcdcd02f4f0451287b36229
rad/master
$ rad patch show f5e2be4
╭─────────────────────────────────────────────────────────────────────╮
│ Title Define power requirements │
│ Patch f5e2be41827ee9f80bcdcd02f4f0451287b36229 │
│ Author bob z6Mkt67…v4N1tRk │
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
│ Commits ahead 2, behind 0 │
│ Status open │
│ │
│ See details. │
├─────────────────────────────────────────────────────────────────────┤
│ 27857ec Add README, just for the fun │
│ 3e674d1 Define power requirements │
├─────────────────────────────────────────────────────────────────────┤
│ ● opened by bob z6Mkt67…v4N1tRk now │
│ ↑ updated to 68143c579935d115e1551b88154cc41763c43e1f (27857ec) now │
╰─────────────────────────────────────────────────────────────────────╯
Wait! There's a mistake. The REQUIREMENTS should be a markdown file. Let's quickly update the patch before incorporating the changes. Updating it this way will tell others about the corrections we needed before merging the changes.
$ rad patch checkout f5e2be41827ee9f80bcdcd02f4f0451287b36229
✓ Switched to branch patch/f5e2be4
✓ Branch patch/f5e2be4 setup to track rad/patches/f5e2be41827ee9f80bcdcd02f4f0451287b36229
$ git mv REQUIREMENTS REQUIREMENTS.md
$ git commit -m "Use markdown for requirements"
[patch/f5e2be4 f567f69] Use markdown for requirements
1 file changed, 0 insertions(+), 0 deletions(-)
rename REQUIREMENTS => REQUIREMENTS.md (100%)
$ git push rad -o no-sync -o patch.message="Use markdown for requirements"
✓ Patch f5e2be4 updated to 5dd1e6b73aa8c2dbfa192f8cf47cd1525c602ebf
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new branch] patch/f5e2be4 -> patches/f5e2be41827ee9f80bcdcd02f4f0451287b36229
Great, all fixed up, lets merge the code.
$ git checkout master
Your branch is up to date with 'rad/master'.
$ git merge patch/f5e2be4
Updating f2de534..f567f69
Fast-forward
README.md | 0
REQUIREMENTS.md | 0
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
create mode 100644 REQUIREMENTS.md
$ git push rad master
✓ Patch f5e2be41827ee9f80bcdcd02f4f0451287b36229 merged at revision 5dd1e6b
✓ Synced with 1 node(s)
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
f2de534..f567f69 master -> master
The patch is now merged and closed :).
$ rad patch show f5e2be4
╭─────────────────────────────────────────────────────────────────────╮
│ Title Define power requirements │
│ Patch f5e2be41827ee9f80bcdcd02f4f0451287b36229 │
│ Author bob z6Mkt67…v4N1tRk │
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
│ Commits ahead 0, behind 1 │
│ Status merged │
│ │
│ See details. │
├─────────────────────────────────────────────────────────────────────┤
│ 27857ec Add README, just for the fun │
│ 3e674d1 Define power requirements │
├─────────────────────────────────────────────────────────────────────┤
│ ● opened by bob z6Mkt67…v4N1tRk now │
│ ↑ updated to 68143c579935d115e1551b88154cc41763c43e1f (27857ec) now │
│ * revised by alice (you) in 5dd1e6b (f567f69) now │
│ ✓ merged by alice (you) at revision 5dd1e6b (f567f69) now │
╰─────────────────────────────────────────────────────────────────────╯
To publish our new state to the network, we simply push:
$ git push