sapling/eden/scm/lib/dag
Stefan Filip ea89b541e1 segmented_changelog: add Dag struct and location_to_name functionality
Summary:
The IdDag provides graph algorithms using Segments.
The IdMap allows converting from the SegmentedChangelogId domain to the
ChangesetId domain.
The Dag struct wraps IdDag and IdMap in order to provide graph algorithms using
the common application level identifiers for commits (ChangesetId).

The construction of the Dag is currently mocked with something that can only be
used in a test environment (unit tests but also integration tests).

This diff also implements a location_to_name function. This is the most
important new functionality that segmented changelog clients require. It
recovers the hash of a commit for which the client only has a segmented
changelog Id. The current assumption is that clients have identifiers for all
merge commit parents so the path to a known commit always follow a set
of first parents.

The IdMap queries will have to be changed to async in the future, but IdDag
queries we expect to stay sync.

Reviewed By: quark-zju

Differential Revision: D20635577

fbshipit-source-id: 4f9bd8dd4a5bd9b0de55f51086f3434ff507963c
2020-03-27 13:48:52 -07:00
..
benches dag: fix benchmarks 2020-02-28 09:23:59 -08:00
bindag dag: use IdDagStore in IdDag with type parameter 2020-03-16 14:41:41 -07:00
fuzz dag: add fuzz tests on the octopus DAG 2020-01-23 17:58:51 -08:00
src segmented_changelog: add Dag struct and location_to_name functionality 2020-03-27 13:48:52 -07:00
Cargo.toml dag: Add InProcessStore as iddagstore 2020-03-24 13:58:06 -07:00