Skip to main content

Module relativize

Module relativize 

Source
Expand description

Id relativization: rewrite absolute file-path node ids to portable {target}/rel / {root}/rel tokens (and follow them through edges, parents, cycle node lists, and external path attributes), so a snapshot is machine-independent.

Functionsยง

relativize_graph
Relativize a structural Graph in place (before cycles are computed): file node ids (absolute paths) become {target}/rel / {root}/rel, edge endpoints and node parents follow, external path attributes are relativized, and redundant/empty path attributes are dropped.
relativize_level
Rewrite a file-based level graph from absolute paths to relativized ids: