Flush the pile in various sensible places
Some checks failed
continuous-integration/drone the build failed
Some checks failed
continuous-integration/drone the build failed
This commit is contained in:
parent
6a3a75de77
commit
11d4b9d18c
@ -265,6 +265,7 @@ pub fn backup_source_to_destination<PT: ProgressTracker>(
|
|||||||
gid_lookup: Default::default(),
|
gid_lookup: Default::default(),
|
||||||
};
|
};
|
||||||
pile.write_pointer(&pointer_name, &pointer_data)?;
|
pile.write_pointer(&pointer_name, &pointer_data)?;
|
||||||
|
pile.flush()?;
|
||||||
|
|
||||||
eprintln!("Pointer saved!");
|
eprintln!("Pointer saved!");
|
||||||
}
|
}
|
||||||
|
@ -229,6 +229,7 @@ pub fn backup_remote_source_to_destination<PT: ProgressTracker + Send + 'static>
|
|||||||
)?;
|
)?;
|
||||||
|
|
||||||
quit(&mut read, &mut write)?;
|
quit(&mut read, &mut write)?;
|
||||||
|
pile.flush()?;
|
||||||
|
|
||||||
info!("Stored! Checking for existence...");
|
info!("Stored! Checking for existence...");
|
||||||
if pile.list_pointers()?.contains(&pointer_name) {
|
if pile.list_pointers()?.contains(&pointer_name) {
|
||||||
|
@ -168,6 +168,8 @@ fn wrapped_main() -> anyhow::Result<i32> {
|
|||||||
bail!("You need to specify either --shallow or --deep.");
|
bail!("You need to specify either --shallow or --deep.");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pile.flush()?;
|
||||||
|
|
||||||
if error_count > 0 {
|
if error_count > 0 {
|
||||||
eprintln!("THERE ARE {} ERRORS.", error_count);
|
eprintln!("THERE ARE {} ERRORS.", error_count);
|
||||||
return Ok(1);
|
return Ok(1);
|
||||||
@ -188,8 +190,10 @@ fn wrapped_main() -> anyhow::Result<i32> {
|
|||||||
Ok(command) => {
|
Ok(command) => {
|
||||||
if let Err(e) = debug_command(&pdesc, &pile, command) {
|
if let Err(e) = debug_command(&pdesc, &pile, command) {
|
||||||
eprintln!("Failed {:?}", e);
|
eprintln!("Failed {:?}", e);
|
||||||
|
pile.flush()?;
|
||||||
return Ok(2);
|
return Ok(2);
|
||||||
} else {
|
} else {
|
||||||
|
pile.flush()?;
|
||||||
return Ok(0);
|
return Ok(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,6 +231,7 @@ fn wrapped_main() -> anyhow::Result<i32> {
|
|||||||
let (other_pile, other_rp_bypass) =
|
let (other_pile, other_rp_bypass) =
|
||||||
open_pile_with_work_bypass(&other_pile_path, &descriptor_other, bypass_level)?;
|
open_pile_with_work_bypass(&other_pile_path, &descriptor_other, bypass_level)?;
|
||||||
|
|
||||||
|
// TODO flush the pile after here yet
|
||||||
push_to(
|
push_to(
|
||||||
Arc::new(this_pile),
|
Arc::new(this_pile),
|
||||||
this_rp_bypass,
|
this_rp_bypass,
|
||||||
|
@ -85,6 +85,9 @@ pub fn debug_prompt<RP: RawPile>(pdesc: PileDescriptor, pile: Pile<RP>) -> anyho
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pile.flush()?;
|
||||||
|
|
||||||
rl.save_history(".yama-history").unwrap();
|
rl.save_history(".yama-history").unwrap();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -276,6 +276,6 @@ pub fn store_fully<PT: ProgressTracker>(
|
|||||||
};
|
};
|
||||||
|
|
||||||
pile.write_pointer(&new_pointer_name, &pointer_data)?;
|
pile.write_pointer(&new_pointer_name, &pointer_data)?;
|
||||||
|
pile.flush()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user