Splitting the WorkingCopy trait into a read-only record and a read/write output
Dependencies
- [2]
SBSM3VZVFixing a bug in deletions (the encoding was improperly set) - [3]
QU6T6J6WUse the change time in addition to the modified time when detecting untouched files (at least on Unix) - [4]
O4DNWMPDCleaunp and proofreading of libpijul::record - [5]
JP3BYVXXFixing file paths on Windows - [6]
3S6LU2U5abstract out FileMetadata (de)serialistion - [7]
X7OHUPL5Fixing a bug in unrecord, and fixing the tests - [8]
ZSF3YFZTencoded file deletion - [9]
TVVW53HZConflict resolution - [10]
VO5OQW4WRemoving anyhow in libpijul - [11]
RRCSHAYZFormatting - [12]
FXEDPLRIResurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore) - [13]
MOPABMFWFixing a deadlock in working_copy::memory (used only in tests for now) - [14]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [15]
EAAJNZ3JMake recursive directory removal optional - [16]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [17]
4NNR32V6conflicts - [18]
FYUDBQ3CFormatting changes + version bump - [19]
GHO6DWPIRefactoring iterators - [20]
WKX5S4Z4remove unneccesary explicit lifetimes - [21]
I24UEJQLVarious post-fire fixes - [22]
LERRJNFCFixing the text change version of "FileMove" to include the former path - [23]
Q3GU26WDmerge with changes from sanakirja v1.1.2 - [*]
NYOF5766track file encoding in the record, including change text for file adds
Change contents
- replacement in ""libpijul/src/working_copy/mod.rs"" at line 14
pub trait WorkingCopy {pub trait WorkingCopyRead { - edit in ""libpijul/src/working_copy/mod.rs"" at line 16
fn create_dir_all(&self, path: &str) -> Result<(), Self::Error>; - edit in ""libpijul/src/working_copy/mod.rs"" at line 19
fn remove_path(&self, name: &str, rec: bool) -> Result<(), Self::Error>;fn rename(&self, former: &str, new: &str) -> Result<(), Self::Error>;fn set_permissions(&self, name: &str, permissions: u16) -> Result<(), Self::Error>;type Writer: std::io::Write;fn write_file(&self, file: &str) -> Result<Self::Writer, Self::Error>; - edit in ""libpijul/src/working_copy/mod.rs"" at line 39[25.946]
pub trait WorkingCopy: WorkingCopyRead {fn create_dir_all(&self, path: &str) -> Result<(), Self::Error>;fn remove_path(&self, name: &str, rec: bool) -> Result<(), Self::Error>;fn rename(&self, former: &str, new: &str) -> Result<(), Self::Error>;fn set_permissions(&self, name: &str, permissions: u16) -> Result<(), Self::Error>;type Writer: std::io::Write;fn write_file(&self, file: &str) -> Result<Self::Writer, Self::Error>;} - replacement in ""libpijul/src/working_copy/memory.rs"" at line 216
impl WorkingCopy for Memory {impl WorkingCopyRead for Memory { - edit in ""libpijul/src/working_copy/memory.rs"" at line 218[4.2240]→[4.25842:25912](∅→∅),[4.25912]→[4.107:142](∅→∅),[4.142]→[4.238:273](∅→∅),[4.273]→[4.186:268](∅→∅),[4.186]→[4.186:268](∅→∅),[4.268]→[4.205553:205680](∅→∅),[4.25992]→[4.205553:205680](∅→∅),[4.205553]→[4.205553:205680](∅→∅),[4.205680]→[4.177:236](∅→∅),[4.236]→[4.205739:205780](∅→∅),[4.205739]→[4.205739:205780](∅→∅),[4.205780]→[4.25993:26047](∅→∅),[4.26047]→[4.205830:205959](∅→∅),[4.205830]→[4.205830:205959](∅→∅)
fn create_dir_all(&self, file: &str) -> Result<(), Self::Error> {let not_already_exists = {let m = self.0.lock();m.get_file(file).is_none()};if not_already_exists {let last = SystemTime::now();self.add_inode(file,Inode::Directory {meta: InodeMetadata::new(0o100, true),children: FileTree {children: HashMap::default(),},last_modified: last,},);}Ok(())} - edit in ""libpijul/src/working_copy/memory.rs"" at line 245
} - edit in ""libpijul/src/working_copy/memory.rs"" at line 247
impl WorkingCopy for Memory {fn create_dir_all(&self, file: &str) -> Result<(), Self::Error> {let not_already_exists = {let m = self.0.lock();m.get_file(file).is_none()};if not_already_exists {let last = SystemTime::now();self.add_inode(file,Inode::Directory {meta: InodeMetadata::new(0o100, true),children: FileTree {children: HashMap::default(),},last_modified: last,},);}Ok(())} - replacement in ""libpijul/src/working_copy/filesystem.rs"" at line 311
impl WorkingCopy for FileSystem {impl WorkingCopyRead for FileSystem { - edit in ""libpijul/src/working_copy/filesystem.rs"" at line 313[4.3951]→[4.28617:28732](∅→∅),[4.4025]→[4.159:214](∅→∅),[4.28732]→[4.159:214](∅→∅),[4.214029]→[4.159:214](∅→∅),[4.214]→[4.214089:214095](∅→∅),[4.214089]→[4.214089:214095](∅→∅)
fn create_dir_all(&self, file: &str) -> Result<(), Self::Error> {debug!("create_dir_all {:?}", file);Ok(std::fs::create_dir_all(&self.path(file))?)} - edit in ""libpijul/src/working_copy/filesystem.rs"" at line 344
} - edit in ""libpijul/src/working_copy/filesystem.rs"" at line 346
impl WorkingCopy for FileSystem {fn create_dir_all(&self, file: &str) -> Result<(), Self::Error> {debug!("create_dir_all {:?}", file);Ok(std::fs::create_dir_all(&self.path(file))?)} - replacement in ""libpijul/src/record.rs"" at line 8
use crate::working_copy::WorkingCopy;use crate::working_copy::WorkingCopyRead; - replacement in ""libpijul/src/record.rs"" at line 276
W: WorkingCopy + Clone + Send + Sync + 'static,W: WorkingCopyRead + Clone + Send + Sync + 'static, - replacement in ""libpijul/src/record.rs"" at line 295
<W as WorkingCopy>::Error: 'static,<W as WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 472
W: WorkingCopy,W: WorkingCopyRead, - replacement in ""libpijul/src/record.rs"" at line 484
<W as WorkingCopy>::Error: 'static,<W as WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 544
W: WorkingCopy,W: WorkingCopyRead, - replacement in ""libpijul/src/record.rs"" at line 559
<W as crate::working_copy::WorkingCopy>::Error: 'static,<W as crate::working_copy::WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 623
fn modified_since_last_commit<T: ChannelTxnT, W: WorkingCopy>(fn modified_since_last_commit<T: ChannelTxnT, W: WorkingCopyRead>( - replacement in ""libpijul/src/record.rs"" at line 647
fn add_file<W: WorkingCopy>(fn add_file<W: WorkingCopyRead>( - replacement in ""libpijul/src/record.rs"" at line 743
W: WorkingCopy + Clone,W: WorkingCopyRead + Clone, - replacement in ""libpijul/src/record.rs"" at line 757
<W as crate::working_copy::WorkingCopy>::Error: 'static,<W as crate::working_copy::WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 901
fn record_moved_file<T: ChannelTxnT, C: ChangeStore, W: WorkingCopy>(fn record_moved_file<T: ChannelTxnT, C: ChangeStore, W: WorkingCopyRead>( - replacement in ""libpijul/src/record.rs"" at line 912
<W as crate::working_copy::WorkingCopy>::Error: 'static,<W as crate::working_copy::WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 995
fn collect_moved_edges<T: GraphTxnT, C: ChangeStore, W: WorkingCopy>(fn collect_moved_edges<T: GraphTxnT, C: ChangeStore, W: WorkingCopyRead>( - replacement in ""libpijul/src/record.rs"" at line 1005
<W as crate::working_copy::WorkingCopy>::Error: 'static,<W as crate::working_copy::WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 1212
W: WorkingCopy,W: WorkingCopyRead, - replacement in ""libpijul/src/record.rs"" at line 1224
<W as WorkingCopy>::Error: 'static,<W as WorkingCopyRead>::Error: 'static, - replacement in ""libpijul/src/record.rs"" at line 1301
fn delete_inode_vertex<T: GraphTxnT, C: ChangeStore, W: WorkingCopy>(fn delete_inode_vertex<T: GraphTxnT, C: ChangeStore, W: WorkingCopyRead>( - replacement in ""libpijul/src/record.rs"" at line 1311
<W as WorkingCopy>::Error: 'static,<W as WorkingCopyRead>::Error: 'static,