(&self, view: &str)
| 171 | } |
| 172 | |
| 173 | fn tree(&self, view: &str) -> BTreeMap<String, String> { |
| 174 | self.with_repo(|repo| { |
| 175 | let mut files = BTreeMap::new(); |
| 176 | repo.materialize_view_entries::<()>(view, |e| { |
| 177 | if e.kind == ViewEntryKind::File { |
| 178 | files.insert(e.path, String::from_utf8_lossy(&e.content).into_owned()); |
| 179 | } |
| 180 | Ok(()) |
| 181 | }) |
| 182 | .unwrap() |
| 183 | .unwrap(); |
| 184 | files |
| 185 | }) |
| 186 | } |
| 187 | |
| 188 | fn on_view(&self, view: &str, hash: &Hash) -> bool { |
| 189 | self.with_repo(|repo| repo.first_foreign_change(view, &[*hash]).unwrap().is_none()) |
no test coverage detected