pub fn backward_dfs_with_path<G>(
    graph: &G,
    reachable_nodes: &BitVec,
    on_directory: impl FnMut(NodeId, PathParts<'_>) -> Result<bool>,
    on_revrel: impl FnMut(NodeId, PathParts<'_>) -> Result<()>,
    root: NodeId
) -> Result<()>where
    G: SwhLabelledBackwardGraph + SwhGraphWithProperties,
    <G as SwhGraphWithProperties>::LabelNames: LabelNames,
    <G as SwhGraphWithProperties>::Maps: Maps,
Expand description

Traverses backward from a directory or content, calling the callbacks on any directory or revision node found.

reachable_nodes is the set of all nodes reachable from a head revision/release (nodes not in the set are ignored).

If on_directory returns false, the directory’s predecessors are ignored.

FIXME: on_directory is always called on the root, even if the root is a content