H6JR7IAF5LHUDBRAQWAQLLNZR2ONBIXS5FJATAYCMJS7SYADCQLAC
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQC
VO5OQW4W2656DIYYRNZ3PO7TQ4JOKQ3GVWE5ALUTYVMX3WMXJOYQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
YN63NUZO4LVJ7XPMURDULTXBVJKW5MVCTZ24R7Z52QMHO3HPDUVQC
CCLLB7OIFNFYJZTG3UCI7536TOCWSCSXR67VELSB466R24WLJSDAC
I52XSRUH5RVHQBFWVMAQPTUSPAJ4KNVID2RMI3UGCVKFLYUO6WZAC
fn is_alive_or_zombie<T: GraphTxnT>(
txn: &T,
channel: &T::Graph,
a: &Vertex<ChangeId>,
) -> Result<bool, TxnErr<T::GraphError>> {
if a.is_root() {
return Ok(true);
}
for e in iter_adjacent(
txn,
channel,
*a,
EdgeFlags::PARENT,
EdgeFlags::all() - EdgeFlags::DELETED,
)? {
let e = e?;
let zf = EdgeFlags::pseudof();
if (e.flag() & zf != EdgeFlags::PSEUDO)
&& (e.flag().contains(EdgeFlags::BLOCK) || a.is_empty())
{
return Ok(true);
}
}
Ok(false)
}
let is_dead = parent_is_dead || {
if let Some(vertex) = txn.get_inodes(&inode_, None)? {
vertex.change != pending_change_id
&& !is_alive(txn, channel, &vertex.inode_vertex())?
} else {
true
}
};
let is_dead = parent_is_dead
|| (!id.basename.is_empty() && {
if let Some(vertex) = txn.get_inodes(&inode_, None)? {
vertex.change != pending_change_id
&& !is_alive_or_zombie(txn, channel, &vertex.inode_vertex())?
} else {
true
}
});