algos: Add iterators to walk across revisions history
This diff adds iterators to walk across the history of revisions heading to a given one. The following types of iteration are offered:
-
committer_date: revisions are returned in reverse chronological order of their commit date (same as git log)
-
dfs: revisions are returned in the same order they are visited when performing a depth-first search in pre order on the revisions DAG
-
dfs_post: revisions are returned in the same order they are visited when performing a depth-first search in post order on the revisions DAG
-
bfs: revisions are returned in the same order they are visited when performing a breadth-first search on the revisions DAG
Another iterator of type path, returning only revisions that modify a specific path in reverse chronological order of their commit date, is also introduced. Nevertheless, due to client-side implementation, its performance are far from optimal when walking across a really large history.
Related swh-web#1026 (closed) Related swh-web#1284
Migrated from D629 (view on Phabricator)