MCPcopy Create free account
hub / github.com/AI45Lab/Code / list_versions

Method list_versions

core/src/file_history.rs:107–113  ·  view source on GitHub ↗

List all versions of a specific file

(&self, path: &str)

Source from the content-addressed store, hash-verified

105
106 /// List all versions of a specific file
107 pub fn list_versions(&self, path: &str) -> Vec<VersionSummary> {
108 let snapshots = read_or_recover(&self.snapshots);
109 snapshots
110 .get(path)
111 .map(|versions| versions.iter().map(VersionSummary::from).collect())
112 .unwrap_or_default()
113 }
114
115 /// Evict oldest snapshots when over the limit
116 fn evict_if_needed(&self, snapshots: &mut HashMap<String, Vec<FileSnapshot>>) {

Calls 2

read_or_recoverFunction · 0.85
getMethod · 0.45