Various post-fire fixes
[?]
Apr 20, 2021, 8:32 PM
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQCDependencies
- [2]
O4DNWMPDCleaunp and proofreading of libpijul::record - [3]
IYJZVLETCleaning up the literate programming bits - [4]
NZIK34IMFixing a bug in diff, where some changes were ignored for no reason - [5]
YWUZQU3TFormatting (for some reason, this previously escaped the hooks) - [6]
VL7ZYKHBRunning hooks through shell on Windows and Unix - [7]
OU243LABSupport for staging - [8]
PKIHBUGTSetting the oldest modification time to EPOCH if no file has changed - [9]
NF4O25IECleaning up useless operations in InodeMetadata - [10]
I6DVZEFUDo not ask for user input if the SSH channel is already closed - [11]
ADPAFSMYProper old metadata when recording - [12]
YTQS4ES3Fixing a parsing problem (related to permissions), and the associated permissions - [13]
VE2UWMW4Trying to fix channel touch - [14]
YDTN6BGITouch the channel if no file was changed - [15]
QV66H4YAPrevent --channel from being used with a single file in `pijul reset` - [16]
2D7P2VKJChange completions (where the whole progress bar story started) - [17]
X7OHUPL5Fixing a bug in unrecord, and fixing the tests - [18]
MFTN7GBWPre-tags cleanup + fast Sanakirja - [19]
EEOOHGQQMore atomic "file moves+transaction" - [20]
UDHP4ZVBFixing SSH asynchronicity issues - [21]
FXT5FS5WUpdating Cargo.nix - [22]
EGSVRZJVAvoid converting between base32 and hash in pijul::commands::unrecord - [23]
NA5I4WYNFixing the inverse of conflict resolutions - [24]
3AMEP2Y5More convenient interface for channels - [25]
CZX6TRWRFixing a shortcut to detect alive children without iterating - [26]
HSVGP2G4Version bump + formatting - [27]
ATZ3BWSEFixing the double-deletion of repairs for folder edges - [28]
H3NAKE2IAdding num_cpus to Cargo.lock - [29]
23LVKATNUse pager crate for log output - [30]
62XVBWPYremove redundant Clap attributes - [31]
WKX5S4Z4remove unneccesary explicit lifetimes - [32]
HDGRZISMVersion updates - [33]
BNPSVXICFriendlier progress bars - [34]
OUWD436AVersion bump - [35]
KUMJITTFVersion bump in the lockfiles - [36]
KDF6FJRVbigger clippy refactors - [37]
UBCBQ5FGRemoving pijul/src/commands/checkout.rs (unused file), as well as litorg comments - [38]
MHQBEHJDunrecord --reset without a pending change - [39]
7FFFKQZUadd 'Default' implementations - [40]
XWETQ4DEUpgrading versions - [41]
4OCC6D42Recursive add - [42]
I7VL7VPZMinor cleanup - [43]
I52XSRUHMassive cleanup, and simplification - [44]
OJZWJUF2MUCH faster `pijul add -r` - [45]
JRSBH6HTIdentification of line numbers in replacements - [46]
SPA2OL5Ikeep-changes feature (default) to avoid deleting problematic changes - [47]
5BRU2RRWCleanup (debugging a crash related to trees/inodes) - [48]
NLGQAH4HCredit and reset relative to current directory instead of the root - [49]
WIORLB47Version bump - [50]
ZXTHL45Oaddress clippy lints - [51]
ZRUPLBBTColours in diff and change: separating concerns and dependencies - [52]
43AJ37IXGetting rid of edge validation, which does not work for zombie conflicts - [53]
IM6UFPOZFixing a test related to the tree/revtree tables - [54]
MDADYULSFix a panic when switching between channels that have different files - [55]
6YMDOZIBRefactoring apply - [56]
K6GWUOD5Styling progress bars - [57]
X243Z3Y5Recording only the required metadata (can even be changed later!) - [58]
H62VFFJECargo.nix, and solving conflicts - [59]
XJPQKIUG - [60]
XA23FMQMReset only files that have been modified - [61]
Q7CAYX5NFixing Windows compilation - [62]
B5Z4IMEUGenerating Cargo.nix for pijul 1.0.0-alpha.6 - [63]
YDKNUL6BAdd `diff --short` that lists changes without showing them - [64]
7ZFRYVVQCargo.nix and formatting - [65]
BD5PC25ADeleting conflict resolution vertices when the sides are deleted - [66]
VIHXB7SGcommands: set up pager for diff, change, and credit - [67]
HR3WK6A7When lock times out, check that there are no more clients before quitting - [68]
VO5OQW4WRemoving anyhow in libpijul - [69]
R3H7D42UDebugging `pijul git`: proper error reporting - [70]
HKEOO4QJVersion bump - [71]
5BB266P6Optional colours in the global config file - [72]
LLT3GY6UWhen recording, do not consider deleted filenames as current - [73]
6DOXSHWGCleanup, and version bump - [74]
VLPIKNFSclone: make source remote the default - [75]
PJ7T2VFLDo not hang on locked repositories - [76]
VMPAOJS2Don't output after pushing to a local channel - [77]
Q45QHPO4Feedback on network stuff - [78]
ENKQ3QZGForward the exit status messages from the SSH background loop to the client (solving hangs) - [79]
I2D35LLFMore accurate recording of modification time - [80]
J63VVQ5Ipijul reset: fixed help message - [81]
5DVRL6MFHard-unrecord - [82]
7UPL3Y2AUnrecord: don't restore the same unrecorded file deletion twice in the inodes and tree tables - [83]
Y7YAFMFFFix path prefix striping on Windows. - [84]
LGEJSLTYFixing output (including its uses in reset and pull) - [85]
JP3BYVXXFixing file paths on Windows - [86]
YN63NUZOSanakirja 1.0 - [87]
SAGSYAPXVarious version bumps - [88]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [89]
CXM5CBS2Fixing `pijul remove` when files are not deleted - [90]
A3DMBJJAUpgrading the `git` subcommand to the latest Sanakirja and Libpijul - [91]
QE64ATLZFixing asynchronicity problems in SSH - [92]
SQVWP4LUWhen clone fails, only remove directories we have created (not other directories) - [93]
44BN7FWSDo not output files introduced by patches that were not applied during a push - [94]
7A2TSC4PConflict solving code (FOLDER edges) - [95]
JRENVH5DReqwest 0.11 - [96]
4H2XTVJ2Fix some mistakes in the docs - [97]
WZVCLZKYaddress clippy lints - [98]
ZBNKSYA6Fixing a bus error when starting a transaction on a full disk - [99]
TKEVOH7HFixing a bug when downloading changes, and making change download more efficient (more async) - [100]
DJYHARZ7Skipping old files when recording - [101]
PH7B6I3UFixing log --hash-only - [102]
RXNT67OTSanakirja version, and removing an unwrap - [103]
SLJ3OHD4unrecord: show list of changes if none were given as arguments - [104]
G734WNM6flake.nix: use crate2nix - [105]
KWAMD2KRA few fixes in the documentation comments - [106]
VXZNQQHCIf an existing file is moved to a new directory that is deleted before the record, record the deletion - [107]
L4LAD4XMFixing clone on WSL (Windows Subsystem for Linux) - [108]
GVQ7YSEDChecking for dependencies even for a local change - [109]
3M7WBE24Re-adding anyhow in the tests of libpijul - [110]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [111]
VYHHOEYHVersions and formatting - [112]
TZ42DX3BProperly dropping a channel - [113]
VQPAUKBQchannel switch as an alias to reset - [114]
3VJB4ULDUpdating Cargo.nix - [115]
GHO6DWPIRefactoring iterators - [116]
ZHABNS3SCanonicalize all paths - [117]
LYTVEPH3Avoid cloning into an existing path - [118]
7PM25EXLRecursive apply was written a little too fast… - [119]
33SQMZYXNew versions of dependencies - [120]
4VWXL6KQCorrect handling of ignore files - [121]
76PCXGMLPushing to, and pulling from the local repository - [122]
DNQHXWRZaddress clippy hard errors - [123]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [124]
3YDPHBANaddress non-controversial clippy lints - [125]
UFCZKKLXUpgrading to the latest Sanakirja/Rand - [126]
NMX52UOGFixing the "invalid change" errors - [127]
6RVT5X4LCurrent state: return zero instead of an Option if there is no change on the channel - [128]
G6S6PWZEDo not touch the channel if this is a partial record - [129]
DIGICKHOFixing a conflict (probably due to unrecord) - [130]
MF3WAHBIcommands/record: amend current change if unspecified - [131]
QNJBR73Kdon't return Result for infallible functions - [132]
KJDQ2WOMFixing the parsing of section headers in the text change format - [133]
VNBLGT6GDo not output unmodified files when resetting (fix) - [134]
A6R6SGCPFixing a panic in `pijul change` - [135]
2K7JLB4ZNo pager on Windows - [136]
HQ56ADNSFormatting, and version bump - [137]
OCBM7IFENew release: pijul-1.0.0-alpha.8 - [138]
BT2ZHPY4Version bumps - [139]
BZSC7VMYaddress clippy lints - [140]
TPEH2XNB1.0.0-alpha.28, with Tokio 1.0 - [141]
3KRGVQFUDo not update the mtime of unmodified files - [142]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [143]
UNZXTNSJChange text format: order dependencies in the order they were on the channel at record time - [144]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [145]
23OFHED6Remove .pijul after a failed cloned, in the case we created it but did not its parent - [146]
SEWGHUHQ.pijul/config: simplify remotes and hooks - [147]
BXD3IQYNFixing --features git - [148]
CCFJ7VO3Renaming "Record" to "Hunk" in the changes - [149]
QMTANHVNReset: only output changed files - [150]
EQLDTLXVFixing a bug with empty new files, and another one with empty replacements - [151]
YAJAXIV5Unrecording changes atomically - [152]
KVBLRDOUConcatenating edits with order conflict resolutions (if relevant), and parsing the text format of the result - [153]
HMMMKONLFixing alive vertices - [154]
NO2QPRFLAdding rollback test - [155]
H23LO7U7a few more clippy lints addressed - [156]
KWAGWB73Adding extra dependencies from the config file - [157]
IIV3EL2XCleanup, formatting, and fixing the Git feature - [158]
ZXCRG5RPIt seems change inverses will need a little more work - [159]
BZCGXVS7Fixing two bugs around conflicts on the last line, where invalid patches were produced (first bug) and applied (second bug) - [160]
Y6EVFMTADon't output files if they aren't in the current channel - [161]
ZAEUSICJFile deletions were not shown with their names in the metadata during record - [162]
B3QWIGDEFixing the Git features with the latest Pijul (+ conflicts in Cargo.toml) - [*]
3WIQYEISFixing conflicts in Cargo.lock
Change contents
- edit in pijul/src/repository.rs at line 1
use std::io::Write; - edit in pijul/src/repository.rs at line 2
use std::sync::Arc; - replacement in pijul/src/repository.rs at line 12
pub working_copy: libpijul::working_copy::filesystem::FileSystem,pub working_copy: Arc<libpijul::working_copy::filesystem::FileSystem>, - edit in pijul/src/repository.rs at line 23
pub fn config_path(&self) -> PathBuf {self.path.join(DOT_DIR).join(CONFIG_FILE)} - replacement in pijul/src/repository.rs at line 28
let config = toml::to_string(&self.config)?;let mut file = std::fs::File::create(&self.path.join(DOT_DIR).join(CONFIG_FILE))?;file.write_all(config.as_bytes())?;self.config.save(&self.config_path())?; - replacement in pijul/src/repository.rs at line 82
working_copy: libpijul::working_copy::filesystem::FileSystem::from_root(working_copy: Arc::new(libpijul::working_copy::filesystem::FileSystem::from_root( - replacement in pijul/src/repository.rs at line 84
),)), - replacement in pijul/src/repository.rs at line 108
working_copy: libpijul::working_copy::filesystem::FileSystem::from_root(&cur),working_copy: Arc::new(libpijul::working_copy::filesystem::FileSystem::from_root(&cur,)), - replacement in pijul/src/remote/mod.rs at line 174
.dichotomy_changelist(txn, &remote.borrow().remote).dichotomy_changelist(txn, &remote.lock()?.remote) - replacement in pijul/src/remote/mod.rs at line 178
.iter_remote(&remote.borrow().remote, n)?.iter_remote(&remote.lock()?.remote, n)? - replacement in pijul/src/remote/mod.rs at line 542
for x in txn.iter_remote(&remote.borrow().remote, 0)? {for x in txn.iter_remote(&remote.lock()?.remote, 0)? { - replacement in pijul/src/remote/mod.rs at line 619
let channel = local_channel.borrow();let channel = local_channel.read()?; - replacement in pijul/src/remote/mod.rs at line 653
for x in txn.iter_remote(&remote_changes.borrow().remote, 0)? {for x in txn.iter_remote(&remote_changes.lock()?.remote, 0)? { - replacement in pijul/src/remote/local.rs at line 3
use std::sync::Arc;use std::sync::{Arc, RwLock}; - replacement in pijul/src/remote/local.rs at line 28
Ok(txn.reverse_log(&channel.borrow(), None)?.next().map(|n| {Ok(txn.reverse_log(&*channel.read()?, None)?.next().map(|n| { - replacement in pijul/src/remote/local.rs at line 70
&remote_channel.borrow().graph,&remote_channel.read()?.graph, - replacement in pijul/src/remote/local.rs at line 78
for x in remote_txn.log(&remote_channel.borrow(), from)? {for x in remote_txn.log(&*remote_channel.read()?, from)? { - replacement in pijul/src/remote/local.rs at line 120
let mut repo = libpijul::working_copy::filesystem::FileSystem::from_root(&self.root);let repo = libpijul::working_copy::filesystem::FileSystem::from_root(&self.root); - replacement in pijul/src/remote/local.rs at line 122
txn.output_repository_no_pending(&mut repo, &store, &mut channel, "", true, None)?;let txn = Arc::new(RwLock::new(txn));let wc = Arc::new(repo);libpijul::output::output_repository_no_pending(wc,&store,txn.clone(),channel.clone(),"",true,None,num_cpus::get(),)?;let txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/main.rs at line 88
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in pijul/src/main.rs at line 205
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - edit in pijul/src/config.rs at line 2
use std::io::Write; - edit in pijul/src/config.rs at line 132
use std::io::Write; - edit in pijul/src/config.rs at line 141
pub fn save(&self, path: &std::path::Path) -> Result<(), anyhow::Error> {let config = toml::to_string(self)?;let mut file = std::fs::File::create(path)?;file.write_all(config.as_bytes())?;Ok(())} - edit in pijul/src/commands/unrecord.rs at line 2
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/unrecord.rs at line 40[20.362]→[20.119:173](∅→∅),[20.173]→[20.11721:11790](∅→∅),[20.96409]→[20.11721:11790](∅→∅),[20.11790]→[20.314:485](∅→∅),[20.314]→[20.314:485](∅→∅)
let mut txn = repo.pristine.mut_txn_begin()?;if let Some(mut channel) = txn.load_channel(channel_name)? {let pending_hash = if self.reset {super::pending(&mut txn, &mut channel, &mut repo)?} else {None};let txn = repo.pristine.mut_txn_begin()?;let channel = if let Some(channel) = txn.load_channel(channel_name)? {channel} else {bail!("No such channel: {:?}", channel_name);};let txn = Arc::new(RwLock::new(txn));let pending_hash = if self.reset {super::pending(txn.clone(), &channel, &mut repo)?} else {None};let mut txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/unrecord.rs at line 58
let mut hashes = Vec::new();let mut hashes = Vec::new(); - replacement in pijul/src/commands/unrecord.rs at line 60[20.42]→[20.42:85](∅→∅),[20.85]→[20.1459:2257](∅→∅),[20.1459]→[20.1459:2257](∅→∅),[20.2257]→[20.86:120](∅→∅),[20.120]→[20.11791:11850](∅→∅),[20.2290]→[20.11791:11850](∅→∅),[20.11850]→[20.9091:9145](∅→∅),[20.9145]→[20.2390:2477](∅→∅),[20.11897]→[20.2390:2477](∅→∅),[20.2390]→[20.2390:2477](∅→∅),[20.2477]→[20.121:279](∅→∅),[20.279]→[20.9146:9224](∅→∅),[20.9224]→[20.349:367](∅→∅),[20.349]→[20.349:367](∅→∅)
if self.change_id.is_empty() {// No change ids were given, present a list for choosing// The number can be set in the global config or passed as a command-line optionlet number_of_changes = if let Some(n) = self.show_changes {n} else {let cfg = crate::config::Global::load()?;cfg.unrecord_changes.ok_or_else(|| {anyhow!("Can't determine how many changes to show. \Please set the `unrecord_changes` option in \your global config or run `pijul unrecord` \with the `--show-changes` option.")})?};let hashes_ = txn.reverse_log(&channel.borrow(), None)?.map(|h| (h.unwrap().1).0.into()).take(number_of_changes).collect::<Vec<_>>();let o = make_changelist(&repo.changes, &hashes_, "unrecord")?;for h in parse_changelist(&edit::edit_bytes(&o[..])?).iter() {hashes.push((*h, *txn.get_internal(&h.into())?.unwrap()))}if self.change_id.is_empty() {// No change ids were given, present a list for choosing// The number can be set in the global config or passed as a command-line optionlet number_of_changes = if let Some(n) = self.show_changes {n - replacement in pijul/src/commands/unrecord.rs at line 66
for c in self.change_id.iter() {let (hash, cid) = txn.hash_from_prefix(c)?;hashes.push((hash, cid))}let cfg = crate::config::Global::load()?;cfg.unrecord_changes.ok_or_else(|| {anyhow!("Can't determine how many changes to show. \Please set the `unrecord_changes` option in \your global config or run `pijul unrecord` \with the `--show-changes` option.")})? - replacement in pijul/src/commands/unrecord.rs at line 76[20.2791]→[20.356:401](∅→∅),[20.356]→[20.356:401](∅→∅),[20.401]→[20.9225:9303](∅→∅),[20.9303]→[20.545:591](∅→∅),[20.2834]→[20.545:591](∅→∅),[20.591]→[20.1855:1883](∅→∅),[20.506]→[20.1855:1883](∅→∅),[20.1883]→[20.9304:9375](∅→∅),[20.70]→[20.1954:1985](∅→∅),[20.499]→[20.1954:1985](∅→∅),[20.9375]→[20.1954:1985](∅→∅),[20.1954]→[20.1954:1985](∅→∅),[20.1985]→[20.9376:9447](∅→∅)
let channel_ = channel.borrow();let mut changes: Vec<(Hash, ChangeId, Option<u64>)> = Vec::new();for (hash, change_id) in hashes {let n = txn.get_changeset(txn.changes(&channel_), &change_id).unwrap();changes.push((hash, change_id, n.map(|&x| x.into())));let hashes_ = txn.reverse_log(&*channel.read()?, None)?.map(|h| (h.unwrap().1).0.into()).take(number_of_changes).collect::<Vec<_>>();let o = make_changelist(&repo.changes, &hashes_, "unrecord")?;for h in parse_changelist(&edit::edit_bytes(&o[..])?).iter() {hashes.push((*h, *txn.get_internal(&h.into())?.unwrap()))}} else {for c in self.change_id.iter() {let (hash, cid) = txn.hash_from_prefix(c)?;hashes.push((hash, cid)) - replacement in pijul/src/commands/unrecord.rs at line 90[20.662]→[20.662:751](∅→∅),[20.751]→[20.645:695](∅→∅),[20.695]→[20.96673:96722](∅→∅),[20.804]→[20.96673:96722](∅→∅),[20.96673]→[20.96673:96722](∅→∅),[20.96722]→[20.9448:9504](∅→∅),[20.9504]→[20.11953:11990](∅→∅),[20.11953]→[20.11953:11990](∅→∅),[20.11990]→[20.9505:9545](∅→∅),[20.9545]→[20.96820:96854](∅→∅),[20.96820]→[20.96820:96854](∅→∅),[20.96854]→[20.9546:9593](∅→∅),[20.9593]→[20.96900:96931](∅→∅),[20.96900]→[20.96900:96931](∅→∅)
std::mem::drop(channel_);changes.sort_by(|a, b| b.2.cmp(&a.2));for (hash, change_id, _) in changes {let channel_ = channel.borrow();for p in txn.iter_revdep(&change_id)? {let (p, d) = p?;if p < &change_id {continue;} else if p > &change_id {break;};let channel_ = channel.read()?;let mut changes: Vec<(Hash, ChangeId, Option<u64>)> = Vec::new();for (hash, change_id) in hashes {let n = txn.get_changeset(txn.changes(&channel_), &change_id).unwrap();changes.push((hash, change_id, n.map(|&x| x.into())));}std::mem::drop(channel_);changes.sort_by(|a, b| b.2.cmp(&a.2));for (hash, change_id, _) in changes {let channel_ = channel.read()?;for p in txn.iter_revdep(&change_id)? {let (p, d) = p?;if p < &change_id {continue;} else if p > &change_id {break;}if txn.get_changeset(txn.changes(&channel_), d)?.is_some() {let dep: Hash = txn.get_external(d)?.unwrap().into();if Some(dep) == pending_hash {bail!("Cannot unrecord change {} because unrecorded changes depend on it",hash.to_base32());} else {bail!("Cannot unrecord change {} because {} depend on it",hash.to_base32(),dep.to_base32()); - edit in pijul/src/commands/unrecord.rs at line 124[20.96953]→[20.71:152](∅→∅),[20.152]→[20.9594:9672](∅→∅),[20.9672]→[20.551:742](∅→∅),[20.12138]→[20.551:742](∅→∅),[20.551]→[20.551:742](∅→∅),[20.742]→[20.696:745](∅→∅),[20.745]→[20.776:960](∅→∅),[20.776]→[20.776:960](∅→∅),[20.960]→[20.746:796](∅→∅),[20.796]→[20.995:1100](∅→∅),[20.995]→[20.995:1100](∅→∅),[20.1009]→[20.97363:97385](∅→∅),[20.1100]→[20.97363:97385](∅→∅),[20.2047]→[20.97363:97385](∅→∅),[20.97363]→[20.97363:97385](∅→∅)
if txn.get_changeset(txn.changes(&channel_), d)?.is_some() {let dep: Hash = txn.get_external(d)?.unwrap().into();if Some(dep) == pending_hash {bail!("Cannot unrecord change {} because unrecorded changes depend on it",hash.to_base32());} else {bail!("Cannot unrecord change {} because {} depend on it",hash.to_base32(),dep.to_base32());}} - edit in pijul/src/commands/unrecord.rs at line 125
std::mem::drop(channel_);txn.unrecord(&repo.changes, &mut channel, &hash)?; - replacement in pijul/src/commands/unrecord.rs at line 126[20.97582]→[20.363:413](∅→∅),[20.28]→[20.1145:1308](∅→∅),[20.413]→[20.1145:1308](∅→∅),[20.1145]→[20.1145:1308](∅→∅),[20.556]→[20.1308:1358](∅→∅),[20.1308]→[20.1308:1358](∅→∅),[20.1358]→[20.38:64](∅→∅),[20.64]→[20.1358:1378](∅→∅),[20.1358]→[20.1358:1378](∅→∅)
if self.reset && is_current_channel {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;std::mem::drop(channel_);txn.unrecord(&repo.changes, &channel, &hash)?;}let txn = Arc::new(RwLock::new(txn));if self.reset && is_current_channel {libpijul::output::output_repository_no_pending(repo.working_copy.clone(),&repo.changes,txn.clone(),channel.clone(),"",true,None,num_cpus::get(),)?;}if let Some(h) = pending_hash {txn.write().unwrap().unrecord(&repo.changes, &channel, &h)?;if cfg!(feature = "keep-changes") {repo.changes.del_change(&h)?; - edit in pijul/src/commands/unrecord.rs at line 148[20.43]→[20.43:87](∅→∅),[20.87]→[20.1378:1442](∅→∅),[20.1378]→[20.1378:1442](∅→∅),[20.1442]→[20.0:120](∅→∅),[20.120]→[20.1488:1502](∅→∅),[20.1488]→[20.1488:1502](∅→∅)
if let Some(h) = pending_hash {txn.unrecord(&repo.changes, &mut channel, &h)?;if cfg!(feature = "keep-changes") {repo.changes.del_change(&h)?;}} - edit in pijul/src/commands/unrecord.rs at line 149
let txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - edit in pijul/src/commands/reset.rs at line 3
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/reset.rs at line 9[20.62]→[20.89:164](∅→∅),[20.89]→[20.89:164](∅→∅),[20.164]→[20.1331:1347](∅→∅),[20.2100]→[20.1331:1347](∅→∅),[20.97774]→[20.1331:1347](∅→∅)
use libpijul::{ChannelTxnT, DepsTxnT, MutTxnT, MutTxnTExt, TxnT, TxnTExt};use log::debug;use libpijul::{ChannelTxnT, DepsTxnT, MutTxnT, TxnT, TxnTExt};use log::*; - replacement in pijul/src/commands/reset.rs at line 41[20.98218]→[20.6094:6163](∅→∅),[20.6163]→[20.174:228](∅→∅),[20.228]→[20.414:504](∅→∅),[20.98334]→[20.414:504](∅→∅)
let mut repo = Repository::find_root(self.repo_path).await?;let mut txn = repo.pristine.mut_txn_begin()?;let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref());let repo = Repository::find_root(self.repo_path).await?;let txn = repo.pristine.mut_txn_begin()?;let config_path = repo.config_path();let mut config = repo.config;let (channel_name, _) = config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/reset.rs at line 48
let mut channel = if let Some(channel) = txn.load_channel(&channel_name)? {let channel = if let Some(channel) = txn.load_channel(&channel_name)? { - edit in pijul/src/commands/reset.rs at line 53
- replacement in pijul/src/commands/reset.rs at line 69
txn.output_file(libpijul::output::output_file( - replacement in pijul/src/commands/reset.rs at line 71
&channel,&txn,&channel.read().unwrap(), - replacement in pijul/src/commands/reset.rs at line 76[20.99610]→[20.99610:99627](∅→∅),[20.99627]→[20.505:583](∅→∅),[20.583]→[20.538:604](∅→∅),[20.99700]→[20.538:604](∅→∅),[20.604]→[20.63:138](∅→∅),[20.138]→[20.869:887](∅→∅),[20.545]→[20.869:887](∅→∅),[20.2136]→[20.869:887](∅→∅),[20.869]→[20.869:887](∅→∅),[20.577]→[20.887:934](∅→∅),[20.887]→[20.887:934](∅→∅),[20.934]→[15.0:141](∅→∅)
} else {let (current_channel, _) = repo.config.get_current_channel(None);if self.channel.as_deref() == Some(current_channel) {if !overwrite_changes {return Ok(());}} else if self.channel.is_some() {if !self.files.is_empty() {bail!("Cannot use --channel with individual paths. Did you mean --dry-run?")return Ok(());}let txn = Arc::new(RwLock::new(txn));let (current_channel, _) = config.get_current_channel(None);if self.channel.as_deref() == Some(current_channel) {if !overwrite_changes {return Ok(());}} else if self.channel.is_some() {if !self.files.is_empty() {bail!("Cannot use --channel with individual paths. Did you mean --dry-run?")}let channel = {let txn = txn.read().unwrap();txn.load_channel(current_channel)?};if let Some(channel) = channel {let mut state = libpijul::RecordBuilder::new();state.record(txn.clone(),libpijul::Algorithm::default(),channel.clone(),repo.working_copy.clone(),&repo.changes,"",num_cpus::get(),)?;let rec = state.finish();debug!("actions = {:?}", rec.actions);if !rec.actions.is_empty() {bail!("Cannot change channel, as there are unrecorded changes.") - edit in pijul/src/commands/reset.rs at line 110[15.159]→[20.12282:12362](∅→∅),[20.934]→[20.12282:12362](∅→∅),[20.12362]→[20.99917:100440](∅→∅),[20.99917]→[20.99917:100440](∅→∅),[20.100440]→[20.12363:12452](∅→∅),[20.12452]→[20.100509:100549](∅→∅),[20.100509]→[20.100509:100549](∅→∅)
if let Some(mut channel) = txn.load_channel(current_channel)? {let mut state = libpijul::RecordBuilder::new();txn.record(&mut state,libpijul::Algorithm::default(),&mut channel,&mut repo.working_copy,&repo.changes,"",)?;let rec = state.finish();debug!("actions = {:?}", rec.actions);if !rec.actions.is_empty() {bail!("Cannot change channel, as there are unrecorded changes.")}} - edit in pijul/src/commands/reset.rs at line 111
} - replacement in pijul/src/commands/reset.rs at line 113[20.100716]→[20.6510:6559](∅→∅),[20.6559]→[20.100907:100946](∅→∅),[20.100907]→[20.100907:100946](∅→∅),[20.100946]→[20.139:494](∅→∅),[20.539]→[20.539:773](∅→∅),[20.6211]→[20.773:826](∅→∅),[20.773]→[20.773:826](∅→∅),[20.826]→[20.578:1226](∅→∅),[20.100946]→[20.578:1226](∅→∅)
let now = std::time::Instant::now();if self.files.is_empty() {if self.channel.is_none() || self.channel.as_deref() == Some(current_channel) {let last_modified = last_modified(&txn, &channel.borrow());txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,Some(last_modified),)?;txn.touch_channel(&mut channel.borrow_mut(), None);txn.commit()?;return Ok(());}let mut inodes = HashSet::new();if let Some(cur) = txn.load_channel(current_channel)? {let mut changediff = HashSet::new();let (a, b, s) = libpijul::pristine::last_common_state(&txn,&cur.borrow(),&channel.borrow(),)?;debug!("last common state {:?}", s);changes_after(&txn, &cur.borrow(), a, &mut changediff, &mut inodes)?;changes_after(&txn, &channel.borrow(), b, &mut changediff, &mut inodes)?;}let now = std::time::Instant::now();if self.files.is_empty() {if self.channel.is_none() || self.channel.as_deref() == Some(current_channel) {let last_modified = last_modified(&*txn.read().unwrap(), &*channel.read()?);libpijul::output::output_repository_no_pending(repo.working_copy.clone(),&repo.changes,txn.clone(),channel.clone(),"",true,Some(last_modified),num_cpus::get(),)?;let mut txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()};txn.touch_channel(&mut *channel.write()?, None);txn.commit()?;return Ok(());}let mut inodes = HashSet::new();let txn_ = txn.read().unwrap();if let Some(cur) = txn_.load_channel(current_channel)? {let mut changediff = HashSet::new();let (a, b, s) = libpijul::pristine::last_common_state(&*txn_,&*cur.read()?,&*channel.read()?,)?;debug!("last common state {:?}", s);changes_after(&*txn_, &*cur.read()?, a, &mut changediff, &mut inodes)?;changes_after(&*txn_, &*channel.read()?, b, &mut changediff, &mut inodes)?;} - replacement in pijul/src/commands/reset.rs at line 150
if self.channel.is_some() {repo.config.current_channel = self.channel;repo.save_config()?;if self.channel.is_some() {config.current_channel = self.channel;config.save(&config_path)?;}let mut paths = Vec::with_capacity(inodes.len());for pos in inodes.iter() {if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &*txn_, &*channel.read()?, false, *pos)?{paths.push(path)} else {paths.clear();break; - replacement in pijul/src/commands/reset.rs at line 164[20.1394]→[20.0:66](∅→∅),[20.66]→[20.1395:1438](∅→∅),[20.1395]→[20.1395:1438](∅→∅),[20.1438]→[20.67:137](∅→∅),[20.137]→[20.1499:1672](∅→∅),[20.1499]→[20.1499:1672](∅→∅),[20.1672]→[20.138:343](∅→∅),[20.343]→[16.4180:4442](∅→∅),[16.4442]→[20.343:386](∅→∅),[20.343]→[20.343:386](∅→∅),[20.386]→[20.1696:1927](∅→∅),[20.1696]→[20.1696:1927](∅→∅),[20.1972]→[20.1972:2033](∅→∅),[20.2033]→[20.192:222](∅→∅),[20.222]→[20.2033:2075](∅→∅),[20.2033]→[20.2033:2075](∅→∅),[20.2075]→[20.387:734](∅→∅),[20.734]→[16.4443:4476](∅→∅),[20.734]→[20.101179:101200](∅→∅),[20.2075]→[20.101179:101200](∅→∅),[16.4476]→[20.101179:101200](∅→∅),[20.101179]→[20.101179:101200](∅→∅),[20.101200]→[16.4477:4739](∅→∅),[20.678]→[20.101200:101310](∅→∅),[16.4739]→[20.101200:101310](∅→∅),[20.101200]→[20.101200:101310](∅→∅),[20.101310]→[20.265:346](∅→∅),[20.346]→[20.101391:101570](∅→∅),[20.101391]→[20.101391:101570](∅→∅),[20.714]→[20.101570:101631](∅→∅),[20.101570]→[20.101570:101631](∅→∅),[20.101631]→[20.223:253](∅→∅),[20.253]→[20.101631:101673](∅→∅),[20.101631]→[20.101631:101673](∅→∅),[20.101673]→[16.4740:4773](∅→∅)
let mut paths = Vec::with_capacity(inodes.len());for pos in inodes.iter() {if let Some((path, _)) = libpijul::fs::find_path(&repo.changes,&txn,&channel.borrow(),false,*pos,)? {paths.push(path)} else {paths.clear();break;}}PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),});for path in paths.iter() {debug!("resetting {:?}", path);txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,&path,true,None,)?;}if paths.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;}PROGRESS.join();} else {PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),});for root in self.files.iter() {let root = std::fs::canonicalize(&root)?;let path = root.strip_prefix(&repo_path)?.to_str().unwrap();txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,&path,true,None,)?;}PROGRESS.join();}PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),});std::mem::drop(txn_);for path in paths.iter() {debug!("resetting {:?}", path);libpijul::output::output_repository_no_pending(repo.working_copy.clone(),&repo.changes,txn.clone(),channel.clone(),&path,true,None,num_cpus::get(),)?;}if paths.is_empty() {libpijul::output::output_repository_no_pending(repo.working_copy,&repo.changes,txn.clone(),channel,"",true,None,num_cpus::get(),)?;}PROGRESS.join();} else {PROGRESS.borrow_mut().unwrap().push(crate::progress::Cursor::Spin {i: 0,pre: "Outputting repository".into(),});for root in self.files.iter() {let root = std::fs::canonicalize(&root)?;let path = root.strip_prefix(&repo_path)?.to_str().unwrap();libpijul::output::output_repository_no_pending(repo.working_copy.clone(),&repo.changes,txn.clone(),channel.clone(),&path,true,None,num_cpus::get(),)?; - replacement in pijul/src/commands/reset.rs at line 221
txn.commit()?;debug!("now = {:?}", now.elapsed());PROGRESS.join(); - edit in pijul/src/commands/reset.rs at line 223
let txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()};txn.commit()?;debug!("now = {:?}", now.elapsed()); - replacement in pijul/src/commands/reset.rs at line 231
debug!(info!( - edit in pijul/src/commands/record.rs at line 1
use std::collections::{HashMap, HashSet}; - edit in pijul/src/commands/record.rs at line 3
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/record.rs at line 11
use libpijul::pristine::ChannelMutTxnT;use libpijul::{Base32, ChannelRef, ChannelTxnT, MutTxnT, MutTxnTExt, TxnT, TxnTExt};use libpijul::{Base32, ChannelMutTxnT, ChannelRef, ChannelTxnT, MutTxnT, MutTxnTExt, TxnT, TxnTExt,};use libpijul::{HashMap, HashSet}; - replacement in pijul/src/commands/record.rs at line 59
let mut repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone()).await?; - replacement in pijul/src/commands/record.rs at line 79
.get_changeset(txn.changes(&channel.borrow()), &c)?.get_changeset(txn.changes(&*channel.read()?), &c)? - replacement in pijul/src/commands/record.rs at line 85
channel.borrow().namechannel.read().unwrap().name - replacement in pijul/src/commands/record.rs at line 94
} else if let Some(h) = txn.reverse_log(&channel.borrow(), None)?.next() {} else if let Some(h) = txn.reverse_log(&*channel.read()?, None)?.next() { - replacement in pijul/src/commands/record.rs at line 115
let (repo_path, mut working_copy) = if let Some(ref w) = self.working_copy {let (repo_path, working_copy) = if let Some(ref w) = self.working_copy { - replacement in pijul/src/commands/record.rs at line 118
Some(libpijul::working_copy::filesystem::FileSystem::from_root(w)),Some(Arc::new(libpijul::working_copy::filesystem::FileSystem::from_root(w),)), - edit in pijul/src/commands/record.rs at line 125
let txn = Arc::new(RwLock::new(txn)); - replacement in pijul/src/commands/record.rs at line 128
&mut channel,working_copy.as_mut().unwrap_or(&mut repo.working_copy),channel.clone(),working_copy.clone().unwrap_or(repo.working_copy.clone()), - replacement in pijul/src/commands/record.rs at line 135
if let Some((mut txn, mut change, updates, hash, oldest)) = result {if let Some((txn, mut change, updates, hash, oldest)) = result { - edit in pijul/src/commands/record.rs at line 157
let mut txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/record.rs at line 180
txn.touch_channel(&mut channel.borrow_mut(), Some(oldest));txn.touch_channel(&mut *channel.write()?, Some(oldest)); - replacement in pijul/src/commands/record.rs at line 223
fn record<T: TxnTExt + MutTxnTExt, C: ChangeStore>(fn record<T: TxnTExt + MutTxnTExt + Sync + Send + 'static,C: ChangeStore + Send + Clone + 'static,>( - replacement in pijul/src/commands/record.rs at line 228
mut txn: T,channel: &mut ChannelRef<T>,working_copy: &mut libpijul::working_copy::FileSystem,txn: Arc<RwLock<T>>,channel: ChannelRef<T>,working_copy: Arc<libpijul::working_copy::FileSystem>, - replacement in pijul/src/commands/record.rs at line 237
T,Arc<RwLock<T>>, - replacement in pijul/src/commands/record.rs at line 256
txn.record(&mut state,state.record(txn.clone(), - replacement in pijul/src/commands/record.rs at line 259
channel,working_copy,channel.clone(),working_copy.clone(), - edit in pijul/src/commands/record.rs at line 263
num_cpus::get(), - replacement in pijul/src/commands/record.rs at line 268
txn.record(&mut state,state.record(txn.clone(), - replacement in pijul/src/commands/record.rs at line 271
channel,working_copy,channel.clone(),working_copy.clone(), - edit in pijul/src/commands/record.rs at line 275
num_cpus::get(), - replacement in pijul/src/commands/record.rs at line 281
&mut txn,channel,txn.clone(),channel.clone(), - edit in pijul/src/commands/record.rs at line 290
- replacement in pijul/src/commands/record.rs at line 293
txn.touch_channel(&mut channel.borrow_mut(), None);let mut txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()};txn.touch_channel(&mut *channel.write()?, None); - edit in pijul/src/commands/record.rs at line 302
debug!("TAKING LOCK {}", line!());let txn_ = txn.write().unwrap(); - replacement in pijul/src/commands/record.rs at line 307
.map(|rec| rec.globalize(&txn).unwrap()).map(|rec| rec.globalize(&*txn_).unwrap()) - edit in pijul/src/commands/record.rs at line 309
let contents = if let Ok(c) = Arc::try_unwrap(rec.contents) {c.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/record.rs at line 315
LocalChange::make_change(&txn, channel, actions, rec.contents, header, Vec::new())?;LocalChange::make_change(&*txn_, &channel, actions, contents, header, Vec::new())?; - replacement in pijul/src/commands/record.rs at line 346
Change::read_and_deps(&mut change, &mut rec.updatables, &txn, channel)Change::read_and_deps(&mut change, &mut rec.updatables, &*txn_, &channel) - edit in pijul/src/commands/record.rs at line 374
std::mem::drop(txn_); - edit in pijul/src/commands/pushpull.rs at line 4
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/pushpull.rs at line 170
libpijul::fs::iter_graph_descendants(&txn, &channel.borrow().graph, p)?libpijul::fs::iter_graph_descendants(&txn, &channel.read()?.graph, p)? - replacement in pijul/src/commands/pushpull.rs at line 176
for x in txn.reverse_log(&channel.borrow(), None)? {for x in txn.reverse_log(&*channel.read()?, None)? { - replacement in pijul/src/commands/pushpull.rs at line 197
let channel = channel.borrow();let channel = channel.read()?; - replacement in pijul/src/commands/pushpull.rs at line 314
for x in txn.iter_remote(&remote_changes.borrow().remote, 0)? {for x in txn.iter_remote(&remote_changes.lock()?.remote, 0)? { - replacement in pijul/src/commands/pushpull.rs at line 317
.channel_has_state(txn.states(&channel.borrow()), &p.b)?.channel_has_state(txn.states(&*channel.read()?), &p.b)? - replacement in pijul/src/commands/pushpull.rs at line 334
libpijul::fs::iter_graph_descendants(&txn, &channel.borrow().graph, p)?libpijul::fs::iter_graph_descendants(&txn, &channel.read()?.graph, p)? - replacement in pijul/src/commands/pushpull.rs at line 343
let remote_channel = remote_channel.borrow();let remote_channel = remote_channel.read()?; - replacement in pijul/src/commands/pushpull.rs at line 347
.channel_has_state(txn.states(&channel.borrow()), &m)?.channel_has_state(txn.states(&*channel.read()?), &m)? - replacement in pijul/src/commands/pushpull.rs at line 354
.get_changeset(txn.changes(&channel.borrow()), h_int)?.get_changeset(txn.changes(&*channel.read()?), h_int)? - replacement in pijul/src/commands/pushpull.rs at line 380
let hash = super::pending(&mut txn, &mut channel, &mut repo)?;let txn = Arc::new(RwLock::new(txn));let hash = super::pending(txn.clone(), &mut channel, &mut repo)?;let mut txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/pushpull.rs at line 451
touched.insert(inode);touched.insert(*inode); - edit in pijul/src/commands/pushpull.rs at line 456
let txn = Arc::new(RwLock::new(txn)); - replacement in pijul/src/commands/pushpull.rs at line 460
if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, *i)?{if let Some((path, _)) = libpijul::fs::find_path(&repo.changes,&*txn.read().unwrap(),&*channel.read()?,false,i,)? { - edit in pijul/src/commands/pushpull.rs at line 482
let mut conflicts = Vec::new(); - replacement in pijul/src/commands/pushpull.rs at line 488
txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,path,true,None,)?;conflicts.extend(libpijul::output::output_repository_no_pending(repo.working_copy.clone(),&repo.changes,txn.clone(),channel.clone(),path,true,None,num_cpus::get(),)?.into_iter(),); - replacement in pijul/src/commands/pushpull.rs at line 504
txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;conflicts.extend(libpijul::output::output_repository_no_pending(repo.working_copy.clone(),&repo.changes,txn.clone(),channel.clone(),"",true,None,num_cpus::get(),)?.into_iter(),); - edit in pijul/src/commands/pushpull.rs at line 520
let mut txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - edit in pijul/src/commands/protocol.rs at line 5
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/protocol.rs at line 73
for x in txn.log(&channel.borrow(), pos)? {for x in txn.log(&*channel.read()?, pos)? { - replacement in pijul/src/commands/protocol.rs at line 88
} else if let Some(x) = txn.reverse_log(&channel.borrow(), None)?.next() {} else if let Some(x) = txn.reverse_log(&*channel.read()?, None)?.next() { - replacement in pijul/src/commands/protocol.rs at line 112
libpijul::fs::iter_graph_descendants(&txn, &channel.borrow().graph, p)?libpijul::fs::iter_graph_descendants(&txn, &channel.read()?.graph, p)? - replacement in pijul/src/commands/protocol.rs at line 121
for x in txn.log(&channel.borrow(), from)? {for x in txn.log(&*channel.read()?, from)? { - replacement in pijul/src/commands/protocol.rs at line 201
if txn.current_state(&channel.borrow())? == state && extra.is_empty() {if txn.current_state(&*channel.read()?)? == state && extra.is_empty() { - replacement in pijul/src/commands/protocol.rs at line 236
for (_, mut channel) in applied {txn.output_repository_no_pending(&mut repo.working_copy,let txn = Arc::new(RwLock::new(txn));for (_, channel) in applied {libpijul::output::output_repository_no_pending(repo.working_copy.clone(), - replacement in pijul/src/commands/protocol.rs at line 241
&mut channel,txn.clone(),channel.clone(), - edit in pijul/src/commands/protocol.rs at line 246
num_cpus::get(), - edit in pijul/src/commands/protocol.rs at line 250
let txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/mod.rs at line 57
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in pijul/src/commands/mod.rs at line 59
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in pijul/src/commands/mod.rs at line 64
fn pending<T: libpijul::MutTxnTExt + libpijul::TxnT>(txn: &mut T,channel: &mut libpijul::ChannelRef<T>,fn pending<T: libpijul::MutTxnTExt + libpijul::TxnT + Send + Sync + 'static>(txn: std::sync::Arc<std::sync::RwLock<T>>,channel: &libpijul::ChannelRef<T>, - replacement in pijul/src/commands/mod.rs at line 70
let recorded = txn.record_all(let mut builder = libpijul::record::Builder::new();builder.record(txn.clone(), - replacement in pijul/src/commands/mod.rs at line 75
channel,&mut repo.working_copy,channel.clone(),repo.working_copy.clone(), - edit in pijul/src/commands/mod.rs at line 79
num_cpus::get(), - edit in pijul/src/commands/mod.rs at line 81
let recorded = builder.finish(); - edit in pijul/src/commands/mod.rs at line 85
let mut txn = txn.write().unwrap(); - replacement in pijul/src/commands/mod.rs at line 89
.map(|rec| rec.globalize(txn).unwrap()).map(|rec| rec.globalize(&*txn).unwrap()) - edit in pijul/src/commands/mod.rs at line 91
let contents = if let Ok(c) = std::sync::Arc::try_unwrap(recorded.contents) {c.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/mod.rs at line 97
txn,&*txn, - replacement in pijul/src/commands/mod.rs at line 100
recorded.contents,contents, - replacement in pijul/src/commands/mod.rs at line 105
libpijul::change::dependencies(txn, &channel.borrow(), pending_change.changes.iter())?;libpijul::change::dependencies(&*txn, &*channel.read()?, pending_change.changes.iter())?; - replacement in pijul/src/commands/log.rs at line 44
for h in txn.reverse_log(&channel.borrow(), None)? {for h in txn.reverse_log(&*channel.read()?, None)? { - replacement in pijul/src/commands/log.rs at line 50
for h in txn.reverse_log(&channel.borrow(), None)? {for h in txn.reverse_log(&*channel.read()?, None)? { - edit in pijul/src/commands/file_operations.rs at line 3
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/file_operations.rs at line 124
let mut txn = repo.pristine.mut_txn_begin()?;let txn = repo.pristine.mut_txn_begin()?; - edit in pijul/src/commands/file_operations.rs at line 128
let txn = Arc::new(RwLock::new(txn)); - replacement in pijul/src/commands/file_operations.rs at line 148
&mut txn,txn.clone(), - edit in pijul/src/commands/file_operations.rs at line 156
let mut txn = txn.write().unwrap(); - replacement in pijul/src/commands/file_operations.rs at line 170
txn.commit()?;if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap().commit()?;} else {unreachable!()} - edit in pijul/src/commands/diff.rs at line 4
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/diff.rs at line 9
use libpijul::{MutTxnT, MutTxnTExt};use libpijul::MutTxnT; - replacement in pijul/src/commands/diff.rs at line 37
let mut repo = Repository::find_root(self.repo_path.clone()).await?;let repo = Repository::find_root(self.repo_path.clone()).await?; - replacement in pijul/src/commands/diff.rs at line 40
let mut channel =let channel = - edit in pijul/src/commands/diff.rs at line 44
let txn = Arc::new(RwLock::new(txn)); - replacement in pijul/src/commands/diff.rs at line 46
txn.record(&mut state,state.record(txn.clone(), - replacement in pijul/src/commands/diff.rs at line 49
&mut channel,&mut repo.working_copy,channel.clone(),repo.working_copy.clone(), - edit in pijul/src/commands/diff.rs at line 53
num_cpus::get(), - replacement in pijul/src/commands/diff.rs at line 58
&mut txn,&mut channel,txn.clone(),channel.clone(), - edit in pijul/src/commands/diff.rs at line 71
let txn = txn.write().unwrap(); - replacement in pijul/src/commands/diff.rs at line 75
.map(|rec| rec.globalize(&txn).unwrap()).map(|rec| rec.globalize(&*txn).unwrap()) - edit in pijul/src/commands/diff.rs at line 77
let contents = if let Ok(cont) = std::sync::Arc::try_unwrap(rec.contents) {cont.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/diff.rs at line 83
&txn,&*txn, - replacement in pijul/src/commands/diff.rs at line 86
rec.contents,contents, - replacement in pijul/src/commands/diff.rs at line 92
full_dependencies(&txn, &channel)?full_dependencies(&*txn, &channel)? - replacement in pijul/src/commands/diff.rs at line 94
dependencies(&txn, &channel.borrow(), change.changes.iter())?dependencies(&*txn, &*channel.read()?, change.changes.iter())? - replacement in pijul/src/commands/diff.rs at line 163
change.write(match change.write( - replacement in pijul/src/commands/diff.rs at line 174
)?) {Ok(()) => {}Err(libpijul::change::TextSerError::Io(e))if e.kind() == std::io::ErrorKind::BrokenPipe => {}Err(e) => return Err(e.into()),} - edit in pijul/src/commands/debug.rs at line 14
#[clap(long = "sanakirja-only")]sanakirja_only: bool, - edit in pijul/src/commands/debug.rs at line 23[20.178176]→[20.5663:5711](∅→∅),[20.5711]→[20.63:114](∅→∅),[20.114]→[20.5711:5818](∅→∅),[20.5711]→[20.5711:5818](∅→∅)
libpijul::pristine::debug_inodes(&txn);libpijul::pristine::debug_revinodes(&txn);libpijul::pristine::debug_tree_print(&txn);libpijul::pristine::debug_revtree_print(&txn); - replacement in pijul/src/commands/debug.rs at line 29[20.178559]→[20.32:264](∅→∅),[20.264]→[20.17868:17909](∅→∅),[20.17909]→[20.299:425](∅→∅),[20.299]→[20.299:425](∅→∅),[20.425]→[20.58:102](∅→∅),[20.58]→[20.58:102](∅→∅),[20.102]→[20.17910:17991](∅→∅)
if let Some(root) = self.root {let (pos, _) = txn.follow_oldest_path(&repo.changes, &channel, &root).unwrap();libpijul::pristine::debug_root(&txn,&channel.borrow().graph,pos.inode_vertex(),std::io::stdout(),true,)?;} else {let channel = channel.borrow();libpijul::pristine::debug(&txn, &channel.graph, std::io::stdout())?;if !self.sanakirja_only {libpijul::pristine::debug_inodes(&txn);libpijul::pristine::debug_revinodes(&txn);libpijul::pristine::debug_tree_print(&txn);libpijul::pristine::debug_revtree_print(&txn);if let Some(root) = self.root {let (pos, _) = txn.follow_oldest_path(&repo.changes, &channel, &root).unwrap();libpijul::pristine::debug_root(&txn,&channel.read()?.graph,pos.inode_vertex(),std::io::stdout(),true,)?;} else {let channel = channel.read()?;libpijul::pristine::debug(&txn, &channel.graph, std::io::stdout())?;}libpijul::pristine::check_alive_debug(&repo.changes, &txn, &*channel.read()?, 0)?; - edit in pijul/src/commands/debug.rs at line 51
libpijul::pristine::check_alive_debug(&repo.changes, &txn, &channel.borrow(), 0)?; - edit in pijul/src/commands/debug.rs at line 52
let channel = channel.read()?;::sanakirja::debug::debug(&txn.txn, &[&channel.graph], "debug.sanakirja", true); - edit in pijul/src/commands/credit.rs at line 52
let channel_ = channel.borrow(); - replacement in pijul/src/commands/credit.rs at line 53[20.178]→[20.180284:180309](∅→∅),[20.237]→[20.180284:180309](∅→∅),[20.180284]→[20.180284:180309](∅→∅)
txn.output_file(let channel = channel.read().unwrap();libpijul::output::output_file( - edit in pijul/src/commands/credit.rs at line 56
&txn, - replacement in pijul/src/commands/credit.rs at line 59
&mut Creditor::new(std::io::stdout(), &txn, &channel_),&mut Creditor::new(std::io::stdout(), &txn, &channel), - replacement in pijul/src/commands/clone.rs at line 6
use libpijul::{MutTxnT, MutTxnTExt};use libpijul::MutTxnT; - edit in pijul/src/commands/clone.rs at line 8
use std::sync::{Arc, RwLock}; - replacement in pijul/src/commands/clone.rs at line 62
let repo_path_ = path.clone();let repo_path_ = repo_path.clone(); - replacement in pijul/src/commands/clone.rs at line 64
std::fs::remove_dir_all(&repo_path_).unwrap_or(());repo_path_.remove(); - replacement in pijul/src/commands/clone.rs at line 88[20.2562]→[20.185601:185679](∅→∅),[16.5072]→[20.185601:185679](∅→∅),[20.185601]→[20.185601:185679](∅→∅)
txn.output_repository_no_pending(&mut repo.working_copy,let config_path = repo.config_path();let mut config = repo.config;let txn = Arc::new(RwLock::new(txn));libpijul::output::output_repository_no_pending(repo.working_copy.clone(), - replacement in pijul/src/commands/clone.rs at line 95
&mut channel,txn.clone(),channel, - edit in pijul/src/commands/clone.rs at line 100
num_cpus::get(), - edit in pijul/src/commands/clone.rs at line 103
let txn = if let Ok(t) = Arc::try_unwrap(txn) {t.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/src/commands/clone.rs at line 109
repo.config.current_channel = Some(self.channel);config.current_channel = Some(self.channel); - replacement in pijul/src/commands/clone.rs at line 111
repo.config.default_remote = std::fs::canonicalize(&l.root)?config.default_remote = std::fs::canonicalize(&l.root)? - replacement in pijul/src/commands/clone.rs at line 115
repo.config.default_remote = Some(self.remote);config.default_remote = Some(self.remote); - replacement in pijul/src/commands/clone.rs at line 117[20.56]→[20.185859:185888](∅→∅),[20.2035]→[20.185859:185888](∅→∅),[20.185859]→[20.185859:185888](∅→∅)
repo.save_config()?;config.save(&config_path)?; - replacement in pijul/src/commands/channel.rs at line 43[20.18744]→[20.18744:18788](∅→∅),[20.18788]→[20.187844:187896](∅→∅),[20.187844]→[20.187844:187896](∅→∅),[20.187896]→[20.513:564](∅→∅)
let channel = channel?;let channel = channel.borrow();let name = txn.name(&channel);let (_, channel) = channel?;let channel = channel.read()?;let name = txn.name(&*channel); - replacement in pijul/src/commands/change.rs at line 35
let channel = channel.borrow();if let Some(h) = txn.reverse_log(&channel, None)?.next() {let channel = channel.read()?;if let Some(h) = txn.reverse_log(&*channel, None)?.next() { - edit in pijul/src/commands/apply.rs at line 1
use std::collections::{HashMap, HashSet}; - edit in pijul/src/commands/apply.rs at line 2
use std::sync::{Arc, RwLock}; - edit in pijul/src/commands/apply.rs at line 8
use libpijul::{HashMap, HashSet}; - replacement in pijul/src/commands/apply.rs at line 31
let mut repo = Repository::find_root(self.repo_path).await?;let repo = Repository::find_root(self.repo_path).await?; - replacement in pijul/src/commands/apply.rs at line 51
let change = libpijul::change::Change::read(&mut change, &mut HashMap::new())?;let change = libpijul::change::Change::read(&mut change, &mut HashMap::default())?; - replacement in pijul/src/commands/apply.rs at line 65
let mut touched = HashSet::new();let mut touched = HashSet::default(); - edit in pijul/src/commands/apply.rs at line 82
let txn = Arc::new(RwLock::new(txn)); - edit in pijul/src/commands/apply.rs at line 85
let txn_ = txn.read().unwrap(); - replacement in pijul/src/commands/apply.rs at line 88
libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, i)?libpijul::fs::find_path(&repo.changes, &*txn_, &*channel.read()?, false, i)? - edit in pijul/src/commands/apply.rs at line 96
std::mem::drop(txn_); - replacement in pijul/src/commands/apply.rs at line 105
txn.output_repository_no_pending(&mut repo.working_copy,libpijul::output::output_repository_no_pending(repo.working_copy.clone(), - replacement in pijul/src/commands/apply.rs at line 108
&mut channel,txn.clone(),channel.clone(), - edit in pijul/src/commands/apply.rs at line 113
num_cpus::get(), - replacement in pijul/src/commands/apply.rs at line 117
txn.output_repository_no_pending(&mut repo.working_copy,libpijul::output::output_repository_no_pending(repo.working_copy.clone(), - replacement in pijul/src/commands/apply.rs at line 120
&mut channel,txn.clone(),channel.clone(), - edit in pijul/src/commands/apply.rs at line 125
num_cpus::get(), - edit in pijul/src/commands/apply.rs at line 130
let txn = if let Ok(txn) = Arc::try_unwrap(txn) {txn.into_inner().unwrap()} else {unreachable!()}; - replacement in pijul/Cargo.toml at line 64
thrussh-keys = "0.20.1"thrussh-keys = "0.20.3" - replacement in pijul/Cargo.toml at line 68
sanakirja = { version = "1.1.7", features = [ "crc32" ] }sanakirja = { version = "1.2.0", features = [ "crc32" ] } - edit in libpijul/src/working_copy/mod.rs at line 11
#[derive(Debug, Error)]pub enum WriteError<E: std::error::Error + 'static> {#[error(transparent)]E(E),#[error(transparent)]Io(#[from] std::io::Error),} - replacement in libpijul/src/working_copy/mod.rs at line 12
type Error: std::error::Error;fn create_dir_all(&mut self, path: &str) -> Result<(), Self::Error>;type Error: std::error::Error + Send;fn create_dir_all(&self, path: &str) -> Result<(), Self::Error>; - replacement in libpijul/src/working_copy/mod.rs at line 17[20.1728]→[20.1728:2064](∅→∅),[20.2064]→[20.199114:199172](∅→∅),[20.199114]→[20.199114:199172](∅→∅),[20.199172]→[20.2065:2100](∅→∅)
fn remove_path(&mut self, name: &str) -> Result<(), Self::Error>;fn rename(&mut self, former: &str, new: &str) -> Result<(), Self::Error>;fn set_permissions(&mut self, name: &str, permissions: u16) -> Result<(), Self::Error>;fn write_file<A, E: std::error::Error, F: FnOnce(&mut dyn std::io::Write) -> Result<A, E>>(&mut self,file: &str,writer: F,) -> Result<A, WriteError<E>>;fn remove_path(&self, name: &str) -> Result<(), Self::Error>;fn rename(&self, former: &str, new: &str) -> Result<(), Self::Error>;fn set_permissions(&self, name: &str, permissions: u16) -> Result<(), Self::Error>;type Writer: std::io::Write;fn write_file(&self, file: &str) -> Result<Self::Writer, Self::Error>; - replacement in libpijul/src/working_copy/memory.rs at line 3
use std::collections::HashMap;use crate::HashMap;use std::sync::{Arc, Mutex}; - replacement in libpijul/src/working_copy/memory.rs at line 8
pub struct Memory {pub files: FileTree,pub last_modified: SystemTime,pub struct Memory(Mutex<Memory_>);#[derive(Debug)]struct Memory_ {files: FileTree,last_modified: SystemTime, - replacement in libpijul/src/working_copy/memory.rs at line 17
pub struct FileTree {struct FileTree { - replacement in libpijul/src/working_copy/memory.rs at line 25
contents: Vec<u8>,contents: Arc<Mutex<Vec<u8>>>, - replacement in libpijul/src/working_copy/memory.rs at line 36
Self {Memory(Mutex::new(Memory_ { - replacement in libpijul/src/working_copy/memory.rs at line 39
}})) - edit in libpijul/src/working_copy/memory.rs at line 48
let m = self.0.lock().unwrap(); - replacement in libpijul/src/working_copy/memory.rs at line 50
let mut current_files = vec![(String::new(), &self.files)];let mut current_files = vec![(String::new(), &m.files)]; - replacement in libpijul/src/working_copy/memory.rs at line 85
contents: file_contents,contents: Arc::new(Mutex::new(file_contents)), - replacement in libpijul/src/working_copy/memory.rs at line 99
children: HashMap::new(),children: HashMap::default(), - replacement in libpijul/src/working_copy/memory.rs at line 105
fn add_inode(&mut self, file: &str, inode: Inode) {let mut file_tree = &mut self.files;fn add_inode(&self, file: &str, inode: Inode) {let mut m = self.0.lock().unwrap(); - replacement in libpijul/src/working_copy/memory.rs at line 108
self.last_modified = last;m.last_modified = last;let mut file_tree = &mut m.files; - replacement in libpijul/src/working_copy/memory.rs at line 120
children: HashMap::new(),children: HashMap::default(), - edit in libpijul/src/working_copy/memory.rs at line 136
} - edit in libpijul/src/working_copy/memory.rs at line 138
impl Memory_ { - edit in libpijul/src/working_copy/memory.rs at line 183
self.last_modified = SystemTime::now(); - edit in libpijul/src/working_copy/memory.rs at line 187
self.last_modified = SystemTime::now(); - replacement in libpijul/src/working_copy/memory.rs at line 217
fn create_dir_all(&mut self, file: &str) -> Result<(), Self::Error> {if self.get_file(file).is_none() {fn create_dir_all(&self, file: &str) -> Result<(), Self::Error> {let m = self.0.lock().unwrap();if m.get_file(file).is_none() { - replacement in libpijul/src/working_copy/memory.rs at line 226
children: HashMap::new(),children: HashMap::default(), - replacement in libpijul/src/working_copy/memory.rs at line 235
match self.get_file(file) {let m = self.0.lock().unwrap();match m.get_file(file) { - replacement in libpijul/src/working_copy/memory.rs at line 245
match self.get_file(file) {let m = self.0.lock().unwrap();match m.get_file(file) { - replacement in libpijul/src/working_copy/memory.rs at line 249
buffer.extend(contents);buffer.extend(&contents.lock().unwrap()[..]); - replacement in libpijul/src/working_copy/memory.rs at line 258
Ok(self.last_modified)let m = self.0.lock().unwrap();Ok(m.last_modified) - replacement in libpijul/src/working_copy/memory.rs at line 262[20.207007]→[20.2694:2765](∅→∅),[20.2765]→[20.207080:207113](∅→∅),[20.207080]→[20.207080:207113](∅→∅)
fn remove_path(&mut self, path: &str) -> Result<(), Self::Error> {self.remove_path_(path);fn remove_path(&self, path: &str) -> Result<(), Self::Error> {self.0.lock().unwrap().remove_path_(path); - replacement in libpijul/src/working_copy/memory.rs at line 267
fn rename(&mut self, old: &str, new: &str) -> Result<(), Self::Error> {fn rename(&self, old: &str, new: &str) -> Result<(), Self::Error> { - replacement in libpijul/src/working_copy/memory.rs at line 269
if let Some(inode) = self.remove_path_(old) {let mut m = self.0.lock().unwrap();if let Some(inode) = m.remove_path_(old) { - replacement in libpijul/src/working_copy/memory.rs at line 275
fn set_permissions(&mut self, file: &str, permissions: u16) -> Result<(), Self::Error> {fn set_permissions(&self, file: &str, permissions: u16) -> Result<(), Self::Error> { - replacement in libpijul/src/working_copy/memory.rs at line 277
match self.get_file_mut(file) {let mut m = self.0.lock().unwrap();match m.get_file_mut(file) { - replacement in libpijul/src/working_copy/memory.rs at line 289[20.207946]→[20.2937:3033](∅→∅),[20.3033]→[20.208032:208090](∅→∅),[20.208032]→[20.208032:208090](∅→∅),[20.208090]→[20.3034:3070](∅→∅),[20.3070]→[20.208126:208166](∅→∅),[20.208126]→[20.208126:208166](∅→∅)
fn write_file<A, E: std::error::Error, F: FnOnce(&mut dyn std::io::Write) -> Result<A, E>>(&mut self,file: &str,writer: F,) -> Result<A, WriteError<E>> {match self.get_file_mut(file) {type Writer = Writer;fn write_file(&self, file: &str) -> Result<Self::Writer, Self::Error> {let mut m = self.0.lock().unwrap();match m.get_file_mut(file) { - replacement in libpijul/src/working_copy/memory.rs at line 297
contents.clear();writer(contents).map_err(WriteError::E)contents.lock().unwrap().clear();Ok(Writer {w: contents.clone(),}) - replacement in libpijul/src/working_copy/memory.rs at line 303
let mut contents = Vec::new();let contents = Arc::new(Mutex::new(Vec::new())); - edit in libpijul/src/working_copy/memory.rs at line 305
let a = writer(&mut contents).map_err(WriteError::E)?; - replacement in libpijul/src/working_copy/memory.rs at line 309
contents,contents: contents.clone(), - replacement in libpijul/src/working_copy/memory.rs at line 313
Ok(a)Ok(Writer { w: contents }) - edit in libpijul/src/working_copy/memory.rs at line 319[20.208883]
pub struct Writer {w: Arc<Mutex<Vec<u8>>>,}impl std::io::Write for Writer {fn write(&mut self, b: &[u8]) -> Result<usize, std::io::Error> {self.w.lock().unwrap().write(b)}fn flush(&mut self) -> Result<(), std::io::Error> {Ok(())}} - edit in libpijul/src/working_copy/filesystem.rs at line 7
use std::sync::{Arc, RwLock}; - replacement in libpijul/src/working_copy/filesystem.rs at line 97
T: crate::MutTxnTExt + crate::TxnTExt,C: crate::changestore::ChangeStore,T: crate::MutTxnTExt + crate::TxnTExt + Send + Sync + 'static,C: crate::changestore::ChangeStore + Clone + Send + 'static, - replacement in libpijul/src/working_copy/filesystem.rs at line 101
&mut self,txn: &mut T,channel: &mut crate::pristine::ChannelRef<T>,self: Arc<Self>,txn: Arc<RwLock<T>>,channel: crate::pristine::ChannelRef<T>, - replacement in libpijul/src/working_copy/filesystem.rs at line 109
) -> Result<(), Error<C::Error, T::GraphError>> {) -> Result<(), Error<C::Error, T::GraphError>>whereT::Channel: Send + Sync,{ - replacement in libpijul/src/working_copy/filesystem.rs at line 114
self.record_prefix(txn,channel,self.clone().record_prefix(txn.clone(),channel.clone(), - replacement in libpijul/src/working_copy/filesystem.rs at line 140
txn: &mut T,txn: Arc<RwLock<T>>, - edit in libpijul/src/working_copy/filesystem.rs at line 207
let mut txn = txn.write().unwrap(); - replacement in libpijul/src/working_copy/filesystem.rs at line 225
T: crate::MutTxnTExt + crate::TxnTExt,C: crate::changestore::ChangeStore,T: crate::MutTxnTExt + crate::TxnTExt + Send + Sync + 'static,C: crate::changestore::ChangeStore + Clone + Send + 'static, - replacement in libpijul/src/working_copy/filesystem.rs at line 228
&mut self,txn: &mut T,channel: &mut crate::pristine::ChannelRef<T>,self: Arc<Self>,txn: Arc<RwLock<T>>,channel: crate::pristine::ChannelRef<T>, - replacement in libpijul/src/working_copy/filesystem.rs at line 236
) -> Result<(), Error<C::Error, T::GraphError>> {) -> Result<(), Error<C::Error, T::GraphError>>whereT::Channel: Send + Sync,{ - replacement in libpijul/src/working_copy/filesystem.rs at line 241
self.add_prefix_rec(txn, repo_path, full, &prefix, threads)?;self.add_prefix_rec(txn.clone(), repo_path, full, &prefix, threads)?; - replacement in libpijul/src/working_copy/filesystem.rs at line 243
txn.record(state,state.record(txn.clone(), - edit in libpijul/src/working_copy/filesystem.rs at line 250
1, - replacement in libpijul/src/working_copy/filesystem.rs at line 266
fn create_dir_all(&mut self, file: &str) -> Result<(), Self::Error> {fn create_dir_all(&self, file: &str) -> Result<(), Self::Error> {debug!("create_dir_all {:?}", file); - edit in libpijul/src/working_copy/filesystem.rs at line 271
debug!("metadata {:?}", file); - edit in libpijul/src/working_copy/filesystem.rs at line 279
debug!("read_file {:?}", file); - edit in libpijul/src/working_copy/filesystem.rs at line 285
debug!("modified_time {:?}", file); - replacement in libpijul/src/working_copy/filesystem.rs at line 290
fn remove_path(&mut self, path: &str) -> Result<(), Self::Error> {fn remove_path(&self, path: &str) -> Result<(), Self::Error> {debug!("remove_path {:?}", path); - replacement in libpijul/src/working_copy/filesystem.rs at line 304
fn rename(&mut self, former: &str, new: &str) -> Result<(), Self::Error> {fn rename(&self, former: &str, new: &str) -> Result<(), Self::Error> {debug!("rename {:?} {:?}", former, new); - replacement in libpijul/src/working_copy/filesystem.rs at line 317
fn set_permissions(&mut self, name: &str, permissions: u16) -> Result<(), Self::Error> {fn set_permissions(&self, name: &str, permissions: u16) -> Result<(), Self::Error> { - replacement in libpijul/src/working_copy/filesystem.rs at line 327
current.set_mode(current.mode() | permissions as u32);if permissions & 0o100 != 0 {current.set_mode(current.mode() | 0o100);} else {current.set_mode(current.mode() & ((!0o777) | 0o666));}debug!("setting {:?}", current); - edit in libpijul/src/working_copy/filesystem.rs at line 334
debug!("set"); - replacement in libpijul/src/working_copy/filesystem.rs at line 341[20.216450]→[20.4626:4722](∅→∅),[20.4722]→[20.216536:216594](∅→∅),[20.216536]→[20.216536:216594](∅→∅),[20.216594]→[20.4723:4759](∅→∅)
fn write_file<A, E: std::error::Error, F: FnOnce(&mut dyn std::io::Write) -> Result<A, E>>(&mut self,file: &str,writer: F,) -> Result<A, WriteError<E>> {type Writer = std::io::BufWriter<std::fs::File>;fn write_file(&self, file: &str) -> Result<Self::Writer, Self::Error> { - edit in libpijul/src/working_copy/filesystem.rs at line 345
debug!("path = {:?}", path); - replacement in libpijul/src/working_copy/filesystem.rs at line 347
std::fs::create_dir_all(p).map_err(WriteError::Io)?std::fs::create_dir_all(p).unwrap_or(()) - edit in libpijul/src/working_copy/filesystem.rs at line 349
debug!("write_file: dir created"); - replacement in libpijul/src/working_copy/filesystem.rs at line 351
let mut file =std::io::BufWriter::new(std::fs::File::create(&path).map_err(WriteError::Io)?);writer(&mut file).map_err(WriteError::E)let file = std::io::BufWriter::new(std::fs::File::create(&path)?);debug!("file");Ok(file) - replacement in libpijul/src/unrecord/mod.rs at line 49
channel: &mut ChannelRef<T>,channel: &ChannelRef<T>, - replacement in libpijul/src/unrecord/mod.rs at line 62
let mut channel = channel.r.borrow_mut();let mut channel = channel.write().unwrap(); - replacement in libpijul/src/unrecord/mod.rs at line 120
let channel = channel.borrow();let channel = channel.read().unwrap(); - replacement in libpijul/src/unrecord/mod.rs at line 122[20.23576]→[20.23576:23598](∅→∅),[20.23598]→[20.233769:233799](∅→∅),[20.233769]→[20.233769:233799](∅→∅),[20.233799]→[20.1015:1062](∅→∅),[20.1062]→[20.16603:16677](∅→∅),[20.1135]→[20.1779:1789](∅→∅),[20.16677]→[20.1779:1789](∅→∅),[20.1779]→[20.1779:1789](∅→∅)
let br = br?;let br = br.borrow();if txn.name(&br) != txn.name(&channel)&& txn.get_changeset(txn.changes(&br), &change_id)?.is_some(){let (name, br) = br?;if name.as_str() == txn.name(&channel) {continue;}let br = br.read().unwrap();if txn.get_changeset(txn.changes(&br), &change_id)?.is_some() { - edit in libpijul/src/unrecord/mod.rs at line 154
change, - edit in libpijul/src/unrecord/mod.rs at line 363
change: &Change, - edit in libpijul/src/unrecord/mod.rs at line 380
|h| change.knows(h), - replacement in libpijul/src/tests/unrecord.rs at line 16
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 64
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 114
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 188
let mut txn = env.mut_txn_begin();let mut txn2 = env2.mut_txn_begin();let mut txn3 = env3.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap();let mut txn2 = env2.mut_txn_begin().unwrap();let mut txn3 = env3.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 291
let mut txn = env.mut_txn_begin();let mut txn2 = env2.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap();let mut txn2 = env2.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 407
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 482
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 558
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 621
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 728
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 818
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 881
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/unrecord.rs at line 988
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/rollback.rs at line 13
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/rollback.rs at line 98
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/rm_file.rs at line 17
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/rm_file.rs at line 19
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/performance.rs at line 16
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/performance.rs at line 81
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/partial.rs at line 18
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/partial.rs at line 61
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/partial.rs at line 88
let mut txn2 = env2.mut_txn_begin();let mut txn2 = env2.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/partial.rs at line 127
let mut txn2 = env2.mut_txn_begin();let mut txn2 = env2.mut_txn_begin().unwrap(); - edit in libpijul/src/tests/mod.rs at line 7
use std::sync::{Arc, RwLock}; - replacement in libpijul/src/tests/mod.rs at line 24
repo: &mut R,repo: &R, - replacement in libpijul/src/tests/mod.rs at line 27
channel: &mut ChannelRef<T>,channel: &ChannelRef<T>, - replacement in libpijul/src/tests/mod.rs at line 37
&mut channel.borrow_mut(),&mut *channel.lock().unwrap(), - replacement in libpijul/src/tests/mod.rs at line 82[20.291162]→[20.1848:1939](∅→∅),[20.1939]→[20.291259:291344](∅→∅),[20.291259]→[20.291259:291344](∅→∅)
fn record_all_output<T: MutTxnT, R: WorkingCopy, P: ChangeStore + Clone + Send + 'static>(repo: &mut R,changes: &P,txn: &mut T,channel: &mut ChannelRef<T>,fn record_all_output<T: MutTxnT + Send + Sync + 'static,R: WorkingCopy + Send + Sync + 'static,P: ChangeStore + Clone + Send + Sync + 'static,>(repo: Arc<R>,changes: Arc<P>,txn: Arc<RwLock<T>>,channel: &ChannelRef<T>, - edit in libpijul/src/tests/mod.rs at line 95
T::Channel: Send + Sync + 'static, - replacement in libpijul/src/tests/mod.rs at line 97[20.1785]→[20.291397:291462](∅→∅),[20.291397]→[20.291397:291462](∅→∅),[20.291462]→[20.25833:25929](∅→∅)
let hash = record_all(repo, changes, txn, channel, prefix)?;output::output_repository_no_pending(repo, changes, txn, channel, "", true, None).unwrap();let hash = record_all(repo.as_ref(),changes.as_ref(),&mut *txn.write().unwrap(),channel,prefix,)?;output::output_repository_no_pending(repo, changes, txn, channel.clone(), "", true, None, 1).unwrap(); - replacement in libpijul/src/tests/missing_context.rs at line 27
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/missing_context.rs at line 42
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/missing_context.rs at line 220
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/missing_context.rs at line 235
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/filesystem.rs at line 19
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/filesystem.rs at line 64
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/filesystem.rs at line 108
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/filesystem.rs at line 148
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 28
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 30
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 189
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 191
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 335
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 337
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 392
let mut txn_charlie = env_charlie.mut_txn_begin();let mut txn_charlie = env_charlie.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 522
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 524
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 654
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 656
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 786
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 788
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 920
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 922
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 924
let mut txn_charlie = env_charlie.mut_txn_begin();let mut txn_charlie = env_charlie.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1138
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1140
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1142
let mut txn_charlie = env_charlie.mut_txn_begin();let mut txn_charlie = env_charlie.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1351
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1364
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1489
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1502
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1588
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/file_conflicts.rs at line 1603
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 16
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 182
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 417
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 541
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 674
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 798
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 941
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1081
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1329
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1453
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1598
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1600
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1742
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1744
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 1869
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 2007
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 2228
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 2483
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 2568
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/conflict.rs at line 2573
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/clone.rs at line 17
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/clone.rs at line 49
let mut txn2 = env2.mut_txn_begin();let mut txn2 = env2.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/clone.rs at line 89
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/clone.rs at line 116
let mut txn2 = env2.mut_txn_begin();let mut txn2 = env2.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/clone.rs at line 155
let mut txn2 = env2.mut_txn_begin();let mut txn2 = env2.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/change.rs at line 38
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/change.rs at line 145
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/change.rs at line 170
let mut txn2 = env2.mut_txn_begin();let mut txn2 = env2.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/change.rs at line 222
let change1 = Change::read(std::io::Cursor::new(&v[..]), &mut HashMap::new()).unwrap();let change1 = Change::read(std::io::Cursor::new(&v[..]), &mut HashMap::default()).unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 15
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 23
debug_to_file(&txn, &channel.borrow(), "debug").unwrap();debug_to_file(&txn, &channel, "debug").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 34
let channel = channel_.borrow();let channel = channel_.lock().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 43
crate::fs::iter_paths(&txn, &channel_.borrow().graph, file_key, |path| {crate::fs::iter_paths(&txn, &channel.graph, file_key, |path| { - replacement in libpijul/src/tests/add_file.rs at line 52
debug_to_file(&txn, &channel_.borrow(), "debug2").unwrap();debug_to_file(&txn, &channel_, "debug2").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 74
let mut txn = env.mut_txn_begin();let mut txn = env.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 101
let mut repo = working_copy::memory::Memory::new();let changes = changestore::memory::Memory::new();let mut repo = Arc::new(working_copy::memory::Memory::new());let changes = Arc::new(changestore::memory::Memory::new()); - replacement in libpijul/src/tests/add_file.rs at line 106
let mut txn = env.mut_txn_begin();txn.add_file("dir/file").unwrap();let mut channel = txn.open_or_create_channel("main").unwrap();let mut txn = Arc::new(RwLock::new(env.mut_txn_begin().unwrap()));txn.write().unwrap().add_file("dir/file").unwrap();let mut channel = txn.write().unwrap().open_or_create_channel("main").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 111[20.457716]→[20.43850:43935](∅→∅),[20.43935]→[20.25614:25681](∅→∅),[20.457793]→[20.25614:25681](∅→∅),[20.25681]→[20.457849:457925](∅→∅),[20.31890]→[20.457849:457925](∅→∅),[20.457849]→[20.457849:457925](∅→∅)
record_all_output(&mut repo, &changes, &mut txn, &mut channel, "").unwrap();debug_to_file(&txn, &channel.borrow(), "debug0").unwrap();let files: Vec<_> = crate::fs::iter_working_copy(&txn, Inode::ROOT)record_all_output(repo.clone(),changes.clone(),txn.clone(),&channel.clone(),"",).unwrap();debug_to_file(&*txn.read().unwrap(), &channel, "debug0").unwrap();let files: Vec<_> = crate::fs::iter_working_copy(&*txn.read().unwrap(), Inode::ROOT) - replacement in libpijul/src/tests/add_file.rs at line 126
txn.remove_file("dir").unwrap();txn.write().unwrap().remove_file("dir").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 128
let files: Vec<_> = crate::fs::iter_working_copy(&txn, Inode::ROOT)let files: Vec<_> = crate::fs::iter_working_copy(&*txn.read().unwrap(), Inode::ROOT) - replacement in libpijul/src/tests/add_file.rs at line 134[20.458320]→[20.44025:44110](∅→∅),[20.44110]→[20.25682:25748](∅→∅),[20.458397]→[20.25682:25748](∅→∅)
record_all_output(&mut repo, &changes, &mut txn, &mut channel, "").unwrap();debug_to_file(&txn, &channel.borrow(), "debug").unwrap();record_all_output(repo, changes, txn, &channel, "").unwrap();debug_to_file(&*txn.read().unwrap(), &channel, "debug").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 137
let files: Vec<_> = crate::fs::iter_working_copy(&txn, Inode::ROOT)let files: Vec<_> = crate::fs::iter_working_copy(&*txn.read().unwrap(), Inode::ROOT) - replacement in libpijul/src/tests/add_file.rs at line 144[20.458708]→[20.44111:44197](∅→∅),[20.44197]→[20.31279:31377](∅→∅),[20.458778]→[20.31279:31377](∅→∅),[20.31377]→[20.458876:458927](∅→∅),[20.458876]→[20.458876:458927](∅→∅),[20.458927]→[20.44198:44229](∅→∅)
txn.add_file("dir2/file").unwrap();txn.remove_file("dir2").unwrap();assert!(crate::fs::iter_working_copy(&txn, Inode::ROOT).all(|f| f.unwrap().1 != "dir2"));assert!(txn.remove_file("dir2").is_err());txn.commit().unwrap();txn.write().unwrap().add_file("dir2/file").unwrap();txn.write().unwrap().remove_file("dir2").unwrap();assert!(crate::fs::iter_working_copy(&*txn.read().unwrap(), Inode::ROOT).all(|f| f.unwrap().1 != "dir2"));assert!(txn.write().unwrap().remove_file("dir2").is_err());txn.write().unwrap().commit().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 169
let mut repo = working_copy::memory::Memory::new();let changes = changestore::memory::Memory::new();let mut repo = Arc::new(working_copy::memory::Memory::new());let changes = Arc::new(changestore::memory::Memory::new()); - replacement in libpijul/src/tests/add_file.rs at line 173
let mut txn = env.mut_txn_begin();txn.add_file("a/b/c/d/e")?;let mut channel = txn.open_or_create_channel("main")?;let mut txn = Arc::new(RwLock::new(env.mut_txn_begin().unwrap()));txn.write().unwrap().add_file("a/b/c/d/e")?;let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 178[20.3398]→[20.3398:3471](∅→∅),[20.3471]→[20.25749:25812](∅→∅),[20.25812]→[20.3525:3597](∅→∅),[20.3525]→[20.3525:3597](∅→∅)
record_all_output(&mut repo, &changes, &mut txn, &mut channel, "")?;debug_to_file(&txn, &channel.borrow(), "debug0").unwrap();let files: Vec<_> = crate::fs::iter_working_copy(&txn, Inode::ROOT)record_all_output(repo.clone(), changes.clone(), txn.clone(), &channel, "")?;debug_to_file(&*txn.read().unwrap(), &channel, "debug0").unwrap();let files: Vec<_> = crate::fs::iter_working_copy(&*txn.read().unwrap(), Inode::ROOT) - replacement in libpijul/src/tests/add_file.rs at line 187
record_all_output(&mut repo, &changes, &mut txn, &mut channel, "")?;debug_to_file(&txn, &channel.borrow(), "debug").unwrap();record_all_output(repo.clone(), changes.clone(), txn.clone(), &channel, "")?;debug_to_file(&*txn.read().unwrap(), &channel, "debug").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 190
let mut repo2 = working_copy::memory::Memory::new();let mut repo2 = Arc::new(working_copy::memory::Memory::new()); - replacement in libpijul/src/tests/add_file.rs at line 192
&mut repo2,&changes,&mut txn,&mut channel,repo2,changes,txn.clone(),channel.clone(), - edit in libpijul/src/tests/add_file.rs at line 199
1, - replacement in libpijul/src/tests/add_file.rs at line 203
let files: Vec<_> = crate::fs::iter_working_copy(&txn, Inode::ROOT)let files: Vec<_> = crate::fs::iter_working_copy(&*txn.read().unwrap(), Inode::ROOT) - replacement in libpijul/src/tests/add_file.rs at line 216
let mut repo = working_copy::memory::Memory::new();let changes = changestore::memory::Memory::new();let mut repo = Arc::new(working_copy::memory::Memory::new());let changes = Arc::new(changestore::memory::Memory::new()); - replacement in libpijul/src/tests/add_file.rs at line 220
let mut txn = env.mut_txn_begin();txn.add_file("dir/file")?;let mut channel = txn.open_or_create_channel("main")?;let mut txn = Arc::new(RwLock::new(env.mut_txn_begin().unwrap()));txn.write().unwrap().add_file("dir/file")?;let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 225
record_all_output(&mut repo, &changes, &mut txn, &mut channel, "").unwrap();debug_to_file(&txn, &channel.borrow(), "debug").unwrap();record_all_output(repo.clone(), changes.clone(), txn.clone(), &channel, "").unwrap();debug_to_file(&*txn.read().unwrap(), &channel, "debug").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 228[20.459870]→[20.7882:7944](∅→∅),[20.7944]→[20.459908:460049](∅→∅),[20.459908]→[20.459908:460049](∅→∅)
repo.write_file::<_, std::io::Error, _>("dir/file", |w| {w.write_all(b"a\nb\nc\n")?;Ok(())})?;record_all_output(&mut repo, &changes, &mut txn, &mut channel, "").unwrap();repo.write_file("dir/file").unwrap().write_all(b"a\nb\nc\n").unwrap();record_all_output(repo.clone(), changes.clone(), txn.clone(), &channel, "").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 237[20.26001]→[20.460244:460263](∅→∅),[20.32056]→[20.460244:460263](∅→∅),[20.460244]→[20.460244:460263](∅→∅)
txn.commit()?;txn.write().unwrap().commit()?; - replacement in libpijul/src/tests/add_file.rs at line 250
let mut txn = env.mut_txn_begin();txn.add_file("dir/file")?;let mut channel = txn.open_or_create_channel("main")?;let mut txn = env.mut_txn_begin().unwrap();txn.write().unwrap().add_file("dir/file")?;let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 278[20.26193]→[20.461680:461699](∅→∅),[20.32221]→[20.461680:461699](∅→∅),[20.461680]→[20.461680:461699](∅→∅)
txn.commit()?;txn.write().unwrap().commit()?; - replacement in libpijul/src/tests/add_file.rs at line 293
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 306
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 351
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 379
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 434
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 469
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 489
let mut txn_bob = env_bob.mut_txn_begin();let mut txn_bob = env_bob.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 667
let mut txn_alice = env_alice.mut_txn_begin();let mut txn_alice = env_alice.mut_txn_begin().unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 778
let mut txn = env.mut_txn_begin();txn.add_file("filedir").unwrap();let mut txn = env.mut_txn_begin().unwrap();txn.write().unwrap().add_file("filedir").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 781
let mut channel = txn.open_or_create_channel("main").unwrap();let mut channel = txn.write().unwrap().open_or_create_channel("main").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 786
txn.add_file("filedir/file").unwrap();txn.write().unwrap().add_file("filedir/file").unwrap(); - replacement in libpijul/src/tests/add_file.rs at line 802
let mut txn = env.mut_txn_begin();txn.add_file("dir/file")?;let mut channel = txn.open_or_create_channel("main")?;let mut txn = env.mut_txn_begin().unwrap();txn.write().unwrap().add_file("dir/file")?;let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 824
let mut txn = env.mut_txn_begin();let mut channel = txn.open_or_create_channel("main")?;let mut txn = env.mut_txn_begin().unwrap();let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 844
let mut txn = env.mut_txn_begin();let mut channel = txn.open_or_create_channel("main")?;let mut txn = env.mut_txn_begin().unwrap();let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 858
let mut txn = env.mut_txn_begin();let mut channel = txn.open_or_create_channel("main")?;let mut txn = env.mut_txn_begin().unwrap();let mut channel = txn.write().unwrap().open_or_create_channel("main")?; - replacement in libpijul/src/tests/add_file.rs at line 862
txn.add_file("file")?;txn.write().unwrap().add_file("file")?; - replacement in libpijul/src/record.rs at line 11
use std::collections::{HashMap, HashSet};use crate::{HashMap, HashSet};use std::collections::VecDeque;use std::sync::{Arc, Mutex, RwLock}; - replacement in libpijul/src/record.rs at line 51[20.489392]→[20.489392:489422](∅→∅),[20.489422]→[20.48769:48836](∅→∅),[20.48836]→[20.489479:489628](∅→∅),[20.489479]→[20.489479:489628](∅→∅)
pub(crate) rec: Recorded,pub(crate) redundant: Vec<(Vertex<ChangeId>, SerializedEdge)>,recorded_inodes: HashMap<Inode, Position<Option<ChangeId>>>,deleted_vertices: HashSet<Position<ChangeId>>,former_parents: Vec<Parent>,pub(crate) rec: Vec<Arc<Mutex<Recorded>>>,recorded_inodes: Arc<Mutex<HashMap<Inode, Position<Option<ChangeId>>>>>,deleted_vertices: Arc<Mutex<HashSet<Position<ChangeId>>>>, - edit in libpijul/src/record.rs at line 56
pub contents: Arc<Mutex<Vec<u8>>>, - replacement in libpijul/src/record.rs at line 69
pub contents: Vec<u8>,pub contents: Arc<Mutex<Vec<u8>>>, - edit in libpijul/src/record.rs at line 82
/// Redundant edges found during the comparison.pub redundant: Vec<(Vertex<ChangeId>, SerializedEdge)>,/// Force a re-diffforce_rediff: bool,deleted_vertices: Arc<Mutex<HashSet<Position<ChangeId>>>>,recorded_inodes: Arc<Mutex<HashMap<Inode, Position<Option<ChangeId>>>>>, - replacement in libpijul/src/record.rs at line 93[20.454]→[20.1062:1283](∅→∅),[20.1283]→[8.0:66](∅→∅),[8.66]→[20.1344:1359](∅→∅),[20.1344]→[20.1344:1359](∅→∅),[20.492]→[20.490736:490902](∅→∅),[20.1359]→[20.490736:490902](∅→∅),[20.490736]→[20.490736:490902](∅→∅)
rec: Recorded {contents: Vec::new(),actions: Vec::new(),updatables: HashMap::new(),largest_file: 0,has_binary_files: false,oldest_change: std::time::SystemTime::UNIX_EPOCH,},redundant: Vec::new(),recorded_inodes: HashMap::new(),deleted_vertices: HashSet::new(),former_parents: Vec::new(),rec: Vec::new(),recorded_inodes: Arc::new(Mutex::new(HashMap::default())), - edit in libpijul/src/record.rs at line 97
deleted_vertices: Arc::new(Mutex::new(HashSet::default())),contents: Arc::new(Mutex::new(Vec::new())), - edit in libpijul/src/record.rs at line 109
pub fn recorded(&mut self) -> Arc<Mutex<Recorded>> {let m = Arc::new(Mutex::new(self.recorded_()));self.rec.push(m.clone());m}fn recorded_(&self) -> Recorded {Recorded {contents: self.contents.clone(),actions: Vec::new(),updatables: HashMap::default(),largest_file: 0,has_binary_files: false,oldest_change: std::time::SystemTime::UNIX_EPOCH,redundant: Vec::new(),force_rediff: self.force_rediff,deleted_vertices: self.deleted_vertices.clone(),recorded_inodes: self.recorded_inodes.clone(),}} - replacement in libpijul/src/record.rs at line 131
pub fn finish(self) -> Recorded {self.recpub fn finish(mut self) -> Recorded {if self.rec.is_empty() {self.recorded();}let mut it = self.rec.into_iter();let mut result = if let Ok(rec) = Arc::try_unwrap(it.next().unwrap()) {rec.into_inner().unwrap()} else {unreachable!()};for rec in it {let rec = if let Ok(rec) = Arc::try_unwrap(rec) {rec.into_inner().unwrap()} else {unreachable!()};let off = result.actions.len();result.actions.extend(rec.actions.into_iter());for (a, b) in rec.updatables {result.updatables.insert(a + off, b);}result.largest_file = result.largest_file.max(rec.largest_file);result.has_binary_files |= rec.has_binary_files;result.oldest_change = result.oldest_change.min(rec.oldest_change);result.redundant.extend(rec.redundant.into_iter())}debug!("result = {:?}, updatables = {:?}",result.actions, result.updatables);result - replacement in libpijul/src/record.rs at line 183
struct RecordItem<'a> {struct RecordItem { - edit in libpijul/src/record.rs at line 190
components: Components<'a>, - replacement in libpijul/src/record.rs at line 192
impl<'a> RecordItem<'a> {fn root(prefix: &'a str) -> Self {impl RecordItem {fn root() -> Self { - edit in libpijul/src/record.rs at line 201
components: components(prefix), - edit in libpijul/src/record.rs at line 208
fn get_inodes_<T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>>(txn: Arc<RwLock<T>>,channel: ChannelRef<T>,inode: &Inode,) -> Result<Option<Position<ChangeId>>, TxnErr<T::GraphError>> {let txn = txn.read().unwrap();let channel = channel.r.read().unwrap();Ok(get_inodes(&*txn, &*channel, inode)?.map(|x| *x))} - replacement in libpijul/src/record.rs at line 224[20.32350]→[20.492397:492412](∅→∅),[20.492397]→[20.492397:492412](∅→∅),[20.492412]→[20.49031:49097](∅→∅),[20.1201]→[20.492478:492501](∅→∅),[20.28094]→[20.492478:492501](∅→∅),[20.32418]→[20.492478:492501](∅→∅),[20.49097]→[20.492478:492501](∅→∅),[20.492478]→[20.492478:492501](∅→∅)
if txn.get_changeset(txn.changes(channel), &vertex.change)?.is_some()if let Some(e) = iter_adjacent(txn,txn.graph(channel),vertex.inode_vertex(),EdgeFlags::PARENT,EdgeFlags::all(),)?.next() - replacement in libpijul/src/record.rs at line 233[20.492511]→[20.32419:32448](∅→∅),[20.32448]→[20.492536:492553](∅→∅),[20.492536]→[20.492536:492553](∅→∅),[20.492553]→[20.32449:32470](∅→∅)
Ok(Some(vertex))} else {Ok(None)if e?.flag().is_alive_parent() {return Ok(Some(vertex));} - edit in libpijul/src/record.rs at line 237
Ok(None) - edit in libpijul/src/record.rs at line 241
}struct Tasks {stop: bool,t: VecDeque<(RecordItem,Position<ChangeId>,Arc<Mutex<Recorded>>,Option<Position<Option<ChangeId>>>,)>, - replacement in libpijul/src/record.rs at line 254
pub fn record<T, W: WorkingCopy, C: ChangeStore>(pub fn record<T,W: WorkingCopy + Send + Sync + 'static,C: ChangeStore + Clone + Send + 'static,>( - replacement in libpijul/src/record.rs at line 260
txn: &mut T,txn: Arc<RwLock<T>>, - replacement in libpijul/src/record.rs at line 262[20.492781]→[20.28150:28184](∅→∅),[20.28184]→[20.492818:492848](∅→∅),[20.32585]→[20.492818:492848](∅→∅),[20.492818]→[20.492818:492848](∅→∅)
channel: &mut T::Channel,working_copy: &mut W,channel: ChannelRef<T>,working_copy: Arc<W>, - edit in libpijul/src/record.rs at line 266
_n_workers: usize, - replacement in libpijul/src/record.rs at line 269
T: ChannelMutTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,T: ChannelMutTxnT+ TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>+ Send+ Sync+ 'static,T::Channel: Send + Sync, - edit in libpijul/src/record.rs at line 277
let work = Arc::new(Mutex::new(Tasks {t: VecDeque::new(),stop: false,}));let mut workers: Vec<std::thread::JoinHandle<()>> = Vec::new();for t in 0..0 {// n_workers - 1 {let working_copy = working_copy.clone();let changes = changes.clone();let channel = channel.clone();let work = work.clone();let txn = txn.clone();workers.push(std::thread::spawn(move || loop {let (w, stop) = {let mut work = work.lock().unwrap();(work.t.pop_front(), work.stop)};if let Some((item, vertex, rec, new_papa)) = w {// This parent has changed.info!("record existing file {:?} on thread {:?}", item, t);rec.lock().unwrap().record_existing_file(txn.clone(),diff_algorithm,channel.clone(),working_copy.clone(),&changes,&item,new_papa,vertex,).unwrap();} else if stop {info!("stop {:?}", t);break;} else {info!("yield {:?}", t);std::thread::park_timeout(std::time::Duration::from_secs(1));}}))} - replacement in libpijul/src/record.rs at line 321
let mut stack = vec![RecordItem::root(prefix)];while let Some(mut item) = stack.pop() {let mut stack = vec![(RecordItem::root(), components(prefix))];while let Some((mut item, mut components)) = stack.pop() { - replacement in libpijul/src/record.rs at line 326
let vertex = if let Some(vertex) = self.recorded_inodes.get(&item.inode) {*vertexlet vertex: Option<Position<Option<ChangeId>>> = self.recorded_inodes.lock().unwrap().get(&item.inode).cloned();let vertex = if let Some(vertex) = vertex {vertex - edit in libpijul/src/record.rs at line 336
.lock().unwrap() - edit in libpijul/src/record.rs at line 339
debug!("TAKING LOCK {}", line!());let txn = txn.read().unwrap();debug!("TAKEN");let channel = channel.r.read().unwrap();debug!("TAKEN 2"); - replacement in libpijul/src/record.rs at line 345[20.493534]→[20.493534:493559](∅→∅),[20.493559]→[20.1202:1242](∅→∅),[20.1242]→[20.493589:493623](∅→∅),[20.28305]→[20.493589:493623](∅→∅),[20.32843]→[20.493589:493623](∅→∅),[20.493589]→[20.493589:493623](∅→∅)
txn,txn.graph(channel),working_copy,&*txn,txn.graph(&channel),working_copy.as_ref(), - replacement in libpijul/src/record.rs at line 353[20.493753]→[20.49098:49182](∅→∅),[20.49182]→[20.0:72](∅→∅),[20.32947]→[20.0:72](∅→∅),[20.72]→[20.1243:1283](∅→∅),[20.1283]→[20.111:259](∅→∅),[20.111]→[20.111:259](∅→∅),[20.259]→[20.493834:494183](∅→∅),[20.32947]→[20.493834:494183](∅→∅),[20.493834]→[20.493834:494183](∅→∅)
} else if let Some(&vertex) = get_inodes(txn, &channel, &item.inode)? {self.delete_obsolete_children(txn,txn.graph(channel),working_copy,changes,&item.full_path,vertex,)?;self.record_existing_file(txn,diff_algorithm,&channel,working_copy,changes,&item,vertex,)?;self.recorded_inodes.insert(item.inode, vertex.to_option());} else if let Some(vertex) = get_inodes_(txn.clone(), channel.clone(), &item.inode)? {{let mut txn = txn.write().unwrap();let mut channel = channel.r.write().unwrap();let mut graph = txn.graph(&mut *channel);self.delete_obsolete_children(&mut *txn,&mut graph,working_copy.as_ref(),changes,&item.full_path,vertex,)?;}let rec = self.recorded();let new_papa = {let mut recorded = self.recorded_inodes.lock().unwrap();recorded.insert(item.inode, vertex.to_option());recorded.get(&item.papa).cloned()};let mut work = work.lock().unwrap();work.t.push_back((item.clone(), vertex, rec, new_papa));std::mem::drop(work);for t in workers.iter() {t.thread().unpark()} - replacement in libpijul/src/record.rs at line 383
match self.add_file(working_copy, item.clone()) {let rec = self.recorded();debug!("TAKING LOCK {}", line!());let mut rec = rec.lock().unwrap();match rec.add_file(working_copy.as_ref(), item.clone()) { - replacement in libpijul/src/record.rs at line 389
self.recorded_inodes.insert(item.inode, vertex);self.recorded_inodes.lock().unwrap().insert(item.inode, vertex); - edit in libpijul/src/record.rs at line 400
debug!("TAKING LOCK {}", line!());let txn = txn.read().unwrap();let channel = channel.r.read().unwrap(); - replacement in libpijul/src/record.rs at line 404
txn,&channel,working_copy,&*txn,&*channel,working_copy.as_ref(), - edit in libpijul/src/record.rs at line 408
&mut components, - edit in libpijul/src/record.rs at line 413
}info!("stop work");work.lock().unwrap().stop = true;for t in workers.iter() {t.thread().unpark()}loop {let w = {let mut work = work.lock().unwrap();debug!("waiting, stop = {:?}", work.stop);work.t.pop_front()};if let Some((item, vertex, rec, new_papa)) = w {// This parent has changed.info!("record existing file {:?}", item);rec.lock().unwrap().record_existing_file(txn.clone(),diff_algorithm,channel.clone(),working_copy.clone(),changes,&item,new_papa,vertex,).unwrap();} else {break;}}for (n, t) in workers.into_iter().enumerate() {debug!("WAITING {:?}", n);t.join().unwrap() - edit in libpijul/src/record.rs at line 451
info!("record done"); - edit in libpijul/src/record.rs at line 455
fn delete_obsolete_children<T: GraphTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,W: WorkingCopy,C: ChangeStore,>(&mut self,txn: &T,channel: &T::Graph,working_copy: &W,changes: &C,full_path: &str,v: Position<ChangeId>,) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>where<W as WorkingCopy>::Error: 'static,{if self.ignore_missing {return Ok(());}let f0 = EdgeFlags::FOLDER | EdgeFlags::BLOCK;let f1 = f0 | EdgeFlags::PSEUDO;debug!("delete_obsolete_children, v = {:?}", v);for child in iter_adjacent(txn, channel, v.inode_vertex(), f0, f1)? {let child = child?;let child = txn.find_block(channel, child.dest()).unwrap();for grandchild in iter_adjacent(txn, channel, *child, f0, f1)? {let grandchild = grandchild?;debug!("grandchild {:?}", grandchild);let needs_deletion =if let Some(inode) = txn.get_revinodes(&grandchild.dest(), None)? {debug!("inode = {:?} {:?}", inode, txn.get_revtree(inode, None));if let Some(path) = crate::fs::inode_filename(txn, *inode)? {working_copy.file_metadata(&path).is_err()} else {true}} else {true};if needs_deletion {let mut name = Vec::new();changes.get_contents(|p| txn.get_external(&p).unwrap().map(From::from),*child,&mut name,).map_err(RecordError::Changestore)?;let mut full_path = full_path.to_string();if name.len() > 2 {if let Ok(name) = std::str::from_utf8(&name[2..]) {if !full_path.is_empty() {full_path.push('/');}full_path.push_str(name);}}// delete recursively.let rec = self.recorded();let mut rec = rec.lock().unwrap();rec.record_deleted_file(txn,&channel,working_copy,&full_path,grandchild.dest(),)?}}}Ok(())}fn push_children<'a,T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,W: WorkingCopy,C: ChangeStore,>(&mut self,txn: &T,channel: &T::Channel,working_copy: &W,item: &mut RecordItem,components: &mut Components<'a>,vertex: Position<Option<ChangeId>>,stack: &mut Vec<(RecordItem, Components<'a>)>,prefix: &str,) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>where<W as crate::working_copy::WorkingCopy>::Error: 'static,{debug!("push_children, item = {:?}", item);let comp = components.next();let full_path = item.full_path.clone();let fileid = OwnedPathId {parent_inode: item.inode,basename: SmallString::new(),};let mut has_matching_children = false;for x in txn.iter_tree(&fileid, None)? {let (fileid_, child_inode) = x?;debug!("push_children {:?} {:?}", fileid_, child_inode);if fileid_.parent_inode < fileid.parent_inode || fileid_.basename.is_empty() {continue;} else if fileid_.parent_inode > fileid.parent_inode {break;}if let Some(comp) = comp {if comp != fileid_.basename.as_str() {continue;}}has_matching_children = true;let basename = fileid_.basename.as_str().to_string();let full_path = if full_path.is_empty() {basename.clone()} else {full_path.clone() + "/" + &basename};debug!("fileid_ {:?} child_inode {:?}", fileid_, child_inode);if let Ok(meta) = working_copy.file_metadata(&full_path) {stack.push((RecordItem {papa: item.inode,inode: *child_inode,v_papa: vertex,basename,full_path,metadata: meta,},components.clone(),));} else if let Some(vertex) = get_inodes(txn, &channel, child_inode)? {let rec = self.recorded();let mut rec = rec.lock().unwrap();rec.record_deleted_file(txn, txn.graph(channel), working_copy, &full_path, *vertex)?}}if comp.is_some() && !has_matching_children {debug!("comp = {:?}", comp);return Err(RecordError::PathNotInRepo(prefix.to_string()));}Ok(())}}fn modified_since_last_commit<T: ChannelTxnT, W: WorkingCopy>(txn: &T,channel: &T::Channel,working_copy: &W,prefix: &str,) -> Result<bool, std::time::SystemTimeError> {if let Ok(last_modified) = working_copy.modified_time(prefix) {debug!("last_modified = {:?}, channel.last = {:?}",last_modified.duration_since(std::time::UNIX_EPOCH)?.as_secs(),txn.last_modified(channel));Ok(last_modified.duration_since(std::time::UNIX_EPOCH)?.as_secs()>= txn.last_modified(channel))} else {Ok(true)}}impl Recorded { - replacement in libpijul/src/record.rs at line 628
working_copy: &mut W,working_copy: &W, - replacement in libpijul/src/record.rs at line 633[20.495974]→[20.49183:49256](∅→∅),[20.49256]→[20.496047:496160](∅→∅),[20.496047]→[20.496047:496160](∅→∅),[20.496160]→[20.49257:49328](∅→∅),[20.49328]→[20.496294:496329](∅→∅),[20.496294]→[20.496294:496329](∅→∅),[20.496329]→[20.49329:49401](∅→∅),[20.49401]→[20.496401:496436](∅→∅),[20.496401]→[20.496401:496436](∅→∅)
let name_start = ChangePosition(self.rec.contents.len().into());meta.write(&mut self.rec.contents).unwrap();self.rec.contents.extend(item.basename.as_bytes());let name_end = ChangePosition(self.rec.contents.len().into());self.rec.contents.push(0);let inode_pos = ChangePosition(self.rec.contents.len().into());self.rec.contents.push(0);let mut contents = self.contents.lock().unwrap();let name_start = ChangePosition(contents.len().into());// Push the metadata, big-endian.contents.push((meta.0 >> 8) as u8);contents.push((meta.0 & 0xff) as u8);//contents.extend(item.basename.as_bytes());let name_end = ChangePosition(contents.len().into());contents.push(0);let inode_pos = ChangePosition(contents.len().into());contents.push(0); - replacement in libpijul/src/record.rs at line 646[20.496480]→[20.49402:49474](∅→∅),[20.49474]→[20.496552:496630](∅→∅),[20.496552]→[20.496552:496630](∅→∅),[20.496630]→[20.49475:49643](∅→∅),[20.49643]→[20.496780:496823](∅→∅),[20.496780]→[20.496780:496823](∅→∅)
let start = ChangePosition(self.rec.contents.len().into());working_copy.read_file(&item.full_path, &mut self.rec.contents)?;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());self.rec.has_binary_files |= {let start = ChangePosition(contents.len().into());working_copy.read_file(&item.full_path, &mut contents)?;let end = ChangePosition(contents.len().into());self.largest_file = self.largest_file.max(end.0.as_u64() - start.0.as_u64());self.has_binary_files |= { - replacement in libpijul/src/record.rs at line 653
let utf8 = std::str::from_utf8(&self.rec.contents[s..e]);let utf8 = std::str::from_utf8(&contents[s..e]); - replacement in libpijul/src/record.rs at line 660
self.rec.contents.push(0);contents.push(0); - replacement in libpijul/src/record.rs at line 682
self.rec.actions.push(Hunk::FileAdd {self.actions.push(Hunk::FileAdd { - replacement in libpijul/src/record.rs at line 705
debug!("{:?}", self.rec.actions.last().unwrap());self.rec.updatables.insert(self.rec.actions.len(),debug!("{:?}", self.actions.last().unwrap());self.updatables.insert(self.actions.len(), - replacement in libpijul/src/record.rs at line 724
T: ChannelMutTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>, - replacement in libpijul/src/record.rs at line 729
txn: &mut T,txn: Arc<RwLock<T>>, - replacement in libpijul/src/record.rs at line 731[20.499537]→[20.28387:28417](∅→∅),[20.28417]→[20.499567:499597](∅→∅),[20.499567]→[20.499567:499597](∅→∅)
channel: &T::Channel,working_copy: &mut W,channel: ChannelRef<T>,working_copy: Arc<W>, - edit in libpijul/src/record.rs at line 735
new_papa: Option<Position<Option<ChangeId>>>, - replacement in libpijul/src/record.rs at line 746
self.former_parents.clear();let mut former_parents = Vec::new(); - replacement in libpijul/src/record.rs at line 750
for name_ in iter_adjacent(txn, txn.graph(channel), vertex.inode_vertex(), f0, f1)? {let txn_ = txn.read().unwrap();let channel_ = channel.read().unwrap();for name_ in iter_adjacent(&*txn_,txn_.graph(&*channel_),vertex.inode_vertex(),f0,f1,)? { - replacement in libpijul/src/record.rs at line 770
let name_dest = txn.find_block_end(txn.graph(channel), name_.dest())let name_dest = txn_.find_block_end(txn_.graph(&*channel_), name_.dest()) - replacement in libpijul/src/record.rs at line 776
|p| txn.get_external(&p).unwrap().map(From::from),|p| txn_.get_external(&p).unwrap().map(From::from), - replacement in libpijul/src/record.rs at line 788
if let Some(v_papa) = iter_adjacent(txn, txn.graph(channel), *name_dest, f0, f1)?.next()if let Some(v_papa) =iter_adjacent(&*txn_, txn_.graph(&*channel_), *name_dest, f0, f1)?.next() - replacement in libpijul/src/record.rs at line 793
self.former_parents.push(Parent {former_parents.push(Parent { - replacement in libpijul/src/record.rs at line 803
item, self.former_parents, is_deleted,item, former_parents, is_deleted, - replacement in libpijul/src/record.rs at line 805
assert!(!self.former_parents.is_empty());assert!(!former_parents.is_empty()); - replacement in libpijul/src/record.rs at line 808
if self.former_parents.len() > 1|| self.former_parents[0].basename != item.basename|| self.former_parents[0].metadata != item.metadata|| self.former_parents[0].parent != item.v_papaif former_parents.len() > 1|| former_parents[0].basename != item.basename|| former_parents[0].metadata != item.metadata|| former_parents[0].parent != item.v_papa - edit in libpijul/src/record.rs at line 814
// This parent has changed.let new_papa = *self.recorded_inodes.get(&item.papa).unwrap(); - replacement in libpijul/src/record.rs at line 817
txn,txn.graph(channel),&*txn_,txn_.graph(&*channel_), - replacement in libpijul/src/record.rs at line 821
new_papa,new_papa.unwrap(), - replacement in libpijul/src/record.rs at line 826
|| self.modified_since_last_commit(txn,&channel,working_copy,|| modified_since_last_commit(&*txn_,&*channel_,working_copy.as_ref(), - replacement in libpijul/src/record.rs at line 833
let mut ret = retrieve(txn, txn.graph(channel), vertex)?;let mut ret = retrieve(&*txn_, txn_.graph(&*channel_), vertex)?; - replacement in libpijul/src/record.rs at line 839
let len = self.rec.actions.len();let len = self.actions.len(); - replacement in libpijul/src/record.rs at line 842
txn,&channel,&*txn_,&*channel_, - replacement in libpijul/src/record.rs at line 850
if self.rec.actions.len() > len {if self.actions.len() > len { - replacement in libpijul/src/record.rs at line 852
if self.rec.oldest_change == std::time::SystemTime::UNIX_EPOCH {self.rec.oldest_change = last_modified;if self.oldest_change == std::time::SystemTime::UNIX_EPOCH {self.oldest_change = last_modified; - replacement in libpijul/src/record.rs at line 855
self.rec.oldest_change = self.rec.oldest_change.min(last_modified);self.oldest_change = self.oldest_change.min(last_modified); - replacement in libpijul/src/record.rs at line 861
&self.rec.actions.len() - len,self.rec.actions.len()&self.actions.len() - len,self.actions.len() - replacement in libpijul/src/record.rs at line 868[20.28957]→[20.28957:28978](∅→∅),[20.28978]→[20.1774:1810](∅→∅),[20.1810]→[20.29013:29043](∅→∅),[20.29013]→[20.29013:29043](∅→∅)
txn,txn.graph(channel),working_copy,&*txn_,txn_.graph(&*channel_),working_copy.as_ref(), - edit in libpijul/src/record.rs at line 878[20.503333]→[20.34070:34202](∅→∅),[20.34202]→[20.30:54](∅→∅),[20.54]→[20.34202:34209](∅→∅),[20.34202]→[20.34202:34209](∅→∅),[20.444]→[20.503398:503434](∅→∅),[20.34209]→[20.503398:503434](∅→∅),[20.503398]→[20.503398:503434](∅→∅),[20.503434]→[20.34210:34238](∅→∅),[20.34238]→[20.503464:503490](∅→∅),[20.503464]→[20.503464:503490](∅→∅),[20.503490]→[20.55:76](∅→∅),[20.76]→[20.503490:503546](∅→∅),[20.503490]→[20.503490:503546](∅→∅),[20.503546]→[20.77:205](∅→∅),[20.205]→[7.1939:2009](∅→∅),[20.205]→[20.503554:503650](∅→∅),[7.2009]→[20.503554:503650](∅→∅),[20.34284]→[20.503554:503650](∅→∅),[20.503554]→[20.503554:503650](∅→∅),[20.503650]→[20.260:317](∅→∅),[20.317]→[20.34285:34395](∅→∅),[20.503681]→[20.34285:34395](∅→∅),[20.34395]→[20.50378:50527](∅→∅),[20.50527]→[20.34542:34588](∅→∅),[20.34542]→[20.34542:34588](∅→∅),[20.34469]→[20.503904:503959](∅→∅),[20.34588]→[20.503904:503959](∅→∅),[20.503904]→[20.503904:503959](∅→∅),[20.503959]→[20.34589:34626](∅→∅),[20.34626]→[20.50528:50616](∅→∅),[20.50616]→[20.34711:34801](∅→∅),[20.34711]→[20.34711:34801](∅→∅),[20.34801]→[20.50617:50703](∅→∅),[20.50703]→[20.34886:35049](∅→∅),[20.34886]→[20.34886:35049](∅→∅),[20.35049]→[20.147:205](∅→∅),[20.147]→[20.147:205](∅→∅),[20.205]→[20.35050:35073](∅→∅),[20.35073]→[20.504274:504310](∅→∅),[20.504274]→[20.504274:504310](∅→∅),[20.504310]→[20.206:281](∅→∅),[20.281]→[20.6727:6946](∅→∅),[20.6946]→[20.371:851](∅→∅),[20.50812]→[20.371:851](∅→∅),[20.371]→[20.371:851](∅→∅),[20.851]→[20.504310:504500](∅→∅),[20.504310]→[20.504310:504500](∅→∅),[20.504500]→[20.852:888](∅→∅),[20.888]→[20.50813:50856](∅→∅),[20.50856]→[20.35074:35097](∅→∅),[20.504576]→[20.35074:35097](∅→∅),[20.35097]→[20.504598:504640](∅→∅),[20.504598]→[20.504598:504640](∅→∅),[20.504640]→[20.35098:35113](∅→∅),[20.35113]→[20.504640:504647](∅→∅),[20.504640]→[20.504640:504647](∅→∅),[20.504647]→[20.35114:35280](∅→∅),[20.12307]→[20.504701:504737](∅→∅),[20.35280]→[20.504701:504737](∅→∅),[20.504701]→[20.504701:504737](∅→∅),[20.504737]→[20.29187:29217](∅→∅),[20.29217]→[20.504767:504935](∅→∅),[20.504767]→[20.504767:504935](∅→∅),[20.504935]→[20.35281:35430](∅→∅),[20.35430]→[20.318:370](∅→∅),[20.370]→[20.504972:505236](∅→∅),[20.12373]→[20.504972:505236](∅→∅),[20.35430]→[20.504972:505236](∅→∅),[20.504972]→[20.504972:505236](∅→∅),[20.505236]→[20.50857:50906](∅→∅),[20.50906]→[20.35487:35532](∅→∅),[20.35487]→[20.35487:35532](∅→∅),[20.35532]→[20.889:958](∅→∅),[20.958]→[20.505312:506196](∅→∅),[20.35532]→[20.505312:506196](∅→∅),[20.505312]→[20.505312:506196](∅→∅),[20.506196]→[20.50907:50948](∅→∅),[20.50948]→[20.506236:506445](∅→∅),[20.506236]→[20.506236:506445](∅→∅),[20.506445]→[20.35533:35616](∅→∅),[20.35616]→[20.6947:7168](∅→∅),[20.1912]→[20.506617:506695](∅→∅),[20.7168]→[20.506617:506695](∅→∅),[20.29318]→[20.506617:506695](∅→∅),[20.35713]→[20.506617:506695](∅→∅),[20.51051]→[20.506617:506695](∅→∅),[20.506617]→[20.506617:506695](∅→∅),[20.506695]→[20.1620:1661](∅→∅),[20.1661]→[20.12374:12446](∅→∅),[20.12446]→[20.506821:506852](∅→∅),[20.506821]→[20.506821:506852](∅→∅),[20.506854]→[20.506854:506855](∅→∅),[20.506855]→[20.1777:1863](∅→∅),[20.1863]→[20.1913:1930](∅→∅),[20.1930]→[20.1863:2268](∅→∅),[20.1863]→[20.1863:2268](∅→∅),[20.2268]→[20.1931:1974](∅→∅),[20.1974]→[20.2310:2354](∅→∅),[20.2310]→[20.2310:2354](∅→∅),[20.2354]→[20.518:601](∅→∅),[20.601]→[13.46:93](∅→∅),[13.93]→[20.2499:2547](∅→∅),[20.667]→[20.2499:2547](∅→∅),[20.2021]→[20.2499:2547](∅→∅),[20.2499]→[20.2499:2547](∅→∅),[20.2547]→[20.507547:507555](∅→∅),[20.507547]→[20.507547:507555](∅→∅),[20.507555]→[2.2:3](∅→∅),[2.3]→[20.507610:507625](∅→∅),[20.507610]→[20.507610:507625](∅→∅)
fn delete_obsolete_children<T: GraphTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,W: WorkingCopy,C: ChangeStore,>(&mut self,txn: &T,channel: &T::Graph,working_copy: &W,changes: &C,full_path: &str,v: Position<ChangeId>,) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>where<W as WorkingCopy>::Error: 'static,{if self.ignore_missing {return Ok(());}let f0 = EdgeFlags::FOLDER | EdgeFlags::BLOCK;let f1 = f0 | EdgeFlags::PSEUDO;debug!("delete_obsolete_children, v = {:?}", v);for child in iter_adjacent(txn, channel, v.inode_vertex(), f0, f1)? {let child = child?;let child = txn.find_block(channel, child.dest()).unwrap();for grandchild in iter_adjacent(txn, channel, *child, f0, f1)? {let grandchild = grandchild?;debug!("grandchild {:?}", grandchild);let needs_deletion =if let Some(inode) = txn.get_revinodes(&grandchild.dest(), None)? {debug!("inode = {:?} {:?}", inode, txn.get_revtree(inode, None));if let Some(path) = crate::fs::inode_filename(txn, *inode)? {working_copy.file_metadata(&path).is_err()} else {true}} else {true};if needs_deletion {let mut name = Vec::new();changes.get_contents(|p| txn.get_external(&p).unwrap().map(From::from),*child,&mut name,).map_err(RecordError::Changestore)?;let mut full_path = full_path.to_string();if name.len() > 2 {if let Ok(name) = std::str::from_utf8(&name[2..]) {if !full_path.is_empty() {full_path.push('/');}full_path.push_str(name);}}// delete recursively.self.record_deleted_file(txn,&channel,working_copy,&full_path,grandchild.dest(),)?}}}Ok(())}fn push_children<'a,T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,W: WorkingCopy,C: ChangeStore,>(&mut self,txn: &T,channel: &T::Channel,working_copy: &W,item: &mut RecordItem<'a>,vertex: Position<Option<ChangeId>>,stack: &mut Vec<RecordItem<'a>>,prefix: &str,) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>where<W as crate::working_copy::WorkingCopy>::Error: 'static,{debug!("push_children, item = {:?}", item);let comp = item.components.next();let full_path = item.full_path.clone();let fileid = OwnedPathId {parent_inode: item.inode,basename: SmallString::new(),};let mut has_matching_children = false;for x in txn.iter_tree(&fileid, None)? {let (fileid_, child_inode) = x?;debug!("push_children {:?} {:?}", fileid_, child_inode);if fileid_.parent_inode < fileid.parent_inode || fileid_.basename.is_empty() {continue;} else if fileid_.parent_inode > fileid.parent_inode {break;}if let Some(comp) = comp {if comp != fileid_.basename.as_str() {continue;}}has_matching_children = true;let basename = fileid_.basename.as_str().to_string();let full_path = if full_path.is_empty() {basename.clone()} else {full_path.clone() + "/" + &basename};debug!("fileid_ {:?} child_inode {:?}", fileid_, child_inode);if let Ok(meta) = working_copy.file_metadata(&full_path) {stack.push(RecordItem {papa: item.inode,inode: *child_inode,v_papa: vertex,basename,full_path,metadata: meta,components: item.components.clone(),})} else if let Some(vertex) = get_inodes(txn, &channel, child_inode)? {self.record_deleted_file(txn,txn.graph(channel),working_copy,&full_path,*vertex,)?}}if comp.is_some() && !has_matching_children {debug!("comp = {:?}", comp);return Err(RecordError::PathNotInRepo(prefix.to_string()));}Ok(())}fn modified_since_last_commit<T: ChannelTxnT, W: WorkingCopy>(&mut self,txn: &T,channel: &T::Channel,working_copy: &W,prefix: &str,) -> Result<bool, std::time::SystemTimeError> {if let Ok(last_modified) = working_copy.modified_time(prefix) {debug!("last_modified = {:?}, channel.last = {:?}",last_modified.duration_since(std::time::UNIX_EPOCH)?.as_secs(),txn.last_modified(channel));Ok(last_modified.duration_since(std::time::UNIX_EPOCH)?.as_secs()>= txn.last_modified(channel))} else {Ok(true)}}}impl Builder { - replacement in libpijul/src/record.rs at line 891[11.48]→[20.51052:51125](∅→∅),[20.508005]→[20.51052:51125](∅→∅),[20.51125]→[20.12529:12591](∅→∅),[20.508141]→[20.12529:12591](∅→∅),[20.12591]→[20.508195:508255](∅→∅),[20.508195]→[20.508195:508255](∅→∅),[20.508255]→[20.51126:51197](∅→∅),[20.51197]→[20.508326:508361](∅→∅),[20.508326]→[20.508326:508361](∅→∅),[20.508361]→[20.51198:51285](∅→∅)
let name_start = ChangePosition(self.rec.contents.len().into());item.metadata.write(&mut self.rec.contents).unwrap();self.rec.contents.extend(item.basename.as_bytes());let name_end = ChangePosition(self.rec.contents.len().into());self.rec.contents.push(0);let name = &self.rec.contents[name_start.0.as_usize()..name_end.0.as_usize()];let mut contents = self.contents.lock().unwrap();let name_start = ChangePosition(contents.len().into());// Push the metadata, big-endian.contents.push((item.metadata.0 >> 8) as u8);contents.push((item.metadata.0 & 0xff) as u8);//contents.extend(item.basename.as_bytes());let name_end = ChangePosition(contents.len().into());contents.push(0);let name = &contents[name_start.0.as_usize()..name_end.0.as_usize()]; - replacement in libpijul/src/record.rs at line 916
self.rec.actions.push(Hunk::FileUndel {self.actions.push(Hunk::FileUndel { - replacement in libpijul/src/record.rs at line 927
self.rec.actions.push(Hunk::FileMove {self.actions.push(Hunk::FileMove { - replacement in libpijul/src/record.rs at line 943
self.rec.actions.push(Hunk::SolveNameConflict {self.actions.push(Hunk::SolveNameConflict { - replacement in libpijul/src/record.rs at line 950
self.rec.contents.truncate(name_start.0.as_usize())contents.truncate(name_start.0.as_usize()) - replacement in libpijul/src/record.rs at line 953
self.rec.contents.truncate(name_start.0.as_usize())contents.truncate(name_start.0.as_usize()) - replacement in libpijul/src/record.rs at line 986
let mut del_del = HashMap::new();let mut alive = HashMap::new();let mut del_del = HashMap::default();let mut alive = HashMap::default(); - replacement in libpijul/src/record.rs at line 1163
impl Builder {impl Recorded { - replacement in libpijul/src/record.rs at line 1177
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/record.rs at line 1193
if !self.deleted_vertices.insert(vertex.start_pos()) {continue;{let mut deleted_vertices = self.deleted_vertices.lock().unwrap();if !deleted_vertices.insert(vertex.start_pos()) {continue;} - edit in libpijul/src/record.rs at line 1205
.lock().unwrap() - replacement in libpijul/src/record.rs at line 1208
self.rec.updatables.insert(self.rec.actions.len(),InodeUpdate::Deleted { inode: *inode },);self.updatables.insert(self.actions.len(), InodeUpdate::Deleted { inode: *inode }); - replacement in libpijul/src/record.rs at line 1302
self.rec.actions.push(Hunk::FileDel {self.actions.push(Hunk::FileDel { - replacement in libpijul/src/record.rs at line 1323
}) = self.rec.actions.last_mut()}) = self.actions.last_mut() - edit in libpijul/src/pristine/sanakirja.rs at line 2
use crate::HashMap; - edit in libpijul/src/pristine/sanakirja.rs at line 4
use std::cell::RefCell; - edit in libpijul/src/pristine/sanakirja.rs at line 5
use std::collections::HashMap; - replacement in libpijul/src/pristine/sanakirja.rs at line 6
use std::sync::Arc;use std::sync::{Arc, Mutex}; - replacement in libpijul/src/pristine/sanakirja.rs at line 139
open_channels: RefCell::new(HashMap::new()),open_remotes: RefCell::new(HashMap::new()),open_channels: Mutex::new(HashMap::default()),open_remotes: Mutex::new(HashMap::default()), - edit in libpijul/src/pristine/sanakirja.rs at line 142
counter: 0, - replacement in libpijul/src/pristine/sanakirja.rs at line 227[20.3608]→[20.536055:536168](∅→∅),[20.59923]→[20.536055:536168](∅→∅),[20.536055]→[20.536055:536168](∅→∅)
open_channels: RefCell::new(HashMap::new()),open_remotes: RefCell::new(HashMap::new()),open_channels: Mutex::new(HashMap::default()),open_remotes: Mutex::new(HashMap::default()), - edit in libpijul/src/pristine/sanakirja.rs at line 230
counter: 0, - replacement in libpijul/src/pristine/sanakirja.rs at line 268[20.60428]→[20.60428:60507](∅→∅),[20.60507]→[20.537793:537859](∅→∅),[20.537793]→[20.537793:537859](∅→∅)
pub(crate) open_channels: RefCell<HashMap<SmallString, ChannelRef<Self>>>,open_remotes: RefCell<HashMap<SmallString, RemoteRef<Self>>>,pub(crate) open_channels: Mutex<HashMap<SmallString, ChannelRef<Self>>>,open_remotes: Mutex<HashMap<SmallString, RemoteRef<Self>>>,counter: usize, - edit in libpijul/src/pristine/sanakirja.rs at line 484
debug!("find_block: BLOCK ERROR"); - edit in libpijul/src/pristine/sanakirja.rs at line 504
debug!("find_block: BLOCK ERROR"); - edit in libpijul/src/pristine/sanakirja.rs at line 513
debug!("find_block: BLOCK ERROR"); - replacement in libpijul/src/pristine/sanakirja.rs at line 533
let mut k = if let Some((k, _)) = cursor.set(txn, &key, None).map_err(|x| BlockError::Txn(x.into()))?{k} else if let Some((k, _)) = cursor.prev(txn).map_err(|x| BlockError::Txn(x.into()))? {k} else {return Err(BlockError::Block { block: p });let mut k = match cursor.set(txn, &key, None) {Ok(Some((k, _))) => k,Ok(None) => {if let Some((k, _)) = cursor.prev(txn).map_err(|x| BlockError::Txn(x.into()))? {k} else {debug!("find_block_end, no prev");return Err(BlockError::Block { block: p });}}Err(e) => {debug!("find_block_end: BLOCK ERROR");return Err(BlockError::Txn(e.into()));} - edit in libpijul/src/pristine/sanakirja.rs at line 549
debug!("find_block_end, loop, k = {:?}, p = {:?}", k, p); - edit in libpijul/src/pristine/sanakirja.rs at line 571
debug!("find_block_end, {:?} {:?}", k, p); - edit in libpijul/src/pristine/sanakirja.rs at line 579
debug!("find_block_end, {:?} {:?}", k, p); - edit in libpijul/src/pristine/sanakirja.rs at line 585
debug!("find_block_end: BLOCK ERROR"); - replacement in libpijul/src/pristine/sanakirja.rs at line 991
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/sanakirja.rs at line 1022
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/sanakirja.rs at line 1025
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/sanakirja.rs at line 1120
let remote = remote.borrow();let remote = remote.db.lock().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1161
match self.open_channels.borrow_mut().entry(name.clone()) {match self.open_channels.lock().unwrap().entry(name.clone()) { - replacement in libpijul/src/pristine/sanakirja.rs at line 1166
r: Rc::new(RefCell::new(c)),r: Arc::new(RwLock::new(c)), - replacement in libpijul/src/pristine/sanakirja.rs at line 1180
match self.open_remotes.borrow_mut().entry(name.clone()) {match self.open_remotes.lock().unwrap().entry(name.clone()) { - replacement in libpijul/src/pristine/sanakirja.rs at line 1204
db: Rc::new(RefCell::new(r)),db: Arc::new(Mutex::new(r)), - replacement in libpijul/src/pristine/sanakirja.rs at line 1292
match self.open_remotes.borrow_mut().entry(name.clone()) {match self.open_remotes.lock().unwrap().entry(name.clone()) { - replacement in libpijul/src/pristine/sanakirja.rs at line 1296
db: Rc::new(RefCell::new(Remote {db: Arc::new(Mutex::new(Remote { - replacement in libpijul/src/pristine/sanakirja.rs at line 1309
Ok(self.open_remotes.borrow().get(&name).cloned())Ok(self.open_remotes.lock().unwrap().get(&name).cloned()) - replacement in libpijul/src/pristine/sanakirja.rs at line 1346
match btree::get(&self.txn, &remote.db.borrow().rev, hash, None)? {match btree::get(&self.txn, &remote.db.lock().unwrap().rev, hash, None)? { - replacement in libpijul/src/pristine/sanakirja.rs at line 1356
match btree::get(&self.txn, &remote.db.borrow().states, m, None)? {match btree::get(&self.txn, &remote.db.lock().unwrap().states, m, None)? { - edit in libpijul/src/pristine/sanakirja.rs at line 1370
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 1401
Ok(btree::del(&mut self.txn, graph, k, e)?)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")}}*/result}fn debug(&mut self, graph: &mut Self::Graph, extra: &str) {::sanakirja::debug::debug(&self.txn,&[graph],format!("debug{}{}", self.counter, extra),true,); - edit in libpijul/src/pristine/sanakirja.rs at line 1466
- replacement in libpijul/src/pristine/sanakirja.rs at line 1706[20.14616]→[20.562358:562404](∅→∅),[20.52526]→[20.562358:562404](∅→∅),[20.562358]→[20.562358:562404](∅→∅)
let mut remote = remote.borrow_mut();let mut remote = remote.db.lock().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1724[20.14715]→[20.562707:562753](∅→∅),[20.52661]→[20.562707:562753](∅→∅),[20.562707]→[20.562707:562753](∅→∅)
let mut remote = remote.borrow_mut();let mut remote = remote.db.lock().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1749
let result = match self.open_channels.borrow_mut().entry(name.clone()) {let result = match self.open_channels.lock().unwrap().entry(name.clone()) { - replacement in libpijul/src/pristine/sanakirja.rs at line 1753
r: Rc::new(RefCell::new(Channel {r: Arc::new(RwLock::new(Channel { - replacement in libpijul/src/pristine/sanakirja.rs at line 1766
r: Rc::new(RefCell::new(Channel {r: Arc::new(RwLock::new(Channel { - replacement in libpijul/src/pristine/sanakirja.rs at line 1796[20.14873]→[20.565273:565315](∅→∅),[20.52923]→[20.565273:565315](∅→∅),[20.565273]→[20.565273:565315](∅→∅)
let channel = channel.r.borrow();let channel = channel.r.read().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1806
r: Rc::new(RefCell::new(Channel {r: Arc::new(RwLock::new(Channel { - replacement in libpijul/src/pristine/sanakirja.rs at line 1822
self.open_channels.borrow_mut().insert(name, br.clone());self.open_channels.lock().unwrap().insert(name, br.clone()); - replacement in libpijul/src/pristine/sanakirja.rs at line 1844
&channel.borrow().name,&channel.r.read().unwrap().name, - replacement in libpijul/src/pristine/sanakirja.rs at line 1850
.borrow_mut().remove(&channel.borrow().name).lock().unwrap().remove(&channel.r.read().unwrap().name) - replacement in libpijul/src/pristine/sanakirja.rs at line 1855
std::cell::RefCell::borrow_mut(&std::rc::Rc::get_mut(&mut channel.r).unwrap()).name = name.clone();channel.r.write().unwrap().name = name.clone(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1857
.borrow_mut().lock().unwrap() - replacement in libpijul/src/pristine/sanakirja.rs at line 1867
let channel = if let Some(channel) = self.open_channels.borrow_mut().remove(&name) {let channel = Rc::try_unwrap(channel.r)let channel = if let Some(channel) = self.open_channels.lock().unwrap().remove(&name) {let channel = Arc::try_unwrap(channel.r) - replacement in libpijul/src/pristine/sanakirja.rs at line 1872
.into_inner();.into_inner().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1906
match self.open_remotes.borrow_mut().entry(name.clone()) {match self.open_remotes.lock().unwrap().entry(name.clone()) { - replacement in libpijul/src/pristine/sanakirja.rs at line 1910
db: Rc::new(RefCell::new(Remote {db: Arc::new(Mutex::new(Remote { - replacement in libpijul/src/pristine/sanakirja.rs at line 1919
db: Rc::new(RefCell::new(Remote {db: Arc::new(Mutex::new(Remote { - replacement in libpijul/src/pristine/sanakirja.rs at line 1937
Ok(self.open_remotes.borrow().get(&name).unwrap().clone())Ok(self.open_remotes.lock().unwrap().get(&name).unwrap().clone()) - replacement in libpijul/src/pristine/sanakirja.rs at line 1948
let r = self.open_remotes.borrow_mut().remove(&name).unwrap();let r = self.open_remotes.lock().unwrap().remove(&name).unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 1950
assert_eq!(Rc::strong_count(&r.db), 1);assert_eq!(Arc::strong_count(&r.db), 1); - replacement in libpijul/src/pristine/sanakirja.rs at line 1956
if let Some(r) = self.open_remotes.borrow_mut().remove(&name) {assert_eq!(Rc::strong_count(&r.db), 1);if let Some(r) = self.open_remotes.lock().unwrap().remove(&name) {assert_eq!(Arc::strong_count(&r.db), 1); - replacement in libpijul/src/pristine/sanakirja.rs at line 1965
let open_channels =std::mem::replace(self.open_channels.borrow_mut().deref_mut(), HashMap::new());let open_channels = std::mem::replace(self.open_channels.lock().unwrap().deref_mut(),HashMap::default(),); - replacement in libpijul/src/pristine/sanakirja.rs at line 1975
let open_remotes =std::mem::replace(self.open_remotes.borrow_mut().deref_mut(), HashMap::new());let open_remotes = std::mem::replace(self.open_remotes.lock().unwrap().deref_mut(),HashMap::default(),); - edit in libpijul/src/pristine/sanakirja.rs at line 1984
// No need to set `Root::Version`, it is set at init. - replacement in libpijul/src/pristine/sanakirja.rs at line 2032
let channel = channel.r.try_borrow()?;let channel = channel.r.read().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 2063
.borrow_mut().remove(&channel.r.borrow().name),.lock().unwrap().remove(&channel.r.read().unwrap().name), - replacement in libpijul/src/pristine/sanakirja.rs at line 2073
let r = remote.db.borrow();let r = remote.db.lock().unwrap(); - replacement in libpijul/src/pristine/sanakirja.rs at line 2085[20.16900]→[20.575923:576000](∅→∅),[20.53881]→[20.575923:576000](∅→∅),[20.575923]→[20.575923:576000](∅→∅)
std::mem::drop(self.open_remotes.borrow_mut().remove(&remote.name));std::mem::drop(self.open_remotes.lock().unwrap().remove(&remote.name)); - replacement in libpijul/src/pristine/mod.rs at line 3
use std::cell::RefCell;use std::collections::{HashMap, HashSet};use crate::{HashMap, HashSet}; - replacement in libpijul/src/pristine/mod.rs at line 5
use std::rc::Rc;use std::sync::{Arc, Mutex, RwLock}; - replacement in libpijul/src/pristine/mod.rs at line 138
pub(crate) r: Rc<RefCell<T::Channel>>,pub(crate) r: Arc<RwLock<T::Channel>>,}#[derive(Debug, Error)]#[error("Mutex poison error")]pub struct PoisonError {}impl<T: ChannelTxnT> ChannelRef<T> {pub fn read(&self) -> Result<std::sync::RwLockReadGuard<T::Channel>, PoisonError> {self.r.read().map_err(|_| PoisonError {})}pub fn write(&self) -> Result<std::sync::RwLockWriteGuard<T::Channel>, PoisonError> {self.r.write().map_err(|_| PoisonError {})} - edit in libpijul/src/pristine/mod.rs at line 164
} - replacement in libpijul/src/pristine/mod.rs at line 165[20.588200]→[20.54079:54116](∅→∅),[20.54116]→[20.48751:48808](∅→∅),[20.48808]→[20.588287:588311](∅→∅),[20.588287]→[20.588287:588311](∅→∅)
impl<T: ChannelTxnT> ChannelRef<T> {pub fn borrow(&self) -> std::cell::Ref<T::Channel> {self.r.borrow()pub fn lock(&self) -> Result<std::sync::MutexGuard<Remote<T>>, PoisonError> {self.db.lock().map_err(|_| PoisonError {}) - edit in libpijul/src/pristine/mod.rs at line 168[20.588317]→[20.48809:48877](∅→∅),[20.48877]→[20.588385:588419](∅→∅),[20.588385]→[20.588385:588419](∅→∅)
pub fn borrow_mut(&mut self) -> std::cell::RefMut<T::Channel> {self.r.borrow_mut()} - replacement in libpijul/src/pristine/mod.rs at line 177
db: Rc<RefCell<Remote<T>>>,db: Arc<Mutex<Remote<T>>>, - edit in libpijul/src/pristine/mod.rs at line 187
}}impl<T: TxnT> RemoteRef<T> {pub fn borrow(&self) -> std::cell::Ref<Remote<T>> {self.db.borrow() - edit in libpijul/src/pristine/mod.rs at line 188
pub fn borrow_mut(&mut self) -> std::cell::RefMut<Remote<T>> {self.db.borrow_mut()} - replacement in libpijul/src/pristine/mod.rs at line 261
type Channel;type Channel: Sync + Send; - replacement in libpijul/src/pristine/mod.rs at line 464
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 466
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 847
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 863
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 876
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 879
channel: &T::Channel,channel: &ChannelRef<T>, - replacement in libpijul/src/pristine/mod.rs at line 884
let done = debug(txn, txn.graph(channel), &mut f)?;let channel = channel.r.read().unwrap();let done = debug(txn, txn.graph(&*channel), &mut f)?; - replacement in libpijul/src/pristine/mod.rs at line 891
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 903
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 910
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 919
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 930
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 961
let mut reachable = HashSet::new();let mut reachable = HashSet::default(); - replacement in libpijul/src/pristine/mod.rs at line 983
let mut alive_unreachable = HashMap::new();let mut alive_unreachable = HashMap::default(); - replacement in libpijul/src/pristine/mod.rs at line 986[20.409]→[20.46843:46881](∅→∅),[20.54330]→[20.46843:46881](∅→∅),[20.66568]→[20.46843:46881](∅→∅),[20.46843]→[20.46843:46881](∅→∅)
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/pristine/mod.rs at line 1072
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/pristine/mod.rs at line 1270
#[cfg(debug_assertions)]// #[cfg(debug_assertions)] - replacement in libpijul/src/pristine/mod.rs at line 1439
type Item = Result<ChannelRef<T>, TxnErr<T::GraphError>>;type Item = Result<(&'txn SmallStr, ChannelRef<T>), TxnErr<T::GraphError>>; - replacement in libpijul/src/pristine/mod.rs at line 1444
Ok(Some((name, _))) => self.txn.load_channel(name.as_str()).transpose(),Ok(Some((name, _))) => Some(Ok((name, self.txn.load_channel(name.as_str()).unwrap()?))), - edit in libpijul/src/pristine/mod.rs at line 1486
/// Delete a key and a value from a graph. Returns `true` if and only if `(k, v)` was in the graph.fn debug(&mut self, channel: &mut Self::Graph, extra: &str); - replacement in libpijul/src/pristine/mod.rs at line 1679[20.52571]→[20.52571:52598](∅→∅),[20.52598]→[20.75944:75959](∅→∅),[20.75959]→[20.110165:110178](∅→∅),[20.110178]→[20.16190:16327](∅→∅),[20.16327]→[20.52831:52866](∅→∅),[20.110256]→[20.52831:52866](∅→∅),[20.52831]→[20.52831:52866](∅→∅),[20.52866]→[20.75960:75975](∅→∅),[20.75975]→[20.110257:110270](∅→∅),[20.110270]→[20.16328:16483](∅→∅),[20.16483]→[20.53117:53125](∅→∅),[20.110366]→[20.53117:53125](∅→∅),[20.53117]→[20.53117:53125](∅→∅),[20.53125]→[20.110367:110399](∅→∅)
let a = txn.del_graph(graph,&k0,Some(&SerializedEdge::new(flag,k1.change,k1.start,introduced_by,)),)?;let b = txn.del_graph(graph,&k1,Some(&SerializedEdge::new(flag | EdgeFlags::PARENT,k0.change,k0.end,introduced_by,)),)?;if (a && !b) || (!a && b) {let v0 = SerializedEdge::new(flag, k1.change, k1.start, introduced_by);let a = txn.del_graph(graph, &k0, Some(&v0))?;{if let Some(&ee) = txn.get_graph(graph, &k0, Some(&v0))? {if ee == v0 {txn.debug(graph, ".3");panic!("Not deleted: {:?} {:?}", k0, v0);}}}let v1 = SerializedEdge::new(flag | EdgeFlags::PARENT, k0.change, k0.end, introduced_by);let b = txn.del_graph(graph, &k1, Some(&v1))?;{if let Some(&ee) = txn.get_graph(graph, &k1, Some(&v1))? {if ee == v1 {txn.debug(graph, ".3");panic!("Not deleted: {:?} {:?}", k1, v1);}}}if a != b {txn.debug(graph, ".2"); - edit in libpijul/src/pristine/mod.rs at line 1724
let gaeul = ChangeId::from_base32(b"GAEULYDRSLJSC").unwrap();let has_gaeul1 = {let v = Vertex {change: gaeul,start: ChangePosition(L64(1677892)),end: ChangePosition(L64(1677893)),};let e = SerializedEdge::new(EdgeFlags::PSEUDO | EdgeFlags::PARENT,gaeul,ChangePosition(L64(1677837)),ChangeId::ROOT,);if let Some(&ee) = txn.get_graph(graph, &v, Some(&e))? {ee == e} else {false}}; - edit in libpijul/src/pristine/mod.rs at line 1757
let has_gaeul1_ = {let v = Vertex {change: gaeul,start: ChangePosition(L64(1677892)),end: ChangePosition(L64(1677893)),};let e = SerializedEdge::new(EdgeFlags::PSEUDO | EdgeFlags::PARENT,gaeul,ChangePosition(L64(1677837)),ChangeId::ROOT,);if let Some(&ee) = txn.get_graph(graph, &v, Some(&e))? {ee == e} else {false}};if has_gaeul1 && !has_gaeul1_ {txn.debug(graph, ".GAEUL");panic!("GAEULT");} - replacement in libpijul/src/pristine/mod.rs at line 1933
let mut h = HashMap::new();let mut h = HashMap::default(); - replacement in libpijul/src/pristine/mod.rs at line 1954[20.3821]→[20.2245:2277](∅→∅),[20.56163]→[20.2245:2277](∅→∅),[20.77260]→[20.2245:2277](∅→∅),[20.2245]→[20.2245:2277](∅→∅)
let mut h = HashSet::new();let mut h = HashSet::default(); - replacement in libpijul/src/pristine/inode_metadata.rs at line 8
use byteorder::{BigEndian, ByteOrder, WriteBytesExt};use byteorder::{BigEndian, ByteOrder}; - edit in libpijul/src/pristine/inode_metadata.rs at line 58
}pub fn write<W: std::io::Write>(&self, mut w: W) -> std::io::Result<()> {w.write_u16::<BigEndian>(self.0) - edit in libpijul/src/pristine/hash.rs at line 160
}impl std::hash::Hash for SerializedHash {fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {self.t.hash(hasher);if self.t == HashAlgorithm::Blake3 as u8 {unsafe { self.h.blake3.hash(hasher) }}} - edit in libpijul/src/pristine/hash.rs at line 262[20.117151]
impl SerializedHash {pub fn size(b: &[u8]) -> usize {if b[0] == HashAlgorithm::Blake3 as u8 {1 + BLAKE3_BYTES} else if b[0] == HashAlgorithm::None as u8 {1} else {panic!("Unknown hash algorithm {:?}", b[0])}}pub unsafe fn size_from_ptr(b: *const u8) -> usize {if *b == HashAlgorithm::Blake3 as u8 {1 + BLAKE3_BYTES} else if *b == HashAlgorithm::None as u8 {1} else {panic!("Unknown hash algorithm {:?}", *b)}}} - edit in libpijul/src/output/output.rs at line 11
use crate::{HashMap, HashSet}; - replacement in libpijul/src/output/output.rs at line 14
use std::collections::{HashMap, HashSet};use std::sync::{Arc, RwLock}; - replacement in libpijul/src/output/output.rs at line 32
pub fn output_repository_no_pending<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(repo: &mut R,pub fn output_repository_no_pending<T: MutTxnT + Send + Sync + 'static,R: WorkingCopy + Send + Sync + 'static,P: ChangeStore + Send + Clone + 'static,>(repo: Arc<R>, - replacement in libpijul/src/output/output.rs at line 39
txn: &mut T,channel: &mut ChannelRef<T>,txn: Arc<RwLock<T>>,channel: ChannelRef<T>, - replacement in libpijul/src/output/output.rs at line 44
) -> Result<Vec<Conflict>, OutputError<P::Error, T::GraphError, R::Error>> {n_workers: usize,) -> Result<Vec<Conflict>, OutputError<P::Error, T::GraphError, R::Error>>whereT::Channel: Send + Sync + 'static,{ - replacement in libpijul/src/output/output.rs at line 53
&mut channel.r.borrow_mut(),channel, - edit in libpijul/src/output/output.rs at line 58
n_workers, - edit in libpijul/src/output/output.rs at line 62
fn output_loop<T: TreeMutTxnT + ChannelMutTxnT + GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>,R: WorkingCopy + 'static,P: ChangeStore + Clone + Send,>(repo: Arc<R>,changes: &P,txn: Arc<RwLock<T>>,channel: ChannelRef<T>,work: Arc<crossbeam_deque::Injector<(OutputItem, String)>>,stop: Arc<std::sync::atomic::AtomicBool>,t: usize,) -> Result<(), OutputError<P::Error, T::GraphError, R::Error>> {use crossbeam_deque::*;// let backoff = crossbeam_utils::Backoff::new();// let w: Worker<(OutputItem, String)> = Worker::new_fifo();loop {match work.steal() {Steal::Success((item, path)) => {let mut conflicts = Vec::new();info!("Outputting {:?}, on thread {}", path, t);output_item::<_, _, R>(txn.clone(),channel.clone(),changes,&item,&mut conflicts,&repo,&path,)?;debug!("setting permissions for {:?}", path);repo.set_permissions(&path, item.meta.permissions()).map_err(OutputError::WorkingCopy)?;debug!("output {:?}", path);}Steal::Retry => {}Steal::Empty => {if stop.load(std::sync::atomic::Ordering::Relaxed) {break;}}}}Ok(())} - replacement in libpijul/src/output/output.rs at line 110[20.673568]→[20.57617:57710](∅→∅),[20.57710]→[20.673584:673624](∅→∅),[20.82074]→[20.673584:673624](∅→∅),[20.673584]→[20.673584:673624](∅→∅)
T: TreeMutTxnT + ChannelMutTxnT + GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>,R: WorkingCopy,P: ChangeStore,T: TreeMutTxnT+ ChannelMutTxnT+ GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>+ Send+ Sync+ 'static,R: WorkingCopy + Send + Sync + 'static,P: ChangeStore + Send + Clone + 'static, - replacement in libpijul/src/output/output.rs at line 120
repo: &mut R,repo: Arc<R>, - replacement in libpijul/src/output/output.rs at line 122
txn: &mut T,channel: &mut T::Channel,txn: Arc<RwLock<T>>,channel: ChannelRef<T>, - replacement in libpijul/src/output/output.rs at line 128
) -> Result<Vec<Conflict>, OutputError<P::Error, T::TreeError, R::Error>> {n_workers: usize,) -> Result<Vec<Conflict>, OutputError<P::Error, T::TreeError, R::Error>>whereT::Channel: Send + Sync + 'static,{let work = Arc::new(crossbeam_deque::Injector::new());let stop = Arc::new(std::sync::atomic::AtomicBool::new(false));let mut threads = Vec::new();for t in 0..n_workers - 1 {let repo = repo.clone();let work = work.clone();let stop = stop.clone();let txn = txn.clone();let channel = channel.clone();let changes = changes.clone();threads.push(std::thread::spawn(move || {output_loop(repo, &changes, txn, channel, work, stop, t + 1)}))} - replacement in libpijul/src/output/output.rs at line 149
let mut files = HashMap::new();let mut next_files = HashMap::new();let mut files = HashMap::default();let mut next_files = HashMap::default(); - replacement in libpijul/src/output/output.rs at line 154
let dead = collect_dead_files(txn, txn.graph(channel), pending_change_id, Inode::ROOT)?;let dead = {let txn_ = txn.read().unwrap();let channel = channel.read().unwrap();let graph = txn_.graph(&*channel);collect_dead_files(&*txn_, graph, pending_change_id, Inode::ROOT)?}; - replacement in libpijul/src/output/output.rs at line 161
kill_dead_files::<T, R, P>(txn, repo, &dead)?;if !dead.is_empty() {let mut txn = txn.write().unwrap();kill_dead_files::<T, R, P>(&mut *txn, repo.clone(), &dead)?;} - replacement in libpijul/src/output/output.rs at line 167[20.1225]→[20.674094:674146](∅→∅),[20.674094]→[20.674094:674146](∅→∅),[20.674146]→[20.4336:4364](∅→∅),[20.4364]→[20.674163:674278](∅→∅),[20.57769]→[20.674163:674278](∅→∅),[20.82176]→[20.674163:674278](∅→∅),[20.674163]→[20.674163:674278](∅→∅)
collect_children(txn,changes,txn.graph(channel),Position::ROOT,Inode::ROOT,"",next_prefix_basename,&mut files,)?;{let txn = txn.read().unwrap();let channel = channel.read().unwrap();collect_children(&*txn,&*changes,txn.graph(&*channel),Position::ROOT,Inode::ROOT,"",next_prefix_basename,&mut files,)?;} - replacement in libpijul/src/output/output.rs at line 182
let mut done_inodes = HashSet::new();let mut done_vertices = HashMap::new();let mut done_inodes = HashSet::default();let mut done_vertices = HashMap::default(); - replacement in libpijul/src/output/output.rs at line 194[20.675153]→[20.9361:9401](∅→∅),[20.9401]→[20.119754:119824](∅→∅),[20.4532]→[20.675254:675284](∅→∅),[20.57935]→[20.675254:675284](∅→∅),[20.119824]→[20.675254:675284](∅→∅),[20.675254]→[20.675254:675284](∅→∅),[20.675284]→[20.741:767](∅→∅),[20.767]→[20.119825:119904](∅→∅),[20.119904]→[20.845:906](∅→∅),[20.845]→[20.845:906](∅→∅),[20.906]→[20.675450:675466](∅→∅),[20.4622]→[20.675450:675466](∅→∅),[20.58024]→[20.675450:675466](∅→∅),[20.675450]→[20.675450:675466](∅→∅)
b.sort_unstable_by(|u, v| {txn.get_changeset(txn.changes(&channel), &u.0.change).unwrap().cmp(&txn.get_changeset(txn.changes(&channel), &v.0.change).unwrap(),)});{let txn = txn.read().unwrap();let channel = channel.read().unwrap();b.sort_unstable_by(|u, v| {txn.get_changeset(txn.changes(&channel), &u.0.change).unwrap().cmp(&txn.get_changeset(txn.changes(&channel), &v.0.change).unwrap(),)});} - replacement in libpijul/src/output/output.rs at line 223
let output_item_inode =let output_item_inode = {let txn = txn.read().unwrap(); - replacement in libpijul/src/output/output.rs at line 229
};}}; - replacement in libpijul/src/output/output.rs at line 258
txn,repo,txn.clone(),repo.clone(), - edit in libpijul/src/output/output.rs at line 266
debug!("inode = {:?}", inode); - replacement in libpijul/src/output/output.rs at line 268
let dead =collect_dead_files(txn, txn.graph(channel), pending_change_id, inode)?;let dead = {let txn_ = txn.read().unwrap();let channel = channel.read().unwrap();collect_dead_files(&*txn_, txn_.graph(&*channel), pending_change_id, inode)?}; - replacement in libpijul/src/output/output.rs at line 274
kill_dead_files::<T, R, P>(txn, repo, &dead)?;if !dead.is_empty() {let mut txn = txn.write().unwrap();kill_dead_files::<T, R, P>(&mut *txn, repo.clone(), &dead)?;} - replacement in libpijul/src/output/output.rs at line 283[20.20515]→[20.678140:678240](∅→∅),[20.678140]→[20.678140:678240](∅→∅),[20.678240]→[20.4720:4764](∅→∅),[20.4764]→[20.678273:678463](∅→∅),[20.58195]→[20.678273:678463](∅→∅),[20.82799]→[20.678273:678463](∅→∅),[20.678273]→[20.678273:678463](∅→∅),[20.678463]→[20.82800:82824](∅→∅)
collect_children(txn,changes,txn.graph(channel),output_item.pos,inode,&path,next_prefix_basename,&mut next_files,)?;{let txn = txn.read().unwrap();let channel = channel.read().unwrap();collect_children(&*txn,&*changes,txn.graph(&*channel),output_item.pos,inode,&path,next_prefix_basename,&mut next_files,)?;}debug!("setting permissions for {:?}", path);repo.set_permissions(&path, output_item.meta.permissions()).map_err(OutputError::WorkingCopy)?; - replacement in libpijul/src/output/output.rs at line 301[20.678511]→[20.892:962](∅→∅),[20.962]→[20.2082:2517](∅→∅),[20.2082]→[20.2082:2517](∅→∅),[20.2517]→[20.1244:1297](∅→∅)
if needs_output(repo, if_modified_after, &path) {repo.write_file(&path, |w: &mut dyn std::io::Write| {output_file::<_, _, R>(txn,channel,changes,&output_item,&mut conflicts,w,)}).map_err(OutputError::from)?if needs_output(repo.as_ref(), if_modified_after, &path) {work.push((output_item.clone(), path.clone())); - edit in libpijul/src/output/output.rs at line 312
repo.set_permissions(&path, output_item.meta.permissions()).map_err(OutputError::WorkingCopy)?; - edit in libpijul/src/output/output.rs at line 318
}stop.store(true, std::sync::atomic::Ordering::Relaxed);let o = output_loop(repo, changes, txn, channel, work, stop, 0);for t in threads {t.join().unwrap()? - edit in libpijul/src/output/output.rs at line 325
o?; - replacement in libpijul/src/output/output.rs at line 359[20.21147]→[20.679732:679767](∅→∅),[20.82892]→[20.679732:679767](∅→∅),[20.679732]→[20.679732:679767](∅→∅)
txn: &mut T,repo: &mut R,txn: Arc<RwLock<T>>,repo: Arc<R>, - replacement in libpijul/src/output/output.rs at line 377
if let Some(ref current_name) = inode_filename(txn, inode)? {let txn_ = txn.read().unwrap();if let Some(ref current_name) = inode_filename(&*txn_, inode)? { - replacement in libpijul/src/output/output.rs at line 381
let parent = txn.get_revtree(&inode, None)?.unwrap().to_owned();std::mem::drop(txn_);let mut txn_ = txn.write().unwrap();let parent = txn_.get_revtree(&inode, None)?.unwrap().to_owned(); - replacement in libpijul/src/output/output.rs at line 385
del_tree_with_rev(txn, &parent, &inode)?;del_tree_with_rev(&mut *txn_, &parent, &inode)?; - replacement in libpijul/src/output/output.rs at line 403
if let Some(&inode) = txn.get_tree(&file_id, None)? {crate::fs::rec_delete(txn, &file_id, inode, true)if let Some(&inode) = txn_.get_tree(&file_id, None)? {crate::fs::rec_delete(&mut *txn_, &file_id, inode, true) - replacement in libpijul/src/output/output.rs at line 407
put_inodes_with_rev(txn, &inode, &output_item.pos)?;put_tree_with_rev(txn, &file_id, &inode)?;put_inodes_with_rev(&mut *txn_, &inode, &output_item.pos)?;put_tree_with_rev(&mut *txn_, &file_id, &inode)?; - replacement in libpijul/src/output/output.rs at line 412
if let Some(&inode) = txn.get_tree(&file_id, None)? {crate::fs::rec_delete(txn, &file_id, inode, true)std::mem::drop(txn_);let mut txn_ = txn.write().unwrap();if let Some(&inode) = txn_.get_tree(&file_id, None)? {crate::fs::rec_delete(&mut *txn_, &file_id, inode, true) - replacement in libpijul/src/output/output.rs at line 418
put_inodes_with_rev(txn, &inode, &output_item.pos)?;put_tree_with_rev(txn, &file_id, &inode)?;put_inodes_with_rev(&mut *txn_, &inode, &output_item.pos)?;put_tree_with_rev(&mut *txn_, &file_id, &inode)?; - replacement in libpijul/src/output/output.rs at line 423
if let Some(&inode) = txn.get_tree(&file_id, None)? {crate::fs::rec_delete(txn, &file_id, inode, true).map_err(PristineOutputError::Fs)?;let mut txn_ = txn.write().unwrap();if let Some(&inode) = txn_.get_tree(&file_id, None)? {crate::fs::rec_delete(&mut *txn_, &file_id, inode, true).map_err(PristineOutputError::Fs)?; - replacement in libpijul/src/output/output.rs at line 428
let inode = create_new_inode(txn)?;let inode = create_new_inode(&mut *txn_)?; - replacement in libpijul/src/output/output.rs at line 433
put_inodes_with_rev(txn, &inode, &output_item.pos)?;put_tree_with_rev(txn, &file_id, &inode)?;put_inodes_with_rev(&mut *txn_, &inode, &output_item.pos)?;put_tree_with_rev(&mut *txn_, &file_id, &inode)?; - replacement in libpijul/src/output/output.rs at line 440
txn.put_tree(&path_id, &inode)?;txn_.put_tree(&path_id, &inode)?; - replacement in libpijul/src/output/output.rs at line 446[20.22422]→[20.58196:58278](∅→∅),[20.22482]→[20.683010:683027](∅→∅),[20.58278]→[20.683010:683027](∅→∅),[20.84029]→[20.683010:683027](∅→∅),[20.683010]→[20.683010:683027](∅→∅),[20.683027]→[20.58279:58309](∅→∅)
fn output_file<T: ChannelMutTxnT + GraphMutTxnT, P: ChangeStore, W: WorkingCopy>(txn: &mut T,channel: &mut T::Channel,fn output_item<T: ChannelMutTxnT + GraphMutTxnT, P: ChangeStore, W: WorkingCopy>(txn: Arc<RwLock<T>>,channel: ChannelRef<T>, - replacement in libpijul/src/output/output.rs at line 452
w: &mut dyn std::io::Write,repo: &W,path: &str, - edit in libpijul/src/output/output.rs at line 455[20.84096]→[20.4887:4956](∅→∅),[20.4956]→[20.683261:683347](∅→∅),[20.58378]→[20.683261:683347](∅→∅),[20.84161]→[20.683261:683347](∅→∅),[20.683261]→[20.683261:683347](∅→∅)
let mut l = retrieve(txn, txn.graph(channel), output_item.pos)?;let mut f = vertex_buffer::ConflictsWriter::new(w, &output_item.path, conflicts); - replacement in libpijul/src/output/output.rs at line 456
alive::output_graph(changes, txn, channel, &mut f, &mut l, &mut forward).map_err(PristineOutputError::from)?;{let txn = txn.read().unwrap();let channel = channel.read().unwrap();let mut l = retrieve(&*txn, txn.graph(&*channel), output_item.pos)?;let w = repo.write_file(&path).map_err(OutputError::WorkingCopy)?;let mut f = vertex_buffer::ConflictsWriter::new(w, &output_item.path, conflicts);alive::output_graph(changes, &*txn, &*channel, &mut f, &mut l, &mut forward).map_err(PristineOutputError::from)?;}if forward.is_empty() {return Ok(());}let mut txn = txn.write().unwrap();let mut channel = channel.write().unwrap(); - replacement in libpijul/src/output/output.rs at line 472
let dest = *txn.find_block(txn.graph(channel), edge.dest()).unwrap();let dest = *txn.find_block(txn.graph(&*channel), edge.dest()).unwrap(); - replacement in libpijul/src/output/output.rs at line 475
txn,T::graph_mut(channel),&mut *txn,T::graph_mut(&mut *channel), - replacement in libpijul/src/output/output.rs at line 486[20.22806]→[20.84418:84510](∅→∅),[20.84510]→[20.683894:683911](∅→∅),[20.683894]→[20.683894:683911](∅→∅)
fn collect_dead_files<T: TreeMutTxnT + GraphTxnT<GraphError = <T as TreeTxnT>::TreeError>>(txn: &mut T,fn collect_dead_files<T: TreeTxnT + GraphTxnT<GraphError = <T as TreeTxnT>::TreeError>>(txn: &T, - replacement in libpijul/src/output/output.rs at line 494
let mut dead = HashMap::new();let mut dead = HashMap::default(); - replacement in libpijul/src/output/output.rs at line 533
repo: &mut W,repo: Arc<W>, - replacement in libpijul/src/output/mod.rs at line 4
use std::collections::HashMap;use crate::HashMap; - replacement in libpijul/src/output/mod.rs at line 15
W: std::error::Error + 'static,W: std::error::Error + Send + 'static, - edit in libpijul/src/output/mod.rs at line 34
}use crate::working_copy::WriteError;impl<C: std::error::Error, T: std::error::Error + 'static, W: std::error::Error>OutputError<C, T, W>{fn from(e: WriteError<Self>) -> Self {match e {WriteError::Io(e) => OutputError::Pristine(PristineOutputError::Io(e)),WriteError::E(e) => e,}} - replacement in libpijul/src/output/mod.rs at line 44
impl<C: std::error::Error, T: std::error::Error + 'static, W: std::error::Error> From<TxnErr<T>>for OutputError<C, T, W>impl<C: std::error::Error, T: std::error::Error + 'static, W: std::error::Error + Send>From<TxnErr<T>> for OutputError<C, T, W> - replacement in libpijul/src/output/mod.rs at line 80[20.24779]→[20.686366:686383](∅→∅),[20.86195]→[20.686366:686383](∅→∅),[20.686366]→[20.686366:686383](∅→∅)
#[derive(Debug)]#[derive(Debug, Clone)] - edit in libpijul/src/output/mod.rs at line 192
}pub fn output_file<T: TreeTxnT + ChannelTxnT,C: crate::changestore::ChangeStore,V: crate::vertex_buffer::VertexBuffer,>(changes: &C,txn: &T,channel: &T::Channel,v0: Position<ChangeId>,out: &mut V,) -> Result<(), FileError<C::Error, T::GraphError>> {let mut forward = Vec::new();let mut graph = crate::alive::retrieve(&*txn, txn.graph(&*channel), v0)?;crate::alive::output_graph(changes, &*txn, &*channel, out, &mut graph, &mut forward)?;Ok(()) - edit in libpijul/src/output/archive.rs at line 4
use crate::{HashMap, HashSet}; - edit in libpijul/src/output/archive.rs at line 6
use std::collections::{HashMap, HashSet}; - replacement in libpijul/src/output/archive.rs at line 146[20.25953]→[20.692403:692439](∅→∅),[20.88013]→[20.692403:692439](∅→∅),[20.692403]→[20.692403:692439](∅→∅)
let channel = channel.borrow();let channel = channel.read().unwrap(); - replacement in libpijul/src/output/archive.rs at line 148
let mut files = HashMap::new();let mut next_files = HashMap::new();let mut files = HashMap::default();let mut next_files = HashMap::default(); - replacement in libpijul/src/output/archive.rs at line 162
let mut done = HashMap::new();let mut done_inodes = HashSet::new();let mut done = HashMap::default();let mut done_inodes = HashSet::default(); - edit in libpijul/src/missing_context.rs at line 5
use crate::{HashMap, HashSet}; - edit in libpijul/src/missing_context.rs at line 7
use std::collections::{HashMap, HashSet}; - replacement in libpijul/src/missing_context.rs at line 48
let mut ids = HashMap::new();let mut ids = HashMap::default(); - replacement in libpijul/src/missing_context.rs at line 185[20.11543]→[20.704175:704213](∅→∅),[20.89883]→[20.704175:704213](∅→∅),[20.704175]→[20.704175:704213](∅→∅)
let mut unknown = HashSet::new();let mut unknown = HashSet::default(); - replacement in libpijul/src/missing_context.rs at line 236
unknown_parents: Vec<(pub(crate) unknown_parents: Vec<( - replacement in libpijul/src/missing_context.rs at line 243
parents: HashSet<SerializedEdge>,pseudo: Vec<(Vertex<ChangeId>, SerializedEdge)>,pub(crate) parents: HashSet<SerializedEdge>,pub(crate) pseudo: Vec<(Vertex<ChangeId>, SerializedEdge)>, - edit in libpijul/src/missing_context.rs at line 419[20.27318]→[20.712749:712811](∅→∅),[20.59459]→[20.712749:712811](∅→∅),[20.92306]→[20.712749:712811](∅→∅),[20.124988]→[20.712749:712811](∅→∅),[20.712749]→[20.712749:712811](∅→∅),[20.712811]→[20.92307:92365](∅→∅),[20.92365]→[20.712864:712881](∅→∅),[20.712864]→[20.712864:712881](∅→∅),[20.712881]→[20.92366:92394](∅→∅),[20.92394]→[20.712911:713044](∅→∅),[20.712911]→[20.712911:713044](∅→∅),[20.713044]→[20.92395:92440](∅→∅),[20.27359]→[20.713075:713184](∅→∅),[20.92440]→[20.713075:713184](∅→∅),[20.713075]→[20.713075:713184](∅→∅),[20.713184]→[20.59460:59594](∅→∅),[20.59594]→[20.713316:713358](∅→∅),[20.713316]→[20.713316:713358](∅→∅),[20.713358]→[20.124989:125054](∅→∅),[20.59508]→[20.59660:59770](∅→∅),[20.125054]→[20.59660:59770](∅→∅),[20.59660]→[20.59660:59770](∅→∅),[20.59770]→[20.713458:713587](∅→∅),[20.713458]→[20.713458:713587](∅→∅),[20.713587]→[20.92441:92478](∅→∅),[20.92478]→[20.125055:125132](∅→∅),[20.125132]→[20.713672:713712](∅→∅),[20.713672]→[20.713672:713712](∅→∅),[20.713712]→[20.125133:125229](∅→∅),[20.125229]→[20.713805:713845](∅→∅),[20.713805]→[20.713805:713845](∅→∅),[20.713845]→[20.125230:125284](∅→∅),[20.125284]→[20.713897:713956](∅→∅),[20.713897]→[20.713897:713956](∅→∅),[20.713956]→[20.125285:125368](∅→∅),[20.92552]→[20.714028:714063](∅→∅),[20.125368]→[20.714028:714063](∅→∅),[20.714028]→[20.714028:714063](∅→∅),[20.714063]→[20.59771:59819](∅→∅),[20.59819]→[20.125369:125429](∅→∅)
}}}}Ok(())}pub(crate) fn collect_zombie_context<T: GraphMutTxnT, K>(txn: &mut T,channel: &mut T::Graph,ws: &mut Workspace,inode: Position<Option<Hash>>,n: &NewEdge<Option<Hash>>,change_id: ChangeId,mut known: K,) -> Result<(), MissingError<T::GraphError>>whereK: FnMut(Hash) -> bool,{if n.flag.contains(EdgeFlags::FOLDER) {return Ok(());}let mut pos = internal_pos(txn, &n.to.start_pos(), change_id)?;let end_pos = internal_pos(txn, &n.to.end_pos(), change_id)?;let mut unknown_parents = Vec::new();while let Ok(&dest_vertex) = txn.find_block(&channel, pos) {debug!("collect zombie context: {:?}", dest_vertex);for v in iter_adjacent(txn,channel,dest_vertex,EdgeFlags::empty(),EdgeFlags::all() - EdgeFlags::DELETED,)? {let v = v?;if v.introduced_by() == change_id || v.dest().change.is_root() {continue;}if v.introduced_by().is_root() {ws.pseudo.push((dest_vertex, *v));continue;}if v.flag().contains(EdgeFlags::PARENT) {// Unwrap ok, since `v` is in the channel.let intro = txn.get_external(&v.introduced_by())?.unwrap().into();if !known(intro) {debug!("unknown: {:?}", v);unknown_parents.push((dest_vertex, *v)) - edit in libpijul/src/missing_context.rs at line 420[20.714140]→[20.714140:714391](∅→∅),[20.714391]→[20.92553:92582](∅→∅),[20.92582]→[20.714415:714432](∅→∅),[20.714415]→[20.714415:714432](∅→∅),[20.714432]→[20.92583:92611](∅→∅),[20.92611]→[20.714462:714567](∅→∅),[20.714462]→[20.714462:714567](∅→∅),[20.714567]→[20.125430:125482](∅→∅),[20.125482]→[20.92612:92659](∅→∅),[20.714609]→[20.92612:92659](∅→∅),[20.27402]→[20.714642:714691](∅→∅),[20.92659]→[20.714642:714691](∅→∅),[20.714642]→[20.714642:714691](∅→∅),[20.714691]→[20.125483:125543](∅→∅),[20.125543]→[20.17857:17941](∅→∅),[20.17941]→[20.715147:715192](∅→∅),[20.125614]→[20.715147:715192](∅→∅),[20.715147]→[20.715147:715192](∅→∅),[20.715192]→[20.342:410](∅→∅),[20.410]→[20.715438:715461](∅→∅),[20.715438]→[20.715438:715461](∅→∅),[20.715461]→[20.125615:125687](∅→∅),[20.59638]→[20.715532:715608](∅→∅),[20.59951]→[20.715532:715608](∅→∅),[20.125687]→[20.715532:715608](∅→∅),[20.715532]→[20.715532:715608](∅→∅),[20.715608]→[20.59952:60013](∅→∅),[20.60013]→[20.715648:715820](∅→∅),[20.715648]→[20.715648:715820](∅→∅),[20.715820]→[20.92660:92680](∅→∅),[20.27467]→[20.715840:715906](∅→∅),[20.92680]→[20.715840:715906](∅→∅),[20.715840]→[20.715840:715906](∅→∅)
}}zombify(txn, channel, ws, change_id, inode, n.flag, &unknown_parents)?;if dest_vertex.end < end_pos.pos {pos.pos = dest_vertex.end} else {break;}}Ok(())}fn zombify<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,ws: &mut Workspace,change_id: ChangeId,inode: Position<Option<Hash>>,flag: EdgeFlags,unknown: &[(Vertex<ChangeId>, SerializedEdge)],) -> Result<(), MissingError<T::GraphError>> {for &(dest_vertex, edge) in unknown.iter() {let p = *txn.find_block_end(channel, edge.dest())?;ws.unknown_parents.push((dest_vertex, p, inode, edge.flag()));let fold = flag & EdgeFlags::FOLDER;debug!("zombify p {:?}, dest_vertex {:?}", p, dest_vertex);let mut v = p;while let Ok(&u) = txn.find_block_end(channel, v.start_pos()) {if u != v {debug!("u = {:?}, v = {:?}", u, v);put_graph_with_rev(txn,channel,EdgeFlags::DELETED | EdgeFlags::BLOCK | fold,u,v,change_id,)?;v = u} else {break; - edit in libpijul/src/missing_context.rs at line 422[20.715930]→[20.715930:715979](∅→∅),[20.715979]→[20.60014:60068](∅→∅),[20.60068]→[20.716020:716138](∅→∅),[20.716020]→[20.716020:716138](∅→∅),[20.716138]→[20.92681:92728](∅→∅),[20.92728]→[20.125688:125792](∅→∅),[20.125792]→[20.716251:716367](∅→∅),[20.716251]→[20.716251:716367](∅→∅),[20.716367]→[20.125793:125869](∅→∅),[20.59712]→[20.716440:716506](∅→∅),[20.60143]→[20.716440:716506](∅→∅),[20.125869]→[20.716440:716506](∅→∅),[20.716440]→[20.716440:716506](∅→∅),[20.716506]→[20.125870:125929](∅→∅),[20.125929]→[20.716563:716619](∅→∅),[20.716563]→[20.716563:716619](∅→∅),[20.716619]→[20.92729:92809](∅→∅),[20.27592]→[20.716698:716708](∅→∅),[20.60224]→[20.716698:716708](∅→∅),[20.92809]→[20.716698:716708](∅→∅),[20.716698]→[20.716698:716708](∅→∅)
// Zombify the first chunk of the split.for parent in iter_adjacent(txn,channel,v,EdgeFlags::PARENT,EdgeFlags::all() - EdgeFlags::DELETED,)? {let parent = parent?;if !parent.flag().contains(EdgeFlags::PSEUDO) {ws.parents.insert(*parent);}}debug!("ws.parents = {:?}", ws.parents);for parent in ws.parents.drain() {let parent_dest = *txn.find_block_end(channel, parent.dest())?;let mut flag = EdgeFlags::DELETED | EdgeFlags::BLOCK;if parent.flag().contains(EdgeFlags::FOLDER) {flag |= EdgeFlags::FOLDER}put_graph_with_rev(txn, channel, flag, parent_dest, v, change_id)?;} - replacement in libpijul/src/lib.rs at line 105
use std::collections::HashMap;// Making hashmaps deterministic (for testing)pub type HashMap<K, V> =std::collections::HashMap<K, V, std::hash::BuildHasherDefault<twox_hash::XxHash64>>;pub type HashSet<K> =std::collections::HashSet<K, std::hash::BuildHasherDefault<twox_hash::XxHash64>>;// pub type HashMap<K, V> = std::collections::HashMap<K, V, std::collections::hash_map::RandomState>;// pub type HashSet<K> = std::collections::HashSet<K, std::collections::hash_map::RandomState>; - replacement in libpijul/src/lib.rs at line 168
channel: &mut pristine::ChannelRef<Self>,channel: &pristine::ChannelRef<Self>, - replacement in libpijul/src/lib.rs at line 179
channel: &mut crate::pristine::ChannelRef<Self>,channel: &crate::pristine::ChannelRef<Self>, - edit in libpijul/src/lib.rs at line 187
/* - replacement in libpijul/src/lib.rs at line 203
&mut channel.borrow_mut(),&mut channel.lock().unwrap(), - replacement in libpijul/src/lib.rs at line 213
channel: &mut pristine::ChannelRef<Self>,channel: &pristine::ChannelRef<Self>, - replacement in libpijul/src/lib.rs at line 225
&mut channel.borrow_mut(),&mut channel.lock().unwrap(), - edit in libpijul/src/lib.rs at line 232
*/ - replacement in libpijul/src/lib.rs at line 242
hasher.update(&recorded.contents);hasher.update(&recorded.contents.lock().unwrap()[..]); - replacement in libpijul/src/lib.rs at line 261
contents: recorded.contents,contents: std::sync::Arc::try_unwrap(recorded.contents).unwrap().into_inner().unwrap(), - replacement in libpijul/src/lib.rs at line 276
channel: &mut pristine::ChannelRef<Self>,channel: &pristine::ChannelRef<Self>, - edit in libpijul/src/lib.rs at line 282
/* - edit in libpijul/src/lib.rs at line 303
*/ - edit in libpijul/src/lib.rs at line 333[20.727226]→[20.727226:727232](∅→∅),[20.727232]→[20.126258:126265](∅→∅),[20.126265]→[20.727233:727334](∅→∅),[20.727233]→[20.727233:727334](∅→∅),[20.727334]→[20.29300:29376](∅→∅),[20.29376]→[20.95239:95307](∅→∅),[20.95307]→[20.29439:29486](∅→∅),[20.29439]→[20.29439:29486](∅→∅),[20.29486]→[20.95308:95356](∅→∅),[20.95356]→[20.29487:29669](∅→∅),[20.727465]→[20.29487:29669](∅→∅),[20.29669]→[20.727603:727620](∅→∅),[20.727603]→[20.727603:727620](∅→∅),[20.727620]→[20.29670:29741](∅→∅),[20.29741]→[20.727740:727750](∅→∅),[20.727740]→[20.727740:727750](∅→∅)
}/*#[cfg(feature = "dump")]fn channel_from_dump<'a>(&'a mut self,name: &str,) -> Result<pristine::channel_dump::ChannelFromDump<'a, Self>,pristine::channel_dump::ChannelDumpError<Self::GraphError>,> {use pristine::channel_dump::*;if self.load_channel(name)?.is_none() {let channel = pristine::MutTxnT::open_or_create_channel(self, name).map_err(ChannelDumpError::Txn)?;Ok(ChannelFromDump::new(self, channel))} else {Err(ChannelDumpError::ChannelNameExists(name.to_string()))} - replacement in libpijul/src/lib.rs at line 334
*/ - replacement in libpijul/src/lib.rs at line 374
for x in pristine::changeid_rev_log(self, &channel.borrow(), None)? {for x in pristine::changeid_rev_log(self, &channel.read().unwrap(), None)? { - replacement in libpijul/src/lib.rs at line 419
self.get_changeset(self.changes(&channel.borrow()), cid)self.get_changeset(self.changes(&channel.read().unwrap()), cid) - replacement in libpijul/src/lib.rs at line 505
self.rev_changes(&channel.borrow()),self.rev_changes(&channel.read().unwrap()), - replacement in libpijul/src/lib.rs at line 528
self.get_changeset(self.changes(&channel.borrow()), h)self.get_changeset(self.changes(&channel.read().unwrap()), h) - replacement in libpijul/src/lib.rs at line 558
fs::find_path(changes, self, &channel.borrow(), false, position)fs::find_path(changes, self, &channel.read().unwrap(), false, position) - replacement in libpijul/src/lib.rs at line 571
fs::find_path(changes, self, &channel.borrow(), true, position)fs::find_path(changes, self, &channel.read().unwrap(), true, position) - replacement in libpijul/src/lib.rs at line 583[20.98933]→[20.98933:99004](∅→∅),[20.99004]→[20.733032:733275](∅→∅),[20.733032]→[20.733032:733275](∅→∅),[20.733275]→[20.99005:99074](∅→∅),[20.30231]→[20.733312:733390](∅→∅),[20.99074]→[20.733312:733390](∅→∅),[20.733312]→[20.733312:733390](∅→∅),[20.733390]→[20.5654:5728](∅→∅),[20.5728]→[20.733451:733552](∅→∅),[20.60580]→[20.733451:733552](∅→∅),[20.99143]→[20.733451:733552](∅→∅),[20.733451]→[20.733451:733552](∅→∅)
fs::follow_oldest_path(changes, self, &channel.borrow(), path)}fn output_file<C: changestore::ChangeStore, V: vertex_buffer::VertexBuffer>(&self,changes: &C,channel: &pristine::ChannelRef<Self>,v0: pristine::Position<pristine::ChangeId>,out: &mut V,) -> Result<(), output::FileError<C::Error, Self::GraphError>> {let mut forward = Vec::new();let channel = channel.borrow();let mut graph = alive::retrieve(self, self.graph(&channel), v0)?;alive::output_graph(changes, self, &channel, out, &mut graph, &mut forward)?;Ok(())fs::follow_oldest_path(changes, self, &channel.read().unwrap(), path) - replacement in libpijul/src/fs.rs at line 20
use std::collections::HashSet;use crate::HashSet; - replacement in libpijul/src/fs.rs at line 538
visited: HashSet::new(),visited: HashSet::default(), - replacement in libpijul/src/find_alive.rs at line 2
use std::collections::HashSet;use crate::HashSet; - replacement in libpijul/src/find_alive.rs at line 10
let mut visited = HashSet::new();let mut alive = HashSet::new();let mut visited = HashSet::default();let mut alive = HashSet::default(); - replacement in libpijul/src/find_alive.rs at line 51[20.15706]→[20.765386:765422](∅→∅),[20.32501]→[20.765386:765422](∅→∅),[20.115204]→[20.765386:765422](∅→∅),[20.765386]→[20.765386:765422](∅→∅)
let mut alive = HashSet::new();let mut alive = HashSet::default(); - replacement in libpijul/src/find_alive.rs at line 53
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/diff/vertex_buffer.rs at line 3
use std::collections::{HashMap, HashSet};use crate::{HashMap, HashSet}; - replacement in libpijul/src/diff/vertex_buffer.rs at line 69
missing_eol: HashSet::new(),missing_eol: HashSet::default(), - replacement in libpijul/src/diff/vertex_buffer.rs at line 76
marker: HashMap::new(),marker: HashMap::default(), - replacement in libpijul/src/diff/vertex_buffer.rs at line 83
solved_conflicts: HashSet::new(),solved_conflicts: HashSet::default(), - replacement in libpijul/src/diff/split.rs at line 1
use std::collections::HashSet;use crate::HashSet; - replacement in libpijul/src/diff/replace.rs at line 6
use crate::record::Builder;use std::collections::{HashMap, HashSet};use crate::record::Recorded;use crate::{HashMap, HashSet}; - replacement in libpijul/src/diff/replace.rs at line 19
side_ends: HashMap::new(),up: HashMap::new(),active: HashSet::new(),reorderings: HashMap::new(),side_ends: HashMap::default(),up: HashMap::default(),active: HashSet::default(),reorderings: HashMap::default(), - replacement in libpijul/src/diff/replace.rs at line 27
impl Builder {impl Recorded { - edit in libpijul/src/diff/replace.rs at line 42
let start = self.contents.lock().unwrap().len(); - replacement in libpijul/src/diff/replace.rs at line 55
self.rec.contents.len(),start, - replacement in libpijul/src/diff/replace.rs at line 61
let start = self.rec.contents.len();let mut contents = self.contents.lock().unwrap(); - replacement in libpijul/src/diff/replace.rs at line 63
self.rec.contents.extend(line.l);contents.extend(line.l); - replacement in libpijul/src/diff/replace.rs at line 65
let end = self.rec.contents.len();let end = contents.len(); - replacement in libpijul/src/diff/replace.rs at line 69
self.rec.contents.push(0);contents.push(0);std::mem::drop(contents); - replacement in libpijul/src/diff/replace.rs at line 81
match self.rec.actions.pop() {match self.actions.pop() { - replacement in libpijul/src/diff/replace.rs at line 84
self.rec.actions.push(Hunk::Replacement {self.actions.push(Hunk::Replacement { - replacement in libpijul/src/diff/replace.rs at line 91
self.rec.actions.push(Hunk::Edit { change: c, local })self.actions.push(Hunk::Edit { change: c, local }) - replacement in libpijul/src/diff/replace.rs at line 94
Some(c) => self.rec.actions.push(c),Some(c) => self.actions.push(c), - replacement in libpijul/src/diff/replace.rs at line 98
self.rec.actions.push(Hunk::Edit {self.actions.push(Hunk::Edit { - replacement in libpijul/src/diff/mod.rs at line 4
use crate::record::Builder;use crate::record::Recorded; - replacement in libpijul/src/diff/mod.rs at line 49
impl Builder {impl Recorded { - replacement in libpijul/src/diff/mod.rs at line 61[20.33418]→[20.794425:794500](∅→∅),[20.115955]→[20.794425:794500](∅→∅),[20.794425]→[20.794425:794500](∅→∅)
self.rec.largest_file = self.rec.largest_file.max(b.len() as u64);self.largest_file = self.largest_file.max(b.len() as u64); - replacement in libpijul/src/diff/mod.rs at line 149
self.rec.has_binary_files = true;self.has_binary_files = true; - replacement in libpijul/src/diff/mod.rs at line 151[5.129]→[20.797717:797895](∅→∅),[20.2352]→[20.797717:797895](∅→∅),[20.797717]→[20.797717:797895](∅→∅)
let pos = self.rec.contents.len();self.rec.contents.extend_from_slice(&b[..]);let pos_end = self.rec.contents.len();self.rec.contents.push(0);let mut contents = self.contents.lock().unwrap();let pos = contents.len();contents.extend_from_slice(&b[..]);let pos_end = contents.len();contents.push(0);std::mem::drop(contents); - replacement in libpijul/src/diff/mod.rs at line 202
self.rec.actions.push(Hunk::Edit {self.actions.push(Hunk::Edit { - replacement in libpijul/src/diff/mod.rs at line 213
self.rec.actions.push(Hunk::Replacement {self.actions.push(Hunk::Replacement { - replacement in libpijul/src/diff/delete.rs at line 8
use crate::record::Builder;use crate::record::Recorded; - replacement in libpijul/src/diff/delete.rs at line 10
impl Builder {impl Recorded { - replacement in libpijul/src/diff/delete.rs at line 46
impl Builder {impl Recorded { - replacement in libpijul/src/diff/delete.rs at line 58
self.rec.actions.push(Hunk::Edit {self.actions.push(Hunk::Edit { - replacement in libpijul/src/diff/delete.rs at line 70
self.rec.actions.push(Hunk::ResurrectZombies {self.actions.push(Hunk::ResurrectZombies { - replacement in libpijul/src/diff/delete.rs at line 208
impl Builder {impl Recorded { - replacement in libpijul/src/diff/delete.rs at line 227[20.813147]→[20.813147:813182](∅→∅),[20.813182]→[20.137170:137236](∅→∅),[20.137236]→[20.813248:813283](∅→∅),[20.813248]→[20.813248:813283](∅→∅)
self.rec.contents.push(0);let pos = ChangePosition(self.rec.contents.len().into());self.rec.contents.push(0);let mut contents = self.contents.lock().unwrap();contents.push(0);let pos = ChangePosition(contents.len().into());contents.push(0);let contents_len = contents.len();std::mem::drop(contents); - replacement in libpijul/src/diff/delete.rs at line 249
self.rec.contents.len(),contents_len, - replacement in libpijul/src/diff/delete.rs at line 253
self.rec.actions.push(Hunk::SolveOrderConflict {self.actions.push(Hunk::SolveOrderConflict { - replacement in libpijul/src/changestore/memory.rs at line 4
use std::collections::HashMap;use crate::HashMap; - edit in libpijul/src/changestore/filesystem.rs at line 4
use std::cell::{RefCell, RefMut}; - edit in libpijul/src/changestore/filesystem.rs at line 6
use std::sync::{Arc, Mutex, MutexGuard}; - replacement in libpijul/src/changestore/filesystem.rs at line 10
#[derive(Clone)]pub struct FileSystem(Arc<FileSystem_>);struct FileSystem_ {change_cache: Mutex<lru_cache::LruCache<ChangeId, Arc<Mutex<ChangeFile<'static>>>>>,pub struct FileSystem {change_cache: RefCell<lru_cache::LruCache<ChangeId, ChangeFile<'static>>>, - edit in libpijul/src/changestore/filesystem.rs at line 13
}impl Clone for FileSystem {fn clone(&self) -> Self {FileSystem {changes_dir: self.changes_dir.clone(),change_cache: RefCell::new(lru_cache::LruCache::new(CHANGE_CACHE_SIZE)),}} - replacement in libpijul/src/changestore/filesystem.rs at line 51
let mut path = self.0.changes_dir.clone();let mut path = self.changes_dir.clone(); - replacement in libpijul/src/changestore/filesystem.rs at line 72
FileSystem(Arc::new(FileSystem_ {FileSystem { - replacement in libpijul/src/changestore/filesystem.rs at line 74
change_cache: Mutex::new(lru_cache::LruCache::new(CHANGE_CACHE_SIZE)),}))change_cache: RefCell::new(lru_cache::LruCache::new(CHANGE_CACHE_SIZE)),} - replacement in libpijul/src/changestore/filesystem.rs at line 83
MutexGuard<lru_cache::LruCache<ChangeId, Arc<Mutex<ChangeFile<'static>>>>>,RefMut<lru_cache::LruCache<ChangeId, ChangeFile<'static>>>, - replacement in libpijul/src/changestore/filesystem.rs at line 86
let mut cache = self.0.change_cache.lock().unwrap();if !cache.contains_key(&change) {let mut change_cache = self.change_cache.borrow_mut();if !change_cache.contains_key(&change) { - edit in libpijul/src/changestore/filesystem.rs at line 90
debug!("changefile: {:?}", path); - replacement in libpijul/src/changestore/filesystem.rs at line 92
cache.insert(change, Arc::new(Mutex::new(p)));debug!("patch done");change_cache.insert(change, p); - replacement in libpijul/src/changestore/filesystem.rs at line 95
Ok(cache)Ok(change_cache) - replacement in libpijul/src/changestore/filesystem.rs at line 115
let mut f = tempfile::NamedTempFile::new_in(&self.0.changes_dir)?;let mut f = tempfile::NamedTempFile::new_in(&self.changes_dir)?; - replacement in libpijul/src/changestore/filesystem.rs at line 123
let mut cache = self.0.change_cache.lock().unwrap();cache.remove(change_id);self.change_cache.borrow_mut().remove(change_id); - replacement in libpijul/src/changestore/filesystem.rs at line 133
let mut cache = self.0.change_cache.lock().unwrap();let mut poisoned = false;if let Some(c) = cache.get_mut(change_id) {if let Ok(l) = c.lock() {return l.has_contents();} else {poisoned = true}}if poisoned {cache.remove(change_id);if let Some(l) = self.change_cache.borrow_mut().get_mut(change_id) {return l.has_contents(); - edit in libpijul/src/changestore/filesystem.rs at line 157
debug!("get_contents {:?}", key); - edit in libpijul/src/changestore/filesystem.rs at line 160
debug!("return 0"); - edit in libpijul/src/changestore/filesystem.rs at line 165
let mut p = p.lock().unwrap(); - edit in libpijul/src/changestore/filesystem.rs at line 166
debug!("get_contents {:?}", n); - edit in libpijul/src/changestore/filesystem.rs at line 195
let p = p.lock().unwrap(); - replacement in libpijul/src/changestore/filesystem.rs at line 204
let mut f = tempfile::NamedTempFile::new_in(&self.0.changes_dir)?;let mut f = tempfile::NamedTempFile::new_in(&self.changes_dir)?; - edit in libpijul/src/change.rs at line 2
use crate::HashSet; - replacement in libpijul/src/change.rs at line 4
use std::collections::{BTreeSet, HashSet};use std::collections::BTreeSet; - replacement in libpijul/src/change.rs at line 11
pub use text_changes::WriteChangeLine;pub use text_changes::{TextDeError, TextSerError, WriteChangeLine}; - replacement in libpijul/src/change.rs at line 269
let channel = channel.borrow();let channel = channel.read().unwrap(); - replacement in libpijul/src/change.rs at line 362
let mut internal_deps_ = HashSet::new();let mut internal_deps_ = HashSet::default(); - replacement in libpijul/src/change.rs at line 378
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/change.rs at line 1175
let (dependencies, extra_known) = dependencies(txn, &channel.borrow(), changes.iter())?;let (dependencies, extra_known) =dependencies(txn, &channel.read().unwrap(), changes.iter())?; - edit in libpijul/src/change/text_changes.rs at line 4
use crate::HashMap; - edit in libpijul/src/change/text_changes.rs at line 6
use std::collections::HashMap; - replacement in libpijul/src/change/text_changes.rs at line 112
let mut hashes = HashMap::new();let mut hashes = HashMap::default(); - replacement in libpijul/src/change/text_changes.rs at line 172
dependencies(txn, &channel.borrow(), change.hashed.changes.iter()).unwrap();dependencies(txn, &channel.read().unwrap(), change.hashed.changes.iter()).unwrap(); - replacement in libpijul/src/change/text_changes.rs at line 241
let mut deps = HashMap::new();let mut extra_dependencies = HashSet::new();let mut deps = HashMap::default();let mut extra_dependencies = HashSet::default(); - replacement in libpijul/src/change/text_changes.rs at line 254
offsets: HashMap::new(),offsets: HashMap::default(), - replacement in libpijul/src/change/text_changes.rs at line 536
mut contents_: &mut Vec<u8>,contents_: &mut Vec<u8>, - replacement in libpijul/src/change/text_changes.rs at line 545
Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> [^ ]+)?"#).unwrap();Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> \S+)?"#).unwrap(); - edit in libpijul/src/change/text_changes.rs at line 589
debug!("cap = {:?}", cap); - replacement in libpijul/src/change/text_changes.rs at line 602
meta.write(&mut contents_).unwrap();contents_.push((meta.0 >> 8) as u8);contents_.push((meta.0 & 0xff) as u8); - replacement in libpijul/src/change/text_changes.rs at line 739
meta.write(&mut contents_).unwrap();contents_.push((meta.0 >> 8) as u8);contents_.push((meta.0 & 0xff) as u8); - replacement in libpijul/src/apply.rs at line 2
use crate::change::{Atom, Change, EdgeMap, NewEdge, NewVertex};use crate::change::{Atom, Change, EdgeMap, NewVertex}; - replacement in libpijul/src/apply.rs at line 7
use std::collections::{HashMap, HashSet};use crate::{HashMap, HashSet}; - edit in libpijul/src/apply.rs at line 9
mod edge;pub(crate) use edge::*;mod vertex;pub(crate) use vertex::*; - replacement in libpijul/src/apply.rs at line 94
let mut channel = channel.r.borrow_mut();let mut channel = channel.write().unwrap(); - replacement in libpijul/src/apply.rs at line 137
let mut channel = channel.r.borrow_mut();let mut channel = channel.write().unwrap(); - replacement in libpijul/src/apply.rs at line 140
let mut visited = HashSet::new();let mut visited = HashSet::default(); - edit in libpijul/src/apply.rs at line 252
|h| change.knows(h), - edit in libpijul/src/apply.rs at line 274
|h| change.knows(h), - edit in libpijul/src/apply.rs at line 276[20.126479]→[20.1126:1231](∅→∅),[20.1126]→[20.1126:1231](∅→∅),[20.1231]→[20.65148:65199](∅→∅),[20.65199]→[20.1268:1481](∅→∅),[20.126528]→[20.1268:1481](∅→∅),[20.1268]→[20.1268:1481](∅→∅),[20.1481]→[20.95915:96006](∅→∅)
crate::missing_context::collect_zombie_context(txn,T::graph_mut(channel),&mut ws.missing_context,n.inode,edge,change_id,|h| change.knows(&h),).map_err(LocalApplyError::from_missing)? - replacement in libpijul/src/apply.rs at line 303
channel: &mut ChannelRef<T>,channel: &ChannelRef<T>, - replacement in libpijul/src/apply.rs at line 309[20.96241]→[20.952760:952806](∅→∅),[20.126984]→[20.952760:952806](∅→∅),[20.952760]→[20.952760:952806](∅→∅)
let mut channel = channel.r.borrow_mut();let mut channel = channel.write().unwrap(); - replacement in libpijul/src/apply.rs at line 341
channel: &mut ChannelRef<T>,channel: &ChannelRef<T>, - edit in libpijul/src/apply.rs at line 387[20.3590]→[20.955450:955493](∅→∅),[20.96840]→[20.955450:955493](∅→∅),[20.128119]→[20.955450:955493](∅→∅),[20.144970]→[20.955450:955493](∅→∅),[20.955450]→[20.955450:955493](∅→∅),[20.955493]→[20.3591:3592](∅→∅),[20.3592]→[20.128120:128155](∅→∅),[20.128155]→[20.955578:955595](∅→∅),[20.955578]→[20.955578:955595](∅→∅),[20.955595]→[20.128156:128182](∅→∅),[20.128182]→[20.955625:955721](∅→∅),[20.955625]→[20.955625:955721](∅→∅),[20.955721]→[20.128183:128233](∅→∅),[20.96886]→[20.955754:955847](∅→∅),[20.128233]→[20.955754:955847](∅→∅),[20.955754]→[20.955754:955847](∅→∅),[20.955847]→[20.207:266](∅→∅),[20.266]→[20.21:194](∅→∅),[20.194]→[20.447:448](∅→∅),[20.447]→[20.447:448](∅→∅),[20.448]→[20.955847:956052](∅→∅),[20.955847]→[20.955847:956052](∅→∅),[20.956052]→[20.67441:67490](∅→∅),[20.67490]→[20.128234:128381](∅→∅),[20.128381]→[20.17747:17757](∅→∅),[20.17747]→[20.17747:17757](∅→∅),[20.17757]→[20.956160:956206](∅→∅),[20.956160]→[20.956160:956206](∅→∅),[20.956206]→[20.67491:67544](∅→∅),[20.67544]→[20.17758:17793](∅→∅),[20.17793]→[20.128382:128438](∅→∅),[20.128438]→[20.17849:17859](∅→∅),[20.17849]→[20.17849:17859](∅→∅),[20.17859]→[20.128439:128591](∅→∅),[20.128591]→[20.18012:18022](∅→∅),[20.18012]→[20.18012:18022](∅→∅),[20.18022]→[20.956322:956376](∅→∅),[20.956322]→[20.956322:956376](∅→∅),[20.956376]→[20.18023:18089](∅→∅),[20.18089]→[20.956376:956497](∅→∅),[20.956376]→[20.956376:956497](∅→∅),[20.956497]→[20.18090:18139](∅→∅),[20.18139]→[20.128592:128671](∅→∅)
}}}Ok(())}fn put_newvertex<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,ch: &Change,ws: &mut Workspace,change: ChangeId,n: &NewVertex<Option<Hash>>,) -> Result<(), LocalApplyError<T::GraphError>> {let vertex = Vertex {change,start: n.start,end: n.end,};if txn.find_block_end(graph, vertex.end_pos()).is_ok()|| txn.find_block(graph, vertex.start_pos()).is_ok(){error!("Invalid change: {:?}", vertex);return Err(LocalApplyError::InvalidChange);}debug!("put_newvertex {:?} {:?} {:?} {:?} {:?}",vertex, n.up_context, n.down_context, n.flag, change);assert!(ws.deleted_by.is_empty());for up in n.up_context.iter() {let up = internal_pos(txn, up, change)?;if put_up_context(txn, graph, ch, ws, up)? && n.flag.contains(EdgeFlags::FOLDER) {return Err(LocalApplyError::InvalidChange);}}for down in n.down_context.iter() {let down = internal_pos(txn, down, change)?;if down.change == change {return Err(LocalApplyError::InvalidChange);}if put_down_context(txn, graph, ch, ws, down)? && !n.flag.contains(EdgeFlags::FOLDER) {return Err(LocalApplyError::InvalidChange);}}debug!("deleted by: {:?}", ws.deleted_by);let up_flag = n.flag | EdgeFlags::BLOCK | EdgeFlags::DELETED;for up in ws.up_context.drain(..) {assert_ne!(up, vertex);if !n.flag.contains(EdgeFlags::FOLDER) {for change in ws.deleted_by.iter() {put_graph_with_rev(txn, graph, up_flag, up, vertex, *change)?; - edit in libpijul/src/apply.rs at line 389
put_graph_with_rev(txn, graph, n.flag | EdgeFlags::BLOCK, up, vertex, change)?; - edit in libpijul/src/apply.rs at line 390[20.956822]→[20.956822:956872](∅→∅),[20.956872]→[20.18353:18458](∅→∅),[20.18458]→[20.67775:67819](∅→∅),[20.956872]→[20.67775:67819](∅→∅),[20.67819]→[20.956932:956966](∅→∅),[20.956932]→[20.956932:956966](∅→∅),[20.956966]→[20.128761:128835](∅→∅),[20.128835]→[20.18534:18617](∅→∅),[20.97176]→[20.18534:18617](∅→∅),[20.18617]→[20.957497:957540](∅→∅),[20.68283]→[20.957497:957540](∅→∅),[20.97236]→[20.957497:957540](∅→∅),[20.957497]→[20.957497:957540](∅→∅)
debug!("down_context {:?}", ws.down_context);let mut down_flag = n.flag;if !n.flag.is_folder() {down_flag -= EdgeFlags::BLOCK}for down in ws.down_context.drain(..) {assert_ne!(down, vertex);put_graph_with_rev(txn, graph, down_flag, vertex, down, change)?;if n.flag.is_folder() {ws.missing_context.files.insert(down);}}ws.deleted_by.clear(); - edit in libpijul/src/apply.rs at line 391[20.957551]→[20.957551:957553](∅→∅),[20.957553]→[20.1047:1048](∅→∅),[20.1048]→[20.128836:128872](∅→∅),[20.128872]→[20.957639:957656](∅→∅),[20.957639]→[20.957639:957656](∅→∅),[20.957656]→[20.128873:128899](∅→∅),[20.128899]→[20.957686:957703](∅→∅),[20.957686]→[20.957686:957703](∅→∅),[20.957738]→[20.957738:957790](∅→∅),[20.957790]→[20.128900:128952](∅→∅),[20.18665]→[20.957823:957945](∅→∅),[20.97282]→[20.957823:957945](∅→∅),[20.128952]→[20.957823:957945](∅→∅),[20.957823]→[20.957823:957945](∅→∅),[20.957945]→[20.144971:145020](∅→∅),[20.65645]→[20.957995:958151](∅→∅),[20.68335]→[20.957995:958151](∅→∅),[20.129002]→[20.957995:958151](∅→∅),[20.145020]→[20.957995:958151](∅→∅),[20.957995]→[20.957995:958151](∅→∅),[20.958151]→[20.18666:18835](∅→∅),[20.18835]→[20.145021:145085](∅→∅),[20.65709]→[20.958502:958670](∅→∅),[20.68386]→[20.958502:958670](∅→∅),[20.97363]→[20.958502:958670](∅→∅),[20.129067]→[20.958502:958670](∅→∅),[20.145085]→[20.958502:958670](∅→∅),[20.958502]→[20.958502:958670](∅→∅),[20.958670]→[20.68387:68505](∅→∅),[20.68505]→[20.18836:18871](∅→∅),[20.18871]→[20.129068:129170](∅→∅),[20.129170]→[20.21769:21884](∅→∅),[20.18973]→[20.68579:68597](∅→∅),[20.21884]→[20.68579:68597](∅→∅),[20.145189]→[20.68579:68597](∅→∅),[20.68579]→[20.68579:68597](∅→∅),[20.68597]→[20.145190:145210](∅→∅),[20.145210]→[20.68615:68706](∅→∅),[20.68615]→[20.68615:68706](∅→∅),[20.68706]→[20.145211:145303](∅→∅),[20.129253]→[20.68849:68892](∅→∅),[20.145303]→[20.68849:68892](∅→∅),[20.68849]→[20.68849:68892](∅→∅),[20.68892]→[20.145304:145366](∅→∅),[20.19034]→[20.69008:69022](∅→∅),[20.145366]→[20.69008:69022](∅→∅),[20.69008]→[20.69008:69022](∅→∅),[20.69262]→[20.959143:959194](∅→∅),[20.959143]→[20.959143:959194](∅→∅),[20.959194]→[20.19035:19057](∅→∅),[20.19057]→[20.959205:959207](∅→∅),[20.959205]→[20.959205:959207](∅→∅),[20.959207]→[20.1049:1050](∅→∅),[20.1050]→[20.129254:129292](∅→∅),[20.129292]→[20.959295:959312](∅→∅),[20.959295]→[20.959295:959312](∅→∅),[20.959312]→[20.129293:129319](∅→∅),[20.129319]→[20.959342:959359](∅→∅),[20.959342]→[20.959342:959359](∅→∅),[20.959394]→[20.959394:959448](∅→∅),[20.959448]→[20.129320:129372](∅→∅),[20.129372]→[20.145367:145411](∅→∅),[20.65753]→[20.959540:959659](∅→∅),[20.69309]→[20.959540:959659](∅→∅),[20.129416]→[20.959540:959659](∅→∅),[20.145411]→[20.959540:959659](∅→∅),[20.959540]→[20.959540:959659](∅→∅),[20.959659]→[20.19106:19263](∅→∅),[20.19263]→[20.145412:145474](∅→∅),[20.65815]→[20.960115:960275](∅→∅),[20.69358]→[20.960115:960275](∅→∅),[20.97502]→[20.960115:960275](∅→∅),[20.129479]→[20.960115:960275](∅→∅),[20.145474]→[20.960115:960275](∅→∅),[20.960115]→[20.960115:960275](∅→∅),[20.960275]→[20.69359:69360](∅→∅),[20.69360]→[20.960275:960393](∅→∅),[20.960275]→[20.960275:960393](∅→∅),[20.960393]→[20.19264:19295](∅→∅),[20.19295]→[20.129480:129585](∅→∅),[20.129585]→[20.21885:21995](∅→∅),[20.21995]→[20.145559:145789](∅→∅),[20.145559]→[20.145559:145789](∅→∅),[20.129672]→[20.960764:960811](∅→∅),[20.145789]→[20.960764:960811](∅→∅),[20.960764]→[20.960764:960811](∅→∅),[20.960811]→[20.145790:145856](∅→∅),[20.19443]→[20.960935:960953](∅→∅),[20.145856]→[20.960935:960953](∅→∅),[20.960935]→[20.960935:960953](∅→∅),[20.69573]→[20.961010:961040](∅→∅),[20.961010]→[20.961010:961040](∅→∅),[20.961040]→[20.69574:69613](∅→∅),[20.69613]→[20.19444:19462](∅→∅)
}fn put_up_context<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,ch: &Change,ws: &mut Workspace,up: Position<ChangeId>,) -> Result<bool, LocalApplyError<T::GraphError>> {let up_vertex = if up.change.is_root() {Vertex::ROOT} else {debug!("put_up_context {:?}", up);let k = *txn.find_block_end(graph, up)?;assert_eq!(k.change, up.change);assert!(k.start <= up.pos);debug!("k = {:?}", k);if k.start < up.pos && k.end > up.pos {// The missing context "graphs" are only used at the// DELETION stage, check that:assert!(ws.missing_context.graphs.0.is_empty());txn.split_block(graph, &k, up.pos, &mut ws.adjbuf)?}Vertex {change: k.change,start: k.start,end: up.pos,}};debug!("up_vertex {:?}", up_vertex);let flag0 = EdgeFlags::PARENT | EdgeFlags::BLOCK;let flag1 = flag0 | EdgeFlags::DELETED | EdgeFlags::FOLDER;let mut is_non_folder = false;for parent in iter_adjacent(txn, graph, up_vertex, flag0, flag1)? {let parent = parent?;is_non_folder |=parent.flag() & (EdgeFlags::PARENT | EdgeFlags::FOLDER) == EdgeFlags::PARENT;if parent.flag().contains(EdgeFlags::PARENT | EdgeFlags::DELETED | EdgeFlags::BLOCK){let introduced_by = txn.get_external(&parent.introduced_by())?.unwrap().into();if !ch.knows(&introduced_by) {ws.deleted_by.insert(parent.introduced_by());}}}ws.up_context.push(up_vertex);Ok(is_non_folder)}fn put_down_context<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,ch: &Change,ws: &mut Workspace,down: Position<ChangeId>,) -> Result<bool, LocalApplyError<T::GraphError>> {let k = *txn.find_block(&graph, down)?;assert_eq!(k.change, down.change);assert!(k.end >= down.pos);if k.start < down.pos && k.end > down.pos {// The missing context "graphs" are only used at the// DELETION stage, check that:assert!(ws.missing_context.graphs.0.is_empty());txn.split_block(graph, &k, down.pos, &mut ws.adjbuf)?}let down_vertex = Vertex {change: k.change,start: down.pos,end: k.end,};debug!("down_vertex {:?}", down_vertex);let flag0 = EdgeFlags::PARENT;let flag1 = flag0 | EdgeFlags::FOLDER | EdgeFlags::BLOCK | EdgeFlags::DELETED;let mut is_folder = false;for parent in iter_adjacent(txn, &graph, down_vertex, flag0, flag1)? {let parent = parent?;is_folder |= parent.flag().contains(EdgeFlags::PARENT | EdgeFlags::FOLDER);if parent.flag().contains(EdgeFlags::PARENT | EdgeFlags::BLOCK) {if parent.flag().contains(EdgeFlags::DELETED) {let introduced_by = txn.get_external(&parent.introduced_by())?.unwrap().into();if !ch.knows(&introduced_by) {ws.deleted_by.insert(parent.introduced_by());}}}}ws.down_context.push(down_vertex);Ok(is_folder) - edit in libpijul/src/apply.rs at line 434[20.97504]→[20.97504:97540](∅→∅),[20.355]→[20.962794:962811](∅→∅),[20.97540]→[20.962794:962811](∅→∅),[20.962794]→[20.962794:962811](∅→∅),[20.962811]→[20.129810:129836](∅→∅),[20.129836]→[20.962841:962973](∅→∅),[20.962841]→[20.962841:962973](∅→∅),[20.962973]→[20.97541:97560](∅→∅),[20.97560]→[20.963004:963010](∅→∅),[20.963004]→[20.963004:963010](∅→∅),[20.963010]→[20.129837:130022](∅→∅),[20.97692]→[20.963317:963319](∅→∅),[20.130022]→[20.963317:963319](∅→∅),[20.963317]→[20.963317:963319](∅→∅),[20.963319]→[20.19499:19547](∅→∅),[20.19547]→[20.963319:963364](∅→∅),[20.963319]→[20.963319:963364](∅→∅),[20.963364]→[20.97693:97720](∅→∅),[20.97720]→[20.130023:130125](∅→∅),[20.97825]→[20.963425:963431](∅→∅),[20.130125]→[20.963425:963431](∅→∅),[20.963425]→[20.963425:963431](∅→∅),[20.963431]→[20.350:403](∅→∅),[20.403]→[20.19600:19664](∅→∅),[20.19600]→[20.19600:19664](∅→∅),[20.19664]→[20.130126:130185](∅→∅),[20.130185]→[20.19722:19728](∅→∅),[20.19722]→[20.19722:19728](∅→∅),[20.19728]→[20.963431:963432](∅→∅),[20.963431]→[20.963431:963432](∅→∅),[20.963432]→[20.19729:19814](∅→∅),[20.19814]→[20.130186:130272](∅→∅),[20.69741]→[20.963637:963660](∅→∅),[20.130272]→[20.963637:963660](∅→∅),[20.963637]→[20.963637:963660](∅→∅),[20.963660]→[20.130273:130332](∅→∅),[20.19873]→[20.963721:963729](∅→∅),[20.97953]→[20.963721:963729](∅→∅),[20.130332]→[20.963721:963729](∅→∅),[20.963721]→[20.963721:963729](∅→∅),[20.963729]→[20.130333:130511](∅→∅),[20.130511]→[20.963911:963912](∅→∅),[20.963911]→[20.963911:963912](∅→∅),[20.963912]→[20.19874:19974](∅→∅),[20.19974]→[20.963912:964016](∅→∅),[20.963912]→[20.963912:964016](∅→∅),[20.964016]→[20.19975:20045](∅→∅),[20.20045]→[20.145969:146041](∅→∅),[20.475]→[20.964696:964790](∅→∅),[20.69800]→[20.964696:964790](∅→∅),[20.98042]→[20.964696:964790](∅→∅),[20.130632]→[20.964696:964790](∅→∅),[20.146041]→[20.964696:964790](∅→∅),[20.964696]→[20.964696:964790](∅→∅),[20.964790]→[20.1333:1434](∅→∅),[20.1434]→[20.476:542](∅→∅),[20.964790]→[20.476:542](∅→∅),[20.542]→[20.964858:964911](∅→∅),[20.130730]→[20.964858:964911](∅→∅),[20.964858]→[20.964858:964911](∅→∅),[20.964911]→[20.130731:130803](∅→∅),[20.130803]→[20.964985:965032](∅→∅),[20.964985]→[20.964985:965032](∅→∅),[20.965032]→[20.20046:20078](∅→∅),[20.20078]→[20.965032:965043](∅→∅),[20.965032]→[20.965032:965043](∅→∅),[20.965043]→[20.130804:131021](∅→∅),[20.69979]→[20.965876:965923](∅→∅),[20.98311]→[20.965876:965923](∅→∅),[20.131021]→[20.965876:965923](∅→∅),[20.965876]→[20.965876:965923](∅→∅),[20.965923]→[20.20166:20265](∅→∅),[20.20265]→[20.965969:966024](∅→∅),[20.965969]→[20.965969:966024](∅→∅),[20.966024]→[20.146042:146064](∅→∅),[20.146064]→[20.65907:66002](∅→∅),[20.65907]→[20.65907:66002](∅→∅),[20.66002]→[20.966085:966141](∅→∅),[20.70042]→[20.966085:966141](∅→∅),[20.98406]→[20.966085:966141](∅→∅),[20.131113]→[20.966085:966141](∅→∅),[20.966085]→[20.966085:966141](∅→∅),[20.966141]→[20.131114:131154](∅→∅),[20.131154]→[20.966231:966248](∅→∅),[20.966231]→[20.966231:966248](∅→∅),[20.966248]→[20.131155:131183](∅→∅),[20.131183]→[20.966278:966415](∅→∅),[20.966278]→[20.966278:966415](∅→∅),[20.966415]→[20.131184:131248](∅→∅),[20.98466]→[20.966462:966496](∅→∅),[20.131248]→[20.966462:966496](∅→∅),[20.966462]→[20.966462:966496](∅→∅),[20.966496]→[20.146065:146153](∅→∅),[20.66090]→[20.966582:966729](∅→∅),[20.70131]→[20.966582:966729](∅→∅),[20.146153]→[20.966582:966729](∅→∅),[20.966582]→[20.966582:966729](∅→∅),[20.966729]→[20.20266:20332](∅→∅),[20.20332]→[20.146154:146224](∅→∅),[20.66160]→[20.967333:967388](∅→∅),[20.70186]→[20.967333:967388](∅→∅),[20.98551]→[20.967333:967388](∅→∅),[20.131319]→[20.967333:967388](∅→∅),[20.146224]→[20.967333:967388](∅→∅),[20.967333]→[20.967333:967388](∅→∅),[20.967388]→[20.131320:131360](∅→∅),[20.131360]→[20.967423:967440](∅→∅),[20.967423]→[20.967423:967440](∅→∅),[20.967440]→[20.131361:131389](∅→∅),[20.131389]→[20.967470:967603](∅→∅),[20.967470]→[20.967470:967603](∅→∅),[20.967603]→[20.131390:131454](∅→∅),[20.98611]→[20.70187:70249](∅→∅),[20.131454]→[20.70187:70249](∅→∅),[20.967650]→[20.70187:70249](∅→∅),[20.70249]→[20.20333:20382](∅→∅),[20.20382]→[20.146225:146281](∅→∅),[20.66216]→[20.967800:967922](∅→∅),[20.70306]→[20.967800:967922](∅→∅),[20.146281]→[20.967800:967922](∅→∅),[20.967800]→[20.967800:967922](∅→∅),[20.967922]→[20.20383:20449](∅→∅),[20.20449]→[20.146282:146352](∅→∅),[20.66286]→[20.968526:968582](∅→∅),[20.70361]→[20.968526:968582](∅→∅),[20.98696]→[20.968526:968582](∅→∅),[20.131525]→[20.968526:968582](∅→∅),[20.146352]→[20.968526:968582](∅→∅),[20.968526]→[20.968526:968582](∅→∅),[20.968582]→[20.1053:1054](∅→∅),[20.1054]→[20.131526:131568](∅→∅),[20.131568]→[20.968674:968691](∅→∅),[20.968674]→[20.968674:968691](∅→∅),[20.968691]→[20.131569:131597](∅→∅),[20.131597]→[20.968721:968808](∅→∅),[20.968721]→[20.968721:968808](∅→∅),[20.968808]→[20.131598:131648](∅→∅),[20.98742]→[20.70362:70403](∅→∅),[20.131648]→[20.70362:70403](∅→∅),[20.968841]→[20.70362:70403](∅→∅),[20.70403]→[20.968873:968977](∅→∅),[20.968873]→[20.968873:968977](∅→∅),[20.968977]→[20.131649:131678](∅→∅),[20.131678]→[20.968985:969041](∅→∅),[20.968985]→[20.968985:969041](∅→∅),[20.969041]→[20.146353:146522](∅→∅),[20.66349]→[20.131679:131727](∅→∅),[20.146522]→[20.131679:131727](∅→∅),[20.70467]→[20.131679:131727](∅→∅),[20.131727]→[20.146523:146569](∅→∅),[20.146569]→[20.969295:969334](∅→∅),[20.969295]→[20.969295:969334](∅→∅),[20.969334]→[20.146570:146685](∅→∅),[20.146685]→[20.53:165](∅→∅),[20.53]→[20.53:165](∅→∅),[20.165]→[20.146686:146733](∅→∅),[20.146733]→[20.66549:66567](∅→∅),[20.66549]→[20.66549:66567](∅→∅),[20.66567]→[20.969434:969458](∅→∅),[20.969434]→[20.969434:969458](∅→∅),[20.969458]→[20.146734:146831](∅→∅),[20.146831]→[20.969552:969581](∅→∅),[20.969552]→[20.969552:969581](∅→∅),[20.969581]→[20.1055:1056](∅→∅),[20.1056]→[20.131728:131772](∅→∅),[20.131772]→[20.969675:969692](∅→∅),[20.969675]→[20.969675:969692](∅→∅),[20.969692]→[20.131773:131801](∅→∅),[20.131801]→[20.969722:969811](∅→∅),[20.969722]→[20.969722:969811](∅→∅),[20.969811]→[20.131802:131852](∅→∅),[20.131852]→[20.20450:20507](∅→∅),[20.98788]→[20.20450:20507](∅→∅),[20.20507]→[20.970152:970181](∅→∅),[20.970152]→[20.970152:970181](∅→∅),[20.970181]→[20.20508:20509](∅→∅),[20.20509]→[20.131853:132022](∅→∅),[20.20572]→[20.970270:970271](∅→∅),[20.132022]→[20.970270:970271](∅→∅),[20.970270]→[20.970270:970271](∅→∅),[20.970443]→[20.970443:970806](∅→∅),[20.970906]→[20.970906:970907](∅→∅),[20.970907]→[20.20573:20607](∅→∅),[20.20607]→[20.146832:146892](∅→∅),[20.132082]→[20.20657:20720](∅→∅),[20.146892]→[20.20657:20720](∅→∅),[20.20657]→[20.20657:20720](∅→∅),[20.20720]→[20.146893:146961](∅→∅),[20.233]→[20.132150:132242](∅→∅),[20.146961]→[20.132150:132242](∅→∅),[20.132150]→[20.132150:132242](∅→∅),[20.70752]→[20.971153:971196](∅→∅),[20.98986]→[20.971153:971196](∅→∅),[20.132242]→[20.971153:971196](∅→∅),[20.971153]→[20.971153:971196](∅→∅),[20.971196]→[20.1057:1058](∅→∅)
pub(crate) fn put_newedge<T, E, F>(txn: &mut T,graph: &mut T::Graph,ws: &mut Workspace,change: ChangeId,inode: Position<Option<Hash>>,n: &NewEdge<Option<Hash>>,apply_check: F,) -> Result<(), E>whereT: GraphMutTxnT,E: From<LocalApplyError<T::GraphError>> + From<TxnErr<T::GraphError>>,F: Fn(&mut T, &mut T::Graph, Vertex<ChangeId>, Vertex<ChangeId>) -> Result<bool, E>,{debug!("put_newedge {:?} {:?}", n, change);if n.flag.contains(EdgeFlags::DELETED) {ws.missing_context.load_graph(txn, graph, inode).map_err(|_| LocalApplyError::InvalidChange)?;}if (n.previous.is_block() && !n.flag.is_block())|| (n.previous.is_folder() != n.flag.is_folder()){return Err(LocalApplyError::InvalidChange.into());}debug_assert!(ws.children.is_empty());debug_assert!(ws.parents.is_empty());let n_introduced_by = if let Some(n) = internal(txn, &n.introduced_by, change)? {n} else {return Err(LocalApplyError::InvalidChange.into());};let mut source = find_source_vertex(txn, graph, &n.from, change, inode, n.flag, ws)?;let mut target = find_target_vertex(txn, graph, &n.to, change, inode, n.flag, ws)?;if n.flag.contains(EdgeFlags::FOLDER) {ws.missing_context.files.insert(target);}loop {if target.end > n.to.end {assert!(!n.flag.contains(EdgeFlags::FOLDER));ws.missing_context.graphs.split(inode, target, n.to.end);txn.split_block(graph, &target, n.to.end, &mut ws.adjbuf)?;target.end = n.to.end}if n.flag.contains(EdgeFlags::DELETED) {debug_assert!(ws.children.is_empty());debug_assert!(ws.parents.is_empty());collect_pseudo_edges(txn, graph, ws, inode, target)?;if !n.flag.contains(EdgeFlags::FOLDER) {reconnect_pseudo_edges(txn, graph, inode, ws, target)?;}ws.children.clear();ws.parents.clear();}del_graph_with_rev(txn, graph, n.previous, source, target, n_introduced_by)?;if apply_check(txn, graph, source, target)? {put_graph_with_rev(txn, graph, n.flag, source, target, change)?;}if target.end >= n.to.end {debug!("{:?} {:?}", target, n.to);debug_assert_eq!(target.end, n.to.end);break;}source = target;target = *txn.find_block(graph, target.end_pos()).map_err(LocalApplyError::from)?;assert_ne!(source, target);}Ok(())}fn find_source_vertex<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,from: &Position<Option<Hash>>,change: ChangeId,inode: Position<Option<Hash>>,flag: EdgeFlags,ws: &mut Workspace,) -> Result<Vertex<ChangeId>, LocalApplyError<T::GraphError>> {debug!("find_source_vertex");let mut source = *txn.find_block_end(&channel, internal_pos(txn, &from, change)?)?;debug!("source = {:?}", source);if source.start < from.pos && source.end > from.pos {assert!(!flag.contains(EdgeFlags::FOLDER));ws.missing_context.graphs.split(inode, source, from.pos);txn.split_block(channel, &source, from.pos, &mut ws.adjbuf)?;source.end = from.pos;}Ok(source)}fn find_target_vertex<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,to: &Vertex<Option<Hash>>,change: ChangeId,inode: Position<Option<Hash>>,flag: EdgeFlags,ws: &mut Workspace,) -> Result<Vertex<ChangeId>, LocalApplyError<T::GraphError>> {let to_pos = internal_pos(txn, &to.start_pos(), change)?;debug!("find_target_vertex, to = {:?}", to);let mut target = *txn.find_block(channel, to_pos)?;debug!("target = {:?}", target);if target.start < to.start {assert!(!flag.contains(EdgeFlags::FOLDER));ws.missing_context.graphs.split(inode, target, to.start);txn.split_block(channel, &target, to.start, &mut ws.adjbuf)?;target.start = to.start;}Ok(target)}fn collect_pseudo_edges<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,apply: &mut Workspace,inode: Position<Option<Hash>>,v: Vertex<ChangeId>,) -> Result<(), LocalApplyError<T::GraphError>> {for e in iter_adjacent(txn,&channel,v,EdgeFlags::empty(),EdgeFlags::all() - EdgeFlags::DELETED,)? {let e = e?;debug!("collect_pseudo_edges {:?} {:?}", v, e);if !e.flag().contains(EdgeFlags::FOLDER) {if e.flag().contains(EdgeFlags::PARENT) {let p = txn.find_block_end(channel, e.dest())?;if is_alive(txn, channel, p)? {apply.parents.insert(*p);}} else {let p = txn.find_block(channel, e.dest())?;if e.flag().contains(EdgeFlags::BLOCK)|| p.is_empty()|| is_alive(txn, channel, p).unwrap(){apply.children.insert(*p);}}}if e.flag().contains(EdgeFlags::PSEUDO) {apply.pseudo.push((v, *e, inode));}}Ok(())}fn reconnect_pseudo_edges<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,inode: Position<Option<Hash>>,ws: &mut Workspace,target: Vertex<ChangeId>,) -> Result<(), LocalApplyError<T::GraphError>> {if ws.parents.is_empty() || ws.children.is_empty() {return Ok(());}let (graph, vids) = if let Some(x) = ws.missing_context.graphs.get(inode) {x} else {return Err(LocalApplyError::InvalidChange.into());};crate::alive::remove_redundant_parents(&graph,&vids,&mut ws.parents,&mut ws.missing_context.covered_parents,target,);for &p in ws.parents.iter() {ws.missing_context.covered_parents.insert((p, target));}crate::alive::remove_redundant_children(&graph, &vids, &mut ws.children, target);for &p in ws.parents.iter() {debug_assert!(is_alive(txn, channel, &p).unwrap());for &c in ws.children.iter() {if p != c {debug_assert!(is_alive(txn, channel, &c).unwrap());put_graph_with_rev(txn, channel, EdgeFlags::PSEUDO, p, c, ChangeId::ROOT)?;}}}Ok(())} - replacement in libpijul/src/apply.rs at line 638
let mut files = std::mem::replace(&mut ws.missing_context.files, HashSet::new());let mut files = std::mem::replace(&mut ws.missing_context.files, HashSet::default()); - file addition: apply[20.198146]
- file addition: vertex.rs[0.90446]
use super::{LocalApplyError, Workspace};use crate::change::{Change, NewVertex};use crate::pristine::*;use crate::{ChangeId, EdgeFlags, Hash, Vertex};pub fn put_newvertex<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,ch: &Change,ws: &mut Workspace,change: ChangeId,n: &NewVertex<Option<Hash>>,) -> Result<(), LocalApplyError<T::GraphError>> {let vertex = Vertex {change,start: n.start,end: n.end,};if txn.find_block_end(graph, vertex.end_pos()).is_ok()|| txn.find_block(graph, vertex.start_pos()).is_ok(){error!("Invalid change: {:?}", vertex);return Err(LocalApplyError::InvalidChange);}debug!("put_newvertex {:?} {:?} {:?} {:?} {:?}",vertex, n.up_context, n.down_context, n.flag, change);assert!(ws.deleted_by.is_empty());for up in n.up_context.iter() {let up = internal_pos(txn, up, change)?;if put_up_context(txn, graph, ch, ws, up)? && n.flag.contains(EdgeFlags::FOLDER) {return Err(LocalApplyError::InvalidChange);}}for down in n.down_context.iter() {let down = internal_pos(txn, down, change)?;if down.change == change {return Err(LocalApplyError::InvalidChange);}if put_down_context(txn, graph, ch, ws, down)? && !n.flag.contains(EdgeFlags::FOLDER) {return Err(LocalApplyError::InvalidChange);}}debug!("deleted by: {:?}", ws.deleted_by);let up_flag = n.flag | EdgeFlags::BLOCK | EdgeFlags::DELETED;for up in ws.up_context.drain(..) {assert_ne!(up, vertex);if !n.flag.contains(EdgeFlags::FOLDER) {for change in ws.deleted_by.iter() {put_graph_with_rev(txn, graph, up_flag, up, vertex, *change)?;}}put_graph_with_rev(txn, graph, n.flag | EdgeFlags::BLOCK, up, vertex, change)?;}debug!("down_context {:?}", ws.down_context);let mut down_flag = n.flag;if !n.flag.is_folder() {down_flag -= EdgeFlags::BLOCK}for down in ws.down_context.drain(..) {assert_ne!(down, vertex);put_graph_with_rev(txn, graph, down_flag, vertex, down, change)?;if n.flag.is_folder() {ws.missing_context.files.insert(down);}}ws.deleted_by.clear();Ok(())}fn put_up_context<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,ch: &Change,ws: &mut Workspace,up: Position<ChangeId>,) -> Result<bool, LocalApplyError<T::GraphError>> {let up_vertex = if up.change.is_root() {Vertex::ROOT} else {debug!("put_up_context {:?}", up);let k = *txn.find_block_end(graph, up)?;assert_eq!(k.change, up.change);assert!(k.start <= up.pos);debug!("k = {:?}", k);if k.start < up.pos && k.end > up.pos {// The missing context "graphs" are only used at the// DELETION stage, check that:assert!(ws.missing_context.graphs.0.is_empty());txn.split_block(graph, &k, up.pos, &mut ws.adjbuf)?}Vertex {change: k.change,start: k.start,end: up.pos,}};debug!("up_vertex {:?}", up_vertex);let flag0 = EdgeFlags::PARENT | EdgeFlags::BLOCK;let flag1 = flag0 | EdgeFlags::DELETED | EdgeFlags::FOLDER;let mut is_non_folder = false;for parent in iter_adjacent(txn, graph, up_vertex, flag0, flag1)? {let parent = parent?;is_non_folder |=parent.flag() & (EdgeFlags::PARENT | EdgeFlags::FOLDER) == EdgeFlags::PARENT;if parent.flag().contains(EdgeFlags::PARENT | EdgeFlags::DELETED | EdgeFlags::BLOCK){let introduced_by = txn.get_external(&parent.introduced_by())?.unwrap().into();if !ch.knows(&introduced_by) {ws.deleted_by.insert(parent.introduced_by());}}}ws.up_context.push(up_vertex);Ok(is_non_folder)}fn put_down_context<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,ch: &Change,ws: &mut Workspace,down: Position<ChangeId>,) -> Result<bool, LocalApplyError<T::GraphError>> {let k = *txn.find_block(&graph, down)?;assert_eq!(k.change, down.change);assert!(k.end >= down.pos);if k.start < down.pos && k.end > down.pos {// The missing context "graphs" are only used at the// DELETION stage, check that:assert!(ws.missing_context.graphs.0.is_empty());txn.split_block(graph, &k, down.pos, &mut ws.adjbuf)?}let down_vertex = Vertex {change: k.change,start: down.pos,end: k.end,};debug!("down_vertex {:?}", down_vertex);let flag0 = EdgeFlags::PARENT;let flag1 = flag0 | EdgeFlags::FOLDER | EdgeFlags::BLOCK | EdgeFlags::DELETED;let mut is_folder = false;for parent in iter_adjacent(txn, &graph, down_vertex, flag0, flag1)? {let parent = parent?;is_folder |= parent.flag().contains(EdgeFlags::PARENT | EdgeFlags::FOLDER);if parent.flag().contains(EdgeFlags::PARENT | EdgeFlags::BLOCK) {if parent.flag().contains(EdgeFlags::DELETED) {let introduced_by = txn.get_external(&parent.introduced_by())?.unwrap().into();if !ch.knows(&introduced_by) {ws.deleted_by.insert(parent.introduced_by());}}}}ws.down_context.push(down_vertex);Ok(is_folder)} - file addition: edge.rs[0.90446]
use super::LocalApplyError;use crate::change::NewEdge;use crate::missing_context::*;use crate::pristine::*;pub fn put_newedge<T, E, F, K>(txn: &mut T,graph: &mut T::Graph,ws: &mut super::Workspace,change: ChangeId,inode: Position<Option<Hash>>,n: &NewEdge<Option<Hash>>,apply_check: F,mut known: K,) -> Result<(), E>whereT: GraphMutTxnT,E: From<LocalApplyError<T::GraphError>> + From<TxnErr<T::GraphError>>,F: Fn(&mut T, &mut T::Graph, Vertex<ChangeId>, Vertex<ChangeId>) -> Result<bool, E>,K: FnMut(&Hash) -> bool,{debug!("put_newedge {:?} {:?}", n, change);check_valid(txn, graph, inode, n, ws)?;let n_introduced_by = if let Some(n) = internal(txn, &n.introduced_by, change)? {n} else {return Err(LocalApplyError::InvalidChange.into());};let mut source = find_source_vertex(txn, graph, &n.from, change, inode, n.flag, ws)?;let mut target = find_target_vertex(txn, graph, &n.to, change, inode, n.flag, ws)?;if n.flag.contains(EdgeFlags::FOLDER) {ws.missing_context.files.insert(target);}let mut zombies = Vec::new();loop {if !n.flag.contains(EdgeFlags::DELETED) {collect_nondeleted_zombies::<_, E, _>(txn,graph,&mut known,source,target,&mut zombies,)?;}if target.end > n.to.end {assert!(!n.flag.contains(EdgeFlags::FOLDER));ws.missing_context.graphs.split(inode, target, n.to.end);txn.split_block(graph, &target, n.to.end, &mut ws.adjbuf)?;target.end = n.to.end}if n.flag.contains(EdgeFlags::DELETED) {debug_assert!(ws.children.is_empty());debug_assert!(ws.parents.is_empty());collect_pseudo_edges(txn, graph, ws, inode, target)?;if !n.flag.contains(EdgeFlags::FOLDER) {reconnect_pseudo_edges(txn, graph, inode, ws, target)?;}ws.children.clear();ws.parents.clear();}del_graph_with_rev(txn, graph, n.previous, source, target, n_introduced_by)?;if apply_check(txn, graph, source, target)? {put_graph_with_rev(txn, graph, n.flag, source, target, change)?;for intro in zombies.drain(..) {put_graph_with_rev(txn, graph, EdgeFlags::DELETED, source, target, intro)?;}}if target.end >= n.to.end {debug!("{:?} {:?}", target, n.to);debug_assert_eq!(target.end, n.to.end);break;}source = target;target = *txn.find_block(graph, target.end_pos()).map_err(LocalApplyError::from)?;assert_ne!(source, target);}if n.flag.contains(EdgeFlags::DELETED) {collect_zombie_context(txn, graph, &mut ws.missing_context, inode, n, change, known).map_err(LocalApplyError::from_missing)?;}Ok(())}fn collect_nondeleted_zombies<T, E, K>(txn: &mut T,graph: &mut T::Graph,mut known: K,source: Vertex<ChangeId>,target: Vertex<ChangeId>,zombies: &mut Vec<ChangeId>,) -> Result<(), E>whereT: GraphMutTxnT,E: From<LocalApplyError<T::GraphError>> + From<TxnErr<T::GraphError>>,K: FnMut(&Hash) -> bool,{for v in iter_deleted_parents(txn, graph, source)? {let v = v?;let intro = v.introduced_by();if !known(&txn.get_external(&intro)?.unwrap().into()) {zombies.push(intro)}}for v in iter_adjacent(txn, graph, target, EdgeFlags::empty(), EdgeFlags::all())? {let v = v?;if v.flag().contains(EdgeFlags::PARENT) {continue;}for v in iter_deleted_parents(txn, graph, target)? {let v = v?;let intro = v.introduced_by();if !known(&txn.get_external(&intro)?.unwrap().into()) {zombies.push(intro)}}}Ok(())}fn check_valid<T: GraphMutTxnT>(txn: &mut T,graph: &mut T::Graph,inode: Position<Option<Hash>>,n: &NewEdge<Option<Hash>>,ws: &mut super::Workspace,) -> Result<(), LocalApplyError<T::GraphError>> {if n.flag.contains(EdgeFlags::DELETED) {ws.missing_context.load_graph(txn, graph, inode).map_err(|_| LocalApplyError::InvalidChange)?;}if (n.previous.is_block() && !n.flag.is_block())|| (n.previous.is_folder() != n.flag.is_folder()){return Err(LocalApplyError::InvalidChange.into());}debug_assert!(ws.children.is_empty());debug_assert!(ws.parents.is_empty());Ok(())}fn find_source_vertex<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,from: &Position<Option<Hash>>,change: ChangeId,inode: Position<Option<Hash>>,flag: EdgeFlags,ws: &mut super::Workspace,) -> Result<Vertex<ChangeId>, LocalApplyError<T::GraphError>> {debug!("find_source_vertex");let mut source = *txn.find_block_end(&channel, internal_pos(txn, &from, change)?)?;debug!("source = {:?}", source);if source.start < from.pos && source.end > from.pos {assert!(!flag.contains(EdgeFlags::FOLDER));ws.missing_context.graphs.split(inode, source, from.pos);txn.split_block(channel, &source, from.pos, &mut ws.adjbuf)?;source.end = from.pos;}Ok(source)}fn find_target_vertex<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,to: &Vertex<Option<Hash>>,change: ChangeId,inode: Position<Option<Hash>>,flag: EdgeFlags,ws: &mut super::Workspace,) -> Result<Vertex<ChangeId>, LocalApplyError<T::GraphError>> {let to_pos = internal_pos(txn, &to.start_pos(), change)?;debug!("find_target_vertex, to = {:?}", to);let mut target = *txn.find_block(channel, to_pos)?;debug!("target = {:?}", target);if target.start < to.start {assert!(!flag.contains(EdgeFlags::FOLDER));ws.missing_context.graphs.split(inode, target, to.start);txn.split_block(channel, &target, to.start, &mut ws.adjbuf)?;target.start = to.start;}Ok(target)}fn collect_pseudo_edges<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,apply: &mut super::Workspace,inode: Position<Option<Hash>>,v: Vertex<ChangeId>,) -> Result<(), LocalApplyError<T::GraphError>> {for e in iter_adjacent(txn,&channel,v,EdgeFlags::empty(),EdgeFlags::all() - EdgeFlags::DELETED,)? {let e = e?;debug!("collect_pseudo_edges {:?} {:?}", v, e);if !e.flag().contains(EdgeFlags::FOLDER) {if e.flag().contains(EdgeFlags::PARENT) {let p = txn.find_block_end(channel, e.dest())?;if is_alive(txn, channel, p)? {apply.parents.insert(*p);}} else {let p = txn.find_block(channel, e.dest())?;if e.flag().contains(EdgeFlags::BLOCK)|| p.is_empty()|| is_alive(txn, channel, p).unwrap(){apply.children.insert(*p);}}}if e.flag().contains(EdgeFlags::PSEUDO) {apply.pseudo.push((v, *e, inode));}}Ok(())}fn reconnect_pseudo_edges<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,inode: Position<Option<Hash>>,ws: &mut super::Workspace,target: Vertex<ChangeId>,) -> Result<(), LocalApplyError<T::GraphError>> {if ws.parents.is_empty() || ws.children.is_empty() {return Ok(());}let (graph, vids) = if let Some(x) = ws.missing_context.graphs.get(inode) {x} else {return Err(LocalApplyError::InvalidChange.into());};crate::alive::remove_redundant_parents(&graph,&vids,&mut ws.parents,&mut ws.missing_context.covered_parents,target,);for &p in ws.parents.iter() {ws.missing_context.covered_parents.insert((p, target));}crate::alive::remove_redundant_children(&graph, &vids, &mut ws.children, target);for &p in ws.parents.iter() {debug_assert!(is_alive(txn, channel, &p).unwrap());for &c in ws.children.iter() {if p != c {debug_assert!(is_alive(txn, channel, &c).unwrap());put_graph_with_rev(txn, channel, EdgeFlags::PSEUDO, p, c, ChangeId::ROOT)?;}}}Ok(())}fn collect_zombie_context<T: GraphMutTxnT, K>(txn: &mut T,channel: &mut T::Graph,ws: &mut crate::missing_context::Workspace,inode: Position<Option<Hash>>,n: &NewEdge<Option<Hash>>,change_id: ChangeId,mut known: K,) -> Result<(), MissingError<T::GraphError>>whereK: FnMut(&Hash) -> bool,{if n.flag.contains(EdgeFlags::FOLDER) {return Ok(());}let mut pos = internal_pos(txn, &n.to.start_pos(), change_id)?;let end_pos = internal_pos(txn, &n.to.end_pos(), change_id)?;let mut unknown_parents = Vec::new();while let Ok(&dest_vertex) = txn.find_block(&channel, pos) {debug!("collect zombie context: {:?}", dest_vertex);for v in iter_adjacent(txn,channel,dest_vertex,EdgeFlags::empty(),EdgeFlags::all() - EdgeFlags::DELETED,)? {let v = v?;if v.introduced_by() == change_id || v.dest().change.is_root() {continue;}if v.introduced_by().is_root() {ws.pseudo.push((dest_vertex, *v));continue;}if v.flag().contains(EdgeFlags::PARENT) {// Unwrap ok, since `v` is in the channel.let intro = txn.get_external(&v.introduced_by())?.unwrap().into();if !known(&intro) {debug!("unknown: {:?}", v);unknown_parents.push((dest_vertex, *v))}}}zombify(txn, channel, ws, change_id, inode, n.flag, &unknown_parents)?;if dest_vertex.end < end_pos.pos {pos.pos = dest_vertex.end} else {break;}}Ok(())}fn zombify<T: GraphMutTxnT>(txn: &mut T,channel: &mut T::Graph,ws: &mut crate::missing_context::Workspace,change_id: ChangeId,inode: Position<Option<Hash>>,flag: EdgeFlags,unknown: &[(Vertex<ChangeId>, SerializedEdge)],) -> Result<(), MissingError<T::GraphError>> {for &(dest_vertex, edge) in unknown.iter() {let p = *txn.find_block_end(channel, edge.dest())?;ws.unknown_parents.push((dest_vertex, p, inode, edge.flag()));let fold = flag & EdgeFlags::FOLDER;debug!("zombify p {:?}, dest_vertex {:?}", p, dest_vertex);let mut v = p;while let Ok(&u) = txn.find_block_end(channel, v.start_pos()) {if u != v {debug!("u = {:?}, v = {:?}", u, v);put_graph_with_rev(txn,channel,EdgeFlags::DELETED | EdgeFlags::BLOCK | fold,u,v,change_id,)?;v = u} else {break;}}// Zombify the first chunk of the split.for parent in iter_adjacent(txn,channel,v,EdgeFlags::PARENT,EdgeFlags::all() - EdgeFlags::DELETED,)? {let parent = parent?;if !parent.flag().contains(EdgeFlags::PSEUDO) {ws.parents.insert(*parent);}}debug!("ws.parents = {:?}", ws.parents);for parent in ws.parents.drain() {let parent_dest = *txn.find_block_end(channel, parent.dest())?;let mut flag = EdgeFlags::DELETED | EdgeFlags::BLOCK;if parent.flag().contains(EdgeFlags::FOLDER) {flag |= EdgeFlags::FOLDER}put_graph_with_rev(txn, channel, flag, parent_dest, v, change_id)?;}}Ok(())} - edit in libpijul/src/alive/retrieve.rs at line 3
use crate::HashMap; - edit in libpijul/src/alive/retrieve.rs at line 5
use std::collections::HashMap; - replacement in libpijul/src/alive/retrieve.rs at line 17
let mut cache: HashMap<Position<ChangeId>, VertexId> = HashMap::new();let mut cache: HashMap<Position<ChangeId>, VertexId> = HashMap::default(); - edit in libpijul/src/alive/mod.rs at line 2
use crate::{HashMap, HashSet}; - edit in libpijul/src/alive/mod.rs at line 87[20.997255]→[20.100952:100953](∅→∅),[20.100953]→[20.997310:997352](∅→∅),[20.997310]→[20.997310:997352](∅→∅)
use std::collections::{HashMap, HashSet}; - replacement in libpijul/src/alive/mod.rs at line 110
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/alive/mod.rs at line 151
let mut visited = HashSet::new();let mut visited = HashSet::default(); - replacement in libpijul/src/alive/dfs.rs at line 4
use std::collections::HashSet;use crate::HashSet; - replacement in libpijul/src/alive/dfs.rs at line 23
sccs: HashSet::new(),sccs: HashSet::default(), - replacement in libpijul/src/alive/dfs.rs at line 147
let mut forward_scc = HashSet::new();let mut regular_scc = HashSet::new();let mut forward_scc = HashSet::default();let mut regular_scc = HashSet::default(); - replacement in libpijul/src/alive/dfs.rs at line 333
let mut sccs0 = HashSet::new();let mut sccs0 = HashSet::default(); - replacement in libpijul/src/alive/debug.rs at line 4
use std::collections::{HashMap, HashSet};use crate::{HashMap, HashSet}; - replacement in libpijul/src/alive/debug.rs at line 21
let mut cache = HashMap::new();let mut cache = HashMap::default(); - replacement in libpijul/src/alive/debug.rs at line 33
let mut others = HashSet::new();let mut others = HashSet::default(); - edit in libpijul/Cargo.toml at line 113
twox-hash = "*"crossbeam-deque = "*"crossbeam-utils = "*" - edit in libpijul/Cargo.toml at line 128
- edit in Cargo.nix at line 781
};"crossbeam-deque" = rec {crateName = "crossbeam-deque";version = "0.8.0";edition = "2018";sha256 = "1ad995vzq74k7jd1pgn9zxbacyzj9ii6l0svhlb2dxzy8vxnxbwl";authors = ["The Crossbeam Project Developers"];dependencies = [{name = "cfg-if";packageId = "cfg-if 1.0.0";}{name = "crossbeam-epoch";packageId = "crossbeam-epoch";optional = true;usesDefaultFeatures = false;}{name = "crossbeam-utils";packageId = "crossbeam-utils";optional = true;usesDefaultFeatures = false;}];features = {"default" = [ "std" ];"std" = [ "crossbeam-epoch/std" "crossbeam-utils/std" ];};resolvedDefaultFeatures = [ "crossbeam-epoch" "crossbeam-utils" "default" "std" ];};"crossbeam-epoch" = rec {crateName = "crossbeam-epoch";version = "0.9.3";edition = "2018";sha256 = "04jbrwrm6ibmd83anc3difsvk0fgjyr1aqs9k33sizlmxcwzd115";authors = ["The Crossbeam Project Developers"];dependencies = [{name = "cfg-if";packageId = "cfg-if 1.0.0";}{name = "crossbeam-utils";packageId = "crossbeam-utils";usesDefaultFeatures = false;}{name = "lazy_static";packageId = "lazy_static";optional = true;}{name = "memoffset";packageId = "memoffset";}{name = "scopeguard";packageId = "scopeguard";usesDefaultFeatures = false;}];features = {"default" = [ "std" ];"loom" = [ "loom-crate" "crossbeam-utils/loom" ];"nightly" = [ "crossbeam-utils/nightly" "const_fn" ];"std" = [ "alloc" "crossbeam-utils/std" "lazy_static" ];};resolvedDefaultFeatures = [ "alloc" "lazy_static" "std" ]; - edit in Cargo.nix at line 2674
}{name = "crossbeam-deque";packageId = "crossbeam-deque";}{name = "crossbeam-utils";packageId = "crossbeam-utils"; - replacement in Cargo.nix at line 2725
packageId = "rand";packageId = "rand 0.8.3"; - edit in Cargo.nix at line 2770
name = "twox-hash";packageId = "twox-hash";}{ - edit in Cargo.nix at line 3042
};"memoffset" = rec {crateName = "memoffset";version = "0.6.1";edition = "2015";sha256 = "11yxgw330cf8g4wy0fnb20ag8gg1b33fsnfmg2g8z6h5wc444yqm";authors = ["Gilad Naaman <gilad.naaman@gmail.com>"];buildDependencies = [{name = "autocfg";packageId = "autocfg";}];features = {};resolvedDefaultFeatures = [ "default" ]; - replacement in Cargo.nix at line 3753
packageId = "rand";packageId = "rand 0.8.3"; - replacement in Cargo.nix at line 4073
"rand" = rec {"rand 0.7.3" = rec {crateName = "rand";version = "0.7.3";edition = "2018";sha256 = "00sdaimkbz491qgi6qxkv582yivl32m2jd401kzbn94vsiwicsva";authors = ["The Rand Project Developers""The Rust Project Developers"];dependencies = [{name = "getrandom";packageId = "getrandom 0.1.16";rename = "getrandom_package";optional = true;}{name = "libc";packageId = "libc";optional = true;usesDefaultFeatures = false;target = { target, features }: (target."unix" or false);}{name = "rand_chacha";packageId = "rand_chacha 0.2.2";usesDefaultFeatures = false;target = { target, features }: (!(target."os" == "emscripten"));}{name = "rand_core";packageId = "rand_core 0.5.1";}{name = "rand_hc";packageId = "rand_hc 0.2.0";target = { target, features }: (target."os" == "emscripten");}];devDependencies = [{name = "rand_hc";packageId = "rand_hc 0.2.0";}];features = {"alloc" = [ "rand_core/alloc" ];"default" = [ "std" ];"getrandom" = [ "getrandom_package" "rand_core/getrandom" ];"nightly" = [ "simd_support" ];"simd_support" = [ "packed_simd" ];"small_rng" = [ "rand_pcg" ];"std" = [ "rand_core/std" "rand_chacha/std" "alloc" "getrandom" "libc" ];"stdweb" = [ "getrandom_package/stdweb" ];"wasm-bindgen" = [ "getrandom_package/wasm-bindgen" ];};resolvedDefaultFeatures = [ "alloc" "default" "getrandom" "getrandom_package" "libc" "std" ];};"rand 0.8.3" = rec { - replacement in Cargo.nix at line 4150
packageId = "rand_chacha";packageId = "rand_chacha 0.3.0"; - replacement in Cargo.nix at line 4161
packageId = "rand_hc";packageId = "rand_hc 0.3.0"; - replacement in Cargo.nix at line 4169
packageId = "rand_hc";packageId = "rand_hc 0.3.0"; - replacement in Cargo.nix at line 4183
"rand_chacha" = rec {"rand_chacha 0.2.2" = rec { - edit in Cargo.nix at line 4185
version = "0.2.2";edition = "2018";sha256 = "00il36fkdbsmpr99p9ksmmp6dn1md7rmnwmz0rr77jbrca2yvj7l";authors = ["The Rand Project Developers""The Rust Project Developers""The CryptoCorrosion Contributors"];dependencies = [{name = "ppv-lite86";packageId = "ppv-lite86";usesDefaultFeatures = false;features = [ "simd" ];}{name = "rand_core";packageId = "rand_core 0.5.1";}];features = {"default" = [ "std" "simd" ];"std" = [ "ppv-lite86/std" ];};resolvedDefaultFeatures = [ "std" ];};"rand_chacha 0.3.0" = rec {crateName = "rand_chacha"; - replacement in Cargo.nix at line 4283
"rand_hc" = rec {"rand_hc 0.2.0" = rec {crateName = "rand_hc";version = "0.2.0";edition = "2018";sha256 = "0g31sqwpmsirdlwr0svnacr4dbqyz339im4ssl9738cjgfpjjcfa";authors = ["The Rand Project Developers"];dependencies = [{name = "rand_core";packageId = "rand_core 0.5.1";}];};"rand_hc 0.3.0" = rec { - replacement in Cargo.nix at line 4766
version = "1.1.7";version = "1.2.0"; - replacement in Cargo.nix at line 4768
sha256 = "1v73b74y36jyqjab2qmycchbqkkg4flwybzwij2v7lazc77qfbgi";src = lib.cleanSourceWith { filter = sourceFilter; src = ../sanakirja/sanakirja; }; - replacement in Cargo.nix at line 4820
version = "1.1.1";version = "1.2.3"; - replacement in Cargo.nix at line 4823
sha256 = "1i0d8kidgfrhxnv6gwbad1dn783x5y8365ki081v8l0ljd0rv6hi";src = lib.cleanSourceWith { filter = sourceFilter; src = ../sanakirja/sanakirja-core; }; - edit in Cargo.nix at line 5130
"static_assertions" = rec {crateName = "static_assertions";version = "1.1.0";edition = "2015";sha256 = "0gsl6xmw10gvn3zs1rv99laj5ig7ylffnh71f9l34js4nr4r7sx2";authors = ["Nikolai Vazquez"];features = {};}; - replacement in Cargo.nix at line 5251
packageId = "rand";packageId = "rand 0.8.3"; - replacement in Cargo.nix at line 5509
version = "0.20.2";version = "0.20.3"; - replacement in Cargo.nix at line 5511
sha256 = "0mny64g0b22dj663lihwkzvyvdsc69c3wcqcpbaj020rmqhsqd9j";sha256 = "0582s732sdgns8dsgwpm52p26vrr8jwr14w7fmvmlzrjw8r4q89j"; - edit in Cargo.nix at line 5961
};"twox-hash" = rec {crateName = "twox-hash";version = "1.6.0";edition = "2018";crateBin = [];sha256 = "0ndb4pil758kn0av83jjgq8kkfkwc5lhi5ii7fk5yw96h1wapy04";authors = ["Jake Goulding <jake.goulding@gmail.com>"];dependencies = [{name = "cfg-if";packageId = "cfg-if 0.1.10";usesDefaultFeatures = false;}{name = "rand";packageId = "rand 0.7.3";optional = true;}{name = "static_assertions";packageId = "static_assertions";usesDefaultFeatures = false;}];features = {"default" = [ "std" ];"serialize" = [ "serde" ];"std" = [ "rand" ];};resolvedDefaultFeatures = [ "default" "rand" "std" ]; - edit in Cargo.lock at line 257
dependencies = ["cfg-if 1.0.0",][[package]]name = "crossbeam-deque"version = "0.8.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" - edit in Cargo.lock at line 268[20.1038908][164.862]
"crossbeam-epoch","crossbeam-utils", - edit in Cargo.lock at line 273[164.877][164.877]
name = "crossbeam-epoch"version = "0.9.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12"dependencies = ["cfg-if 1.0.0","crossbeam-utils","lazy_static","memoffset","scopeguard",][[package]] - edit in Cargo.lock at line 933
"crossbeam-deque","crossbeam-utils", - replacement in Cargo.lock at line 945
"rand","rand 0.8.3", - edit in Cargo.lock at line 955
"twox-hash", - edit in Cargo.lock at line 1049
][[package]]name = "memoffset"version = "0.6.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87"dependencies = ["autocfg", - replacement in Cargo.lock at line 1305
"rand","rand 0.8.3", - edit in Cargo.lock at line 1434
version = "0.7.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"dependencies = ["getrandom 0.1.16","libc","rand_chacha 0.2.2","rand_core 0.5.1","rand_hc 0.2.0",][[package]]name = "rand" - replacement in Cargo.lock at line 1452
"rand_chacha","rand_chacha 0.3.0", - replacement in Cargo.lock at line 1454
"rand_hc","rand_hc 0.3.0",][[package]]name = "rand_chacha"version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"dependencies = ["ppv-lite86","rand_core 0.5.1", - edit in Cargo.lock at line 1497
version = "0.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"dependencies = ["rand_core 0.5.1",][[package]]name = "rand_hc" - replacement in Cargo.lock at line 1655
version = "1.1.7"version = "1.2.0" - replacement in Cargo.lock at line 1657
checksum = "f12d87cf615fd1b3858cfc2fcfa9236f4ebc2063be62b194c45e9ae1c959e3ec"checksum = "d822992da34989ceda221b7cc3f99381da3130c8e90f393054b0ea4e80617265" - replacement in Cargo.lock at line 1671
version = "1.1.1"version = "1.2.4" - replacement in Cargo.lock at line 1673
checksum = "119a9d41931450b40302711633902f7da0635b686af167b6ed30bbd7e2440dc4"checksum = "c15b6118bc265955b685bee694a1f04c70dfb65344411495d88e716a2cd74a3b" - edit in Cargo.lock at line 1793
name = "static_assertions"version = "1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"[[package]] - replacement in Cargo.lock at line 1840
"rand","rand 0.8.3", - replacement in Cargo.lock at line 1947
version = "0.20.2"version = "0.20.3" - replacement in Cargo.lock at line 1949
checksum = "3235ac21ae190820d5ba0c333e58324cb7edf79f1c463a8c914d88051e31de56"checksum = "32214c32e2327f5a7775879390b944396f23ae28f5f2a71bd2f6352dc6d10215" - edit in Cargo.lock at line 2103
name = "twox-hash"version = "1.6.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"dependencies = ["cfg-if 0.1.10","rand 0.7.3","static_assertions",][[package]]