MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / open_readonly_repository

Function open_readonly_repository

atomic-cli/src/commands/mod.rs:411–415  ·  view source on GitHub ↗

Acquire a read-only repository for a CLI query, allowing short-lived writers (such as Stop checkpoint publication) to finish first. Only typed database contention is retried, for at most ten seconds; all other errors propagate immediately. Callers must not already hold a writable repository handle. Keep this policy at the CLI boundary: library callers may require immediate failure or supply their

(
    path: impl AsRef<Path>,
)

Source from the content-addressed store, hash-verified

409/// Keep this policy at the CLI boundary: library callers may require immediate
410/// failure or supply their own deadline to `Repository::open_readonly_wait`.
411pub(crate) fn open_readonly_repository(
412 path: impl AsRef<Path>,
413) -> Result<Repository, atomic_repository::RepositoryError> {
414 Repository::open_readonly_wait(path, std::time::Duration::from_secs(10))
415}
416
417/// Open the repository at `root` for a command that writes to the vault,
418/// creating the vault when it does not exist yet.

Callers 15

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
bind_work_startMethod · 0.85
executeMethod · 0.85
runMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected