Adding a "Sink" working copy and avoid outputting ignored files
Dependencies
- [2]
G55Y75FUAvoiding deadlocks when using output.rs with a non-filesystem output - [3]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [4]
2VXTRPO4Custom diff separators - [5]
G7VOM2IMReturning an error when recording non-existent paths - [*]
7KNPYIDUSplitting the WorkingCopy trait into a read-only record and a read/write output - [*]
LPM4PBYJMore precise API for working copy in record and output - [*]
ZDK3GNDBTag transactions (including a massive refactoring of errors)
Change contents
- edit in libpijul/src/working_copy/mod.rs at line 40
fn is_writable(&self, _path: &str) -> Result<bool, Self::Error> {Ok(true)} - edit in libpijul/src/working_copy/mod.rs at line 50
}#[derive(Clone)]pub struct Sink {}pub fn sink() -> Sink {Sink {}}impl WorkingCopyRead for Sink {type Error = std::io::Error;fn file_metadata(&self, _file: &str) -> Result<InodeMetadata, Self::Error> {panic!("file_metadata not implemented: {:?}", _file)}fn read_file(&self, _file: &str, _buffer: &mut Vec<u8>) -> Result<(), Self::Error> {panic!("read_file not implemented: {:?}", _file)}fn modified_time(&self, _file: &str) -> Result<std::time::SystemTime, Self::Error> {panic!("modified_time not implemented: {:?}", _file)} - edit in libpijul/src/working_copy/mod.rs at line 71[7.490]
impl WorkingCopy for Sink {fn is_writable(&self, _path: &str) -> Result<bool, Self::Error> {Ok(false)}fn create_dir_all(&self, _path: &str) -> Result<(), Self::Error> {Ok(())}fn remove_path(&self, _name: &str, _rec: bool) -> Result<(), Self::Error> {Ok(())}fn rename(&self, _former: &str, _new: &str) -> Result<(), Self::Error> {Ok(())}fn set_permissions(&self, _name: &str, _permissions: u16) -> Result<(), Self::Error> {Ok(())}type Writer = std::io::Sink;fn write_file(&self, _file: &str, _inode: Inode) -> Result<Self::Writer, Self::Error> {Ok(std::io::sink())}} - replacement in libpijul/src/working_copy/filesystem.rs at line 347
1,threads, - edit in libpijul/src/output/output.rs at line 729[9.26099][2.0]
if !repo.is_writable(path).map_err(OutputError::WorkingCopy)? {return Ok(());}