Expand description
Revision-spec resolution: map a revspec string to a session record id.
Supported forms (resolved over the Tier-1 journal DAG):
@head/HEAD/@→ the current HEAD record@head~N/HEAD~N(N >= 0) → walk N parent links back from HEAD@head^/HEAD^→ parent of HEAD (same as~1)<seq>(a bare non-negative int) → the record with thatseq@time:<unix_ms>→ the most recent record at or before that time@latest:<label>→ the highest-seq record whoseop_kindORlabelequals<label><id>or a unique<id-prefix>→ the record whose id equals / uniquely begins with the text
Resolution is deterministic and never panics; ambiguity or no-match is an error.
Functions§
- resolve_
revspec - Resolve
specto a record id, given the full record list and the current HEAD (Noneif the session is empty). Returns an error if the spec is malformed, ambiguous, or matches no record. - resolve_
revspec_ for - Load the session for
doc_idand resolvespecto a record id.