Flush the pile in various sensible places
Some checks failed
continuous-integration/drone the build failed

This commit is contained in:
Olivier 'reivilibre' 2021-11-13 10:38:30 +00:00
parent 6a3a75de77
commit 11d4b9d18c
5 changed files with 11 additions and 1 deletions

View File

@ -265,6 +265,7 @@ pub fn backup_source_to_destination<PT: ProgressTracker>(
gid_lookup: Default::default(),
};
pile.write_pointer(&pointer_name, &pointer_data)?;
pile.flush()?;
eprintln!("Pointer saved!");
}

View File

@ -229,6 +229,7 @@ pub fn backup_remote_source_to_destination<PT: ProgressTracker + Send + 'static>
)?;
quit(&mut read, &mut write)?;
pile.flush()?;
info!("Stored! Checking for existence...");
if pile.list_pointers()?.contains(&pointer_name) {

View File

@ -168,6 +168,8 @@ fn wrapped_main() -> anyhow::Result<i32> {
bail!("You need to specify either --shallow or --deep.");
};
pile.flush()?;
if error_count > 0 {
eprintln!("THERE ARE {} ERRORS.", error_count);
return Ok(1);
@ -188,8 +190,10 @@ fn wrapped_main() -> anyhow::Result<i32> {
Ok(command) => {
if let Err(e) = debug_command(&pdesc, &pile, command) {
eprintln!("Failed {:?}", e);
pile.flush()?;
return Ok(2);
} else {
pile.flush()?;
return Ok(0);
}
}
@ -227,6 +231,7 @@ fn wrapped_main() -> anyhow::Result<i32> {
let (other_pile, other_rp_bypass) =
open_pile_with_work_bypass(&other_pile_path, &descriptor_other, bypass_level)?;
// TODO flush the pile after here yet
push_to(
Arc::new(this_pile),
this_rp_bypass,

View File

@ -85,6 +85,9 @@ pub fn debug_prompt<RP: RawPile>(pdesc: PileDescriptor, pile: Pile<RP>) -> anyho
}
}
}
pile.flush()?;
rl.save_history(".yama-history").unwrap();
Ok(())

View File

@ -276,6 +276,6 @@ pub fn store_fully<PT: ProgressTracker>(
};
pile.write_pointer(&new_pointer_name, &pointer_data)?;
pile.flush()?;
Ok(())
}