Improve error messages for invalid Jujutsu revisions.
Review Request #15295 — Created Sept. 14, 2026 and updated — Latest diff uploaded
When passing a revision to
rbt difforrbt postin 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 asnone(), crashed with "list index out of range".
parse_revision_specnow raisesInvalidRevisionSpecErrorfor these
cases. The message includes the error from jj, such as:CRITICAL: Invalid revision "kkkkqqqq": Revision `kkkkqqqq` doesn't existThis 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 diffwith a typoed change ID, an empty revset, a revset
with a syntax error, the root commit ID, and a valid change.