Debugging `pijul git`: proper error reporting
[?]
Dec 2, 2020, 2:24 PM
R3H7D42UZ446V5TO2574BMAQQAYYJPEIMSZVDPAGVIYU2COJSWBACDependencies
- [2]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [3]
7UPL3Y2AUnrecord: don't restore the same unrecorded file deletion twice in the inodes and tree tables - [4]
KWAMD2KRA few fixes in the documentation comments - [5]
AEPEFS7OWrite help for each argument - [6]
I52XSRUHMassive cleanup, and simplification - [7]
4H2XTVJ2Fix some mistakes in the docs - [8]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [9]
YDKNUL6BAdd `diff --short` that lists changes without showing them
Change contents
- edit in pijul/src/commands/git.rs at line 287
debug!("fork channel: {:?} {:?}",parent_channel.borrow().name(),name); - replacement in pijul/src/commands/git.rs at line 693
working_copy.record_prefixes(txn, channel, changes, &mut state, repo_path, prefixes)?;for p in prefixes.iter() {let result = working_copy.record_prefix(txn, channel, changes, &mut state, repo_path, p);if let Err(e) = result {match e.downcast() {Ok(libpijul::Error::FileNotInRepo { .. }) => {}Ok(e) => return Err(e.into()),Err(e) => return Err(e),}}} - edit in pijul/src/commands/apply.rs at line 4
use anyhow::bail; - edit in pijul/src/commands/apply.rs at line 10
use crate::Error; - replacement in pijul/src/commands/apply.rs at line 19
/// Only apply the dependencies of this change, not the change itself./// Only apply the dependencies of the change, not the change itself. Only applicable for a single change. - replacement in pijul/src/commands/apply.rs at line 23
change: Option<String>,change: Vec<String>, - edit in pijul/src/commands/apply.rs at line 33
} else if self.change.is_some() {txn.open_or_create_channel(&channel_name)? - replacement in pijul/src/commands/apply.rs at line 34
return Err((Error::NoSuchChannel {channel: channel_name.to_string(),}).into());txn.open_or_create_channel(&channel_name)? - replacement in pijul/src/commands/apply.rs at line 36
let hash = if let Some(ch) = self.change {if let Ok(h) = txn.hash_from_prefix(&ch) {let mut hashes = Vec::new();for ch in self.change.iter() {hashes.push(if let Ok(h) = txn.hash_from_prefix(ch) { - replacement in pijul/src/commands/apply.rs at line 43
}} else {})}if hashes.is_empty() { - replacement in pijul/src/commands/apply.rs at line 48
repo.changes.save_change(&change)?};hashes.push(repo.changes.save_change(&change)?)} - replacement in pijul/src/commands/apply.rs at line 51
txn.apply_deps_rec(&repo.changes, &mut channel, hash)?;if hashes.len() > 1 {bail!("--deps-only is only applicable to a single change")}txn.apply_deps_rec(&repo.changes, &mut channel, hashes.pop().unwrap())?; - replacement in pijul/src/commands/apply.rs at line 56
txn.apply_change_rec(&repo.changes, &mut channel, hash)?;for hash in hashes.drain(..) {txn.apply_change_rec(&repo.changes, &mut channel, hash)?;} - replacement in libpijul/src/working_copy/filesystem.rs at line 60
if let Err(e) =self.record_prefix(txn, channel, changes, state, repo_path, prefix.as_ref()){eprintln!("{}", e)}self.record_prefix(txn, channel, changes, state, repo_path, prefix.as_ref())? - replacement in libpijul/src/working_copy/filesystem.rs at line 63
if let Err(e) =self.record_prefix(txn, channel, changes, state, repo_path, Path::new("")){eprintln!("{}", e)}self.record_prefix(txn, channel, changes, state, repo_path, Path::new(""))? - replacement in libpijul/src/unrecord/working_copy.rs at line 102
txn.put_inodes(inode, dest)?;txn.put_revinodes(dest, inode)?;put_inodes_with_rev(txn, inode, dest)?; - edit in libpijul/src/record.rs at line 481
debug!("comp = {:?}", comp); - replacement in libpijul/src/output/output.rs at line 258
txn.put_inodes(inode, output_item.pos)?;txn.put_revinodes(output_item.pos, inode)?;put_inodes_with_rev(txn, inode, output_item.pos)?; - replacement in libpijul/src/output/output.rs at line 267
txn.put_inodes(inode, output_item.pos)?;txn.put_revinodes(output_item.pos, inode)?;put_inodes_with_rev(txn, inode, output_item.pos)?; - replacement in libpijul/src/output/output.rs at line 282
txn.put_inodes(inode, output_item.pos)?;txn.put_revinodes(output_item.pos, inode)?;put_inodes_with_rev(txn, inode, output_item.pos)?;