sapling/mononoke_types
Stanislau Hlebik 6b48086887 mononoke: add hacky list_directory_unodes() method to test unodes
Summary:
The high level goal is to test new unodes functionality. In particular, we want
to test `list_directory()` functionality.
There's a problem though - `list_directory()` returns Nodehash and filetype for
each entry it returns. That's cheap to do with mercurial manifests but not
cheap with unodes:

1) Mercurial manifests store filetype (i.e. whether it's a file,
symlink or executable) in manifests. But we don't store it in unode manifests
(it's stored in a separate file unode entry).
2) Unodes don't have mercurial hashes at all.

However there's currently a single user of `list_directory()` call - this is
scmquery - and it just discards both of the fields - https://fburl.com/8vr5hibo.

So I decided to introduce a separate `list_directory_unodes()` method that
returns a list of directory entries without any additional info. The plan is to
use it in scmquery for repos that already has unodes backfilled. That's
intended to be short-term - ideally we replace current thrift interface with
something more modern or at the very least replace `list_directory` with
`list_directory_unodes()` completely.

Reviewed By: farnz

Differential Revision: D16918232

fbshipit-source-id: f05185be8eecbf0852c7ddb0a482d4a5a63f8b53
2019-08-22 02:50:59 -07:00
..
if mononoke/{types,filestore}: use a separate type for File Chunks 2019-08-02 03:43:16 -07:00
mocks remove some extern crates and #[macro_use] 2019-05-21 12:25:03 -07:00
src mononoke: add hacky list_directory_unodes() method to test unodes 2019-08-22 02:50:59 -07:00
Cargo.toml Transition fbcode Rust crates to 2018 edition 2019-06-24 13:15:17 -07:00