`view`'s snapshot as the repository has it now.
(repo: &Repository, view: &str)
| 169 | |
| 170 | /// `view`'s snapshot as the repository has it now. |
| 171 | fn current_snapshot(repo: &Repository, view: &str) -> Result<ViewSnapshot, Status> { |
| 172 | let effective = repo.sandbox_effective_state(view).map_err(view_error)?; |
| 173 | let own = repo |
| 174 | .export_sandbox_skeleton(view, &BTreeMap::new()) |
| 175 | .map_err(view_error)? |
| 176 | .view |
| 177 | .state; |
| 178 | Ok(wire::view_snapshot(view, &effective, Some(&own))) |
| 179 | } |
| 180 | |
| 181 | /// Refuse unless `expected` is the view's snapshot now. |
| 182 | fn fence(repo: &Repository, view: &str, expected: &ViewSnapshot) -> Result<ViewSnapshot, Status> { |
no test coverage detected