Fix a panic when switching between channels that have different files
[?]
Feb 26, 2021, 8:31 AM
MDADYULS5AWVMTJDGYCGNQTN6T7XJDRUBDTFILDY5MLF6I2PE5NACDependencies
- [2]
YN63NUZOSanakirja 1.0 - [3]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [4]
GHO6DWPIRefactoring iterators - [5]
VNBLGT6GDo not output unmodified files when resetting (fix) - [6]
27PYHR6LMaking the get_latest_touch function (useful to make archives) public in libpijul - [7]
I52XSRUHMassive cleanup, and simplification - [8]
3KRGVQFUDo not update the mtime of unmodified files - [9]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [10]
QMTANHVNReset: only output changed files - [11]
XA23FMQMReset only files that have been modified - [12]
LGEJSLTYFixing output (including its uses in reset and pull) - [13]
3AMEP2Y5More convenient interface for channels - [14]
VO5OQW4WRemoving anyhow in libpijul - [15]
HMMMKONLFixing alive vertices - [16]
BXD3IQYNFixing --features git - [*]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [*]
K6GWUOD5Styling progress bars
Change contents
- replacement in pijul/src/commands/reset.rs at line 127
let mut paths = Vec::with_capacity(inodes.len()); - replacement in pijul/src/commands/reset.rs at line 129
let (path, _) = libpijul::fs::find_path(if let Some((path, _)) = libpijul::fs::find_path( - replacement in pijul/src/commands/reset.rs at line 135
)?;)? {paths.push(path)} else {paths.clear();break;}}for path in paths.iter() { - edit in pijul/src/commands/reset.rs at line 153
if paths.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;} - replacement in pijul/src/commands/pushpull.rs at line 458
touched_paths.push(libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, *i)?.0)if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, *i)?{touched_paths.push(path)} else {touched_paths.clear();break;} - edit in pijul/src/commands/pushpull.rs at line 484[18.11136][19.2211]
if touched_paths.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;} - edit in pijul/src/commands/apply.rs at line 79
let mut touched_files = Vec::with_capacity(touched.len()); - replacement in pijul/src/commands/apply.rs at line 81
let (path, _) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, i)?;if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, i)?{touched_files.push(path)} else {touched_files.clear();break;}}for path in touched_files.iter() { - edit in pijul/src/commands/apply.rs at line 100
if !touched_files.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;} - replacement in libpijul/src/pristine/mod.rs at line 1879
let (path, _) = crate::fs::find_path(changes, txn, channel, true, file_).unwrap();let (path, _) = crate::fs::find_path(changes, txn, channel, true, file_).unwrap().unwrap(); - replacement in libpijul/src/lib.rs at line 555
) -> Result<(String, bool), output::FileError<C::Error, Self::GraphError>> {) -> Result<Option<(String, bool)>, output::FileError<C::Error, Self::GraphError>> { - replacement in libpijul/src/lib.rs at line 568
) -> Result<(String, bool), output::FileError<C::Error, Self::GraphError>> {) -> Result<Option<(String, bool)>, output::FileError<C::Error, Self::GraphError>> { - replacement in libpijul/src/fs.rs at line 836
) -> Result<(String, bool), crate::output::FileError<C::Error, T::GraphError>> {) -> Result<Option<(String, bool)>, crate::output::FileError<C::Error, T::GraphError>> { - replacement in libpijul/src/fs.rs at line 846
let inode_vertex = txn.find_block_end(txn.graph(channel), v).unwrap();let inode_vertex = match txn.find_block_end(txn.graph(channel), v) {Ok(block) => block,Err(BlockError::Block { block, .. }) => {debug!("block not found {:?}", block);assert!(path.is_empty());return Ok(None)},Err(BlockError::Txn(t)) => return Err(crate::output::FileError::Txn(t)),}; - replacement in libpijul/src/fs.rs at line 910
Ok((path.join("/"), all_alive))Ok(Some((path.join("/"), all_alive)))