Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Make `rad patch show` prettier
◌ CI pending Lorenz Leutgeb committed 9 months ago
commit b3335c51387f711d6e63b328ec403e579f82f862
parent 7d2f0e387c66f3f24b94673a2de9589407e2f946
1 pending (1 total) View logs
16 files changed +655 -739
modified crates/radicle-cli/examples/rad-merge-via-push.md
@@ -83,35 +83,35 @@ $ 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             │
-
│ Branches  feature/1                                            │
-
│ Commits   ahead 0, behind 2                                    │
-
│ Status    merged                                               │
-
├────────────────────────────────────────────────────────────────┤
-
│ 20aa5dd First change                                           │
-
├────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (20aa5dd) now                          │
-
│   └─ ✓ merged by alice (you) at revision 696ec55 (20aa5dd) now │
-
╰────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     First change                                  │
+
│ Patch     696ec5508494692899337afe6713fe1796d0315c      │
+
│ Author    alice (you)                                   │
+
│ Head      20aa5dde6210796c3a2f04079b42316a31d02689      │
+
│ Branches  feature/1                                     │
+
│ Commits   ahead 0, behind 2                             │
+
│ Status    merged                                        │
+
├─────────────────────────────────────────────────────────┤
+
│ 20aa5dd First change                                    │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 696ec55 with head 20aa5dd by alice (you) now │
+
│   └─ ✓  merged                       by alice (you)     │
+
╰─────────────────────────────────────────────────────────╯
$ rad patch show 356f73863a8920455ff6e77cd9c805d68910551b
-
╭────────────────────────────────────────────────────────────────╮
-
│ Title     Second change                                        │
-
│ Patch     356f73863a8920455ff6e77cd9c805d68910551b             │
-
│ Author    alice (you)                                          │
-
│ Head      daf349ff76bedf48c5f292290b682ee7be0683cf             │
-
│ Branches  feature/2                                            │
-
│ Commits   ahead 0, behind 2                                    │
-
│ Status    merged                                               │
-
├────────────────────────────────────────────────────────────────┤
-
│ daf349f Second change                                          │
-
├────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (daf349f) now                          │
-
│   └─ ✓ merged by alice (you) at revision 356f738 (daf349f) now │
-
╰────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Second change                                 │
+
│ Patch     356f73863a8920455ff6e77cd9c805d68910551b      │
+
│ Author    alice (you)                                   │
+
│ Head      daf349ff76bedf48c5f292290b682ee7be0683cf      │
+
│ Branches  feature/2                                     │
+
│ Commits   ahead 0, behind 2                             │
+
│ Status    merged                                        │
+
├─────────────────────────────────────────────────────────┤
+
│ daf349f Second change                                   │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 356f738 with head daf349f by alice (you) now │
+
│   └─ ✓  merged                       by alice (you)     │
+
╰─────────────────────────────────────────────────────────╯
```

We can verify that the remote tracking branches were also deleted:
modified 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                                   │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (5c88a79) 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 head 5c88a79 by alice (you) now │
+
╰──────────────────────────────────────────────────────────────────────────────────────────╯

commit 5c88a79d75f5c2b4cc51ee6f163d2db91ee198d7
Author: radicle <radicle@localhost>
@@ -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                                   │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (7f63fcb) 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 head 7f63fcb 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                                    │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (7f63fcb) 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 head 7f63fcb by alice (you) now │
+
╰──────────────────────────────────────────────────────────────────────────────────────────╯
```
modified crates/radicle-cli/examples/rad-patch-change-base.md
@@ -44,21 +44,21 @@ Our second patch looks like the following:

```
$ rad patch show 183d343ab47d7fe18baf1b24b7209ad033d7fe5c -v
-
╭────────────────────────────────────────────────────╮
-
│ 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                  │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (27857ec) 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 183d343ab47d7fe18baf1b24b7209ad033d7fe5c with head 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 -v
-
╭─────────────────────────────────────────────────────────────────────╮
-
│ 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                                │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (27857ec) now                               │
-
│ ↑ updated to ebe76f9c2148eb595d7a745f82275786bf3458c3 (27857ec) 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 183d343ab47d7fe18baf1b24b7209ad033d7fe5c with head 27857ec by alice (you) now │
+
│ ↑ Revision ebe76f9c2148eb595d7a745f82275786bf3458c3 with head 27857ec by alice (you) now │
+
╰──────────────────────────────────────────────────────────────────────────────────────────╯
```
modified crates/radicle-cli/examples/rad-patch-checkout-revision.md
@@ -15,25 +15,25 @@ 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                  │
-
│ 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                                   │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (3e674d1) now                               │
-
│ ↑ updated to 3156bed9d64d4675d6cf56612d217fc5f4e8a53a (27857ec) now │
-
│ ↑ updated to 2f5324f61e05cda65b667eeea02570d077a8e724 (639f44a) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Define power requirements                     │
+
│ Patch     aa45913e757cacd46972733bddee5472c78fa32a      │
+
│ Author    alice (you)                                   │
+
│ Head      639f44a25145a37f747f3c84265037a9461e44c5      │
+
│ 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 with head 3e674d1 by alice (you) now │
+
│ ↑ Revision 3156bed with head 27857ec by alice (you) now │
+
│ ↑ Revision 2f5324f with head 639f44a by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

So, let's checkout the previous revision, `0c0942e2`:
modified 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                          │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (717c900) 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 head 717c900 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 │
@@ -85,22 +85,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                                           │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice z6MknSL…StBU8Vi (717c900) now                     │
-
│ ↑ updated to 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 (1cc8cd9) 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 head 717c900 by alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi now │
+
│ ↑ Revision 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 with head 1cc8cd9 by alice z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi now │
+
│   └─ ✓ accepted by bob (you) now                                                                                                    │
+
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

``` ~bob
@@ -110,22 +110,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                                           │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (717c900) now                               │
-
│ ↑ updated to 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 (1cc8cd9) 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 head 717c900 by alice (you) now │
+
│ ↑ Revision 93915b9afa94a9dc4f52f12cdf077d4613ea3eb3 with head 1cc8cd9 by alice (you) now │
+
╰──────────────────────────────────────────────────────────────────────────────────────────╯
```

If Alice also decides to delete the patch, then any seeds that have synced with
modified crates/radicle-cli/examples/rad-patch-draft.md
@@ -18,19 +18,19 @@ We can confirm it's a draft by running `show`:

```
$ rad patch show 97e18f8598237a396a1c0ac1509c89028e666c97
-
╭────────────────────────────────────────────────────╮
-
│ Title     Nothing yet                              │
-
│ Patch     97e18f8598237a396a1c0ac1509c89028e666c97 │
-
│ Author    alice (you)                              │
-
│ Head      2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
-
│ Branches  cloudhead/draft                          │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    draft                                    │
-
├────────────────────────────────────────────────────┤
-
│ 2a46583 Nothing to see here..                      │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (2a46583) [ .. ]           │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Nothing yet                                   │
+
│ Patch     97e18f8598237a396a1c0ac1509c89028e666c97      │
+
│ Author    alice (you)                                   │
+
│ Head      2a465832b5a76abe25be44a3a5d224bbd7741ba7      │
+
│ Branches  cloudhead/draft                               │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    draft                                         │
+
├─────────────────────────────────────────────────────────┤
+
│ 2a46583 Nothing to see here..                           │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 97e18f8 with head 2a46583 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

Once the patch is ready for review, we can use the `ready` command:
@@ -41,19 +41,19 @@ $ rad patch ready 97e18f8598237a396a1c0ac1509c89028e666c97 --no-announce

```
$ rad patch show 97e18f8598237a396a1c0ac1509c89028e666c97
-
╭────────────────────────────────────────────────────╮
-
│ Title     Nothing yet                              │
-
│ Patch     97e18f8598237a396a1c0ac1509c89028e666c97 │
-
│ Author    alice (you)                              │
-
│ Head      2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
-
│ Branches  cloudhead/draft                          │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
├────────────────────────────────────────────────────┤
-
│ 2a46583 Nothing to see here..                      │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (2a46583) [ .. ]           │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Nothing yet                                   │
+
│ Patch     97e18f8598237a396a1c0ac1509c89028e666c97      │
+
│ Author    alice (you)                                   │
+
│ Head      2a465832b5a76abe25be44a3a5d224bbd7741ba7      │
+
│ Branches  cloudhead/draft                               │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 2a46583 Nothing to see here..                           │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 97e18f8 with head 2a46583 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

If for whatever reason, it needed to go back into draft mode, we could use
@@ -62,17 +62,17 @@ the `--undo` flag:
```
$ rad patch ready --undo 97e18f8598237a396a1c0ac1509c89028e666c97 --no-announce
$ rad patch show 97e18f8598237a396a1c0ac1509c89028e666c97
-
╭────────────────────────────────────────────────────╮
-
│ Title     Nothing yet                              │
-
│ Patch     97e18f8598237a396a1c0ac1509c89028e666c97 │
-
│ Author    alice (you)                              │
-
│ Head      2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
-
│ Branches  cloudhead/draft                          │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    draft                                    │
-
├────────────────────────────────────────────────────┤
-
│ 2a46583 Nothing to see here..                      │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (2a46583) [ .. ]           │
-
╰────────────────────────────────────────────────────╯
-
```
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Nothing yet                                   │
+
│ Patch     97e18f8598237a396a1c0ac1509c89028e666c97      │
+
│ Author    alice (you)                                   │
+
│ Head      2a465832b5a76abe25be44a3a5d224bbd7741ba7      │
+
│ Branches  cloudhead/draft                               │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    draft                                         │
+
├─────────────────────────────────────────────────────────┤
+
│ 2a46583 Nothing to see here..                           │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 97e18f8 with head 2a46583 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
+
```

\ No newline at end of file
modified crates/radicle-cli/examples/rad-patch-edit.md
@@ -45,21 +45,21 @@ 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                  │
-
│ Branches  changes                                                   │
-
│ Commits   ahead 2, behind 0                                         │
-
│ Status    open                                                      │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ 8945f61 Define the LICENSE                                          │
-
│ 03c02af Add README, just for the fun                                │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (03c02af) now                               │
-
│ ↑ updated to 5d78dd5376453e25df5988ec86951c99cb73742c (8945f61) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Add README, just for the fun                  │
+
│ Patch     89f7afb1511b976482b21f6b2f39aef7f4fb88a2      │
+
│ Author    alice (you)                                   │
+
│ Head      8945f6189adf027892c85ac57f7e9341049c2537      │
+
│ Branches  changes                                       │
+
│ Commits   ahead 2, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 8945f61 Define the LICENSE                              │
+
│ 03c02af Add README, just for the fun                    │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 89f7afb with head 03c02af by alice (you) now │
+
│ ↑ Revision 5d78dd5 with head 8945f61 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

We can change the title and description of the patch itself by using a
@@ -68,23 +68,23 @@ 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                  │
-
│ Branches  changes                                                   │
-
│ Commits   ahead 2, behind 0                                         │
-
│ Status    open                                                      │
-
│                                                                     │
-
│ Add README & LICENSE                                                │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ 8945f61 Define the LICENSE                                          │
-
│ 03c02af Add README, just for the fun                                │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (03c02af) now                               │
-
│ ↑ updated to 5d78dd5376453e25df5988ec86951c99cb73742c (8945f61) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Add Metadata                                  │
+
│ Patch     89f7afb1511b976482b21f6b2f39aef7f4fb88a2      │
+
│ Author    alice (you)                                   │
+
│ Head      8945f6189adf027892c85ac57f7e9341049c2537      │
+
│ 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 with head 03c02af by alice (you) now │
+
│ ↑ Revision 5d78dd5 with head 8945f61 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

Notice that the `Title` is now `Add Metadata`, and the patch now has a
@@ -96,23 +96,23 @@ 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                  │
-
│ Branches  changes                                                   │
-
│ Commits   ahead 2, behind 0                                         │
-
│ Status    open                                                      │
-
│                                                                     │
-
│ Add README & LICENSE                                                │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ 8945f61 Define the LICENSE                                          │
-
│ 03c02af Add README, just for the fun                                │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (03c02af) now                               │
-
│ ↑ updated to 5d78dd5376453e25df5988ec86951c99cb73742c (8945f61) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Add Metadata                                  │
+
│ Patch     89f7afb1511b976482b21f6b2f39aef7f4fb88a2      │
+
│ Author    alice (you)                                   │
+
│ Head      8945f6189adf027892c85ac57f7e9341049c2537      │
+
│ 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 with head 03c02af by alice (you) now │
+
│ ↑ Revision 5d78dd5 with head 8945f61 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

We can see that this didn't affect the patch's description, but
modified crates/radicle-cli/examples/rad-patch-pull-update.md
@@ -97,20 +97,20 @@ Alice pulls the update.

``` ~alice
$ rad patch show 55b9721
-
╭─────────────────────────────────────────────────────────────────────╮
-
│ Title    Bob's patch                                                │
-
│ Patch    55b9721ed7f6bfec38f43729e9b6631c5dc812fb                   │
-
│ Author   bob z6Mkt67…v4N1tRk                                        │
-
│ Head     cad2666a8a2250e4dee175ed5044be2c251ff08b                   │
-
│ Commits  ahead 2, behind 0                                          │
-
│ Status   open                                                       │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ cad2666 Bob's commit #2                                             │
-
│ bdcdb30 Bob's commit #1                                             │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by bob z6Mkt67…v4N1tRk (bdcdb30) now                       │
-
│ ↑ updated to f91e056da05b2d9a58af1160c76245bc3debf7a8 (cad2666) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────────────╮
+
│ Title    Bob's patch                                            │
+
│ Patch    55b9721ed7f6bfec38f43729e9b6631c5dc812fb               │
+
│ Author   bob z6Mkt67…v4N1tRk                                    │
+
│ Head     cad2666a8a2250e4dee175ed5044be2c251ff08b               │
+
│ Commits  ahead 2, behind 0                                      │
+
│ Status   open                                                   │
+
├─────────────────────────────────────────────────────────────────┤
+
│ cad2666 Bob's commit #2                                         │
+
│ bdcdb30 Bob's commit #1                                         │
+
├─────────────────────────────────────────────────────────────────┤
+
│ ● Revision 55b9721 with head bdcdb30 by bob z6Mkt67…v4N1tRk now │
+
│ ↑ Revision f91e056 with head cad2666 by bob z6Mkt67…v4N1tRk now │
+
╰─────────────────────────────────────────────────────────────────╯
$ git ls-remote rad
f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354	refs/heads/master
cad2666a8a2250e4dee175ed5044be2c251ff08b	refs/heads/patches/55b9721ed7f6bfec38f43729e9b6631c5dc812fb
modified crates/radicle-cli/examples/rad-patch-revert-merge.md
@@ -21,20 +21,20 @@ First we see the patch as merged.

```
$ rad patch show 696ec5508494692899337afe6713fe1796d0315c
-
╭────────────────────────────────────────────────────────────────╮
-
│ Title     First change                                         │
-
│ Patch     696ec5508494692899337afe6713fe1796d0315c             │
-
│ Author    alice (you)                                          │
-
│ Head      20aa5dde6210796c3a2f04079b42316a31d02689             │
-
│ Branches  feature/1, master                                    │
-
│ Commits   up to date                                           │
-
│ Status    merged                                               │
-
├────────────────────────────────────────────────────────────────┤
-
│ 20aa5dd First change                                           │
-
├────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (20aa5dd) now                          │
-
│   └─ ✓ merged by alice (you) at revision 696ec55 (20aa5dd) now │
-
╰────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     First change                                  │
+
│ Patch     696ec5508494692899337afe6713fe1796d0315c      │
+
│ Author    alice (you)                                   │
+
│ Head      20aa5dde6210796c3a2f04079b42316a31d02689      │
+
│ Branches  feature/1, master                             │
+
│ Commits   up to date                                    │
+
│ Status    merged                                        │
+
├─────────────────────────────────────────────────────────┤
+
│ 20aa5dd First change                                    │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 696ec55 with head 20aa5dd by alice (you) now │
+
│   └─ ✓  merged                       by alice (you)     │
+
╰─────────────────────────────────────────────────────────╯
```

Now let's revert the patch by pushing a new `master` that doesn't include
@@ -59,17 +59,17 @@ The patch shows up as open again.

```
$ rad patch show 696ec5508494692899337afe6713fe1796d0315c
-
╭────────────────────────────────────────────────────╮
-
│ Title     First change                             │
-
│ Patch     696ec5508494692899337afe6713fe1796d0315c │
-
│ Author    alice (you)                              │
-
│ Head      20aa5dde6210796c3a2f04079b42316a31d02689 │
-
│ Branches  feature/1                                │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
├────────────────────────────────────────────────────┤
-
│ 20aa5dd First change                               │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (20aa5dd) now              │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     First change                                  │
+
│ Patch     696ec5508494692899337afe6713fe1796d0315c      │
+
│ Author    alice (you)                                   │
+
│ Head      20aa5dde6210796c3a2f04079b42316a31d02689      │
+
│ Branches  feature/1                                     │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 20aa5dd First change                                    │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 696ec55 with head 20aa5dd by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```
modified crates/radicle-cli/examples/rad-patch-update.md
@@ -13,19 +13,19 @@ To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkE

```
$ rad patch show b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5
-
╭────────────────────────────────────────────────────╮
-
│ Title     Not a real change                        │
-
│ Patch     b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5 │
-
│ Author    alice (you)                              │
-
│ Head      51b2f0f77b9849bfaa3e9d3ff68ee2f57771d20c │
-
│ Branches  feature/1                                │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
├────────────────────────────────────────────────────┤
-
│ 51b2f0f Not a real change                          │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (51b2f0f) now              │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Not a real change                             │
+
│ Patch     b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5      │
+
│ Author    alice (you)                                   │
+
│ Head      51b2f0f77b9849bfaa3e9d3ff68ee2f57771d20c      │
+
│ Branches  feature/1                                     │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 51b2f0f Not a real change                               │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision b6a23eb with head 51b2f0f by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

We can make some changes to the repository:
@@ -54,19 +54,19 @@ 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                  │
-
│ Branches  feature/1                                                 │
-
│ Commits   ahead 2, behind 0                                         │
-
│ Status    open                                                      │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ 4d27214 Rename readme file                                          │
-
│ 51b2f0f Not a real change                                           │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (51b2f0f) now                               │
-
│ ↑ updated to ea7def3857f62f404606d7cd6490cd0de4eaebd1 (4d27214) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Not a real change                             │
+
│ Patch     b6a23eb08656de0ef1fcc0b5fe8820841e5cb2e5      │
+
│ Author    alice (you)                                   │
+
│ Head      4d272148458a17620541555b1f0905c01658aa9f      │
+
│ Branches  feature/1                                     │
+
│ Commits   ahead 2, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 4d27214 Rename readme file                              │
+
│ 51b2f0f Not a real change                               │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision b6a23eb with head 51b2f0f by alice (you) now │
+
│ ↑ Revision ea7def3 with head 4d27214 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```
modified crates/radicle-cli/examples/rad-patch-via-push.md
@@ -20,21 +20,21 @@ We can see a patch was created:

```
$ rad patch show 6035d2f582afbe01ff23ea87528ae523d76875b6
-
╭────────────────────────────────────────────────────╮
-
│ Title     Add things #1                            │
-
│ Patch     6035d2f582afbe01ff23ea87528ae523d76875b6 │
-
│ Author    alice (you)                              │
-
│ Head      42d894a83c9c356552a57af09ccdbd5587a99045 │
-
│ Branches  feature/1                                │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
│                                                    │
-
│ See commits for details.                           │
-
├────────────────────────────────────────────────────┤
-
│ 42d894a Add things                                 │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (42d894a) now              │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Add things #1                                 │
+
│ Patch     6035d2f582afbe01ff23ea87528ae523d76875b6      │
+
│ Author    alice (you)                                   │
+
│ Head      42d894a83c9c356552a57af09ccdbd5587a99045      │
+
│ Branches  feature/1                                     │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    open                                          │
+
│                                                         │
+
│ See commits for details.                                │
+
├─────────────────────────────────────────────────────────┤
+
│ 42d894a Add things                                      │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 6035d2f with head 42d894a by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

If we check our local branch, we can see its upstream is set to track a remote
@@ -137,21 +137,21 @@ 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                  │
-
│ Branches  feature/2                                                 │
-
│ Commits   ahead 2, behind 0                                         │
-
│ Status    open                                                      │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ 02bef3f Improve code                                                │
-
│ 8b0ea80 Add more things                                             │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (8b0ea80) now                               │
-
│ ↑ updated to d7040c6c97629c2b94f86fb639bebbff5de39697 (02bef3f) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Add more things                               │
+
│ Patch     95808913573cead52ad7b42c7b475260ec45c4b2      │
+
│ Author    alice (you)                                   │
+
│ Head      02bef3fac41b2f98bb3c02b868a53ddfecb55b5f      │
+
│ Branches  feature/2                                     │
+
│ Commits   ahead 2, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 02bef3f Improve code                                    │
+
│ 8b0ea80 Add more things                                 │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 9580891 with head 8b0ea80 by alice (you) now │
+
│ ↑ Revision d7040c6 with head 02bef3f by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

And we can check that all the refs are properly updated in our repository:
@@ -217,22 +217,22 @@ 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                  │
-
│ Branches  feature/2                                                 │
-
│ Commits   ahead 2, behind 0                                         │
-
│ Status    open                                                      │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ 9304dbc Amended commit                                              │
-
│ 8b0ea80 Add more things                                             │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (8b0ea80) now                               │
-
│ ↑ updated to d7040c6c97629c2b94f86fb639bebbff5de39697 (02bef3f) now │
-
│ ↑ updated to 670d02794aa05afd6e0851f4aa848bc87c4712c7 (9304dbc) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Add more things                               │
+
│ Patch     95808913573cead52ad7b42c7b475260ec45c4b2      │
+
│ Author    alice (you)                                   │
+
│ Head      9304dbc445925187994a7a93222a3f8bde73b785      │
+
│ Branches  feature/2                                     │
+
│ Commits   ahead 2, behind 0                             │
+
│ Status    open                                          │
+
├─────────────────────────────────────────────────────────┤
+
│ 9304dbc Amended commit                                  │
+
│ 8b0ea80 Add more things                                 │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision 9580891 with head 8b0ea80 by alice (you) now │
+
│ ↑ Revision d7040c6 with head 02bef3f by alice (you) now │
+
│ ↑ Revision 670d027 with head 9304dbc by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

## Empty patch
modified crates/radicle-cli/examples/rad-patch.md
@@ -43,21 +43,21 @@ $ rad patch
```
```
$ rad patch show aa45913e757cacd46972733bddee5472c78fa32a -p
-
╭────────────────────────────────────────────────────╮
-
│ Title     Define power requirements                │
-
│ Patch     aa45913e757cacd46972733bddee5472c78fa32a │
-
│ Author    alice (you)                              │
-
│ Head      3e674d1a1df90807e934f9ae5da2591dd6848a33 │
-
│ Branches  flux-capacitor-power                     │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
│                                                    │
-
│ See details.                                       │
-
├────────────────────────────────────────────────────┤
-
│ 3e674d1 Define power requirements                  │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (3e674d1) now              │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Define power requirements                     │
+
│ Patch     aa45913e757cacd46972733bddee5472c78fa32a      │
+
│ Author    alice (you)                                   │
+
│ Head      3e674d1a1df90807e934f9ae5da2591dd6848a33      │
+
│ Branches  flux-capacitor-power                          │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    open                                          │
+
│                                                         │
+
│ See details.                                            │
+
├─────────────────────────────────────────────────────────┤
+
│ 3e674d1 Define power requirements                       │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision aa45913 with head 3e674d1 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯

commit 3e674d1a1df90807e934f9ae5da2591dd6848a33
Author: radicle <radicle@localhost>
@@ -96,22 +96,22 @@ 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 │
-
│ Branches  flux-capacitor-power                     │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
│                                                    │
-
│ See details.                                       │
-
├────────────────────────────────────────────────────┤
-
│ 3e674d1 Define power requirements                  │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (3e674d1) now              │
-
╰────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Define power requirements                     │
+
│ Patch     aa45913e757cacd46972733bddee5472c78fa32a      │
+
│ Author    alice (you)                                   │
+
│ Labels    fun                                           │
+
│ Head      3e674d1a1df90807e934f9ae5da2591dd6848a33      │
+
│ Branches  flux-capacitor-power                          │
+
│ Commits   ahead 1, behind 0                             │
+
│ Status    open                                          │
+
│                                                         │
+
│ See details.                                            │
+
├─────────────────────────────────────────────────────────┤
+
│ 3e674d1 Define power requirements                       │
+
├─────────────────────────────────────────────────────────┤
+
│ ● Revision aa45913 with head 3e674d1 by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```

Wait, let's add a README too! Just for fun.
@@ -183,25 +183,25 @@ 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                  │
-
│ 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                                   │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (3e674d1) now                               │
-
│ ↑ updated to 6e5a3b7b2ce27b32e7ccc2f0b3f4594897dde638 (27857ec) now │
-
│   └─ ✓ accepted by alice (you) now                                  │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Define power requirements                     │
+
│ Patch     aa45913e757cacd46972733bddee5472c78fa32a      │
+
│ Author    alice (you)                                   │
+
│ Labels    fun                                           │
+
│ Head      27857ec9eb04c69cacab516e8bf4b5fd36090f66      │
+
│ 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 with head 3e674d1 by alice (you) now │
+
│ ↑ Revision 6e5a3b7 with head 27857ec by alice (you) now │
+
│   └─ ✓ accepted                      by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
$ rad patch list
╭─────────────────────────────────────────────────────────────────────────────────────────╮
│ ●  ID       Title                      Author         Reviews  Head     +   -   Updated │
@@ -215,23 +215,23 @@ 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                  │
-
│ 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                                   │
-
├─────────────────────────────────────────────────────────────────────┤
-
│ ● opened by alice (you) (3e674d1) now                               │
-
│ ↑ updated to 6e5a3b7b2ce27b32e7ccc2f0b3f4594897dde638 (27857ec) now │
-
│   └─ ✓ accepted by alice (you) now                                  │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────╮
+
│ Title     Define power requirements                     │
+
│ Patch     aa45913e757cacd46972733bddee5472c78fa32a      │
+
│ Author    alice (you)                                   │
+
│ Labels    fun                                           │
+
│ Head      27857ec9eb04c69cacab516e8bf4b5fd36090f66      │
+
│ 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 with head 3e674d1 by alice (you) now │
+
│ ↑ Revision 6e5a3b7 with head 27857ec by alice (you) now │
+
│   └─ ✓ accepted                      by alice (you) now │
+
╰─────────────────────────────────────────────────────────╯
```
modified crates/radicle-cli/examples/workflow/4-patching-contributor.md
@@ -41,21 +41,21 @@ $ 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 │
-
│ Branches  flux-capacitor-power                     │
-
│ Commits   ahead 1, behind 0                        │
-
│ Status    open                                     │
-
│                                                    │
-
│ See details.                                       │
-
├────────────────────────────────────────────────────┤
-
│ 3e674d1 Define power requirements                  │
-
├────────────────────────────────────────────────────┤
-
│ ● opened by bob (you) (3e674d1) now                │
-
╰────────────────────────────────────────────────────╯
+
╭───────────────────────────────────────────────────────╮
+
│ Title     Define power requirements                   │
+
│ Patch     e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46    │
+
│ Author    bob (you)                                   │
+
│ Head      3e674d1a1df90807e934f9ae5da2591dd6848a33    │
+
│ Branches  flux-capacitor-power                        │
+
│ Commits   ahead 1, behind 0                           │
+
│ Status    open                                        │
+
│                                                       │
+
│ See details.                                          │
+
├───────────────────────────────────────────────────────┤
+
│ 3e674d1 Define power requirements                     │
+
├───────────────────────────────────────────────────────┤
+
│ ● Revision e4934b6 with head 3e674d1 by bob (you) now │
+
╰───────────────────────────────────────────────────────╯
```

We can also confirm that the patch branch is in storage:
modified crates/radicle-cli/examples/workflow/5-patching-maintainer.md
@@ -28,22 +28,22 @@ $ git branch -r
  bob/patches/e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46
  rad/master
$ rad patch show e4934b6
-
╭─────────────────────────────────────────────────────────────────────╮
-
│ Title    Define power requirements                                  │
-
│ Patch    e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46                   │
-
│ 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 (3e674d1) now                       │
-
│ ↑ updated to 773b9aab58b11e9fa83d0ed0baca2bea6ff889c9 (27857ec) now │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────────────╮
+
│ Title    Define power requirements                              │
+
│ Patch    e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46               │
+
│ 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                               │
+
├─────────────────────────────────────────────────────────────────┤
+
│ ● Revision e4934b6 with head 3e674d1 by bob z6Mkt67…v4N1tRk now │
+
│ ↑ Revision 773b9aa with head 27857ec by bob z6Mkt67…v4N1tRk now │
+
╰─────────────────────────────────────────────────────────────────╯
```

Wait! There's a mistake.  The REQUIREMENTS should be a markdown file.  Let's
@@ -102,25 +102,25 @@ The patch is now merged and closed :).

```
$ rad patch show e4934b6
-
╭─────────────────────────────────────────────────────────────────────╮
-
│ Title    Define power requirements                                  │
-
│ Patch    e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46                   │
-
│ 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 (3e674d1) now                       │
-
│ ↑ updated to 773b9aab58b11e9fa83d0ed0baca2bea6ff889c9 (27857ec) now │
-
│ * revised by alice (you) in 9d62420 (f567f69) now                   │
-
│   └─ ✓ accepted by alice (you) now                                  │
-
│   └─ ✓ merged by alice (you) at revision 9d62420 (f567f69) now      │
-
╰─────────────────────────────────────────────────────────────────────╯
+
╭─────────────────────────────────────────────────────────────────╮
+
│ Title    Define power requirements                              │
+
│ Patch    e4934b6d9dbe01ce3c7fbb5b77a80d5f1dacdc46               │
+
│ 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                               │
+
├─────────────────────────────────────────────────────────────────┤
+
│ ● Revision e4934b6 with head 3e674d1 by bob z6Mkt67…v4N1tRk now │
+
│ ↑ Revision 773b9aa with head 27857ec by bob z6Mkt67…v4N1tRk now │
+
│ ↑ Revision 9d62420 with head 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:
modified crates/radicle-cli/src/terminal/patch.rs
@@ -436,7 +436,7 @@ pub fn show(
        .children(commits.into_iter().map(|l| l.boxed()))
        .divider();

-
    for line in timeline::timeline(profile, patch) {
+
    for line in timeline::timeline(profile, patch, verbose) {
        widget.push(line);
    }

modified crates/radicle-cli/src/terminal/patch/timeline.rs
@@ -9,158 +9,62 @@ use radicle::profile::Profile;
use crate::terminal as term;
use crate::terminal::format::Author;

+
/// The timeline of a [`Patch`].
+
///
+
/// A [`Patch`] will always have opened with a root revision and may
+
/// have a series of revisions that update the patch.
+
///
+
/// This function converts it into a series of [`term::Line`]s for
+
/// display.
pub fn timeline<'a>(
    profile: &'a Profile,
    patch: &'a Patch,
+
    verbose: bool,
) -> impl Iterator<Item = term::Line> + 'a {
-
    Timeline::build(profile, patch).into_lines(profile)
-
}
+
    let mut revisions = patch
+
        .revisions()
+
        .map(|(id, revision)| {
+
            (
+
                revision.timestamp(),
+
                RevisionEntry::from_revision(patch, id, revision, profile, verbose),
+
            )
+
        })
+
        .collect::<Vec<_>>();

-
/// The timeline of a [`Patch`].
-
///
-
/// A `Patch` will always have opened with a root revision and may
-
/// have a series of revisions that update the patch.
-
///
-
/// The function, [`timeline`], builds a `Timeline` and converts it
-
/// into a series of [`term::Line`]s.
-
struct Timeline<'a> {
-
    opened: Opened<'a>,
-
    revisions: Vec<RevisionEntry<'a>>,
-
}
+
    revisions.sort_by_key(|(t, _)| *t);

-
impl<'a> Timeline<'a> {
-
    fn build(profile: &Profile, patch: &'a Patch) -> Self {
-
        let opened = Opened::from_patch(patch, profile);
-
        let mut revisions = patch
-
            .revisions()
-
            .skip(1) // skip the root revision since it's handled in `Opened::from_patch`
-
            .map(|(id, revision)| {
-
                (
-
                    revision.timestamp(),
-
                    RevisionEntry::from_revision(patch, id, revision, profile),
-
                )
-
            })
-
            .collect::<Vec<_>>();
-
        revisions.sort_by_key(|(t, _)| *t);
-
        Timeline {
-
            opened,
-
            revisions: revisions.into_iter().map(|(_, e)| e).collect(),
-
        }
-
    }
-

-
    fn into_lines(self, profile: &'a Profile) -> impl Iterator<Item = term::Line> + 'a {
-
        self.opened.into_lines(profile).chain(
-
            self.revisions
-
                .into_iter()
-
                .flat_map(|r| r.into_lines(profile)),
-
        )
-
    }
+
    revisions
+
        .into_iter()
+
        .map(|(_, e)| e)
+
        .flat_map(move |r| r.into_lines(profile, verbose))
}

-
/// The root `Revision` of the `Patch`.
-
struct Opened<'a> {
-
    /// The `Author` of the patch.
+
/// A revision entry in the timeline.
+
/// We do not distinguish between revisions created by the original
+
/// author an others, and also not between the initial revision and others.
+
/// This tends to confuse more than it helps.
+
struct RevisionEntry<'a> {
+
    /// Whether this is entry is about the initial [`Revision`] of the patch.
+
    is_initial: bool,
+
    /// The [`Author`] that created the [`Revision`].
    author: Author<'a>,
-
    /// When the patch was created.
+
    /// When the [`Revision`] was created.
    timestamp: cob::Timestamp,
-
    /// The commit head of the `Revision`.
+
    /// The id of the [`Revision`].
+
    id: RevisionId,
+
    /// The commit head of the [`Revision`].
    head: git::Oid,
-
    /// Any updates performed on the root `Revision`.
+
    /// All [`Update`]s that occurred on the [`Revision`].
    updates: Vec<Update<'a>>,
}

-
impl<'a> Opened<'a> {
-
    fn from_patch(patch: &'a Patch, profile: &Profile) -> Self {
-
        let (root, revision) = patch.root();
-
        let mut updates = Vec::new();
-
        updates.extend(revision.reviews().map(|(_, review)| {
-
            (
-
                review.timestamp(),
-
                Update::Reviewed {
-
                    review: review.clone(),
-
                },
-
            )
-
        }));
-
        updates.extend(patch.merges().filter_map(|(nid, merge)| {
-
            if merge.revision == root {
-
                Some((
-
                    merge.timestamp,
-
                    Update::Merged {
-
                        author: Author::new(nid, profile, false),
-
                        merge: merge.clone(),
-
                    },
-
                ))
-
            } else {
-
                None
-
            }
-
        }));
-
        updates.sort_by_key(|(t, _)| *t);
-
        Opened {
-
            author: Author::new(&patch.author().id, profile, false),
-
            timestamp: patch.timestamp(),
-
            head: revision.head(),
-
            updates: updates.into_iter().map(|(_, up)| up).collect(),
-
        }
-
    }
-

-
    fn into_lines(self, profile: &'a Profile) -> impl Iterator<Item = term::Line> + 'a {
-
        iter::once(
-
            term::Line::spaced([
-
                term::format::positive("●").into(),
-
                term::format::default("opened by").into(),
-
            ])
-
            .space()
-
            .extend(self.author.line())
-
            .space()
-
            .extend(term::Line::spaced([
-
                term::format::parens(term::format::secondary(term::format::oid(self.head))).into(),
-
                term::format::dim(term::format::timestamp(self.timestamp)).into(),
-
            ])),
-
        )
-
        .chain(self.updates.into_iter().map(|up| {
-
            term::Line::spaced([term::Label::space(), term::Label::from("└─ ")])
-
                .extend(up.into_line(profile))
-
        }))
-
    }
-
}
-

-
/// A revision entry in the [`Timeline`].
-
enum RevisionEntry<'a> {
-
    /// An `Updated` entry means that the original author of the
-
    /// `Patch` created a new revision.
-
    Updated {
-
        /// When the `Revision` was created.
-
        timestamp: cob::Timestamp,
-
        /// The id of the `Revision`.
-
        id: RevisionId,
-
        /// The commit head of the `Revision`.
-
        head: git::Oid,
-
        /// All [`Update`]s that occurred on the `Revision`.
-
        updates: Vec<Update<'a>>,
-
    },
-
    /// A `Revised` entry means that an author other than the original
-
    /// author of the `Patch` created a new revision.
-
    Revised {
-
        /// The `Author` that created the `Revision` (that is not the
-
        /// `Patch` author).
-
        author: Author<'a>,
-
        /// When the `Revision` was created.
-
        timestamp: cob::Timestamp,
-
        /// The id of the `Revision`.
-
        id: RevisionId,
-
        /// The commit head of the `Revision`.
-
        head: git::Oid,
-
        /// All [`Update`]s that occurred on the `Revision`.
-
        updates: Vec<Update<'a>>,
-
    },
-
}
-

impl<'a> RevisionEntry<'a> {
    fn from_revision(
        patch: &'a Patch,
        id: RevisionId,
        revision: &'a Revision,
        profile: &Profile,
+
        verbose: bool,
    ) -> Self {
        let mut updates = Vec::new();
        updates.extend(revision.reviews().map(|(_, review)| {
@@ -176,8 +80,12 @@ impl<'a> RevisionEntry<'a> {
                Some((
                    merge.timestamp,
                    Update::Merged {
-
                        author: Author::new(nid, profile, false),
-
                        merge: merge.clone(),
+
                        author: Author::new(nid, profile, verbose),
+
                        merge: if merge.commit != revision.head() {
+
                            Some(merge.clone())
+
                        } else {
+
                            None
+
                        },
                    },
                ))
            } else {
@@ -186,84 +94,52 @@ impl<'a> RevisionEntry<'a> {
        }));
        updates.sort_by_key(|(t, _)| *t);

-
        if revision.author() == patch.author() {
-
            RevisionEntry::Updated {
-
                timestamp: revision.timestamp(),
-
                id,
-
                head: revision.head(),
-
                updates: updates.into_iter().map(|(_, up)| up).collect(),
-
            }
-
        } else {
-
            RevisionEntry::Revised {
-
                author: Author::new(&revision.author().id, profile, false),
-
                timestamp: revision.timestamp(),
-
                id,
-
                head: revision.head(),
-
                updates: updates.into_iter().map(|(_, up)| up).collect(),
-
            }
-
        }
-
    }
-

-
    fn into_lines(self, profile: &'a Profile) -> Vec<term::Line> {
-
        match self {
-
            RevisionEntry::Updated {
-
                timestamp,
-
                id,
-
                head,
-
                updates,
-
            } => Self::updated(profile, timestamp, id, head, updates).collect(),
-
            RevisionEntry::Revised {
-
                author,
-
                timestamp,
-
                id,
-
                head,
-
                updates,
-
            } => Self::revised(profile, author, timestamp, id, head, updates).collect(),
+
        RevisionEntry {
+
            is_initial: patch.root().0 == id,
+
            author: Author::new(&revision.author().id, profile, verbose),
+
            timestamp: revision.timestamp(),
+
            id,
+
            head: revision.head(),
+
            updates: updates.into_iter().map(|(_, up)| up).collect(),
        }
    }

-
    fn updated(
+
    fn into_lines(
+
        self,
        profile: &'a Profile,
-
        timestamp: cob::Timestamp,
-
        id: RevisionId,
-
        head: git::Oid,
-
        updates: Vec<Update<'a>>,
+
        verbose: bool,
    ) -> impl Iterator<Item = term::Line> + 'a {
-
        iter::once(term::Line::spaced([
-
            term::format::tertiary("↑").into(),
-
            term::format::default("updated to").into(),
-
            term::format::dim(id).into(),
-
            term::format::parens(term::format::secondary(term::format::oid(head))).into(),
-
            term::format::dim(term::format::timestamp(timestamp)).into(),
-
        ]))
-
        .chain(updates.into_iter().map(|up| {
-
            term::Line::spaced([term::Label::space(), term::Label::from("└─ ")])
-
                .extend(up.into_line(profile))
-
        }))
-
    }
+
        use term::{format::*, *};

-
    fn revised(
-
        profile: &'a Profile,
-
        author: Author<'a>,
-
        timestamp: cob::Timestamp,
-
        id: RevisionId,
-
        head: git::Oid,
-
        updates: Vec<Update<'a>>,
-
    ) -> impl Iterator<Item = term::Line> + 'a {
-
        let (alias, nid) = author.labels();
-
        iter::once(term::Line::spaced([
-
            term::format::tertiary("*").into(),
-
            term::format::default("revised by").into(),
-
            alias,
-
            nid,
-
            term::format::default("in").into(),
-
            term::format::dim(term::format::oid(id)).into(),
-
            term::format::parens(term::format::secondary(term::format::oid(head))).into(),
-
            term::format::dim(term::format::timestamp(timestamp)).into(),
-
        ]))
-
        .chain(updates.into_iter().map(|up| {
-
            term::Line::spaced([term::Label::space(), term::Label::from("└─ ")])
-
                .extend(up.into_line(profile))
+
        let id: Label = if verbose {
+
            self.id.to_string().into()
+
        } else {
+
            oid(self.id).into()
+
        };
+

+
        let icon = if self.is_initial {
+
            positive("●")
+
        } else {
+
            tertiary("↑")
+
        };
+

+
        iter::once(
+
            Line::spaced([
+
                icon.into(),
+
                dim("Revision").into(),
+
                id,
+
                dim("with head").into(),
+
                secondary(oid(self.head)).into(),
+
                dim("by").into(),
+
            ])
+
            .space()
+
            .extend(self.author.line())
+
            .space()
+
            .extend(Line::spaced([dim(timestamp(self.timestamp)).into()])),
+
        )
+
        .chain(self.updates.into_iter().map(move |up| {
+
            Line::spaced([Label::space(), Label::from("└─ ")])
+
                .extend(up.into_line(profile, verbose))
        }))
    }
}
@@ -273,56 +149,96 @@ enum Update<'a> {
    /// A revision of the patch was reviewed.
    Reviewed { review: Review },
    /// A revision of the patch was merged.
-
    Merged { author: Author<'a>, merge: Merge },
+
    Merged {
+
        author: Author<'a>,
+
        /// If the merge is none, this means that it was a fast-forward merge.
+
        merge: Option<Merge>,
+
    },
}

impl Update<'_> {
-
    fn timestamp(&self) -> cob::Timestamp {
-
        match self {
-
            Update::Reviewed { review } => review.timestamp(),
-
            Update::Merged { merge, .. } => merge.timestamp,
-
        }
-
    }
+
    fn into_line(self, profile: &Profile, verbose: bool) -> term::Line {
+
        use term::{format::*, *};

-
    fn into_line(self, profile: &Profile) -> term::Line {
-
        let timestamp = self.timestamp();
-
        let mut line = match self {
+
        match self {
            Update::Reviewed { review } => {
-
                let verdict = review.verdict();
-
                let verdict_symbol = match verdict {
-
                    Some(Verdict::Accept) => term::PREFIX_SUCCESS,
-
                    Some(Verdict::Reject) => term::PREFIX_ERROR,
-
                    None => term::format::dim("⋄"),
+
                const BY: &str = "by";
+

+
                let by = if verbose {
+
                    "".to_string() + BY
+
                } else {
+
                    // Magical string for alignment, obtained by
+
                    // trial and error.
+
                    "                     ".to_string() + BY
                };
-
                let verdict_verb = match verdict {
-
                    Some(Verdict::Accept) => term::format::default("accepted"),
-
                    Some(Verdict::Reject) => term::format::default("rejected"),
-
                    None => term::format::default("reviewed"),
+

+
                let (symbol, verb) = match review.verdict() {
+
                    Some(Verdict::Accept) => (PREFIX_SUCCESS, positive("accepted")),
+
                    Some(Verdict::Reject) => (PREFIX_ERROR, negative("rejected")),
+
                    None => (dim("⋄"), default("reviewed")),
                };
-
                term::Line::spaced([
-
                    verdict_symbol.into(),
-
                    verdict_verb.into(),
-
                    term::format::default("by").into(),
-
                ])
-
                .space()
-
                .extend(Author::new(&review.author().id.into(), profile, false).line())
+

+
                Line::spaced([symbol.into(), verb.into(), dim(by).into()])
+
                    .space()
+
                    .extend(Author::new(&review.author().id.into(), profile, verbose).line())
+
                    .space()
+
                    .item(dim(timestamp(review.timestamp())))
            }
            Update::Merged { author, merge } => {
+
                // The additional whitespace before and after makes it align, see:
+
                // - " merged "
+
                // - "accepted"
+
                // - "rejected"
+
                // This is less noisy to look at in the terminal.
+
                const MERGED: &str = " merged ";
+

+
                const AT_COMMIT_ALIGN: &str = "   ";
+
                const AT_COMMIT: &str = "at commit";
+

+
                let at_commit = if !verbose {
+
                    AT_COMMIT_ALIGN.to_string() + AT_COMMIT
+
                } else {
+
                    AT_COMMIT.to_string()
+
                };
+

                let (alias, nid) = author.labels();
-
                term::Line::spaced([
-
                    term::PREFIX_SUCCESS.bold().into(),
-
                    term::format::default("merged by").into(),
-
                    alias,
-
                    nid,
-
                    term::format::default("at revision").into(),
-
                    term::format::dim(term::format::oid(merge.revision)).into(),
-
                    term::format::parens(term::format::secondary(term::format::oid(merge.commit)))
-
                        .into(),
-
                ])
+

+
                let (commit, timestamp) = match merge {
+
                    Some(merge) => (
+
                        Line::spaced([dim(at_commit).into(), secondary(oid(merge.commit)).into()])
+
                            .space(),
+
                        timestamp(merge.timestamp),
+
                    ),
+
                    None => {
+
                        let mut line = Line::blank();
+
                        if !verbose {
+
                            const LENGTH_OF_SHORT_COMMIT_HASH: usize = 7;
+
                            const LENGTH_OF_SPACES: usize = 2;
+
                            line.pad(
+
                                AT_COMMIT_ALIGN.len()
+
                                    + AT_COMMIT.len()
+
                                    + LENGTH_OF_SHORT_COMMIT_HASH
+
                                    + LENGTH_OF_SPACES,
+
                            );
+
                        }
+
                        (line, "".into())
+
                    }
+
                };
+

+
                Line::blank()
+
                    .item(PREFIX_SUCCESS.bold())
+
                    .space()
+
                    .item(Label::from(positive(MERGED)))
+
                    .space()
+
                    .extend(commit)
+
                    .item(dim("by"))
+
                    .space()
+
                    .item(alias)
+
                    .space()
+
                    .item(nid)
+
                    .space()
+
                    .item(timestamp)
            }
-
        };
-
        line.push(term::Label::space());
-
        line.push(term::format::dim(term::format::timestamp(timestamp)));
-
        line
+
        }
    }
}