Open the Atomic repository at `root` and return `(view_name, merkle_base32)` for the current view. Returns `None` if the directory is not an Atomic repository or any error occurs — callers treat absence of VCS info as non-fatal.
(root: &Path)
| 440 | /// Returns `None` if the directory is not an Atomic repository or any error |
| 441 | /// occurs — callers treat absence of VCS info as non-fatal. |
| 442 | fn atomic_revision(root: &Path) -> Option<(String, String)> { |
| 443 | let repo = atomic_repository::Repository::open_existing(root).ok()?; |
| 444 | let view_name = repo.current_view().to_string(); |
| 445 | let info = repo.get_view_info(&view_name).ok()?; |
| 446 | Some((view_name, info.state.to_base32())) |
| 447 | } |
| 448 | |
| 449 | /// Inner fallible implementation of [`append_agent_trace`]. |
| 450 | fn try_append_agent_trace(record: &TraceRecord, root: &Path) -> std::io::Result<()> { |