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

Method open_with_budget

atomic-repository/src/repository/mod.rs:568–575  ·  view source on GitHub ↗

Open an existing repository under an explicit effect budget (CB-13D). Under [`ReconcileEffectBudget::MetadataOnly`] the writable open refuses *before* any recovery runs when the repository holds pending work whose recovery would execute effect-bearing plans (deferred tree alignment, incomplete working-copy or repository operation heads): the returned error is [`RepositoryError::ReactiveDeferred`]

(
        path: P,
        budget: ReconcileEffectBudget,
    )

Source from the content-addressed store, hash-verified

566 /// [`ReconcileEffectBudget::Command`] open behaves exactly like
567 /// [`open`](Self::open).
568 pub fn open_with_budget<P: AsRef<Path>>(
569 path: P,
570 budget: ReconcileEffectBudget,
571 ) -> Result<Self, RepositoryError> {
572 Self::wait_for_database(DEFAULT_DATABASE_WAIT, || {
573 Self::open_once(path.as_ref(), budget)
574 })
575 }
576
577 fn open_once(path: &Path, budget: ReconcileEffectBudget) -> Result<Self, RepositoryError> {
578 if let Some((working_root, canonical, view)) = sandbox::detect_sandbox(path) {

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected