merge with changes from sanakirja v1.1.2
[?]
Feb 26, 2021, 9:42 AM
Q3GU26WDEYE2HXMM4WWNEGVMSXLQAKRJBSB2EJZA6JTHPKQHXCXQCDependencies
- [2]
IYJZVLETCleaning up the literate programming bits - [3]
CCFJ7VO3Renaming "Record" to "Hunk" in the changes - [4]
YN63NUZOSanakirja 1.0 - [5]
UM5DLRPBstore new non-UTF-8 files raw and decode to deplay the contents - [6]
WZVCLZKYaddress clippy lints - [7]
WIORLB47Version bump - [8]
EQLDTLXVFixing a bug with empty new files, and another one with empty replacements - [9]
3M7WBE24Re-adding anyhow in the tests of libpijul - [10]
NO2QPRFLAdding rollback test - [11]
NA5I4WYNFixing the inverse of conflict resolutions - [12]
3AMEP2Y5More convenient interface for channels - [13]
6HNRL5RTdetect non-utf8 text files - [14]
VO5OQW4WRemoving anyhow in libpijul - [15]
W4NSLQNGmake text_encoding available to all of libpijul - [16]
TPEH2XNB1.0.0-alpha.28, with Tokio 1.0 - [17]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [18]
LYTVEPH3Avoid cloning into an existing path - [19]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [20]
SAGSYAPXVarious version bumps - [21]
JRENVH5DReqwest 0.11 - [22]
NYOF5766track file encoding in the record, including change text for file adds - [23]
GHO6DWPIRefactoring iterators - [24]
246V5TYIdecode existing files - [25]
ZRUPLBBTColours in diff and change: separating concerns and dependencies - [26]
VMOYG7MKtext file decoding for new files - [27]
6YMDOZIBRefactoring apply - [28]
JACZWIJ6Version bump - [29]
BZSC7VMYaddress clippy lints - [*]
ZHABNS3SCanonicalize all paths
Change contents
- resurrect zombie in "libpijul/src/working_copy/mod.rs" at line 1
use chardetng::EncodingDetector; - resurrect zombie in "libpijul/src/working_copy/mod.rs" at line 2
- resurrect zombie in "libpijul/src/working_copy/mod.rs" at line 3
use crate::{pristine::InodeMetadata, text_encoding::Encoding}; - file un-deletion: text.rs text.rs text.rs
- edit in libpijul/src/tests/text.rs at line 2
use crate::change::*; - replacement in libpijul/src/tests/text.rs at line 21
let (h, change) = record_all(&mut repo, &store, &mut txn, &mut channel, "")?;let (h, change) = record_all_change(&mut repo, &store, &mut txn, &mut channel, "")?; - replacement in libpijul/src/tests/text.rs at line 77
let (h1, change1) = record_all(&mut repo, &store, &mut txn, &mut channel, "")?;let (h1, change1) = record_all_change(&mut repo, &store, &mut txn, &mut channel, "")?; - edit in libpijul/src/tests/text.rs at line 105
fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(repo: &mut R,store: &P,txn: &mut T,channel: &mut ChannelRef<T>,prefix: &str,) -> Result<(Hash, Change), anyhow::Error>whereR::Error: Send + Sync + 'static,{let mut state = Builder::new();state.record(txn, Algorithm::default(), channel, repo, store, prefix)?;let rec = state.finish();let changes = rec.actions.into_iter().map(|rec| rec.globalize(txn)).collect();let change0 = crate::change::Change::make_change(txn,&channel,changes,rec.contents,crate::change::ChangeHeader {message: "test".to_string(),authors: vec![],description: None,// Beware of changing the following line: two changes// doing the same thing will be equal. Sometimes we don't// want that, as in tests::unrecord::unrecord_double.timestamp: chrono::Utc::now(),},Vec::new(),);let hash = store.save_change(&change0)?;apply::apply_local_change(txn, channel, &change0, hash, &rec.updatables)?;Ok((hash, change0))} - edit in libpijul/src/tests/mod.rs at line 1
use crate::change::{Local, LocalChange}; - resolve order conflict in libpijul/src/tests/mod.rs at line 20
- replacement in libpijul/src/tests/mod.rs at line 23
fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(fn record_all_change<T: MutTxnT, R: WorkingCopy, P: ChangeStore>( - replacement in libpijul/src/tests/mod.rs at line 29
) -> Result<Hash, anyhow::Error>) -> Result<(Hash, LocalChange<Local>), anyhow::Error> - edit in libpijul/src/tests/mod.rs at line 79
Ok((hash, change0))}fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(repo: &mut R,store: &P,txn: &mut T,channel: &mut ChannelRef<T>,prefix: &str,) -> Result<Hash, anyhow::Error>whereR::Error: Send + Sync + 'static,{let Ok((hash, _)) = record_all_change(repo, store, txn, channel, prefix); - edit in libpijul/src/record.rs at line 2[6.488937]→[6.571:613](∅→∅),[6.488937]→[6.571:613](∅→∅),[6.677]→[6.677:678](∅→∅),[6.677]→[6.677:678](∅→∅)
use std::collections::{HashMap, HashSet}; - edit in libpijul/src/record.rs at line 11
use std::collections::{HashMap, HashSet}; - resurrect zombie in "libpijul/src/record.rs" at line 273
let start = ChangePosition(self.rec.contents.len().into()); - edit in libpijul/src/record.rs at line 273
let (contents, encoding) = if meta.is_file() {let encoding = working_copy.decode_file(&item.full_path, &mut self.rec.contents)?; - resurrect zombie in "libpijul/src/record.rs" at line 276
let end = ChangePosition(self.rec.contents.len().into());self.rec.largest_file = self.rec.largest_file.max(end.0.as_u64() - start.0.as_u64()); - edit in libpijul/src/record.rs at line 276
self.rec.has_binary_files |= encoding.is_none(); - edit in libpijul/src/record.rs at line 279
let s = start.0.into();let e = end.0.as_usize().min(s + CHECK_UTF8 + 4); - resurrect zombie in "libpijul/src/record.rs" at line 280
if end > start { - edit in libpijul/src/record.rs at line 281
flag: EdgeFlags::BLOCK, - resurrect zombie in "libpijul/src/record.rs" at line 281
(Some(Atom::NewVertex(NewVertex {up_context: vec![Position {change: None,pos: inode_pos,}],down_context: vec![],start,end, - replacement in libpijul/src/record.rs at line 290
flag: EdgeFlags::empty(),flag: EdgeFlags::BLOCK, - edit in libpijul/src/record.rs at line 1142[6.496437]→[6.2018:2073](∅→∅),[6.496437]→[6.2018:2073](∅→∅),[6.496780]→[6.2170:2231](∅→∅),[6.496780]→[6.2170:2231](∅→∅),[6.496552]→[6.2074:2169](∅→∅),[6.496552]→[6.2074:2169](∅→∅)
let (contents, encoding) = if meta.is_file() {self.rec.has_binary_files |= encoding.is_none();let encoding = working_copy.decode_file(&item.full_path, &mut self.rec.contents)?; - file un-deletion: mod.rs mod.rs mod.rs
- edit in libpijul/src/diff/mod.rs at line 64
self.diff_binary(changes, txn, txn.graph(channel), path, inode, a, &b)?; - resurrect zombie in "libpijul/src/diff/mod.rs" at line 64
let mime_a = tree_magic_mini::from_u8(&d.contents_a);let mime_b = tree_magic_mini::from_u8(&b);debug!("mimes = {:?}, {:?}", mime_a, mime_b);if (!mime_a.starts_with("text/") || !mime_b.starts_with("text/")) && d.contents_a != b { - edit in libpijul/src/diff/mod.rs at line 64
// TODO pass through the encodings and use that to decide - edit in libpijul/src/diff/mod.rs at line 69
self.diff_binary(changes, txn, txn.graph(channel), path, inode, a, &b)?; - edit in libpijul/src/change.rs at line 1118
encoding, - edit in libpijul/src/change.rs at line 1120
encoding, - replacement in libpijul/src/change/text_changes.rs at line 434[4.140860]→[6.2882:2930](∅→∅),[6.53215]→[6.2882:2930](∅→∅),[6.53215]→[5.385:448](∅→∅),[6.53215]→[5.385:448](∅→∅)
print_contents(w, "+", c)?;print_contents(&mut w, "+", c, encoding)?;print_contents(w, "+", c, encoding)?; - edit in libpijul/src/change/text_changes.rs at line 1226
w.write_change_line(pref, a)? - replacement in libpijul/src/change/text_changes.rs at line 1228[6.85037]→[6.3913:3962](∅→∅),[6.85037]→[6.3913:3962](∅→∅),[5.591]→[6.5804:5848](∅→∅),[6.1861]→[6.5804:5848](∅→∅),[6.5804]→[6.5804:5848](∅→∅)
w.write_change_line(pref, contents)?writeln!(w, "{} {}", pref, a)?;w.write_change_line(pref, a)? - resurrect zombie in "libpijul/src/change/text_changes.rs" at line 1244
let c = &change_contents[n.start.us()..n.end.us()]; - resurrect zombie in "libpijul/src/change/text_changes.rs" at line 1245
print_contents(w, "+", c, &None)?; - resurrect zombie in "libpijul/Cargo.toml" at line 116
tree_magic_mini = "1.0.0"chardetng = "0.1.10"encoding_rs = "0.8.26" - resolve order conflict in Cargo.lock at line 986[31.3328][6.6687]
- edit in Cargo.lock at line 1183
][[package]]name = "ntapi"version = "0.3.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"dependencies = ["winapi", - resurrect zombie in "Cargo.lock" at line 1183
][[package]]name = "nom"version = "5.1.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af"dependencies = ["lexical-core","memchr","version_check", - edit in Cargo.lock at line 1194
][[package]]name = "ntapi"version = "0.3.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"dependencies = ["winapi",