WZVCLZKY34KQBQU6YBGJLQCDADBQ67LQVDNRVCMQVY3O3C3EIWSQC
I52XSRUH5RVHQBFWVMAQPTUSPAJ4KNVID2RMI3UGCVKFLYUO6WZAC
H23LO7U7MNB5GTLOUIFYAJ6DP57DM3VFBR4IBOAVPMHS356AYFPQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
UDHP4ZVBQZT2VBURB2MDCU2IZDNMCAFSIUKWRBDQ5BWMFKSN2LYQC
VQPAUKBQ2POZKL7CZFAZK5ZQKEBYL27XZYZWYUSH5AH25KK6DWKAC
76PCXGML77EZWTRI5E6KHLVRAFTJ2AB5YRN5EKOYNAPKTWY2KCGAC
if n < pos {
continue;
} else if n > pos {
writeln!(o, "-")?;
break;
} else {
writeln!(o, "{} {}", n, m.to_base32())?;
break;
match n.cmp(&pos) {
std::cmp::Ordering::Less => continue,
std::cmp::Ordering::Greater => {
writeln!(o, "-")?;
break;
}
std::cmp::Ordering::Equal => {
writeln!(o, "{} {}", n, m.to_base32())?;
break;
}
match *change {
Atom::EdgeMap(ref n) => {
remove_zombies(txn, channel, change_id, n)?;
repair_edges_context(
changes,
txn,
channel,
&mut ws.apply.missing_context,
change_id,
n,
)?
}
_ => {}
if let Atom::EdgeMap(ref n) = *change {
remove_zombies(txn, channel, change_id, n)?;
repair_edges_context(
changes,
txn,
channel,
&mut ws.apply.missing_context,
change_id,
n,
)?
if new_vertex.flag.contains(EdgeFlags::FOLDER) {
if new_vertex.down_context.is_empty() {
// let mut f = std::fs::File::create("debug_unrecord")?;
// txn.debug(&channel, &mut f).unwrap();
if new_vertex.flag.contains(EdgeFlags::FOLDER) && new_vertex.down_context.is_empty() {
// let mut f = std::fs::File::create("debug_unrecord")?;
// txn.debug(&channel, &mut f).unwrap();
} else {
if vertex.start == vertex.end {
debug!("delete_recursively {:?}", vertex);
// Killing an inode.
if !self.deleted_vertices.insert(vertex.start_pos()) {
continue;
}
if let Some(inode) = txn.get_revinodes(vertex.start_pos(), None) {
debug!(
"delete_recursively, vertex = {:?}, inode = {:?}",
vertex, inode
);
self.recorded_inodes
.insert(inode, vertex.start_pos().to_option());
self.rec
.updatables
.insert(self.rec.actions.len(), InodeUpdate::Deleted { inode });
}
self.delete_inode_vertex(txn, channel, vertex, vertex.start_pos(), full_path)
} else if vertex.start == vertex.end {
debug!("delete_recursively {:?}", vertex);
// Killing an inode.
if !self.deleted_vertices.insert(vertex.start_pos()) {
continue;
}
if let Some(inode) = txn.get_revinodes(vertex.start_pos(), None) {
debug!(
"delete_recursively, vertex = {:?}, inode = {:?}",
vertex, inode
);
self.recorded_inodes
.insert(inode, vertex.start_pos().to_option());
self.rec
.updatables
.insert(self.rec.actions.len(), InodeUpdate::Deleted { inode });
if v.flag.contains(EdgeFlags::PARENT) && !v.flag.contains(EdgeFlags::DELETED) {
if !reachable.contains(&k) {
let file = find_file(txn, &channel, k, &mut stack, &mut visited);
alive_unreachable.insert(k, file);
}
if v.flag.contains(EdgeFlags::PARENT)
&& !v.flag.contains(EdgeFlags::DELETED)
&& !reachable.contains(&k)
{
let file = find_file(txn, &channel, k, &mut stack, &mut visited);
alive_unreachable.insert(k, file);
if is_dir {
if !txn.del_tree(file_id.as_file_id(), Some(inode))? {
debug!(
"rec_delete (is_dir): {:?} {:?} not present",
file_id.as_file_id(),
inode
);
}
if is_dir && !txn.del_tree(file_id.as_file_id(), Some(inode))? {
debug!(
"rec_delete (is_dir): {:?} {:?} not present",
file_id.as_file_id(),
inode
);
if std::str::from_utf8(&d.contents_a).is_err() || std::str::from_utf8(&b).is_err() {
if d.contents_a != b {
self.diff_binary(changes, txn, channel, path, inode, a, &b);
return Ok(());
}
if (std::str::from_utf8(&d.contents_a).is_err() || std::str::from_utf8(&b).is_err())
&& d.contents_a != b
{
self.diff_binary(changes, txn, channel, path, inode, a, &b);
return Ok(());
offsets.contents_len = self.contents.len() as u64;
offsets.total = offsets.contents_off + contents_comp.len() as u64;
let contents_len = self.contents.len() as u64;
let total = contents_off + contents_comp.len() as u64;
let offsets = Offsets {
version,
hashed_len,
unhashed_off,
unhashed_len,
contents_off,
contents_len,
total,
};
match atom {
Atom::EdgeMap(ref n) => {
for e in n.edges.iter() {
if e.flag.contains(EdgeFlags::DELETED) {
trace!("repairing context deleted {:?}", e);
repair_context_deleted(
txn,
channel,
&mut ws.missing_context,
n.inode,
change_id,
|h| change.knows(&h),
e,
)?
}
if let Atom::EdgeMap(ref n) = atom {
for e in &n.edges {
if e.flag.contains(EdgeFlags::DELETED) {
trace!("repairing context deleted {:?}", e);
repair_context_deleted(
txn,
channel,
&mut ws.missing_context,
n.inode,
change_id,
|h| change.knows(&h),
e,
)?