in focus/operations/src/testing/sync_with_project_cache.rs [91:119]
fn generate_content(&self, shard_count: usize) -> Result<()> {
let app = self.underlying.app.clone();
for shard_index in 0..shard_count {
let exit_code = project_cache::push(
app.clone(),
self.repo_path(),
String::from("HEAD"),
shard_index,
shard_count,
)
.with_context(|| {
format!(
"Failed to generate content for shard {} of {}",
shard_index + 1,
shard_count
)
})?;
if exit_code != ExitCode(0) {
bail!(
"Non-zero exit while generating content for shard {} of {}",
shard_index + 1,
shard_count
)
}
}
Ok(())
}