pub struct ResolvedCodebase {
pub git_url: String,
pub remote: ResolveRemoteResponse,
pub repos: Vec<RemoteRepoRef>,
}Expand description
A checkout path resolved to its codebase: the origin URL it was resolved from, the codebase (git remote) the server deduplicates that URL to, and the live repo records linked to it.
Fields§
§git_url: String§remote: ResolveRemoteResponse§repos: Vec<RemoteRepoRef>Never empty from resolve_path_to_codebase, which errors instead.
Implementations§
Source§impl ResolvedCodebase
impl ResolvedCodebase
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
The codebase’s display name: its registered name, else its URL.
Sourcepub fn choose(&self, preferred: &[Uuid]) -> RepoChoice
pub fn choose(&self, preferred: &[Uuid]) -> RepoChoice
Pick the repo to bind: the only one, else the first of preferred
(repo ids, most preferred first) that is one of this codebase’s live
repos, else none.
Sessions are keyed by (repo_id, session_id) on the server, so two
repos of one codebase are NOT interchangeable for ingest: binding a
session to a different one mid-flight splits it across two session
rows (VIS-1018). Hence no silent fallback to an arbitrary repo here.
Sourcepub fn repo_list(&self) -> String
pub fn repo_list(&self) -> String
name (id) for each live repo, lowest id first — for messages that
ask the user to pick one.
Sourcepub fn binding(&self, repo_id: Uuid) -> RepoBinding
pub fn binding(&self, repo_id: Uuid) -> RepoBinding
A binding to repo_id of this codebase.