sapling/eden/scm/lib/dag
Jun Wu 30ad76433e dag: add a way to describe bytes in indexedlog IdDag store
Summary:
This will be useful to explain bytes in the indexedlog.

Together with `debugdumpindexedlog` this can be used to troubleshoot issues.
For example, `debugdumpindexedlog` has:

  # Entry 11763:
  0004064b: 00 03 01 00 00 00 00 00 05 f1 00 01 ea 8b 80 80  ................
  0004065b: 80 80 80 80 01                                   .....

The entry can then be easily decoded via debugshell:

  In [1]: def e(s):
   ...:     print(b.dag.describebytes(bin(s.replace(' ',''))))

  In [2]: e('00 03 01 00 00 00 00 00 05 f1 00 01 ea 8b 80 80 80 80 80 80 01')
  # 00: Flags = (empty)
  # 03: Level = 3
  # 01 00 00 00 00 00 05 f1: High = N1521
  # 00: Delta = 0 (Low = N1521)
  # 01: Parent count = 1
  # ea 8b 80 80 80 80 80 80 01: Parents[0] = N1514

Reviewed By: sfilipco

Differential Revision: D26654639

fbshipit-source-id: c8438623b7e22e6abaf5c3011be25587f9d68753
2021-02-25 08:32:48 -08:00
..
benches dag: move algorithms from IdDag<Store> to Store 2021-02-10 12:28:31 -08:00
bindag dag: make spanset module private 2021-02-05 11:53:45 -08:00
dag-types dag-types: add Location 2021-02-09 11:31:30 -08:00
fuzz dag: use non-master group in fuzz test 2020-08-26 15:32:24 -07:00
gitdag dag: make parent function async 2020-12-10 12:37:36 -08:00
src dag: add a way to describe bytes in indexedlog IdDag store 2021-02-25 08:32:48 -08:00
Cargo.toml dag: rename dag-wire-types to dag-types 2021-02-09 11:31:29 -08:00