diff --git a/CHANGELOG.md b/CHANGELOG.md index c05b83f1..3ed337d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## New Features + +- Teach `rad patch show` to show the full commit range for each revision. + Previously, it would only show the head of the range, but not the base. + It now shows `..`, where the shortened OID is used when not + using `--verbose`, and the full OID when using `--verbose`. + These ranges make using `git range-diff` a lot easier, since you can copy + the range from each revision you want to compare. + ## 1.8.0 ## New Features diff --git a/crates/radicle-cli/examples/rad-merge-via-push.md b/crates/radicle-cli/examples/rad-merge-via-push.md index 6973cc50..5a82f3f9 100644 --- a/crates/radicle-cli/examples/rad-merge-via-push.md +++ b/crates/radicle-cli/examples/rad-merge-via-push.md @@ -83,37 +83,37 @@ $ rad patch --merged │ ✓ [ ... ] First change alice (you) - 20aa5dd +0 -0 now │ ╰─────────────────────────────────────────────────────────────────────────────╯ $ rad patch show 696ec5508494692899337afe6713fe1796d0315c -╭────────────────────────────────────────────────────╮ -│ Title First change │ -│ Patch 696ec5508494692899337afe6713fe1796d0315c │ -│ Author alice (you) │ -│ Head 20aa5dde6210796c3a2f04079b42316a31d02689 │ -│ Base [.. ] │ -│ Branches feature/1 │ -│ Commits ahead 0, behind 2 │ -│ Status merged │ -├────────────────────────────────────────────────────┤ -│ 20aa5dd First change │ -├────────────────────────────────────────────────────┤ -│ ● Revision 696ec55 @ 20aa5dd by alice (you) now │ -│ └─ ✓ merged by alice (you) │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title First change │ +│ Patch 696ec5508494692899337afe6713fe1796d0315c │ +│ Author alice (you) │ +│ Head 20aa5dde6210796c3a2f04079b42316a31d02689 │ +│ Base [.. ] │ +│ Branches feature/1 │ +│ Commits ahead 0, behind 2 │ +│ Status merged │ +├──────────────────────────────────────────────────────────┤ +│ 20aa5dd First change │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 696ec55 @ [.. ]..20aa5dd by alice (you) now │ +│ └─ ✓ merged by alice (you) │ +╰──────────────────────────────────────────────────────────╯ $ rad patch show 356f73863a8920455ff6e77cd9c805d68910551b -╭────────────────────────────────────────────────────╮ -│ Title Second change │ -│ Patch 356f73863a8920455ff6e77cd9c805d68910551b │ -│ Author alice (you) │ -│ Head daf349ff76bedf48c5f292290b682ee7be0683cf │ -│ Base [.. ] │ -│ Branches feature/2 │ -│ Commits ahead 0, behind 2 │ -│ Status merged │ -├────────────────────────────────────────────────────┤ -│ daf349f Second change │ -├────────────────────────────────────────────────────┤ -│ ● Revision 356f738 @ daf349f by alice (you) now │ -│ └─ ✓ merged by alice (you) │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Second change │ +│ Patch 356f73863a8920455ff6e77cd9c805d68910551b │ +│ Author alice (you) │ +│ Head daf349ff76bedf48c5f292290b682ee7be0683cf │ +│ Base [.. ] │ +│ Branches feature/2 │ +│ Commits ahead 0, behind 2 │ +│ Status merged │ +├──────────────────────────────────────────────────────────┤ +│ daf349f Second change │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 356f738 @ [.. ]..daf349f by alice (you) now │ +│ └─ ✓ merged by alice (you) │ +╰──────────────────────────────────────────────────────────╯ ``` We can verify that the remote tracking branches were also deleted: diff --git a/crates/radicle-cli/examples/rad-patch-ahead-behind.md b/crates/radicle-cli/examples/rad-patch-ahead-behind.md index cf8c5b7b..b64c206d 100644 --- a/crates/radicle-cli/examples/rad-patch-ahead-behind.md +++ b/crates/radicle-cli/examples/rad-patch-ahead-behind.md @@ -56,20 +56,20 @@ When showing the patch, we see that it is `ahead 1, behind 1`, since master has diverged by one commit: ``` $ rad patch show -v -p 217f050 -╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ Title Add Alan │ -│ Patch 217f050f8891def8fb863f7c0b4f85c89f97299d │ -│ Author alice (you) │ -│ Head 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 │ -│ Base f64fb2c8fe28f7c458c72ec8d700373924794943 │ -│ Branches feature/1 │ -│ Commits ahead 1, behind 1 │ -│ Status open │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ 5c88a79 Add Alan │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● Revision 217f050f8891def8fb863f7c0b4f85c89f97299d with head 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 by alice (you) now │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Title Add Alan │ +│ Patch 217f050f8891def8fb863f7c0b4f85c89f97299d │ +│ Author alice (you) │ +│ Head 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 │ +│ Base f64fb2c8fe28f7c458c72ec8d700373924794943 │ +│ Branches feature/1 │ +│ Commits ahead 1, behind 1 │ +│ Status open │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ 5c88a79 Add Alan │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● Revision 217f050f8891def8fb863f7c0b4f85c89f97299d with range f64fb2c8fe28f7c458c72ec8d700373924794943..5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 by alice (you) now │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ commit 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 Author: radicle @@ -102,21 +102,21 @@ When we look at the patch, we see that it has both commits, because this new patch uses the same base as the previous patch: ``` $ rad patch show -v e22ff008e2a0ed47262890d13263031d7555b555 -╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ Title Add Mel │ -│ Patch e22ff008e2a0ed47262890d13263031d7555b555 │ -│ Author alice (you) │ -│ Head 7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 │ -│ Base f64fb2c8fe28f7c458c72ec8d700373924794943 │ -│ Branches feature/2 │ -│ Commits ahead 2, behind 1 │ -│ Status open │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ 7f63fcb Add Mel │ -│ 5c88a79 Add Alan │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● Revision e22ff008e2a0ed47262890d13263031d7555b555 with head 7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 by alice (you) now │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Title Add Mel │ +│ Patch e22ff008e2a0ed47262890d13263031d7555b555 │ +│ Author alice (you) │ +│ Head 7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 │ +│ Base f64fb2c8fe28f7c458c72ec8d700373924794943 │ +│ Branches feature/2 │ +│ Commits ahead 2, behind 1 │ +│ Status open │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ 7f63fcb Add Mel │ +│ 5c88a79 Add Alan │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● Revision e22ff008e2a0ed47262890d13263031d7555b555 with range f64fb2c8fe28f7c458c72ec8d700373924794943..7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 by alice (you) now │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` If we want to instead create a "stacked" patch, we can do so with the @@ -137,18 +137,18 @@ that it is still two commits ahead and one behind from `master`. ``` $ rad patch show -v a467ffa260c4fbe355b6fb550ba0c4956078717e -╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ Title Add Mel #2 │ -│ Patch a467ffa260c4fbe355b6fb550ba0c4956078717e │ -│ Author alice (you) │ -│ Head 7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 │ -│ Base 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 │ -│ Branches feature/2 │ -│ Commits ahead 2, behind 1 │ -│ Status open │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ 7f63fcb Add Mel │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● Revision a467ffa260c4fbe355b6fb550ba0c4956078717e with head 7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 by alice (you) now │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Title Add Mel #2 │ +│ Patch a467ffa260c4fbe355b6fb550ba0c4956078717e │ +│ Author alice (you) │ +│ Head 7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 │ +│ Base 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7 │ +│ Branches feature/2 │ +│ Commits ahead 2, behind 1 │ +│ Status open │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ 7f63fcb Add Mel │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● Revision a467ffa260c4fbe355b6fb550ba0c4956078717e with range 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7..7f63fcbcf23fc39eea784c091ad3d20d7e4bd005 by alice (you) now │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/examples/rad-patch-change-base.md b/crates/radicle-cli/examples/rad-patch-change-base.md index 0ad7732b..de6c12cc 100644 --- a/crates/radicle-cli/examples/rad-patch-change-base.md +++ b/crates/radicle-cli/examples/rad-patch-change-base.md @@ -44,21 +44,21 @@ Our second patch looks like the following: ``` $ rad patch show 183d343ab47d7fe18baf1b24b7209ad033d7fe5c -╭────────────────────────────────────────────────────╮ -│ Title Add README, just for the fun │ -│ Patch 183d343ab47d7fe18baf1b24b7209ad033d7fe5c │ -│ Author alice (you) │ -│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ -│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ -│ Branches add-readme │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 27857ec Add README, just for the fun │ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision 183d343 @ 27857ec by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add README, just for the fun │ +│ Patch 183d343ab47d7fe18baf1b24b7209ad033d7fe5c │ +│ Author alice (you) │ +│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ +│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ +│ Branches add-readme │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 27857ec Add README, just for the fun │ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 183d343 @ f2de534..27857ec by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` But wait, we meant to stack them and so we don't want to see the @@ -75,19 +75,19 @@ we have a single commit: ``` $ rad patch show 183d343 -╭────────────────────────────────────────────────────╮ -│ Title Add README, just for the fun │ -│ Patch 183d343ab47d7fe18baf1b24b7209ad033d7fe5c │ -│ Author alice (you) │ -│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ -│ Base 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ -│ Branches add-readme │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 27857ec Add README, just for the fun │ -├────────────────────────────────────────────────────┤ -│ ● Revision 183d343 @ 27857ec by alice (you) now │ -│ ↑ Revision ebe76f9 @ 27857ec by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add README, just for the fun │ +│ Patch 183d343ab47d7fe18baf1b24b7209ad033d7fe5c │ +│ Author alice (you) │ +│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ +│ Base 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ +│ Branches add-readme │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 27857ec Add README, just for the fun │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 183d343 @ f2de534..27857ec by alice (you) now │ +│ ↑ Revision ebe76f9 @ 3e674d1..27857ec by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/examples/rad-patch-checkout-revision.md b/crates/radicle-cli/examples/rad-patch-checkout-revision.md index 9b350f0e..4a0e6f35 100644 --- a/crates/radicle-cli/examples/rad-patch-checkout-revision.md +++ b/crates/radicle-cli/examples/rad-patch-checkout-revision.md @@ -15,26 +15,26 @@ We can see the list of revisions of the patch by `show`ing it: ``` $ rad patch show aa45913 -╭────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ -│ Author alice (you) │ -│ Head 639f44a25145a37f747f3c84265037a9461e44c5 │ -│ Base [.. ] │ -│ Branches patch/aa45913 │ -│ Commits ahead 3, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├────────────────────────────────────────────────────┤ -│ 639f44a Add LICENSE, just for the business │ -│ 27857ec Add README, just for the fun │ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision aa45913 @ 3e674d1 by alice (you) now │ -│ ↑ Revision 3156bed @ 27857ec by alice (you) now │ -│ ↑ Revision 2f5324f @ 639f44a by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ +│ Author alice (you) │ +│ Head 639f44a25145a37f747f3c84265037a9461e44c5 │ +│ Base [.. ] │ +│ Branches patch/aa45913 │ +│ Commits ahead 3, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────┤ +│ 639f44a Add LICENSE, just for the business │ +│ 27857ec Add README, just for the fun │ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision aa45913 @ [.. ]..3e674d1 by alice (you) now │ +│ ↑ Revision 3156bed @ [.. ]..27857ec by alice (you) now │ +│ ↑ Revision 2f5324f @ [.. ]..639f44a by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` So, let's checkout the previous revision, `0c0942e2`: diff --git a/crates/radicle-cli/examples/rad-patch-delete.md b/crates/radicle-cli/examples/rad-patch-delete.md index 67f2f2c9..c635d887 100644 --- a/crates/radicle-cli/examples/rad-patch-delete.md +++ b/crates/radicle-cli/examples/rad-patch-delete.md @@ -33,23 +33,23 @@ $ rad patch comment 6c61ef1 -m "I think we should use MIT" ``` ~alice $ rad patch show 6c61ef1 -v -╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ Title Define LICENSE for project │ -│ Patch 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b │ -│ Author alice (you) │ -│ Head 717c900ec17735639587325e0fd9fe09991c9edd │ -│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ -│ Branches prepare-license │ -│ Commits ahead 1, behind 0 │ -│ Status draft │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ 717c900 Introduce license │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● Revision 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b with head 717c900ec17735639587325e0fd9fe09991c9edd by alice (you) now │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ bob z6Mkt67…v4N1tRk now 833db19 │ -│ I think we should use MIT │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Title Define LICENSE for project │ +│ Patch 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b │ +│ Author alice (you) │ +│ Head 717c900ec17735639587325e0fd9fe09991c9edd │ +│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ +│ Branches prepare-license │ +│ Commits ahead 1, behind 0 │ +│ Status draft │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ 717c900 Introduce license │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● Revision 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b with range f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354..717c900ec17735639587325e0fd9fe09991c9edd by alice (you) now │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ bob z6Mkt67…v4N1tRk now 833db19 │ +│ I think we should use MIT │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ $ rad patch comment 6c61ef1 --reply-to 833db19 -m "Thanks, I'll add it!" ╭─────────────────────────╮ │ alice (you) now 1803a38 │ @@ -84,22 +84,22 @@ $ rad patch review 6c61ef1 --accept -m "LGTM!" ✓ Patch 6c61ef1 accepted ✓ Synced with 2 seed(s) $ rad patch show 6c61ef1 -v -╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ Title Define LICENSE for project │ -│ Patch 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b │ -│ Author alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │ -│ Head 1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e │ -│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ -│ Commits ahead 2, behind 0 │ -│ Status draft │ -├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ 1cc8cd9 Add MIT License │ -│ 717c900 Introduce license │ -├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● Revision 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b with head 717c900ec17735639587325e0fd9fe09991c9edd by alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi now │ -│ ↑ Revision 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 with head 1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e by alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi now │ -│ └─ ✓ accepted by bob (you) now │ -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Title Define LICENSE for project │ +│ Patch 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b │ +│ Author alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │ +│ Head 1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e │ +│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ +│ Commits ahead 2, behind 0 │ +│ Status draft │ +├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ 1cc8cd9 Add MIT License │ +│ 717c900 Introduce license │ +├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● Revision 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b with range f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354..717c900ec17735639587325e0fd9fe09991c9edd by alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi now │ +│ ↑ Revision 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 with range f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354..1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e by alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi now │ +│ └─ ✓ accepted by bob (you) now │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` ``` ~bob @@ -109,22 +109,22 @@ $ rad patch delete 6c61ef1 ``` ~alice $ rad patch show 6c61ef1 -v -╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ Title Define LICENSE for project │ -│ Patch 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b │ -│ Author alice (you) │ -│ Head 1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e │ -│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ -│ Branches prepare-license │ -│ Commits ahead 2, behind 0 │ -│ Status draft │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ 1cc8cd9 Add MIT License │ -│ 717c900 Introduce license │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● Revision 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b with head 717c900ec17735639587325e0fd9fe09991c9edd by alice (you) now │ -│ ↑ Revision 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 with head 1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e by alice (you) now │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Title Define LICENSE for project │ +│ Patch 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b │ +│ Author alice (you) │ +│ Head 1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e │ +│ Base f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 │ +│ Branches prepare-license │ +│ Commits ahead 2, behind 0 │ +│ Status draft │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ 1cc8cd9 Add MIT License │ +│ 717c900 Introduce license │ +├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● Revision 6c61ef1716ad8a5c11e04dd7a3fec51e01fba70b with range f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354..717c900ec17735639587325e0fd9fe09991c9edd by alice (you) now │ +│ ↑ Revision 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 with range f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354..1cc8cd9de8ccc44b4fe3876f2dbd2cd1cf9ddc0e by alice (you) now │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` If Alice also decides to delete the patch, then any seeds that have synced with diff --git a/crates/radicle-cli/examples/rad-patch-draft.md b/crates/radicle-cli/examples/rad-patch-draft.md index 6d9c67bd..2ce5200f 100644 --- a/crates/radicle-cli/examples/rad-patch-draft.md +++ b/crates/radicle-cli/examples/rad-patch-draft.md @@ -18,20 +18,20 @@ We can confirm it's a draft by running `show`: ``` $ rad patch show 97e18f8598237a396a1c0ac1509c89028e666c97 -╭────────────────────────────────────────────────────╮ -│ Title Nothing yet │ -│ Patch 97e18f8598237a396a1c0ac1509c89028e666c97 │ -│ Author alice (you) │ -│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │ -│ Base [.. ] │ -│ Branches cloudhead/draft │ -│ Commits ahead 1, behind 0 │ -│ Status draft │ -├────────────────────────────────────────────────────┤ -│ 2a46583 Nothing to see here.. │ -├────────────────────────────────────────────────────┤ -│ ● Revision 97e18f8 @ 2a46583 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Nothing yet │ +│ Patch 97e18f8598237a396a1c0ac1509c89028e666c97 │ +│ Author alice (you) │ +│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │ +│ Base [.. ] │ +│ Branches cloudhead/draft │ +│ Commits ahead 1, behind 0 │ +│ Status draft │ +├──────────────────────────────────────────────────────────┤ +│ 2a46583 Nothing to see here.. │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 97e18f8 @ [.. ]..2a46583 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` Once the patch is ready for review, we can use the `ready` command: @@ -42,20 +42,20 @@ $ rad patch ready 97e18f8598237a396a1c0ac1509c89028e666c97 --no-announce ``` $ rad patch show 97e18f8598237a396a1c0ac1509c89028e666c97 -╭────────────────────────────────────────────────────╮ -│ Title Nothing yet │ -│ Patch 97e18f8598237a396a1c0ac1509c89028e666c97 │ -│ Author alice (you) │ -│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │ -│ Base [.. ] │ -│ Branches cloudhead/draft │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 2a46583 Nothing to see here.. │ -├────────────────────────────────────────────────────┤ -│ ● Revision 97e18f8 @ 2a46583 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Nothing yet │ +│ Patch 97e18f8598237a396a1c0ac1509c89028e666c97 │ +│ Author alice (you) │ +│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │ +│ Base [.. ] │ +│ Branches cloudhead/draft │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 2a46583 Nothing to see here.. │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 97e18f8 @ [.. ]..2a46583 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` If for whatever reason, it needed to go back into draft mode, we could use @@ -64,18 +64,18 @@ the `--undo` flag: ``` $ rad patch ready --undo 97e18f8598237a396a1c0ac1509c89028e666c97 --no-announce $ rad patch show 97e18f8598237a396a1c0ac1509c89028e666c97 -╭────────────────────────────────────────────────────╮ -│ Title Nothing yet │ -│ Patch 97e18f8598237a396a1c0ac1509c89028e666c97 │ -│ Author alice (you) │ -│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │ -│ Base [.. ] │ -│ Branches cloudhead/draft │ -│ Commits ahead 1, behind 0 │ -│ Status draft │ -├────────────────────────────────────────────────────┤ -│ 2a46583 Nothing to see here.. │ -├────────────────────────────────────────────────────┤ -│ ● Revision 97e18f8 @ 2a46583 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Nothing yet │ +│ Patch 97e18f8598237a396a1c0ac1509c89028e666c97 │ +│ Author alice (you) │ +│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │ +│ Base [.. ] │ +│ Branches cloudhead/draft │ +│ Commits ahead 1, behind 0 │ +│ Status draft │ +├──────────────────────────────────────────────────────────┤ +│ 2a46583 Nothing to see here.. │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 97e18f8 @ [.. ]..2a46583 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/examples/rad-patch-edit.md b/crates/radicle-cli/examples/rad-patch-edit.md index 96ef780d..9250ed77 100644 --- a/crates/radicle-cli/examples/rad-patch-edit.md +++ b/crates/radicle-cli/examples/rad-patch-edit.md @@ -45,22 +45,22 @@ Let's look at the patch, to see what it looks like before editing it: ``` $ rad patch show 89f7afb -╭────────────────────────────────────────────────────╮ -│ Title Add README, just for the fun │ -│ Patch 89f7afb1511b976482b21f6b2f39aef7f4fb88a2 │ -│ Author alice (you) │ -│ Head 8945f6189adf027892c85ac57f7e9341049c2537 │ -│ Base [.. ] │ -│ Branches changes │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 8945f61 Define the LICENSE │ -│ 03c02af Add README, just for the fun │ -├────────────────────────────────────────────────────┤ -│ ● Revision 89f7afb @ 03c02af by alice (you) now │ -│ ↑ Revision 5d78dd5 @ 8945f61 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add README, just for the fun │ +│ Patch 89f7afb1511b976482b21f6b2f39aef7f4fb88a2 │ +│ Author alice (you) │ +│ Head 8945f6189adf027892c85ac57f7e9341049c2537 │ +│ Base [.. ] │ +│ Branches changes │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 8945f61 Define the LICENSE │ +│ 03c02af Add README, just for the fun │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 89f7afb @ [.. ]..03c02af by alice (you) now │ +│ ↑ Revision 5d78dd5 @ [.. ]..8945f61 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` We can change the title and description of the patch itself by using a @@ -69,24 +69,24 @@ multi-line message (using two `--message` options here): ``` $ rad patch edit 89f7afb --message "Add Metadata" --message "Add README & LICENSE" --no-announce $ rad patch show 89f7afb -╭────────────────────────────────────────────────────╮ -│ Title Add Metadata │ -│ Patch 89f7afb1511b976482b21f6b2f39aef7f4fb88a2 │ -│ Author alice (you) │ -│ Head 8945f6189adf027892c85ac57f7e9341049c2537 │ -│ Base [.. ] │ -│ Branches changes │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -│ │ -│ Add README & LICENSE │ -├────────────────────────────────────────────────────┤ -│ 8945f61 Define the LICENSE │ -│ 03c02af Add README, just for the fun │ -├────────────────────────────────────────────────────┤ -│ ● Revision 89f7afb @ 03c02af by alice (you) now │ -│ ↑ Revision 5d78dd5 @ 8945f61 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add Metadata │ +│ Patch 89f7afb1511b976482b21f6b2f39aef7f4fb88a2 │ +│ Author alice (you) │ +│ Head 8945f6189adf027892c85ac57f7e9341049c2537 │ +│ Base [.. ] │ +│ Branches changes │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +│ │ +│ Add README & LICENSE │ +├──────────────────────────────────────────────────────────┤ +│ 8945f61 Define the LICENSE │ +│ 03c02af Add README, just for the fun │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 89f7afb @ [.. ]..03c02af by alice (you) now │ +│ ↑ Revision 5d78dd5 @ [.. ]..8945f61 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` Notice that the `Title` is now `Add Metadata`, and the patch now has a @@ -98,24 +98,24 @@ If we want to change a specific revision's description, we can use the ``` $ rad patch edit 89f7afb --revision 5d78dd5 --message "Changes: Adds LICENSE file" --no-announce $ rad patch show 89f7afb -╭────────────────────────────────────────────────────╮ -│ Title Add Metadata │ -│ Patch 89f7afb1511b976482b21f6b2f39aef7f4fb88a2 │ -│ Author alice (you) │ -│ Head 8945f6189adf027892c85ac57f7e9341049c2537 │ -│ Base [.. ] │ -│ Branches changes │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -│ │ -│ Add README & LICENSE │ -├────────────────────────────────────────────────────┤ -│ 8945f61 Define the LICENSE │ -│ 03c02af Add README, just for the fun │ -├────────────────────────────────────────────────────┤ -│ ● Revision 89f7afb @ 03c02af by alice (you) now │ -│ ↑ Revision 5d78dd5 @ 8945f61 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add Metadata │ +│ Patch 89f7afb1511b976482b21f6b2f39aef7f4fb88a2 │ +│ Author alice (you) │ +│ Head 8945f6189adf027892c85ac57f7e9341049c2537 │ +│ Base [.. ] │ +│ Branches changes │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +│ │ +│ Add README & LICENSE │ +├──────────────────────────────────────────────────────────┤ +│ 8945f61 Define the LICENSE │ +│ 03c02af Add README, just for the fun │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 89f7afb @ [.. ]..03c02af by alice (you) now │ +│ ↑ Revision 5d78dd5 @ [.. ]..8945f61 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` We can see that this didn't affect the patch's description, but diff --git a/crates/radicle-cli/examples/rad-patch-jj.md b/crates/radicle-cli/examples/rad-patch-jj.md index b22e64c2..fec39e35 100644 --- a/crates/radicle-cli/examples/rad-patch-jj.md +++ b/crates/radicle-cli/examples/rad-patch-jj.md @@ -62,21 +62,21 @@ $ jj bookmark create flux-capacitor-power ``` $ rad patch show 1e31055 -p -╭───────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch 1e31055[.. ] │ -│ Author alice (you) │ -│ Head a6ea7b7[.. ] │ -│ Base f2de534[.. ] │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├───────────────────────────────────────────────────┤ -│ a6ea7b7 Define power requirements │ -├───────────────────────────────────────────────────┤ -│ ● Revision 1e31055 @ a6ea7b7 by alice (you) now │ -╰───────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch 1e31055[.. ] │ +│ Author alice (you) │ +│ Head a6ea7b7[.. ] │ +│ Base f2de534[.. ] │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────┤ +│ a6ea7b7 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 1e31055 @ [.. ]..a6ea7b7 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ commit a6ea7b7[..] Author: Test User @@ -88,4 +88,4 @@ diff --git a/REQUIREMENTS b/REQUIREMENTS new file mode 100644 index 0000000..e69de29 -``` \ No newline at end of file +``` diff --git a/crates/radicle-cli/examples/rad-patch-pull-update.md b/crates/radicle-cli/examples/rad-patch-pull-update.md index e5f37ec2..1522bfaa 100644 --- a/crates/radicle-cli/examples/rad-patch-pull-update.md +++ b/crates/radicle-cli/examples/rad-patch-pull-update.md @@ -97,21 +97,21 @@ Alice pulls the update. ``` ~alice $ rad patch show 55b9721 -╭─────────────────────────────────────────────────────────╮ -│ Title Bob's patch │ -│ Patch 55b9721ed7f6bfec38f43729e9b6631c5dc812fb │ -│ Author bob z6Mkt67…v4N1tRk │ -│ Head cad2666a8a2250e4dee175ed5044be2c251ff08b │ -│ Base [.. ] │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├─────────────────────────────────────────────────────────┤ -│ cad2666 Bob's commit #2 │ -│ bdcdb30 Bob's commit #1 │ -├─────────────────────────────────────────────────────────┤ -│ ● Revision 55b9721 @ bdcdb30 by bob z6Mkt67…v4N1tRk now │ -│ ↑ Revision f91e056 @ cad2666 by bob z6Mkt67…v4N1tRk now │ -╰─────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────╮ +│ Title Bob's patch │ +│ Patch 55b9721ed7f6bfec38f43729e9b6631c5dc812fb │ +│ Author bob z6Mkt67…v4N1tRk │ +│ Head cad2666a8a2250e4dee175ed5044be2c251ff08b │ +│ Base [.. ] │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────────────┤ +│ cad2666 Bob's commit #2 │ +│ bdcdb30 Bob's commit #1 │ +├──────────────────────────────────────────────────────────────────┤ +│ ● Revision 55b9721 @ [.. ]..bdcdb30 by bob z6Mkt67…v4N1tRk now │ +│ ↑ Revision f91e056 @ [.. ]..cad2666 by bob z6Mkt67…v4N1tRk now │ +╰──────────────────────────────────────────────────────────────────╯ $ git ls-remote rad f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 HEAD f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master diff --git a/crates/radicle-cli/examples/rad-patch-revert-merge.md b/crates/radicle-cli/examples/rad-patch-revert-merge.md index 166e24a0..de89f91e 100644 --- a/crates/radicle-cli/examples/rad-patch-revert-merge.md +++ b/crates/radicle-cli/examples/rad-patch-revert-merge.md @@ -21,21 +21,21 @@ First we see the patch as merged. ``` $ rad patch show 696ec5508494692899337afe6713fe1796d0315c -╭────────────────────────────────────────────────────╮ -│ Title First change │ -│ Patch 696ec5508494692899337afe6713fe1796d0315c │ -│ Author alice (you) │ -│ Head 20aa5dde6210796c3a2f04079b42316a31d02689 │ -│ Base [.. ] │ -│ Branches feature/1, master │ -│ Commits up to date │ -│ Status merged │ -├────────────────────────────────────────────────────┤ -│ 20aa5dd First change │ -├────────────────────────────────────────────────────┤ -│ ● Revision 696ec55 @ 20aa5dd by alice (you) now │ -│ └─ ✓ merged by alice (you) │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title First change │ +│ Patch 696ec5508494692899337afe6713fe1796d0315c │ +│ Author alice (you) │ +│ Head 20aa5dde6210796c3a2f04079b42316a31d02689 │ +│ Base [.. ] │ +│ Branches feature/1, master │ +│ Commits up to date │ +│ Status merged │ +├──────────────────────────────────────────────────────────┤ +│ 20aa5dd First change │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 696ec55 @ [.. ]..20aa5dd by alice (you) now │ +│ └─ ✓ merged by alice (you) │ +╰──────────────────────────────────────────────────────────╯ ``` Now let's revert the patch by pushing a new `master` that doesn't include @@ -60,18 +60,18 @@ The patch shows up as open again. ``` $ rad patch show 696ec5508494692899337afe6713fe1796d0315c -╭────────────────────────────────────────────────────╮ -│ Title First change │ -│ Patch 696ec5508494692899337afe6713fe1796d0315c │ -│ Author alice (you) │ -│ Head 20aa5dde6210796c3a2f04079b42316a31d02689 │ -│ Base [.. ] │ -│ Branches feature/1 │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 20aa5dd First change │ -├────────────────────────────────────────────────────┤ -│ ● Revision 696ec55 @ 20aa5dd by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title First change │ +│ Patch 696ec5508494692899337afe6713fe1796d0315c │ +│ Author alice (you) │ +│ Head 20aa5dde6210796c3a2f04079b42316a31d02689 │ +│ Base [.. ] │ +│ Branches feature/1 │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 20aa5dd First change │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 696ec55 @ [.. ]..20aa5dd by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/examples/rad-patch-update.md b/crates/radicle-cli/examples/rad-patch-update.md index 55917b4e..db768266 100644 --- a/crates/radicle-cli/examples/rad-patch-update.md +++ b/crates/radicle-cli/examples/rad-patch-update.md @@ -13,20 +13,20 @@ To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkE ``` $ rad patch show b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 -╭────────────────────────────────────────────────────╮ -│ Title Not a real change │ -│ Patch b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 │ -│ Author alice (you) │ -│ Head 51b2f0f77b9849bfaa3e9d3ff68ee2f57771d20c │ -│ Base [.. ] │ -│ Branches feature/1 │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 51b2f0f Not a real change │ -├────────────────────────────────────────────────────┤ -│ ● Revision b6a23eb @ 51b2f0f by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Not a real change │ +│ Patch b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 │ +│ Author alice (you) │ +│ Head 51b2f0f77b9849bfaa3e9d3ff68ee2f57771d20c │ +│ Base [.. ] │ +│ Branches feature/1 │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 51b2f0f Not a real change │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision b6a23eb @ [.. ]..51b2f0f by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` We can make some changes to the repository: @@ -55,20 +55,20 @@ The command outputs the new Revision ID, which we can now see here: ``` $ rad patch show b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 -╭────────────────────────────────────────────────────╮ -│ Title Not a real change │ -│ Patch b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 │ -│ Author alice (you) │ -│ Head 4d272148458a17620541555b1f0905c01658aa9f │ -│ Base [.. ] │ -│ Branches feature/1 │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 4d27214 Rename readme file │ -│ 51b2f0f Not a real change │ -├────────────────────────────────────────────────────┤ -│ ● Revision b6a23eb @ 51b2f0f by alice (you) now │ -│ ↑ Revision ea7def3 @ 4d27214 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Not a real change │ +│ Patch b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 │ +│ Author alice (you) │ +│ Head 4d272148458a17620541555b1f0905c01658aa9f │ +│ Base [.. ] │ +│ Branches feature/1 │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 4d27214 Rename readme file │ +│ 51b2f0f Not a real change │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision b6a23eb @ [.. ]..51b2f0f by alice (you) now │ +│ ↑ Revision ea7def3 @ [.. ]..4d27214 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/examples/rad-patch-via-push.md b/crates/radicle-cli/examples/rad-patch-via-push.md index 89d43d46..e00c5ada 100644 --- a/crates/radicle-cli/examples/rad-patch-via-push.md +++ b/crates/radicle-cli/examples/rad-patch-via-push.md @@ -20,22 +20,22 @@ We can see a patch was created: ``` $ rad patch show 6035d2f582afbe01ff23ea87528ae523d76875b6 -╭────────────────────────────────────────────────────╮ -│ Title Add things #1 │ -│ Patch 6035d2f582afbe01ff23ea87528ae523d76875b6 │ -│ Author alice (you) │ -│ Head 42d894a83c9c356552a57af09ccdbd5587a99045 │ -│ Base [.. ] │ -│ Branches feature/1 │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -│ │ -│ See commits for details. │ -├────────────────────────────────────────────────────┤ -│ 42d894a Add things │ -├────────────────────────────────────────────────────┤ -│ ● Revision 6035d2f @ 42d894a by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add things #1 │ +│ Patch 6035d2f582afbe01ff23ea87528ae523d76875b6 │ +│ Author alice (you) │ +│ Head 42d894a83c9c356552a57af09ccdbd5587a99045 │ +│ Base [.. ] │ +│ Branches feature/1 │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +│ │ +│ See commits for details. │ +├──────────────────────────────────────────────────────────┤ +│ 42d894a Add things │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 6035d2f @ [.. ]..42d894a by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` If we check our local branch, we can see its upstream is set to track a remote @@ -139,22 +139,22 @@ We can then see that the patch head has moved: ``` $ rad patch show 9580891 -╭────────────────────────────────────────────────────╮ -│ Title Add more things │ -│ Patch 95808913573cead52ad7b42c7b475260ec45c4b2 │ -│ Author alice (you) │ -│ Head 02bef3fac41b2f98bb3c02b868a53ddfecb55b5f │ -│ Base [.. ] │ -│ Branches feature/2 │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 02bef3f Improve code │ -│ 8b0ea80 Add more things │ -├────────────────────────────────────────────────────┤ -│ ● Revision 9580891 @ 8b0ea80 by alice (you) now │ -│ ↑ Revision d7040c6 @ 02bef3f by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add more things │ +│ Patch 95808913573cead52ad7b42c7b475260ec45c4b2 │ +│ Author alice (you) │ +│ Head 02bef3fac41b2f98bb3c02b868a53ddfecb55b5f │ +│ Base [.. ] │ +│ Branches feature/2 │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 02bef3f Improve code │ +│ 8b0ea80 Add more things │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 9580891 @ [.. ]..8b0ea80 by alice (you) now │ +│ ↑ Revision d7040c6 @ [.. ]..02bef3f by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` And we can check that all the refs are properly updated in our repository: @@ -220,23 +220,23 @@ That worked. We can see the new revision if we call `rad patch show`: ``` $ rad patch show 9580891 -╭────────────────────────────────────────────────────╮ -│ Title Add more things │ -│ Patch 95808913573cead52ad7b42c7b475260ec45c4b2 │ -│ Author alice (you) │ -│ Head 9304dbc445925187994a7a93222a3f8bde73b785 │ -│ Base [.. ] │ -│ Branches feature/2 │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -├────────────────────────────────────────────────────┤ -│ 9304dbc Amended commit │ -│ 8b0ea80 Add more things │ -├────────────────────────────────────────────────────┤ -│ ● Revision 9580891 @ 8b0ea80 by alice (you) now │ -│ ↑ Revision d7040c6 @ 02bef3f by alice (you) now │ -│ ↑ Revision 670d027 @ 9304dbc by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Add more things │ +│ Patch 95808913573cead52ad7b42c7b475260ec45c4b2 │ +│ Author alice (you) │ +│ Head 9304dbc445925187994a7a93222a3f8bde73b785 │ +│ Base [.. ] │ +│ Branches feature/2 │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +├──────────────────────────────────────────────────────────┤ +│ 9304dbc Amended commit │ +│ 8b0ea80 Add more things │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision 9580891 @ [.. ]..8b0ea80 by alice (you) now │ +│ ↑ Revision d7040c6 @ [.. ]..02bef3f by alice (you) now │ +│ ↑ Revision 670d027 @ [.. ]..9304dbc by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` ## Detached HEAD diff --git a/crates/radicle-cli/examples/rad-patch.md b/crates/radicle-cli/examples/rad-patch.md index 8946a1b9..3e5c52e3 100644 --- a/crates/radicle-cli/examples/rad-patch.md +++ b/crates/radicle-cli/examples/rad-patch.md @@ -43,22 +43,22 @@ $ rad patch ``` ``` $ rad patch show aa45913e757cacd46972733bddee5472c78fa32a -p -╭────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ -│ Author alice (you) │ -│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ -│ Base [.. ] │ -│ Branches flux-capacitor-power │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├────────────────────────────────────────────────────┤ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision aa45913 @ 3e674d1 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ +│ Author alice (you) │ +│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ +│ Base [.. ] │ +│ Branches flux-capacitor-power │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────┤ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision aa45913 @ [.. ]..3e674d1 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ commit 3e674d1a1df90807e934f9ae5da2591dd6848a33 Author: radicle @@ -97,23 +97,23 @@ organise your workflow: $ rad patch label aa45913 --add fun --no-announce $ rad patch assign aa45913 --add did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi --no-announce $ rad patch show aa45913 -╭────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ -│ Author alice (you) │ -│ Labels fun │ -│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ -│ Base [.. ] │ -│ Branches flux-capacitor-power │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├────────────────────────────────────────────────────┤ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision aa45913 @ 3e674d1 by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ +│ Author alice (you) │ +│ Labels fun │ +│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ +│ Base [.. ] │ +│ Branches flux-capacitor-power │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────┤ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision aa45913 @ [.. ]..3e674d1 by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` Wait, let's add a README too! Just for fun. @@ -185,26 +185,26 @@ Showing the patch list now will reveal the favorable verdict: ``` $ rad patch show aa45913 -╭────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ -│ Author alice (you) │ -│ Labels fun │ -│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ -│ Base [.. ] │ -│ Branches flux-capacitor-power, patch/aa45913 │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├────────────────────────────────────────────────────┤ -│ 27857ec Add README, just for the fun │ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision aa45913 @ 3e674d1 by alice (you) now │ -│ ↑ Revision 6e5a3b7 @ 27857ec by alice (you) now │ -│ └─ ✓ accepted by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ +│ Author alice (you) │ +│ Labels fun │ +│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ +│ Base [.. ] │ +│ Branches flux-capacitor-power, patch/aa45913 │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────┤ +│ 27857ec Add README, just for the fun │ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision aa45913 @ [.. ]..3e674d1 by alice (you) now │ +│ ↑ Revision 6e5a3b7 @ [.. ]..27857ec by alice (you) now │ +│ └─ ✓ accepted by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ $ rad patch list ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │ ● ID Title Author Reviews Head + - Updated │ @@ -218,24 +218,24 @@ If you make a mistake on the patch description, you can always change it! ``` $ rad patch edit aa45913 --message "Define power requirements" --message "Add requirements file" --no-announce $ rad patch show aa45913 -╭────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ -│ Author alice (you) │ -│ Labels fun │ -│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ -│ Base [.. ] │ -│ Branches flux-capacitor-power, patch/aa45913 │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -│ │ -│ Add requirements file │ -├────────────────────────────────────────────────────┤ -│ 27857ec Add README, just for the fun │ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision aa45913 @ 3e674d1 by alice (you) now │ -│ ↑ Revision 6e5a3b7 @ 27857ec by alice (you) now │ -│ └─ ✓ accepted by alice (you) now │ -╰────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch aa45913e757cacd46972733bddee5472c78fa32a │ +│ Author alice (you) │ +│ Labels fun │ +│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ +│ Base [.. ] │ +│ Branches flux-capacitor-power, patch/aa45913 │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +│ │ +│ Add requirements file │ +├──────────────────────────────────────────────────────────┤ +│ 27857ec Add README, just for the fun │ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────┤ +│ ● Revision aa45913 @ [.. ]..3e674d1 by alice (you) now │ +│ ↑ Revision 6e5a3b7 @ [.. ]..27857ec by alice (you) now │ +│ └─ ✓ accepted by alice (you) now │ +╰──────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/examples/workflow/4-patching-contributor.md b/crates/radicle-cli/examples/workflow/4-patching-contributor.md index 8b7b8ac3..c9038e30 100644 --- a/crates/radicle-cli/examples/workflow/4-patching-contributor.md +++ b/crates/radicle-cli/examples/workflow/4-patching-contributor.md @@ -41,22 +41,22 @@ $ rad patch │ ● e4934b6 Define power requirements bob (you) - 3e674d1 +0 -0 now │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ $ rad patch show e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 -╭────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 │ -│ Author bob (you) │ -│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ -│ Base [.. ] │ -│ Branches flux-capacitor-power │ -│ Commits ahead 1, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├────────────────────────────────────────────────────┤ -│ 3e674d1 Define power requirements │ -├────────────────────────────────────────────────────┤ -│ ● Revision e4934b6 @ 3e674d1 by bob (you) now │ -╰────────────────────────────────────────────────────╯ +╭────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 │ +│ Author bob (you) │ +│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │ +│ Base [.. ] │ +│ Branches flux-capacitor-power │ +│ Commits ahead 1, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├────────────────────────────────────────────────────────┤ +│ 3e674d1 Define power requirements │ +├────────────────────────────────────────────────────────┤ +│ ● Revision e4934b6 @ [.. ]..3e674d1 by bob (you) now │ +╰────────────────────────────────────────────────────────╯ ``` We can also confirm that the patch branch is in storage: diff --git a/crates/radicle-cli/examples/workflow/5-patching-maintainer.md b/crates/radicle-cli/examples/workflow/5-patching-maintainer.md index a7c3bd6b..bcb1c9b1 100644 --- a/crates/radicle-cli/examples/workflow/5-patching-maintainer.md +++ b/crates/radicle-cli/examples/workflow/5-patching-maintainer.md @@ -28,23 +28,23 @@ $ git branch -r bob/patches/e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 rad/master $ rad patch show e4934b6 -╭─────────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 │ -│ Author bob z6Mkt67…v4N1tRk │ -│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ -│ Base [.. ] │ -│ Commits ahead 2, behind 0 │ -│ Status open │ -│ │ -│ See details. │ -├─────────────────────────────────────────────────────────┤ -│ 27857ec Add README, just for the fun │ -│ 3e674d1 Define power requirements │ -├─────────────────────────────────────────────────────────┤ -│ ● Revision e4934b6 @ 3e674d1 by bob z6Mkt67…v4N1tRk now │ -│ ↑ Revision 773b9aa @ 27857ec by bob z6Mkt67…v4N1tRk now │ -╰─────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 │ +│ Author bob z6Mkt67…v4N1tRk │ +│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ +│ Base [.. ] │ +│ Commits ahead 2, behind 0 │ +│ Status open │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────────────┤ +│ 27857ec Add README, just for the fun │ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────────────┤ +│ ● Revision e4934b6 @ [.. ]..3e674d1 by bob z6Mkt67…v4N1tRk now │ +│ ↑ Revision 773b9aa @ [.. ]..27857ec by bob z6Mkt67…v4N1tRk now │ +╰──────────────────────────────────────────────────────────────────╯ ``` Wait! There's a mistake. The REQUIREMENTS should be a markdown file. Let's @@ -103,26 +103,26 @@ The patch is now merged and closed :). ``` $ rad patch show e4934b6 -╭─────────────────────────────────────────────────────────╮ -│ Title Define power requirements │ -│ Patch e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 │ -│ Author bob z6Mkt67…v4N1tRk │ -│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ -│ Base [.. ] │ -│ Commits ahead 0, behind 1 │ -│ Status merged │ -│ │ -│ See details. │ -├─────────────────────────────────────────────────────────┤ -│ 27857ec Add README, just for the fun │ -│ 3e674d1 Define power requirements │ -├─────────────────────────────────────────────────────────┤ -│ ● Revision e4934b6 @ 3e674d1 by bob z6Mkt67…v4N1tRk now │ -│ ↑ Revision 773b9aa @ 27857ec by bob z6Mkt67…v4N1tRk now │ -│ ↑ Revision 9d62420 @ f567f69 by alice (you) now │ -│ └─ ✓ accepted by alice (you) now │ -│ └─ ✓ merged by alice (you) │ -╰─────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────╮ +│ Title Define power requirements │ +│ Patch e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46 │ +│ Author bob z6Mkt67…v4N1tRk │ +│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │ +│ Base [.. ] │ +│ Commits ahead 0, behind 1 │ +│ Status merged │ +│ │ +│ See details. │ +├──────────────────────────────────────────────────────────────────┤ +│ 27857ec Add README, just for the fun │ +│ 3e674d1 Define power requirements │ +├──────────────────────────────────────────────────────────────────┤ +│ ● Revision e4934b6 @ [.. ]..3e674d1 by bob z6Mkt67…v4N1tRk now │ +│ ↑ Revision 773b9aa @ [.. ]..27857ec by bob z6Mkt67…v4N1tRk now │ +│ ↑ Revision 9d62420 @ [.. ]..f567f69 by alice (you) now │ +│ └─ ✓ accepted by alice (you) now │ +│ └─ ✓ merged by alice (you) │ +╰──────────────────────────────────────────────────────────────────╯ ``` To publish our new state to the network, we simply push: diff --git a/crates/radicle-cli/src/terminal/patch/timeline.rs b/crates/radicle-cli/src/terminal/patch/timeline.rs index 9cf6a47f..c4250bcd 100644 --- a/crates/radicle-cli/src/terminal/patch/timeline.rs +++ b/crates/radicle-cli/src/terminal/patch/timeline.rs @@ -53,7 +53,9 @@ struct RevisionEntry<'a> { timestamp: cob::Timestamp, /// The id of the [`Revision`]. id: RevisionId, - /// The commit head of the [`Revision`]. + /// The base commit of the [`Revision`]. + base: git::Oid, + /// The head commit of the [`Revision`]. head: git::Oid, /// All [`Update`]s that occurred on the [`Revision`]. updates: Vec>, @@ -100,6 +102,7 @@ impl<'a> RevisionEntry<'a> { author: Author::new(&revision.author().id, profile, verbose), timestamp: revision.timestamp(), id, + base: *revision.base(), head: revision.head(), updates: updates.into_iter().map(|(_, up)| up).collect(), } @@ -113,7 +116,7 @@ impl<'a> RevisionEntry<'a> { use term::{format::*, *}; let id: Label = if verbose { - self.id.to_string().into() + oid_long(self.id).into() } else { oid(self.id).into() }; @@ -127,13 +130,13 @@ impl<'a> RevisionEntry<'a> { let line = Line::spaced([icon.into(), dim("Revision").into(), id]).space(); let line = line - .item(dim(if verbose { "with head" } else { "@" })) + .item(dim(if verbose { "with range" } else { "@" })) .space(); let line = line.item(secondary(if verbose { - Paint::new(self.head.to_string()) + range_long(self.base, self.head) } else { - oid(self.head) + range(self.base, self.head) })); iter::once( @@ -169,7 +172,7 @@ impl Update<'_> { match self { Update::Reviewed { review } => { - let by = " ".repeat(if verbose { 0 } else { 13 }) + "by"; + let by = " ".repeat(if verbose { 0 } else { 22 }) + "by"; let (symbol, verb) = match review.verdict() { Some(Verdict::Accept) => (PREFIX_SUCCESS, positive("accepted")),