Commit Graph

10294 Commits

Author SHA1 Message Date
Thomas Orozco
4130c60595 mononoke/cmdlib: remove public-facing add_scribe_logging_args API
Summary:
Like it says in the title. There's no reason for this to be ad ad-hoc "throw in
an arg" when everything else is done by adding arg types.

Reviewed By: HarveyHunt

Differential Revision: D27791333

fbshipit-source-id: 38e5a479800179b249ace5cc599340cb84eb53e2
2021-04-16 10:27:44 -07:00
Thomas Orozco
cf5b91ec95 mononoke/cmdlib: remove public-facing add_mcrouter_args API
Summary:
Like it says in the title. Let's remove ad-hoc "add an arg then look the arg"
mechanisms like this one.

Reviewed By: HarveyHunt

Differential Revision: D27791334

fbshipit-source-id: 257cea7763ab5130525ad739fe4ebdda4e8bfeb6
2021-04-16 10:27:44 -07:00
Thomas Orozco
b8f95fe3b0 mononoke/cmdlib: split args module
Summary:
This module is way too big and bundles many different functions:

- Our app builder
- Our matches object and environment initialization
- A bunch of utility functions

Let's split it up

Reviewed By: HarveyHunt

Differential Revision: D27790730

fbshipit-source-id: 8353b18a28fde5267d03ba0342c8cb98ad855e37
2021-04-16 10:27:44 -07:00
Thomas Orozco
c8cc339309 mononoke: remove parse_caching
Summary:
This isn't useful anymore. Let's ask our MononokeMatches what is set up for
caching instead of parsing the args one more time.

Reviewed By: HarveyHunt

Differential Revision: D27767697

fbshipit-source-id: 9da83769284a4aed4a96cd0eb212f42dd01ade87
2021-04-16 10:27:43 -07:00
Thomas Orozco
db4c509b9e mononoke: use MononokeEnvironment in RepoFactory
Summary:
There is a very frustrating operation that happens often when working on the
Mononoke code base:

- You want to add a flag
- You want to consume it in the repo somewhere

Unfortunately, when we need to do this, we end up having to thread this from a
million places and parse it out in every single main() we have.

This is a mess, and it results in every single Mononoke binary starting with
heaps of useless boilerplate:

```
    let matches = app.get_matches();

    let (caching, logger, mut runtime) = matches.init_mononoke(fb)?;

    let config_store = args::init_config_store(fb, &logger, &matches)?;

    let mysql_options = args::parse_mysql_options(&matches);
    let blobstore_options = args::parse_blobstore_options(&matches)?;
    let readonly_storage = args::parse_readonly_storage(&matches);
```

So, this diff updates us to just use MononokeEnvironment directly in
RepoFactory, which means none of that has to happen: we can now add a flag,
parse it into MononokeEnvironment, and get going.

While we're at it, we can also remove blobstore options and all that jazz from
MononokeApiEnvironment since now it's there in the underlying RepoFactory.

Reviewed By: HarveyHunt

Differential Revision: D27767700

fbshipit-source-id: e1e359bf403b4d3d7b36e5f670aa1a7dd4f1d209
2021-04-16 10:27:43 -07:00
Thomas Orozco
eba01d39e5 mononoke: move ScrubHandler out of ScrubOptions
Summary:
ScrubOptions normally represents options we parsed from the CLI, but right now
we abuse this a little bit to throw a ScrubHandler into them, which we
sometimes mutate before using this config.

In this stack, I'm unifying how we pass configs to RepoFactory, and this little
exception doesn't really fit. So, let's change this up, and make ScrubHandler
something you may give the RepoFactory if you're so inclined.

Reviewed By: HarveyHunt

Differential Revision: D27767699

fbshipit-source-id: fd38bf47eeb723ec7d62f8d34e706d8581a38c43
2021-04-16 10:27:43 -07:00
Thomas Orozco
c2c904f933 mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches
Summary:
Basically every single Mononoke binary starts with the same preamble:

- Init mononoke
- Init caching
- Init logging
- Init tunables

Some of them forget to do it, some don't, etc. This is a mess.

To make things messier, our initialization consists of a bunch of lazy statics
interacting with each other (init logging & init configerator are kinda
intertwined due to the fact that configerator wants a logger but dynamic
observability wants a logger), and methods you must only call once.

This diff attempts to clean this up by moving all this initialization into the
construction of MononokeMatches. I didn't change all the accessor methods
(though I did update those that would otherwise return things instantiated at
startup).

I'm planning to do a bit more on top of this, as my actual goal here is to make
it easier to thread arguments from MononokeMatches to RepoFactory, and to do so
I'd like to just pass my MononokeEnvironment as an input to RepoFactory.

Reviewed By: HarveyHunt

Differential Revision: D27767698

fbshipit-source-id: 00d66b07b8c69f072b92d3d3919393300dd7a392
2021-04-16 10:27:43 -07:00
Thomas Orozco
9e92ba1d28 mononoke: always initialize tunables in integration tests
Summary:
We actually require tunables in our binaries, but some of our tests have
historically not initialized them, because the underlying binaries don't
load tunables (so they get defaults).

I'd like to remove the footgun of binaries not initializing tunables, but to do
this I need tunables to be everywhere, which is what this does.

Reviewed By: StanislavGlebik

Differential Revision: D27791723

fbshipit-source-id: 13551a999ecebb8e35aef55c0e2c0df0dac20d43
2021-04-16 10:27:43 -07:00
Thomas Orozco
3df7627d2d mononoke: rename MononokeEnvironment to MononokeApiEnvironment
Summary:
I want to call something else MononokeEnvironment (the environment the whole
binary is running in), so let's rename this one.

Reviewed By: StanislavGlebik

Differential Revision: D27767696

fbshipit-source-id: bd6f2f282a7fc1bc09926a0286ecb8a5777a0a24
2021-04-16 10:27:43 -07:00
Pyre Bot Jr
dc8edb9bd7 Add annotations to eden/fs/py/eden/thrift/test/client_test.py
Reviewed By: xavierd

Differential Revision: D27823522

fbshipit-source-id: 6bec6252e1c6f402528aed2ee784ba85373e6db3
2021-04-16 10:14:23 -07:00
Alex Hornby
072e871771 mononoke: log packblob test compressed sizes
Summary: This test failed on CI for unknown reasons,  log the sizes in the failure as a clue.

Reviewed By: farnz

Differential Revision: D27822287

fbshipit-source-id: d15c8165c1d5a5a588b48d7b8469e5cd9cba1a35
2021-04-16 08:34:19 -07:00
Jan Mazur
e885d25c86 use ErrorKind instead of generic ahyhow::Error to match on errors
Summary: Changing generic anyhow::Error to ErrorKind so there is no need to downcast when we want to match on errors.

Reviewed By: krallin

Differential Revision: D27742374

fbshipit-source-id: ba4c1779d5919eb989dadf5f457d893a3618fffc
2021-04-16 08:26:29 -07:00
Stanislau Hlebik
d93c5a3784 mononoke: add public phase warmer
Reviewed By: krallin

Differential Revision: D27821286

fbshipit-source-id: ece394a2f7f46a3b67d6074a615741c56dc7e3d8
2021-04-16 08:20:48 -07:00
Thomas Orozco
1367bb124f mononoke: "randomize" a few more queries
Reviewed By: StanislavGlebik

Differential Revision: D27821553

fbshipit-source-id: e5ebddfda7dc902efec0cf1a7924aa651b5cbc80
2021-04-16 07:11:52 -07:00
Simon Farnsworth
577d58ae72 Rearrange blobstore factory to ensure that PackBlob has a BlobstoreWithLink
Summary:
In the next diff, the packer will need to create PackBlobs with access to link and unlink operations on the underlying data store.

Rearrange blobstore factory so that this is guaranteed by design, noting that we will want to manually create just a PackBlob later.

Reviewed By: ahornby

Differential Revision: D27795485

fbshipit-source-id: e16c7baea4f2402a4f8f95d722adb5c422c5b8e3
2021-04-16 06:51:18 -07:00
Jan Mazur
77a205db89 quiet certain connection errors when shutting down
Summary: Similar to D27155123 (1a56da1c6f).

Reviewed By: krallin

Differential Revision: D27805926

fbshipit-source-id: cf58a2e9b2ef92ca536f3b61b63fb42cfb1ec940
2021-04-16 02:26:04 -07:00
Andrey Chursin
360a6b5a0e checkout: check unkwnown file content in native checkout
Summary:
This replicates behaviour of Python code - if unknown file content matches content of the file to be check out, do not abort checkout

This is useful for resuming interrupted checkouts / clones

Reviewed By: DurhamG

Differential Revision: D27799147

fbshipit-source-id: 7d2582583525da18fba08dfcd8bced2b619304de
2021-04-15 20:08:17 -07:00
Andrey Chursin
82f93150a0 vfs: add VFS::read
Summary: Adding method to VFS to read file content

Reviewed By: DurhamG

Differential Revision: D27799146

fbshipit-source-id: c7e5c2dbd496d3cfd349a435225b1d44ee14cda0
2021-04-15 20:08:17 -07:00
Thomas Orozco
acaa598e7a mononoke/bookmarks: temporarily work around fault injection in SQL queries
Reviewed By: markbt, mitrandir77, StanislavGlebik

Differential Revision: D27799466

fbshipit-source-id: b44c4d7a8c76a37a6683694cdf56bcb06e02a529
2021-04-15 13:11:13 -07:00
Katie Mancini
fd78a70d7a fix prefetch-profile activate
Summary:
activate recently got broken when we added the prefetch-metadata flag,
this needs to be on activate as well as fetch

Reviewed By: xavierd

Differential Revision: D27778771

fbshipit-source-id: 052710c2f206e66d8042314773b6b408cff4915c
2021-04-15 09:30:16 -07:00
Andrey Chursin
261e309caf checkout: handle --clean in native checkout
Summary: Currently native checkout aborts on unknown files even with --clean flag. It should not abort with --clean

Reviewed By: DurhamG

Differential Revision: D27779554

fbshipit-source-id: 2badc84c10eab28d2b1fc8840142ef883ac48c26
2021-04-15 09:26:12 -07:00
Stanislau Hlebik
38a3921a2f mercurial: fix unused_import warning
Summary: It's been showing up while building mononoke. Let's fix it

Reviewed By: sfilipco

Differential Revision: D27789928

fbshipit-source-id: a15912f66b9ad3370545aed88405dbeb800e63de
2021-04-15 09:20:09 -07:00
Durham Goode
f0f6a38fbe dynamicconfig: backout D26801059 that enabled no-repo configs
Summary: This seems to have broken the EdenFS HgPrefetch test.

Reviewed By: xavierd

Differential Revision: D27795192

fbshipit-source-id: 80a748036961aa6a5750182bf65637fb76825341
2021-04-15 09:00:19 -07:00
Thomas Orozco
aed52d2afc fix hg-server panic formatting
Summary:
This now warms as of Rust 1.51, but we turn it into an error:

https://www.internalfb.com/intern/sandcastle/log/?instance_id=18014398919947596&step_id=18014402571733773&step_index=5&name=Build

Context: https://fb.workplace.com/groups/rust.language/permalink/5558170997564803/

I think the diff that introduced this code raced with the one that updated the panic messages globally.

Reviewed By: HarveyHunt

Differential Revision: D27791846

fbshipit-source-id: d551768103a96ffcbe87770b0b79f92494f4fa87
2021-04-15 06:20:25 -07:00
Johan Schuijt-Li
deb1059f81 mononokepeer: support connecting over unix socket proxy
Reviewed By: markbt

Differential Revision: D27647191

fbshipit-source-id: c3b50529cd5ef421e84dc34b45550742f8cd19c6
2021-04-15 05:18:34 -07:00
CodemodService Bot
383d91a214 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D27790050

fbshipit-source-id: 7c17ceb0f960610333cc72b66efd696ca30898ef
2021-04-15 04:28:09 -07:00
Jan Mazur
de0cd376bf get --insecure flag from options
Summary:
Before:
```
➜  scm hg --insecure pull --config paths.default='mononoke://localhost:20667/fbsource' --insecure
pulling from mononoke://localhost:20667/fbsource
trying different paths
trying path infinitepush mononoke://mononoke.internal.tfbnw.net/fbsource
connected to twshared7229.27.lla2.facebook.com session XlIEDC1TJoVscAfF
searching for changes
adding commits
adding manifests
adding file changes
added 45 commits with 0 changes to 0 files
(running background incremental repack)
➜  scm hg --insecure pull --config paths.default='mononoke://devvm2552.lla0.facebook.com:20667/fbsource' --insecure
pulling from mononoke://devvm2552.lla0.facebook.com:20667/fbsource
connected to devvm2552.lla0.facebook.com session 14iIYK6mFs9KmUM3
no changes found
adding commits
devel-warn: applied empty changegroup at: /opt/fb/mercurial/edenscm/mercurial/bundle2.py:522 (_processchangegroup)
adding manifests
adding file changes
added 0 commits with 0 changes to 0 files
(running background incremental repack)
➜  scm hg pull --config paths.default='mononoke://devvm2552.lla0.facebook.com:20667/fbsource'                 pulling from mononoke://devvm2552.lla0.facebook.com:20667/fbsource
connected to devvm2552.lla0.facebook.com session kyOtOxOMm2iEAgqw
searching for changes
adding commits
adding manifests
adding file changes
added 1 commits with 0 changes to 0 files
(running background incremental repack)
```

Something from this stack D27243638 (3295f0f1fe) might have broken --insecure flag
when pulling. I believe this is the fix.

Reviewed By: johansglock

Differential Revision: D27765417

fbshipit-source-id: 7c7f47643e73b568985e74794ee028b40499674d
2021-04-15 00:32:17 -07:00
Andrey Chursin
9d644ac97e checkout: integrate with rust progress bar
Summary: This will show proper checkout progress when using native checkout

Reviewed By: quark-zju

Differential Revision: D27775423

fbshipit-source-id: 79f2afa02bd1fab7d5f747da1c714d4d1126ce7c
2021-04-14 19:43:26 -07:00
Maxime Arthaud
f2c0b69e6d suppress errors in fbcode/eden - batch 1
Reviewed By: MaggieMoss

Differential Revision: D27738056

fbshipit-source-id: 82957c165d968da999d021e9745b1bf967c615ea
2021-04-14 18:04:55 -07:00
Arun Kulshreshtha
a1be9e6a7f http-client: avoid quadratic behavior when deseralizing large CBOR values
Summary:
EdenAPI makes heavy use of streaming HTTP responses consisting of a series of serialized CBOR values. In order to process the data in a streaming manner, we use the `CborStream` combinator, which attempts to deserialize the CBOR values as they are received.

`CborStream` hits a pathological case when it receives a very large CBOR value. Previously, it would always buffer the input stream into 1 MB chunks, and attempt to deserialize whenever a new chunk was received. In the case of downloading values that are >1GB in size, this meant potentially thousands of wasted deserialization attempts. In practice, this meant that EdenAPI would hang when receiving the content of large files.

To address this problem, this diff adds a simple heuristic: If a partial CBOR value exceeds the current buffer size, double the size threshold before attempting to deserialize again. This reduces the pathological case from `O(n^2)` to `O(log(n))` (with some caveats, described in the comment in the code).

Reviewed By: krallin

Differential Revision: D27759698

fbshipit-source-id: 67882c31ce95a934b96c61f1c72bd97cad942d2e
2021-04-14 17:34:01 -07:00
Durham Goode
4803877dde dynamicconfig: generate dynamicconfigs when there's no repo
Summary:
Previously we'd skip dynamicconfigs when there wasn't a repo available.
Now that dynamicconfig can represent the NoRepo state, let's load dynamicconfigs
in that situation.

This also supports the case where there is no user name.

Reviewed By: kulshrax

Differential Revision: D26801059

fbshipit-source-id: 377cfffb6695a7fbe31303868a88862259ebf8c4
2021-04-14 14:32:16 -07:00
Pyre Bot Jr
b127a5ab2d Add annotations to eden/fs/cli/doctor/test/disk_usage_test.py
Reviewed By: xavierd

Differential Revision: D27766016

fbshipit-source-id: 9862fc315794feaa5f1dd9f1723514e4a0ba0f25
2021-04-14 13:43:13 -07:00
Arun Kulshreshtha
d8cbafba34 edenapi: add edenapi.maxrequests option
Summary: Add a new `edenapi.maxrequests` config option to allow controlling the number of parallel in-flight requests. This can be used to bound resource usage of the client when requesting large amounts of data.

Reviewed By: sfilipco

Differential Revision: D27724817

fbshipit-source-id: 8d607efa83d8b0b94074d1a6e06f6c536cc0c791
2021-04-14 12:41:22 -07:00
Arun Kulshreshtha
c33ed64827 http-client: add option to limit concurrency
Summary: Add a method to allow setting `CURLMOPT_MAX_TOTAL_CONNECTIONS`, which limits the number of concurrent requests within a curl multi session. If the number of requests in the session exceeds this number, they will be queued and sent once earlier requests have completed.

Reviewed By: sfilipco

Differential Revision: D27724818

fbshipit-source-id: 436384aed9d6d29f426e5e45aebb7a72c24ba667
2021-04-14 12:41:22 -07:00
Stanislau Hlebik
e8baaa6bc9 mononoke: log hash validation failures to ods
Summary:
In D27459516 (7dc59708ce) I've added hg filenode hash validation to walker, however I forgot
to start logigng validation failures to walker.

Reviewed By: ahornby

Differential Revision: D27764660

fbshipit-source-id: b012f3d6b0f7a39aa82c966fccc0835ee0b05f0c
2021-04-14 10:17:33 -07:00
Stefan Filip
c694f63a48 configparser: pass fb feature to hostcaps
Summary:
Without this, `make local` will build `hostcaps` without fb-specific logic and
cause wrong configs being used. `hg up master` will error out like:

  File "treemanifest/__init__.py", line 690, in _httpgetdesignatednodes
    self.edenapi.trees(dpack, self.name, keys)
  RustError: Server reported an error (403 Forbidden)

Reviewed By: quark-zju

Differential Revision: D27759821

fbshipit-source-id: d42895f44bc53003f2578b65640ebe4ee05d52e6
2021-04-14 10:15:54 -07:00
Thomas Orozco
ff4fd5bc19 revisionstore: stop ignoring errors in prefetch
Summary:
Right now, if prefetch fails, we just give the client back an error saying
"content not found".

This isn't super helpful, because usually the reason the content is not found
is because we cannot talk to the server that has the content, so showing the
user why we cannot talk to said server is more useful.

I'd like to ship this gradually, so I also added a config flag to turn it off.
Initially I'll have the flag set, but I did default it to not-set in the code
so that our tests run with the desired configuration.

Note: I initially contemplated adding logging for this here, but after
discussion with xavierd it looks like just failing instead of eating the error
is probably a better approach (and it's much simpler). This is also consistent
with what EdenAPI does.

Reviewed By: mzr

Differential Revision: D27761572

fbshipit-source-id: 3506d9c97a00e3f076bd346883e07f49194b0b06
2021-04-14 09:22:28 -07:00
Thomas Orozco
80ce907817 revisionstore: don't fail on 404 on some objects from the server
Summary:
Right now, if the server ever tells us a file is missing, we fail the entire
batch download. This is a bit unfortunate because other objects could still be
downloaded, but also because we lose the distinction between "server crashed"
and "server told us the data we want does not exist".

Besides, it's actually a bit unnecessary. Indeed, this fails, we just ignore
the error anyway up the stack, so it never actually gets accessed.

Reviewed By: mzr

Differential Revision: D27761574

fbshipit-source-id: cb4fb0526a3bf19c04ecb81c05d44d4d8afb81ad
2021-04-14 09:22:28 -07:00
Thomas Orozco
97dc596648 lfs_protocol: implement Display for Operation
Summary: It's convenient!

Reviewed By: StanislavGlebik

Differential Revision: D27761575

fbshipit-source-id: ceff362197f0c08dd22d3940440b6ddde0f9639c
2021-04-14 09:22:28 -07:00
Thomas Orozco
cd87d03eb4 revisionstore: remove some downcasting
Summary: We can just return the actual error here now.

Reviewed By: sfilipco

Differential Revision: D27761573

fbshipit-source-id: 0866f976b4ed434deffd96be6820ad05d27b7b93
2021-04-14 09:22:28 -07:00
Mark Juggurnauth-Thomas
f897ce4fce cmdutil: indicate that hg update needs a destination
Summary:
If a operation can't proceed because we are in an interrupted update state,
indicate in the hint that `hg update` needs a destination.

Reviewed By: sfilipco

Differential Revision: D27764182

fbshipit-source-id: f0734a4929e34833c4bf84e148db04d57b779246
2021-04-14 09:19:10 -07:00
Kostia Balytskyi
fc3908e9fa repo_client: log full gettreepack args to scuba in verbose mode
Summary:
This will allow us to have greater visibility into what's going on when there are production issues.

Note: for getpack, the params data model is `[MPath, [Node]]`. In practice there seems to always just be 1 node per mpath. However, to preserve the mapping, I log every mpath in a separate sample.

Reviewed By: ahornby

Differential Revision: D26690685

fbshipit-source-id: 36616256747b61390b0435467892daeff2b4dd07
2021-04-14 08:29:59 -07:00
Egor Tkachenko
1a7f5eeaa2 Delete commitcloud backfiller source code
Summary:
Continue deletion

byfirebepurged

Reviewed By: StanislavGlebik

Differential Revision: D27708132

fbshipit-source-id: 928525892b8d46a48d4e6043f81e273fd74e8c53
2021-04-14 02:52:30 -07:00
Thomas Orozco
1abb41f42d revisionstore: lfs: add support for downloading content in chunks
Summary:
NOTE: The revisionstore LFS tests talk to prod Mononoke LFS, so the test here
will fail until that is deployed.

Like it says in the title, this adds support for downloading content in chunks
instead of all in one go. The underlying goal here is to let us do better load
balancing server side. This earlier diff in this stack explains that in more
detail: D27188610 (820b538001).

Reviewed By: quark-zju

Differential Revision: D27191594

fbshipit-source-id: 19b1be9bddc6b32b1fabfe4ab5738dfcf71b1a85
2021-04-14 02:49:47 -07:00
Thomas Orozco
8d9e7b52df mononoke/lfs_server: don't trust the client to provide valid size
Summary:
Historically, we haven't really cared about the sizes provided by clients in
LFS, and we went as far as just echoing them back to the client.

However, with the support I'm adding for range requests, this will start to
matter, because clients will ask for content in this range, so if the client
has the wrong size, we should correct it for them rather than just let them
proceed, lest they fail to download the file properly.

That being said, I am pretty sure there are places relying on us not caring
about the size, so I'm not throwing errors there.

Reviewed By: mitrandir77

Differential Revision: D27710438

fbshipit-source-id: ab670b44364604c07c449e500e379ca40b8c5ec1
2021-04-14 01:22:28 -07:00
Thomas Orozco
115f7a5c6b mononoke_types: add conversions to lfs_protocol types
Summary:
Like it says in the title. This is helpful for the next diff here, and it's
generally convenient to have nice conversions between our frontend and backend
types.

Reviewed By: HarveyHunt

Differential Revision: D27710439

fbshipit-source-id: f7d4279d750715866844ee0b32418825fd325499
2021-04-14 01:22:28 -07:00
Andrii Grynenko
e1dc359365 Move ReleasableDestructor into HeaderClientChannel
Summary: Since HeaderClientChannel now accepts a transport unique_ptr there's no need to have this deleter exposed outside of HeaderClientChannel.

Reviewed By: iahs

Differential Revision: D27729209

fbshipit-source-id: 064b03afdfe567b6df6437348596f0f6f97f6aaf
2021-04-13 23:35:41 -07:00
Meyer Jacobs
0ec6d1fcc8 scmstore: Introduce FetchKey and FetchValue traits
Summary: Introduce `FetchKey` and `FetchValue` traits to simplify repeated trait bounds in many `ReadStore` implementations. We also newly require `Clone` for both keys and values, which was already required by the fallback combinator.

Reviewed By: DurhamG

Differential Revision: D27652499

fbshipit-source-id: 6a3d5eb18a904b982fdb9946b80fcc9025d391ea
2021-04-13 22:13:03 -07:00
Meyer Jacobs
fb44958218 scmstore: improve debugscmstore command to support fetching arbitrary files / trees
Summary:
Extend debugscmstore command to fetch arbitrary files / trees by key.

Replace debugpyscmstore with a python fallback for debugscmstore (allowing you to test with the store as it is constructed for Python, with legacy fallback).

Refactor some functionality so it is shared between the rust and python versions of debugscmstore.

Currently the output is pretty ugly. It uses the `{:#?}` format for everything. In the next change, I propose modifying the `Debug` implementation for `minibytes::Bytes` to use ascii-escaped bytestrings rather than the default slice formatter to make things much nicer.

This new `debugscmstore` functionality should be useful in integration tests for testing scmstore under different repo configurations, and for test harnesses and performance testing (fetch a specific set of things easily, simulate delays in the key stream by delaying the input pipe, etc).

Reviewed By: andll

Differential Revision: D27351321

fbshipit-source-id: 8650480e3f5b045b279472643570309c48d7fe6b
2021-04-13 22:13:03 -07:00
Meyer Jacobs
830901c72d scmstore: introduce TreeScmStoreBuilder and refactor pyrevisionstore and debugscmstore to use it
Summary: Like `FileScmStoreBuilder`, but for trees. As LFS is not used for trees, `TreeScmStoreBuilder` defaults to `ExtStoredPolicy::Use` (pass along anything you find without LFS-specific checks).

Reviewed By: DurhamG

Differential Revision: D27641290

fbshipit-source-id: 637340a23cef058e7e37a41ae7f5b4fcc9481190
2021-04-13 22:13:03 -07:00