HomeSoftware Heritage

algos: Add iterators to walk across revisions history

Authored by anlambert on Nov 6 2018, 10:19 PM.

Description

algos: Add iterators to walk across revisions history

This commit 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 performances
are far from optimal when walking across a really large history.

Related T1026
Related T1284

Details

Committed
anlambertNov 9 2018, 2:04 PM
Pushed
anlambertNov 9 2018, 2:13 PM
Differential Revision
D629: algos: Add iterators to walk across revisions history
Parents
rDSTO19d4019e21c0: Rename the 'ts' argument of 'origin_visit_add' to 'date'.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 2302
Build 2788: test-and-build