Testing binary diff
Dependencies
- [2]
TNN56XYKlibpijul alpha.43 - [3]
FDPGJDXVCompiling Thrussh with feature OpenSSL by default - [4]
FXEDPLRIResurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore) - [5]
YX3VCEOMVersion bump - [6]
G65S7FAWVersion bump and cleanup - [7]
HKEOO4QJVersion bump - [8]
NX5I5H53New published versions - [9]
HSVGP2G4Version bump + formatting - [10]
HW5Q7GGYVersion bump - [11]
A3RM526YIntegrating identity malleability - [12]
BT2ZHPY4Version bumps - [13]
3AZB5NUOFixing the Git feature - [14]
H565UUPCUse correct pattern for workspace interdependencies - [15]
4DNDMC7IFixing a number of bugs related to encodings (extra newlines + misdetection in linux2x) - [16]
QJXNUQFJSolving conflicts - [17]
OUWD436AVersion bump - [18]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [19]
WIORLB47Version bump - [20]
VYHHOEYHVersions and formatting - [21]
EEBKW7VTKeys and identities - [22]
TPEH2XNB1.0.0-alpha.28, with Tokio 1.0 - [23]
CUHXXBDZFixing a bug in replacements, recently introduced during a fix of a graph corruption bug - [24]
HDGRZISMVersion updates - [25]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [26]
SN7AGY6SMaking `pijul lock` robust to kill signals - [27]
XL6Y64UPFixing a panic when iterating over the basenames of a file - [28]
UN64Q3P2Version bump - [29]
ZQXP3HNAVersion bump - [30]
MNTJ3VOKVersion bump - [31]
GBSL4AZIVersion bump - [32]
FSNBD6GKDebugging information and Cargo.lock updates (attempting to measure and solve #468) - [33]
SAGSYAPXVarious version bumps - [34]
IIV3EL2XCleanup, formatting, and fixing the Git feature - [35]
XAY4DYRRVersion bump - [36]
3S4DR77ZVersion updates - [37]
WZVCLZKYaddress clippy lints - [38]
5YDI33C4Fixing pager on OSX - [39]
B3QWIGDEFixing the Git features with the latest Pijul (+ conflicts in Cargo.toml) - [40]
HQ56ADNSFormatting, and version bump - [41]
BNPSVXICFriendlier progress bars - [42]
I24UEJQLVarious post-fire fixes - [43]
WTRH4B2XFormatting - [44]
OCBM7IFENew release: pijul-1.0.0-alpha.8 - [45]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [46]
6CZYYOG7Faster guessing of encoding - [47]
JRENVH5DReqwest 0.11 - [48]
CT6FBU57SDPX license + version bump - [49]
FYUDBQ3CFormatting changes + version bump - [50]
SPA2OL5Ikeep-changes feature (default) to avoid deleting problematic changes - [51]
6DOXSHWGCleanup, and version bump - [52]
ZTVNGFNTVersion bump - [53]
UFCZKKLXUpgrading to the latest Sanakirja/Rand - [54]
OIOMXESDBetter error handling in HTTP - [55]
G6YZ7U65Version bump - [56]
WI5BS6BSNew published versions - [57]
5BRU2RRWCleanup (debugging a crash related to trees/inodes) - [58]
NA5I4WYNFixing the inverse of conflict resolutions - [59]
VRDOV7DDVersions - [60]
HR3WK6A7When lock times out, check that there are no more clients before quitting - [61]
JACZWIJ6Version bump - [62]
B5Z4IMEUGenerating Cargo.nix for pijul 1.0.0-alpha.6 - [*]
TGA6QXGIInitial support for binary diffs (conflicts are not yet supported in the output)
Change contents
- replacement in pijul/Cargo.toml at line 4
version = "1.0.0-alpha.50"version = "1.0.0-alpha.51" - replacement in pijul/Cargo.toml at line 54
libpijul = { path = "../libpijul", version = "1.0.0-alpha.43", features = [ "tarball" ] }libpijul = { path = "../libpijul", version = "1.0.0-alpha.44", features = [ "tarball" ] } - edit in libpijul/src/tests/mod.rs at line 13
mod diff; - file addition: diff.rs[5.248792]
use super::*;use crate::alive::retrieve;use rand::distributions::Alphanumeric;use rand::{Rng, SeedableRng};use rand_chacha::ChaCha20Rng;use std::io::Write;#[test]fn bin_diff_test() -> Result<(), anyhow::Error> {env_logger::try_init().unwrap_or(());let repo = working_copy::memory::Memory::new();let changes = changestore::memory::Memory::new();let mut contents = String::new();repo.add_file("file", contents.clone().into());let env = pristine::sanakirja::Pristine::new_anon()?;let id = {let txn = env.arc_txn_begin().unwrap();txn.write().add_file("file", 0).unwrap();let channel = txn.write().open_or_create_channel("main").unwrap();let h = record_all(&repo, &changes, &txn, &channel, "").unwrap();let id = *txn.read().get_internal(&h.into()).unwrap().unwrap();txn.commit().unwrap();id};let mut rng = ChaCha20Rng::seed_from_u64(1234);for i in 0..1000 {contents.extend((&mut rng).sample_iter(&Alphanumeric).take(80).map(char::from),);contents.push('\n');repo.write_file("file").unwrap().write_all(contents.as_bytes()).unwrap();if i % 10 == 0 {let txn = env.arc_txn_begin().unwrap();let channel = txn.write().open_or_create_channel("main").unwrap();record_all(&repo, &changes, &txn, &channel, "").unwrap();txn.commit().unwrap();}}{let txn = env.arc_txn_begin().unwrap();let channel = txn.write().open_or_create_channel("main").unwrap();record_all(&repo, &changes, &txn, &channel, "").unwrap();txn.commit().unwrap();}let len = contents.len();unsafe {let c = contents.as_bytes_mut();if c[len / 2] == b'y' {c[len / 2] = b'x'} else {c[len / 2] = b'y'}}{let txn = env.arc_txn_begin().unwrap();let channel = txn.write().open_or_create_channel("main").unwrap();debug_to_file(&*txn.read(), &channel, "debug").unwrap();let mut rec = crate::record::Builder::new();let rec = rec.recorded();let vertex = Position {change: id,pos: ChangePosition(1u64.into()),};let mut ret = retrieve(&*txn.read(), txn.read().graph(&*channel.read()), vertex)?;rec.lock().diff(&changes,&*txn.read(),&*channel.read(),crate::record::Algorithm::Myers,String::new(),vertex.to_option(),&mut ret,contents.as_bytes(),&None,)?;debug!("{:#?}", rec.lock().actions);record_all(&repo, &changes, &txn, &channel, "").unwrap();debug_to_file(&*txn.read(), &channel, "debug").unwrap();// txn.commit().unwrap()}Ok(())} - replacement in libpijul/src/diff/replace.rs at line 60
debug!("old {:?}", &lines_a[old..(old + old_len)]);debug!("new {:?}", &lines_b[from_new..(from_new + len)]);debug!("old {:?}..{:?}", old, old + old_len);trace!("old {:?}", &lines_a[old..(old + old_len)]);debug!("new {:?}..{:?}", from_new, from_new + len);trace!("new {:?}", &lines_b[from_new..(from_new + len)]); - replacement in libpijul/src/diff/mod.rs at line 51
(self.ptr == b.ptr || self.l == b.l) && self.cyclic == b.cyclic((self.ptr == b.ptr && self.l.len() == b.l.len()) || self.l == b.l)&& self.cyclic == b.cyclic - edit in libpijul/src/diff/mod.rs at line 143[64.2024][64.2024]
debug!("contents_a: {:?}", d.contents_a.len()); - edit in libpijul/src/diff/bin.rs at line 16[64.2994][64.2994]
ptr: ch.as_ptr(), - replacement in libpijul/Cargo.toml at line 4
version = "1.0.0-alpha.43"version = "1.0.0-alpha.44" - replacement in libpijul/Cargo.toml at line 142
rand = "0.5"rand = "0.7" - replacement in libpijul/Cargo.toml at line 152
detone = "1.0"[5.2206]detone = "1.0"rand = "0.7"rand_chacha = "0.2" - edit in Cargo.lock at line 311
name = "cloudabi"version = "0.0.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"dependencies = ["bitflags",][[package]] - edit in Cargo.lock at line 454
name = "detone"version = "1.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f7104c193859c8141dcbb2008bd3d93e581d0fa7bb47b0d9f5e15c89d1b55514"[[package]] - edit in Cargo.lock at line 665
name = "fuchsia-cprng"version = "0.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"[[package]] - replacement in Cargo.lock at line 1081
version = "1.0.0-alpha.43"version = "1.0.0-alpha.44" - edit in Cargo.lock at line 1098
"detone", - edit in Cargo.lock at line 1111
"parking_lot", - replacement in Cargo.lock at line 1115
"rand 0.5.6","rand 0.7.3","rand_chacha 0.2.2", - replacement in Cargo.lock at line 1500
version = "1.0.0-alpha.50"version = "1.0.0-alpha.51" - edit in Cargo.lock at line 1635
version = "0.5.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"dependencies = ["cloudabi","fuchsia-cprng","libc","rand_core 0.3.1","winapi",][[package]]name = "rand" - edit in Cargo.lock at line 1680
version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"dependencies = ["rand_core 0.4.2",][[package]]name = "rand_core"version = "0.4.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"[[package]]name = "rand_core"