Cleanup and formatting
[?]
May 27, 2021, 10:05 AM
GUL4M5FIE7JYXJHR7MCTQS3543HIQXGPLBWZKASBAWWEA4SZ75CACDependencies
- [2]
F6V27C3MFixing the "old file optimisation" in record, after the move to parallelisable records - [3]
NS36CJCOValidating timestamps in record - [4]
HWH4WWN3Proper separation of Git commit messages into a message and description fields in changes - [5]
AAXP2534Tags: completing the subcommand - [6]
PEUQPKDHFixing a warning in pijul credit - [7]
3H6Q5LDSFixing a bug with the salt argument in `mv` - [8]
YN63NUZOSanakirja 1.0 - [9]
YDTN6BGITouch the channel if no file was changed - [10]
K7JPP64SFaster error in unrecord when the change is not on the channel - [11]
7MNTFTDFExit with an error when a change could not be signed - [12]
KWAGWB73Adding extra dependencies from the config file - [13]
GBLM3JLRFix options of git subcommand - [14]
MF3WAHBIcommands/record: amend current change if unspecified - [15]
AXVPNZ2Ncommands/git: fix imports - [16]
BXD3IQYNFixing --features git - [17]
6RVT5X4LCurrent state: return zero instead of an Option if there is no change on the channel - [18]
QL6K2ZM3Tags - [19]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [20]
3FTEGCMRadd timestamp_validator to tag --timestamp option - [21]
I52XSRUHMassive cleanup, and simplification - [22]
OWCCRVO5Fixing a broken pipe in credit - [23]
3MHUNYERChanging --amend flag to respect -m flag - [24]
I24UEJQLVarious post-fire fixes - [25]
2RXOCWUWMaking libpijul deterministic (and getting rid of `rand`) - [26]
DJYHARZ7Skipping old files when recording - [27]
ZHABNS3SCanonicalize all paths - [28]
CVAT6LN3Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`) - [29]
B3QWIGDEFixing the Git features with the latest Pijul (+ conflicts in Cargo.toml) - [30]
L2LPPKD4Fixing the Git feature - [31]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [32]
IIV3EL2XCleanup, formatting, and fixing the Git feature - [33]
5SLOJYHGFixing the Git feature - [34]
V435QOJRUsing path-slash to fix path issues on Windows - [35]
A3DMBJJAUpgrading the `git` subcommand to the latest Sanakirja and Libpijul - [36]
L4JXJHWXpijul/*: reorganize imports and remove extern crate
Change contents
- replacement in pijul/src/commands/unrecord.rs at line 132
txn.write().unwrap().unrecord(&repo.changes, &channel, &hash, 0)?;txn.write().unwrap().unrecord(&repo.changes, &channel, &hash, 0)?; - replacement in pijul/src/commands/unrecord.rs at line 151
txn.write().unwrap().unrecord(&repo.changes, &channel, &h, 0)?;txn.write().unwrap().unrecord(&repo.changes, &channel, &h, 0)?; - replacement in pijul/src/commands/tag.rs at line 120
let channel_name = repo.config.get_current_channel(None).0.to_string();let channel_name = repo.config.get_current_channel(None).0.to_string(); - replacement in pijul/src/commands/record.rs at line 60
return Ok(())return Ok(()); - replacement in pijul/src/commands/record.rs at line 117
txn.unrecord(&repo.changes, &mut channel, &h, self.timestamp.unwrap_or(0) as u64)?;txn.unrecord(&repo.changes,&mut channel,&h,self.timestamp.unwrap_or(0) as u64,)?; - replacement in pijul/src/commands/record.rs at line 149
match result {match result { - replacement in pijul/src/commands/record.rs at line 287
Either<(Either<(Arc<RwLock<T>>,Change,HashMap<usize, libpijul::InodeUpdate>,Option<libpijul::Hash>,std::time::SystemTime,), - replacement in pijul/src/commands/record.rs at line 296[8.132]→[8.106748:106819](∅→∅),[8.13909]→[8.106748:106819](∅→∅),[8.106748]→[8.106748:106819](∅→∅),[8.106819]→[8.2267:2303](∅→∅),[8.2303]→[8.714:749](∅→∅),[8.749]→[2.2772:2800](∅→∅)
Change,HashMap<usize, libpijul::InodeUpdate>,Option<libpijul::Hash>,std::time::SystemTime,), Arc<RwLock<T>>>,>, - replacement in pijul/src/commands/record.rs at line 435
B(B)B(B), - edit in pijul/src/commands/git.rs at line 1
use anyhow::bail;use canonical_path::CanonicalPathBuf;use clap::{ArgSettings, Clap};use libpijul::pristine::*;use libpijul::*;use log::{debug, error, info, trace}; - edit in pijul/src/commands/git.rs at line 13[8.843]→[8.0:18](∅→∅),[8.2237]→[8.0:18](∅→∅),[8.18]→[8.160:198](∅→∅),[8.2237]→[8.160:198](∅→∅),[8.198]→[8.0:31](∅→∅),[8.2237]→[8.0:31](∅→∅),[8.31]→[8.0:27](∅→∅),[8.16]→[8.0:27](∅→∅),[8.27]→[8.2264:2281](∅→∅),[8.2264]→[8.2264:2281](∅→∅),[8.2281]→[8.17:55](∅→∅)
use anyhow::bail;use canonical_path::CanonicalPathBuf;use clap::{ArgSettings, Clap};use libpijul::pristine::*;use libpijul::*;use log::{debug, error, info, trace}; - replacement in pijul/src/commands/git.rs at line 329
let state = import_commit(git, repo, txn.clone(), channel.clone(), &oid, &mut stats)?;let state =import_commit(git, repo, txn.clone(), channel.clone(), &oid, &mut stats)?; - replacement in pijul/src/commands/git.rs at line 571
if let Some(old_path) = libpijul::fs::inode_filename(&*txn, *inode)? {if let Some(old_path) = libpijul::fs::inode_filename(&*txn, *inode)?{ - replacement in pijul/src/commands/git.rs at line 663
debug!("recording on channel {:?}", txn_.name(&channel.read().unwrap()));debug!("recording on channel {:?}",txn_.name(&channel.read().unwrap())); - replacement in pijul/src/commands/git.rs at line 703
description: if description.is_empty() { None } else { Some(description) },description: if description.is_empty() {None} else {Some(description)}, - replacement in pijul/src/commands/git.rs at line 747
fn record_apply<T: TxnT + TxnTExt + MutTxnTExt + Send + Sync + 'static, C: libpijul::changestore::ChangeStore + Clone + Send + 'static>(fn record_apply<T: TxnT + TxnTExt + MutTxnTExt + Send + Sync + 'static,C: libpijul::changestore::ChangeStore + Clone + Send + 'static,>( - replacement in pijul/src/commands/git.rs at line 789
txn.current_state(&channel.read().unwrap()).map_err(TxnErr)?,txn.current_state(&channel.read().unwrap()).map_err(TxnErr)?, - replacement in pijul/src/commands/file_operations.rs at line 6
use clap::{Clap, ArgSettings};use clap::{ArgSettings, Clap}; - replacement in pijul/src/commands/credit.rs at line 61
Ok(_) => {},Ok(_) => {} - replacement in pijul/src/commands/credit.rs at line 65
return Err(io.into())return Err(io.into()); - replacement in pijul/src/commands/credit.rs at line 67
},} - edit in pijul/src/commands/credit.rs at line 140
let st: u64 = v.start.into();write!(self.w, "{}.{} > ", v.change.to_base32(), st)?; - edit in libpijul/src/pristine/sanakirja.rs at line 1409
// self.counter += 1;// debug!("put_graph {:?} {:?}, counter = {:?}", k, e, self.counter);/*if self.counter >= 12965 {let mut x = None;let mut cursor = btree::cursor::Cursor::new(&self.txn, graph)?;let mut panic = None;while let Some((k, v)) = cursor.next(&self.txn)? {if let Some((ref k_, ref v_)) = x {if k_ > k || (k_== k && v_ > v) {panic = Some((*k, *v));break}}x = Some((*k, *v))}self.debug(graph, ".put");if panic.is_some() {panic!("{:?}", x);}}*/ - replacement in libpijul/src/pristine/sanakirja.rs at line 1418
// self.counter += 1;// debug!("del_graph {:?} {:?}, counter = {:?}", k, e, self.counter);/*if self.counter >= 12965 {let mut x = None;let mut cursor = btree::cursor::Cursor::new(&self.txn, graph)?;let mut panic = None;while let Some((k, v)) = cursor.next(&self.txn)? {if let Some((ref k_, ref v_)) = x {if k_ > k || (k_== k && v_ > v) {panic = Some((*k, *v));break}}x = Some((*k, *v))}self.debug(graph, ".del");if panic.is_some() {panic!("{:?}", x);}}let change = ChangeId::from_base32(b"MM6XEY5S32WRA").unwrap();let mm6v = Vertex {change,start: ChangePosition(L64(1478218)),end: ChangePosition(L64(1478229)),};let mm6e = (Edge {flag: EdgeFlags::BLOCK | EdgeFlags::FOLDER | EdgeFlags::PARENT,dest: Position {change,pos: ChangePosition(L64(1466149)),},introduced_by: change,}).into();let has_mm6 = if let Some((v, e)) = btree::get(&self.txn, graph, &mm6v, Some(&mm6e)).unwrap() {v == &mm6v && e == &mm6e} else {false};*/let result = Ok(btree::del(&mut self.txn, graph, k, e)?);/*if has_mm6 && (k != &mm6v || e != Some(&mm6e)) {if let Some((v, e)) = btree::get(&self.txn, graph, &mm6v, Some(&mm6e)).unwrap() {assert_eq!(v, &mm6v);assert_eq!(e, &mm6e)} else {panic!("Not found")}}*/resultOk(btree::del(&mut self.txn, graph, k, e)?)