pub struct Repository<T> { /* private fields */ }Expand description
The repository side of a run, over whichever store holds its state.
The two flavours below are this one behaviour with a different store under it, so neither can learn something the other does not know.
Implementations§
Source§impl Repository<MemoryStore<VcsState>>
impl Repository<MemoryStore<VcsState>>
Source§impl Repository<FileStore<VcsState>>
impl Repository<FileStore<VcsState>>
Sourcepub fn create(path: impl Into<PathBuf>) -> Result<Self>
pub fn create(path: impl Into<PathBuf>) -> Result<Self>
A repository provider keeping its state at path: whatever is already
there, or nothing.
Attaching rather than replacing, so a second provider over the same path picks up what the first one left — which is what a journey driving several invocations reaches for this flavour to get.
Trait Implementations§
Source§impl<T: Debug> Debug for Repository<T>
impl<T: Debug> Debug for Repository<T>
Source§impl<T: Store<VcsState>> Vcs for Repository<T>
impl<T: Store<VcsState>> Vcs for Repository<T>
Source§fn publish(
&self,
token: &SessionToken,
request: &PublishRequest,
hosting: &dyn Hosting,
) -> Result<Publication>
fn publish( &self, token: &SessionToken, request: &PublishRequest, hosting: &dyn Hosting, ) -> Result<Publication>
Publish a session’s branch, as far as a provider honestly can.
The host side is performed rather than described: a change request is really
opened against the Hosting this was handed, really adopted when one is
already open, and really merged under the policy — so the six host methods
are exercised and what the host recorded is what a journey reads back.
The repository side is not, and none of it is claimed. There is no origin to
fetch from, no tree to build in, no push, and no lock to queue behind, so no
fetch, push, lock-wait, lock-acquired, or merge-queued event is
emitted. What is emitted is what was decided: the change that was opened, and
the merge that landed.
Source§fn preserved(&self, scope: Scope) -> Result<Vec<Recoverable>>
fn preserved(&self, scope: Scope) -> Result<Vec<Recoverable>>
The same rows Vcs::recoverable answers with.
This provider is handed its preserved work, and what it is handed is work nobody published: there is no base here whose history could record a landing and no tree to compare content against, so it withholds nothing and the wider question has the same answer as the narrower one.
Source§fn resolve_identity(&self, origin_or_path: &str) -> Result<Identity>
fn resolve_identity(&self, origin_or_path: &str) -> Result<Identity>
Source§fn open_session(&self, req: SessionRequest) -> Result<Session>
fn open_session(&self, req: SessionRequest) -> Result<Session>
Source§fn adopt_session(&self, token: SessionToken) -> Result<Session>
fn adopt_session(&self, token: SessionToken) -> Result<Session>
Source§fn preserve(
&self,
s: &Session,
provenance: Provenance,
) -> Result<PreservedBranch>
fn preserve( &self, s: &Session, provenance: Provenance, ) -> Result<PreservedBranch>
Source§fn session(&self, token: &SessionToken) -> Result<SessionRecord>
fn session(&self, token: &SessionToken) -> Result<SessionRecord>
Source§fn close_session(&self, token: &SessionToken) -> Result<Session>
fn close_session(&self, token: &SessionToken) -> Result<Session>
Source§fn recoverable(&self, scope: Scope) -> Result<Vec<Recoverable>>
fn recoverable(&self, scope: Scope) -> Result<Vec<Recoverable>>
Source§fn publish_with_cancellation(
&self,
token: &SessionToken,
request: &PublishRequest,
hosting: &dyn Hosting,
cancellation: &dyn PublicationCancellation,
) -> Result<Publication, Error>
fn publish_with_cancellation( &self, token: &SessionToken, request: &PublishRequest, hosting: &dyn Hosting, cancellation: &dyn PublicationCancellation, ) -> Result<Publication, Error>
publish, asking cancellation while it waits and ending as
FailureKind::Cancelled once it says so. Read moreSource§fn recoverable_matching(
&self,
scope: Scope,
selection: &Selection,
) -> Result<Vec<Recoverable>, Error>
fn recoverable_matching( &self, scope: Scope, selection: &Selection, ) -> Result<Vec<Recoverable>, Error>
Source§fn preserved_matching(
&self,
scope: Scope,
selection: &Selection,
) -> Result<Vec<Recoverable>, Error>
fn preserved_matching( &self, scope: Scope, selection: &Selection, ) -> Result<Vec<Recoverable>, Error>
preserved, narrowed the same way and for the same reason.
Selection::detail changes presentation cost only: both detail modes keep
the same rows, tip, landing evidence, holds, retirement and recovery command.