error handling for repo actions
[?]
Sep 16, 2025, 6:39 PM
IFQPVMBD552DZ3B5HCM6W6MI2SB6576ZYJNU5KVA3O4YPZAUEFHACDependencies
- [2]
6YZAVBWUInitial commit - [3]
KLR5FRIBadd fs state read/write of repos - [4]
SWWE2R6Mdisplay basic repo stuff - [5]
UB2ITZJSrefresh changed files on FS changes - [6]
EC3TVL4Xadd untracked files - [7]
KT5UYXGKfix selection after adding file, add changed file diffs - [8]
ELG3UDT6allow to rm added files - [9]
W7IUT3ZVstart recording impl - [10]
YBJRDOTCmake all repo actions async - [11]
A5YBC77Vrecord! - [12]
UCBNZULEmake changed files paths optional (no path for root) - [13]
4WO3ZJM2show untracked files' contents - [14]
W4LFX7IHgroup diffs by file name - [15]
PTFDJ567add untracked files encoding - [16]
AMPZ2BXKshow changed files diffs (only Edit atm) - [17]
RPCIGCNSadd replacement diff details - [18]
Y6LXBCJBupdate toolchain and rust edition - [19]
OQ6HSAWHshow record log - [20]
WI2BVQ6Jrm client lib crate - [21]
AHWWRC73navigate log entries - [22]
JE44NYHMdisplay log files diffs - [23]
ONRCENKTrm unnecessary state from repo's internal state - [24]
4ELJZGRJload and store all change diffs at once - [25]
VCNKFNUFapp init test - [26]
ACDXXAX2refactor main's updates into smaller fns - [27]
I56UGW7Umake record test, fix log update - [28]
X6AK4QPXfinish recording test - [29]
YYKXNBFLtest: add untracked file - [30]
5CYU7UT7test: rm added file - [31]
ESMM3FELtest selection reindexing - [32]
UF5NJKAStest load repo - [33]
SWDPAGF6test channel name - [34]
KQ3P3QRLupdate comments - [35]
FL2ULDJNtest record - [36]
2LWMGRUMtest diff - [37]
QYDWH7KBtest add and rm - [38]
5FVZF7XXtest changed files - [39]
B6YUTY3Qtest untracked files - [40]
F542TMBEtest log - [41]
DXAYDIMQupdate to latest pijul - [42]
KWTBNTO3diffs selection and scrolling - [43]
PTWZYQFRuse nav-scrollable for repo status - [44]
JZXYSIYDchannel selection! - [45]
5ZRDYL6Kfork channel, fix recording esc key - [46]
OJPGHVC3entire log! - [47]
WAOGSCOJvery nice refactor, wip adding channels logs - [48]
WH57EHNMupdate tests - [49]
PSKE5G36view description of change - [50]
AZ5D2LQUallow to set record description - [51]
KF2LDB5Yhandle repo init errors - [52]
KMB6FND3test view update fn rather than direct fn calls - [53]
ZIUHKVJKupdate tests - [54]
OC6DLIZ3test record when nothing to record - [55]
I2AG42PAnew cols layout - [56]
XHWLKCLDauto-scroll past skip sections on load - [57]
PKLUHYE4allow to copy change hash - [58]
A6Z4O6RCactions menu - [59]
YK3MOJJLchonky refactor, wip other channels logs & diffs
Change contents
- replacement in libflorescence/src/testing.rs at line 79
repo::add(&mut repo, DEFAULT_IGNORE_FILE);repo::add(&mut repo, DEFAULT_IGNORE_FILE).unwrap(); - replacement in libflorescence/src/testing.rs at line 85
repo::record(&internal, "Initialized".to_string(), None, skey);repo::record(&internal, "Initialized".to_string(), None, skey).unwrap(); - replacement in libflorescence/src/testing.rs at line 87
let log = repo::get_log(&internal.repo, None, None, None);let log = repo::get_log(&internal.repo, None, None, None).unwrap(); - replacement in libflorescence/src/repo.rs at line 77
InitFailed(LoadError),InitFailed(String), - replacement in libflorescence/src/repo.rs at line 79
state: State,state: anyhow::Result<State>, - edit in libflorescence/src/repo.rs at line 83
result: anyhow::Result<()>, - edit in libflorescence/src/repo.rs at line 87
result: anyhow::Result<()>, - replacement in libflorescence/src/repo.rs at line 92
diffs: ChangedFiles,diffs: anyhow::Result<ChangedFiles>, - replacement in libflorescence/src/repo.rs at line 94
LoadedEntireLog(Log),LoadedEntireLog(anyhow::Result<Log>), - replacement in libflorescence/src/repo.rs at line 97
log: Log,log: anyhow::Result<Log>, - replacement in libflorescence/src/repo.rs at line 212
Ok((mut internal_state, state)) => {Ok((mut internal_state, Ok(state))) => { - edit in libflorescence/src/repo.rs at line 221
}Ok((_, Err(err))) => {let _ = msg_out_tx.send(MsgOut::InitFailed(err.to_string())); - replacement in libflorescence/src/repo.rs at line 226
let _ = msg_out_tx.send(MsgOut::InitFailed(err));let _ = msg_out_tx.send(MsgOut::InitFailed(err.to_string())); - replacement in libflorescence/src/repo.rs at line 231
pub fn load(path: &Path) -> Result<(InternalState, State), LoadError> {pub fn load(path: &Path,) -> Result<(InternalState, anyhow::Result<State>), LoadError> { - replacement in libflorescence/src/repo.rs at line 273
let state: State;let state: anyhow::Result<State>; - replacement in libflorescence/src/repo.rs at line 289[27.225]→[23.612:666](∅→∅),[10.2442]→[23.612:666](∅→∅),[23.666]→[27.226:281](∅→∅),[27.281]→[23.715:746](∅→∅),[23.715]→[23.715:746](∅→∅)
internal_state = spawn_blocking(move || {add(&mut internal_state, &path_clone);internal_statelet result: anyhow::Result<()>;(internal_state, result) = spawn_blocking(move || {let result = add(&mut internal_state, &path_clone);(internal_state, result) - replacement in libflorescence/src/repo.rs at line 296
let _ = msg_out_tx.send(MsgOut::AddedUntrackedFile { path });let _ =msg_out_tx.send(MsgOut::AddedUntrackedFile { result, path }); - replacement in libflorescence/src/repo.rs at line 301[27.400]→[23.747:801](∅→∅),[10.2657]→[23.747:801](∅→∅),[23.801]→[27.401:455](∅→∅),[27.455]→[23.849:880](∅→∅),[23.849]→[23.849:880](∅→∅)
internal_state = spawn_blocking(move || {rm(&mut internal_state, &path_clone);internal_statelet result: anyhow::Result<()>;(internal_state, result) = spawn_blocking(move || {let result = rm(&mut internal_state, &path_clone);(internal_state, result) - replacement in libflorescence/src/repo.rs at line 308
let _ = msg_out_tx.send(MsgOut::RmedAddedFile { path });let _ = msg_out_tx.send(MsgOut::RmedAddedFile { result, path }); - replacement in libflorescence/src/repo.rs at line 311
let state: State;let state: anyhow::Result<State>; - replacement in libflorescence/src/repo.rs at line 313
record(&internal_state, msg, desc, sk);// Update state after making a recordlet state = get_state(&internal_state);let state = |internal_state: &InternalState| {record(internal_state, msg, desc, sk)?;// Update state after making a recordget_state(internal_state)};let state = state(&internal_state); - replacement in libflorescence/src/repo.rs at line 329
let diffs: ChangedFiles;let diffs: anyhow::Result<ChangedFiles>; - edit in libflorescence/src/repo.rs at line 331
let change =internal_state.repo.changes.get_change(&hash).unwrap(); - replacement in libflorescence/src/repo.rs at line 332
changed_files(&change, &internal_state.repo.changes);get_change_diffs(hash, &internal_state).context(format!("Getting change with the hash {}",hash_to_string(&hash))); - replacement in libflorescence/src/repo.rs at line 344
let state: State;let state: anyhow::Result<State>; - replacement in libflorescence/src/repo.rs at line 346
switch_to_channel(&mut internal_state, name);let state = get_state(&internal_state);let state = |internal_state: &mut InternalState| {switch_to_channel(internal_state, name)?;get_state(internal_state)};let state = state(&mut internal_state); - replacement in libflorescence/src/repo.rs at line 361
let state: State;let state: anyhow::Result<State>; - replacement in libflorescence/src/repo.rs at line 363
fork_channel(&mut internal_state, name);let state = get_state(&internal_state);let state = |internal_state: &mut InternalState| {fork_channel(internal_state, name)?;get_state(internal_state)};let state = state(&mut internal_state); - replacement in libflorescence/src/repo.rs at line 378
let log: Log;let log: anyhow::Result<Log>; - replacement in libflorescence/src/repo.rs at line 389
let log: Log;let log: anyhow::Result<Log>; - replacement in libflorescence/src/repo.rs at line 411
fn get_state(state: &InternalState) -> State {fn get_state(state: &InternalState) -> anyhow::Result<State> { - replacement in libflorescence/src/repo.rs at line 416[23.1773]→[23.1773:1814](∅→∅),[23.1814]→[44.570:617](∅→∅),[44.617]→[23.1814:1890](∅→∅),[23.1814]→[23.1814:1890](∅→∅),[23.1890]→[13.264:325](∅→∅),[9.295]→[13.264:325](∅→∅)
let channel = current_channel(repo);let other_channels = other_channels(repo);let diff = diff(repo);let untracked_files = untracked_files(repo);let changed_files = changed_files(&diff, &repo.changes);let channel = current_channel(repo)?;let other_channels = other_channels(repo)?;let diff = diff(repo)?;let untracked_files = untracked_files(repo)?;let changed_files = changed_files(&diff, &repo.changes)?; - replacement in libflorescence/src/repo.rs at line 422[19.359]→[47.2459:2519](∅→∅),[46.460]→[23.1931:1943](∅→∅),[27.850]→[23.1931:1943](∅→∅),[47.2519]→[23.1931:1943](∅→∅),[23.1931]→[23.1931:1943](∅→∅)
let log = get_log(repo, Some(&channel), offset, limit);State {let log = get_log(repo, Some(&channel), offset, limit)?;Ok(State { - replacement in libflorescence/src/repo.rs at line 430
}}) - replacement in libflorescence/src/repo.rs at line 437
fn current_channel(repo: &pijul::Repository) -> String {let txn = repo.pristine.txn_begin().unwrap();txn.current_channel()fn current_channel(repo: &pijul::Repository) -> anyhow::Result<String> {let txn = repo.pristine.txn_begin()?;Ok(txn.current_channel() - replacement in libflorescence/src/repo.rs at line 442
.to_string().to_string()) - replacement in libflorescence/src/repo.rs at line 446
fn other_channels(repo: &pijul::Repository) -> Vec<String> {let txn = repo.pristine.txn_begin().unwrap();fn other_channels(repo: &pijul::Repository) -> anyhow::Result<Vec<String>> {let txn = repo.pristine.txn_begin()?; - replacement in libflorescence/src/repo.rs at line 449
txn.channels("").unwrap()let channels = txn.channels("")? - replacement in libflorescence/src/repo.rs at line 457
.collect().collect();Ok(channels) - replacement in libflorescence/src/repo.rs at line 461
fn switch_to_channel(state: &mut InternalState, name: String) {fn switch_to_channel(state: &mut InternalState,name: String,) -> anyhow::Result<()> { - replacement in libflorescence/src/repo.rs at line 466
let current_channel = current_channel(repo);let txn = repo.pristine.arc_txn_begin().unwrap();let current_channel = current_channel(repo)?;let txn = repo.pristine.arc_txn_begin()?; - replacement in libflorescence/src/repo.rs at line 470
return;return Ok(()); - replacement in libflorescence/src/repo.rs at line 475
txn.load_channel(¤t_channel).unwrap()txn.load_channel(¤t_channel)? - replacement in libflorescence/src/repo.rs at line 478
&& has_unrecorded_changes(txn.clone(), channel.clone(), repo)&& has_unrecorded_changes(txn.clone(), channel.clone(), repo)? - replacement in libflorescence/src/repo.rs at line 481
return;return Ok(()); - replacement in libflorescence/src/repo.rs at line 485
txn.write().set_current_channel(&name).unwrap();txn.commit().unwrap();txn.write().set_current_channel(&name)?;txn.commit()?;Ok(()) - replacement in libflorescence/src/repo.rs at line 490
fn fork_channel(state: &mut InternalState, name: String) {fn fork_channel(state: &mut InternalState, name: String) -> anyhow::Result<()> { - replacement in libflorescence/src/repo.rs at line 492
let current_channel = current_channel(repo);let mut txn = repo.pristine.mut_txn_begin().unwrap();let channel = txn.load_channel(¤t_channel).unwrap().unwrap();let _fork = txn.fork(&channel, name.trim()).unwrap();txn.commit().unwrap();let current_channel = current_channel(repo)?;let mut txn = repo.pristine.mut_txn_begin()?;let channel = txn.load_channel(¤t_channel)?.context("Loading current channel")?;let _fork = txn.fork(&channel, name.trim())?;txn.commit()?;Ok(()) - replacement in libflorescence/src/repo.rs at line 552
) {) -> anyhow::Result<()> { - replacement in libflorescence/src/repo.rs at line 554
let channel = current_channel(repo);let txn = repo.pristine.arc_txn_begin().unwrap();let channel = current_channel(repo)?;let txn = repo.pristine.arc_txn_begin()?; - replacement in libflorescence/src/repo.rs at line 557
let channel = txn.read().load_channel(&channel).unwrap().unwrap();let channel = txn.read().load_channel(&channel)?.context("Loading current channel")?; - replacement in libflorescence/src/repo.rs at line 563
let (h, c) = txn.read().hash_from_prefix(h).unwrap();let (h, c) = txn.read().hash_from_prefix(h)?; - replacement in libflorescence/src/repo.rs at line 566
.get_changeset(txn.read().changes(&*channel.read()), &c).unwrap().get_changeset(txn.read().changes(&*channel.read()), &c)? - replacement in libflorescence/src/repo.rs at line 588
txn.write().apply_root_change_if_needed(&repo.changes,&channel,rand::thread_rng(),).unwrap();txn.write().apply_root_change_if_needed(&repo.changes,&channel,rand::thread_rng(),)?; - replacement in libflorescence/src/repo.rs at line 595
state.record(txn.clone(),pijul::Algorithm::default(),false,&pijul::DEFAULT_SEPARATOR,channel.clone(),&repo.working_copy,&repo.changes,"",1, // std::thread::available_parallelism()?.get(),).unwrap();state.record(txn.clone(),pijul::Algorithm::default(),false,&pijul::DEFAULT_SEPARATOR,channel.clone(),&repo.working_copy,&repo.changes,"",1, // std::thread::available_parallelism()?.get(),)?; - replacement in libflorescence/src/repo.rs at line 615
.map(|rec| rec.globalize(&*txn_).unwrap()).collect();let contents = Arc::try_unwrap(rec.contents).unwrap().into_inner();.map(|rec| {let res = rec.globalize(&*txn_)?;Ok(res)}).collect::<anyhow::Result<Vec<_>>>()?;let contents = Arc::into_inner(rec.contents).context("Failed to get unique strong reference on change contents",)?.into_inner(); - replacement in libflorescence/src/repo.rs at line 632
).unwrap();)?; - replacement in libflorescence/src/repo.rs at line 640
let hash = repo.changes.save_change(&mut change, |change, hash| {change.unhashed = Some(serde_json::json!({"signature": sk.sign_raw(&hash.to_bytes()).unwrap(),}));Ok::<_, pijul::changestore::filesystem::Error>(())}).unwrap();let hash = repo.changes.save_change(&mut change, |change, hash| {change.unhashed = Some(serde_json::json!({"signature": sk.sign_raw(&hash.to_bytes()).unwrap(),}));Ok::<_, pijul::changestore::filesystem::Error>(())})?; - replacement in libflorescence/src/repo.rs at line 647
txn_.apply_local_change(&channel, &change, &hash, &rec.updatables).unwrap();txn_.apply_local_change(&channel, &change, &hash, &rec.updatables)?; - replacement in libflorescence/src/repo.rs at line 650
std::fs::create_dir_all(&path).unwrap();std::fs::create_dir_all(&path)?; - replacement in libflorescence/src/repo.rs at line 654
.duration_since(std::time::SystemTime::UNIX_EPOCH).unwrap().duration_since(std::time::SystemTime::UNIX_EPOCH)? - replacement in libflorescence/src/repo.rs at line 662
.duration_since(std::time::SystemTime::UNIX_EPOCH).unwrap().duration_since(std::time::SystemTime::UNIX_EPOCH)? - replacement in libflorescence/src/repo.rs at line 668
txn.commit().unwrap();txn.commit()?;Ok(()) - replacement in libflorescence/src/repo.rs at line 672
fn diff(repo: &pijul::Repository) -> Diff {let txn = repo.pristine.arc_txn_begin().unwrap();fn diff(repo: &pijul::Repository) -> anyhow::Result<Diff> {let txn = repo.pristine.arc_txn_begin()?; - replacement in libflorescence/src/repo.rs at line 680
let channel = txn.write().open_or_create_channel(&cur_channel).unwrap();let channel = txn.write().open_or_create_channel(&cur_channel)?; - replacement in libflorescence/src/repo.rs at line 683
state.record(txn.clone(),pijul::Algorithm::default(),false,&pijul::DEFAULT_SEPARATOR,channel.clone(),&repo.working_copy,&repo.changes,"",std::thread::available_parallelism().unwrap().get(),).unwrap();state.record(txn.clone(),pijul::Algorithm::default(),false,&pijul::DEFAULT_SEPARATOR,channel.clone(),&repo.working_copy,&repo.changes,"",std::thread::available_parallelism()?.get(),)?; - replacement in libflorescence/src/repo.rs at line 700
.map(|rec| rec.globalize(&*txn_).unwrap()).collect().map(|rec| {let res = rec.globalize(&*txn_)?;Ok(res)}).collect::<anyhow::Result<Vec<_>>>()? - replacement in libflorescence/src/repo.rs at line 707
let contents = std::sync::Arc::try_unwrap(rec.contents).unwrap()let contents = std::sync::Arc::into_inner(rec.contents).context("Failed to get unique strong reference on change contents")? - replacement in libflorescence/src/repo.rs at line 718
).unwrap();)?; - replacement in libflorescence/src/repo.rs at line 725
).unwrap())? - replacement in libflorescence/src/repo.rs at line 729
changeOk(change) - replacement in libflorescence/src/repo.rs at line 733[10.3438]→[33.2900:2964](∅→∅),[33.2964]→[7.635:762](∅→∅),[10.3498]→[7.635:762](∅→∅),[7.635]→[7.635:762](∅→∅)
pub fn add(repo: &mut pijul::Repository, file_path_str: &str) {let txn = repo.pristine.arc_txn_begin().unwrap();let repo_path = CanonicalPathBuf::canonicalize(&repo.path).unwrap();pub fn add(repo: &mut pijul::Repository,file_path_str: &str,) -> anyhow::Result<()> {let txn = repo.pristine.arc_txn_begin()?;let repo_path = CanonicalPathBuf::canonicalize(&repo.path)?; - replacement in libflorescence/src/repo.rs at line 745
let path = CanonicalPathBuf::canonicalize(full_path).unwrap();let meta = std::fs::metadata(&path).unwrap();let path = CanonicalPathBuf::canonicalize(full_path)?;let meta = std::fs::metadata(&path)?; - replacement in libflorescence/src/repo.rs at line 761
if !txn.is_tracked(&path_str).unwrap() {if !txn.is_tracked(&path_str)? { - replacement in libflorescence/src/repo.rs at line 763
panic!("Failed to track file with: {e}");bail!("Failed to track file with: {e}"); - replacement in libflorescence/src/repo.rs at line 766
panic!("Won't add file \"{path_str}\" as it's already tracked");bail!("Won't add file \"{path_str}\" as it's already tracked"); - replacement in libflorescence/src/repo.rs at line 769
txn.commit().unwrap();txn.commit()?;Ok(()) - replacement in libflorescence/src/repo.rs at line 774
fn rm(repo: &mut pijul::Repository, file_path_str: &str) {fn rm(repo: &mut pijul::Repository, file_path_str: &str) -> anyhow::Result<()> { - replacement in libflorescence/src/repo.rs at line 776
let mut txn = repo.pristine.mut_txn_begin().unwrap();let mut txn = repo.pristine.mut_txn_begin()?; - replacement in libflorescence/src/repo.rs at line 779
if txn.is_tracked(&path_str).unwrap() {txn.remove_file(&path_str).unwrap();if txn.is_tracked(&path_str)? {txn.remove_file(&path_str)?; - replacement in libflorescence/src/repo.rs at line 782
txn.commit().unwrap();txn.commit()?;Ok(())}fn get_change_diffs(hash: ChangeHash,internal_state: &InternalState,) -> anyhow::Result<ChangedFiles> {let change = internal_state.repo.changes.get_change(&hash)?;changed_files(&change, &internal_state.repo.changes) - replacement in libflorescence/src/repo.rs at line 794
fn changed_files(diff: &Diff, repo_changes: &FileSystem) -> ChangedFiles {fn changed_files(diff: &Diff,repo_changes: &FileSystem,) -> anyhow::Result<ChangedFiles> { - replacement in libflorescence/src/repo.rs at line 874
get_change_contents(repo_changes, change, &diff.contents).unwrap();get_change_contents(repo_changes, change, &diff.contents)?; - replacement in libflorescence/src/repo.rs at line 892
get_change_contents(repo_changes, change, &diff.contents).unwrap();get_change_contents(repo_changes, change, &diff.contents)?; - replacement in libflorescence/src/repo.rs at line 900
).unwrap();)?; - replacement in libflorescence/src/repo.rs at line 947
changesOk(changes) - replacement in libflorescence/src/repo.rs at line 950
fn untracked_files(repo: &pijul::Repository) -> BTreeSet<String> {let repo_path = CanonicalPathBuf::canonicalize(&repo.path).unwrap();let txn = repo.pristine.arc_txn_begin().unwrap();let threads = std::thread::available_parallelism().unwrap().get();fn untracked_files(repo: &pijul::Repository,) -> anyhow::Result<BTreeSet<String>> {let repo_path = CanonicalPathBuf::canonicalize(&repo.path)?;let txn = repo.pristine.arc_txn_begin()?;let threads = std::thread::available_parallelism()?.get(); - replacement in libflorescence/src/repo.rs at line 968
).unwrap().filter_map(move |path| {let (path, _) = path.unwrap();use path_slash::PathExt;let path_str = path.to_slash_lossy();if !txn_.read().is_tracked(&path_str).unwrap() {Some(path_str.into_owned())} else {None)?.filter_map(move |path| match path {Err(e) => Some(Err(anyhow::Error::from(e))),Ok((path, _)) => {use path_slash::PathExt;let path_str = path.to_slash_lossy();let is_tracked = match txn_.read().is_tracked(&path_str) {Ok(is_tracked) => is_tracked,Err(e) => return Some(Err(anyhow::Error::from(e))),};if !is_tracked {Some(Ok(path_str.into_owned()))} else {None} - replacement in libflorescence/src/repo.rs at line 993
) -> Vec<LogEntry> {) -> anyhow::Result<Vec<LogEntry>> { - replacement in libflorescence/src/repo.rs at line 997
let txn = repo.pristine.txn_begin().unwrap();let txn = repo.pristine.txn_begin()?; - replacement in libflorescence/src/repo.rs at line 1004
let channel = txn.load_channel(&cur_channel).unwrap().unwrap();let channel = txn.load_channel(&cur_channel)?.context("Loading current channel")?; - replacement in libflorescence/src/repo.rs at line 1010
let mut reverse_log =txn.reverse_log(&channel.read(), None).unwrap().peekable();let mut reverse_log = txn.reverse_log(&channel.read(), None)?.peekable(); - replacement in libflorescence/src/repo.rs at line 1013
return vec![];return Ok(vec![]); - replacement in libflorescence/src/repo.rs at line 1018
let (_, (hash, _mrk)) = pr.unwrap();let cid = pijul::GraphTxnT::get_internal(&txn, hash).unwrap().unwrap();let (_, (hash, _mrk)) = pr?;let cid = pijul::GraphTxnT::get_internal(&txn, hash)?.context("Getting log change ID")?; - replacement in libflorescence/src/repo.rs at line 1028
).unwrap()== Some(cid);)? == Some(cid); - replacement in libflorescence/src/repo.rs at line 1039
let entry = mk_log_entry(repo, ChangeHash::from(hash));let entry = mk_log_entry(repo, ChangeHash::from(hash))?; - replacement in libflorescence/src/repo.rs at line 1050
entriesOk(entries) - replacement in libflorescence/src/repo.rs at line 1053
fn mk_log_entry(repo: &pijul::Repository, hash: ChangeHash) -> LogEntry {let header = repo.changes.get_header(&hash).unwrap();let files = repo.changes.get_changes(&hash).unwrap();fn mk_log_entry(repo: &pijul::Repository,hash: ChangeHash,) -> anyhow::Result<LogEntry> {let header = repo.changes.get_header(&hash)?;let files = repo.changes.get_changes(&hash)?; - replacement in libflorescence/src/repo.rs at line 1066
LogEntry {Ok(LogEntry { - replacement in libflorescence/src/repo.rs at line 1071
}}) - replacement in libflorescence/src/repo.rs at line 1181
) -> bool {) -> anyhow::Result<bool> { - replacement in libflorescence/src/repo.rs at line 1183
state.record(txn,libpijul::Algorithm::default(),false,&libpijul::DEFAULT_SEPARATOR,channel,&repo.working_copy,&repo.changes,"",std::thread::available_parallelism().unwrap().get(),).unwrap();state.record(txn,libpijul::Algorithm::default(),false,&libpijul::DEFAULT_SEPARATOR,channel,&repo.working_copy,&repo.changes,"",std::thread::available_parallelism()?.get(),)?; - replacement in libflorescence/src/repo.rs at line 1196
!rec.actions.is_empty()Ok(!rec.actions.is_empty()) - replacement in libflorescence/src/repo/test.rs at line 66
} = state;} = state.unwrap(); - replacement in libflorescence/src/repo/test.rs at line 89
assert_eq!(repo::current_channel(&repo), libpijul::DEFAULT_CHANNEL);assert_eq!(repo::current_channel(&repo).unwrap(),libpijul::DEFAULT_CHANNEL); - replacement in libflorescence/src/repo/test.rs at line 96
assert_eq!(repo::current_channel(&repo), new_channel_name);assert_eq!(repo::current_channel(&repo).unwrap(), new_channel_name); - replacement in libflorescence/src/repo/test.rs at line 105
let log = repo::get_log(&internal.repo, None, None, None);let log = repo::get_log(&internal.repo, None, None, None).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 116
repo::record(&internal, msg.to_string(), None, skey);repo::record(&internal, msg.to_string(), None, skey).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 118
let log = repo::get_log(&internal.repo, None, None, None);let log = repo::get_log(&internal.repo, None, None, None).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 138
let diff = repo::diff(&internal.repo);let diff = repo::diff(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 145
let diff = repo::diff(&internal.repo);let diff = repo::diff(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 152
let changed_files = repo::changed_files(&diff, &internal.repo.changes);let changed_files =repo::changed_files(&diff, &internal.repo.changes).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 169
let untracked_files = repo::untracked_files(&internal.repo);let untracked_files = repo::untracked_files(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 176
let untracked_files = repo::untracked_files(&internal.repo);let untracked_files = repo::untracked_files(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 187
let diff = repo::diff(&internal.repo);let diff = repo::diff(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 194
repo::add(&mut internal.repo, new_file);repo::add(&mut internal.repo, new_file).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 196
let diff = repo::diff(&internal.repo);let diff = repo::diff(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 203
repo::rm(&mut internal.repo, new_file);repo::rm(&mut internal.repo, new_file).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 205
let adiff = repo::diff(&internal.repo);let adiff = repo::diff(&internal.repo).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 215
let mut log = repo::get_log(&internal.repo, None, None, None);let mut log = repo::get_log(&internal.repo, None, None, None).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 222
let mut log = repo::get_log(&internal.repo, None, None, Some(limit));let mut log =repo::get_log(&internal.repo, None, None, Some(limit)).unwrap(); - replacement in libflorescence/src/repo/test.rs at line 228
let mut log = repo::get_log(&internal.repo, None, Some(offset), None);let mut log =repo::get_log(&internal.repo, None, Some(offset), None).unwrap(); - edit in libflorescence/src/prelude.rs at line 1
#[doc(inline)]pub use anyhow::{bail, Context}; - edit in libflorescence/Cargo.toml at line 25
[dependencies.anyhow]workspace = true - replacement in inflorescence/src/test.rs at line 139
Msg::FromRepo(repo::MsgOut::AddedUntrackedFile { path }) if path == file_to_recordMsg::FromRepo(repo::MsgOut::AddedUntrackedFile { result:_, path }) if path == file_to_record - replacement in inflorescence/src/test.rs at line 252
Msg::FromRepo(repo::MsgOut::AddedUntrackedFile { path }) if path == file_to_recordMsg::FromRepo(repo::MsgOut::AddedUntrackedFile {result:_, path }) if path == file_to_record - replacement in inflorescence/src/test.rs at line 559
Msg::FromRepo(repo::MsgOut::AddedUntrackedFile { path })Msg::FromRepo(repo::MsgOut::AddedUntrackedFile { result:_, path }) - replacement in inflorescence/src/test.rs at line 608
Msg::FromRepo(repo::MsgOut::RmedAddedFile { path })Msg::FromRepo(repo::MsgOut::RmedAddedFile { result:_, path }) - edit in inflorescence/src/main.rs at line 637
let report_err = |state: &mut State, err: String| {report::show_err(&mut state.model.report, err);Task::none()}; - replacement in inflorescence/src/main.rs at line 644
repo::MsgOut::InitFailed(err) => {report::show_err(&mut state.model.report, err.to_string());Task::none()}repo::MsgOut::InitFailed(err) => report_err(state, err.to_string()), - replacement in inflorescence/src/main.rs at line 648[47.86393]→[47.86393:86458](∅→∅),[47.86458]→[27.7884:8019](∅→∅),[26.1078]→[27.7884:8019](∅→∅),[27.8088]→[26.1078:1200](∅→∅),[26.1078]→[26.1078:1200](∅→∅),[26.1200]→[46.47127:47201](∅→∅),[46.47201]→[47.86459:86593](∅→∅)
} => repo_refreshed(state, repo_state, invalidate_logs),repo::MsgOut::AddedUntrackedFile { path: _ } => Task::none(),repo::MsgOut::RmedAddedFile { path: _ } => Task::none(),repo::MsgOut::GotChangeDiffs { hash, diffs } => {repo_got_change_diffs(state, hash, diffs)}repo::MsgOut::LoadedEntireLog(log) => got_entire_log(state, log),repo::MsgOut::LoadedOtherChannelLog { channel, log } => {loaded_other_channel_log(state, channel, log)}} => match repo_state {Ok(repo_state) => {repo_refreshed(state, repo_state, invalidate_logs)}Err(err) => report_err(state, err.to_string()),},repo::MsgOut::AddedUntrackedFile { result, path: _ } => match result {Ok(()) => Task::none(),Err(err) => report_err(state, err.to_string()),},repo::MsgOut::RmedAddedFile { result, path: _ } => match result {Ok(()) => Task::none(),Err(err) => report_err(state, err.to_string()),},repo::MsgOut::GotChangeDiffs { hash, diffs } => match diffs {Ok(diffs) => repo_got_change_diffs(state, hash, diffs),Err(err) => report_err(state, err.to_string()),},repo::MsgOut::LoadedEntireLog(log) => match log {Ok(log) => got_entire_log(state, log),Err(err) => report_err(state, err.to_string()),},repo::MsgOut::LoadedOtherChannelLog { channel, log } => match log {Ok(log) => loaded_other_channel_log(state, channel, log),Err(err) => report_err(state, err.to_string()),}, - edit in Cargo.toml at line 31
[workspace.dependencies.anyhow]version = "1" - edit in Cargo.lock at line 2795
"anyhow",