a73x

7e663401

Standardize revision terminology to rN format

a73x   2026-03-21 19:14

Reviews in patch show used "(revision 1)" while the header and TUI
used "(r1)". Patch log used "Revision 1". Standardize everything to
the shorter rN format for consistency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

diff --git a/src/lib.rs b/src/lib.rs
index 18e9672..7d459b0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -262,7 +262,7 @@ pub fn run(cli: cli::Cli, repo: &Repository) -> Result<(), error::Error> {
                if !reviews.is_empty() {
                    println!("\n--- Reviews ---");
                    for r in &reviews {
                        let rev_label = r.revision.map(|n| format!(" (revision {})", n)).unwrap_or_default();
                        let rev_label = r.revision.map(|n| format!(" (r{})", n)).unwrap_or_default();
                        println!(
                            "\n{} ({:?}) - {}{}:\n{}",
                            r.author.name, r.verdict, r.timestamp, rev_label, r.body
diff --git a/src/patch.rs b/src/patch.rs
index 2ed819b..9bf22b9 100644
--- a/src/patch.rs
+++ b/src/patch.rs
@@ -638,7 +638,7 @@ pub fn patch_log_to_writer(

        writeln!(
            writer,
            "Revision {}  {}  {}{}{}{}",
            "r{}  {}  {}{}{}{}",
            rev.number, short_oid, rev.timestamp, label, file_summary, body_display
        ).ok();
    }
diff --git a/tests/revision_test.rs b/tests/revision_test.rs
index 6a6306d..fb2b5bf 100644
--- a/tests/revision_test.rs
+++ b/tests/revision_test.rs
@@ -371,11 +371,11 @@ fn test_patch_log() {
    repo.run_ok(&["patch", "revise", &id]);

    let out = repo.run_ok(&["patch", "log", &id]);
    assert!(out.contains("Revision 1"));
    assert!(out.contains("r1"));
    assert!(out.contains("(initial)"));
    assert!(out.contains("Revision 2"));
    assert!(out.contains("r2"));
    assert!(out.contains("added b.txt"));
    assert!(out.contains("Revision 3"));
    assert!(out.contains("r3"));
}

#[test]
@@ -437,7 +437,7 @@ fn test_review_shows_revision_context_in_show() {
    repo.run_ok(&["patch", "review", &id, "-v", "approve", "-b", "LGTM"]);

    let out = repo.run_ok(&["patch", "show", &id]);
    assert!(out.contains("(revision 1)"));
    assert!(out.contains("(r1)"));
}

// ===========================================================================