_smithers_attempts.jj_pointer. revert restores the workspace to that state and discards any graph snapshots recorded after the attempt began, so the run’s timeline rolls back to the point-in-time of that attempt.
API reference: Time Travel lists every revert and time-travel export, its options, and links to source and tests.
Requirements
- JJ in
PATH(brew install jjorcargo install jj-cli) - Workspace is a JJ repository (
jj git initorjj init) - The target attempt was completed when JJ was available (otherwise no pointer was captured)
Programmatic
adapter is the SmithersDb instance for the run’s database.
revertToAttempt returns { success: false, error: string } if the attempt is not found or has no recorded JJ pointer (it does not throw for these cases). Inspect the returned result.success boolean to detect failures. On success it returns { success: true, jjPointer: string }.
timeTravel when you want the higher-level reset flow: it can restore VCS, reset the target node, and reset dependent nodes after the selected attempt.