• 
      

    Improve error messages for invalid Jujutsu revisions.

    Review Request #15295 — Created Sept. 14, 2026 and updated

    Information

    RBTools
    master

    Reviewers

    When passing a revision to rbt diff or rbt post in a Jujutsu
    repository, a typo in the change ID would produce an unhelpful error:

    CRITICAL: Unexpected error executing the command: jj log -r ...
    

    The actual error from jj was swallowed. A revset that matched no
    changes, such as none(), crashed with "list index out of range".

    parse_revision_spec now raises InvalidRevisionSpecError for these
    cases. The message includes the error from jj, such as:

    CRITICAL: Invalid revision "kkkkqqqq": Revision `kkkkqqqq` doesn't exist
    

    This also adds special handling for the "zzzzzzzz" root commit, which
    would attempt to look up the parent and then fail later with a confusing
    fork point error.

    • Ran unit tests.
    • Ran rbt diff with a typoed change ID, an empty revset, a revset
      with a syntax error, the root commit ID, and a valid change.
    Summary ID
    Improve error messages for invalid Jujutsu revisions.
    When passing a revision to `rbt diff` or `rbt post` in a Jujutsu repository, a typo in the change ID would produce an unhelpful error: CRITICAL: Unexpected error executing the command: jj log -r ... The actual error from jj was swallowed. A revset that matched no changes, such as `none()`, crashed with "list index out of range". `parse_revision_spec` now raises `InvalidRevisionSpecError` for these cases. The message includes the error from jj, such as: CRITICAL: Invalid revision "kkkkqqqq": Revision \`kkkkqqqq\` doesn't exist This also adds special handling for the "zzzzzzzz" root commit, which would attempt to look up the parent and then fail later with a confusing fork point error. Testing Done: - Ran unit tests. - Ran `rbt diff` with a typoed change ID, an empty revset, a revset with a syntax error, the root commit ID, and a valid change.
    llupprnryquoxqkklvoxvtukwszqrzzn
    Checks run (2 succeeded)
    flake8 passed.
    JSHint passed.
    maubin
    1. Ship It!
    2.