Summary:
I noticed we removed the call to getManifestEntry, but didn't remove
the method from the EdenThriftClient.
Reviewed By: singhsrb
Differential Revision: D21025523
fbshipit-source-id: 409eb52bad08b305ecfd0f8918cb71fec6a71aab
Summary:
Some of our types were vulnerable to the issue described in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1008r0.pdf so
make all deleted default constructors explicit.
Reviewed By: simpkins
Differential Revision: D21008976
fbshipit-source-id: 5b21923f25121dabf4bb0ea55f94536fb3532e6b
Summary:
We should use the HgsqlName to check the repo lock, because that's the one
Mercurial uses in the repo lock there.
Reviewed By: farnz
Differential Revision: D20943177
fbshipit-source-id: 047be6cb31da3ee006c9bedc3de21d655a4c2677
Summary:
The name for repository in hgsql might not match that of the repository itself.
Let's use the hgsql repo name instead of the repo name for syncing globalrevs.
Reviewed By: farnz
Differential Revision: D20943175
fbshipit-source-id: 605c623918fd590ba3b7208b92d2fedf62062ae1
Summary:
This parses out the Hgsql name out of the repo config. While in there, I also
noticed that our tests force us to have a default impl right now (there are
otherwise waaaay to many fields to specify), but at the same time we don't use
it everywhere. So, in an effort to clean up, I updated hooks to use a default.
I added a newtype wrapper for the hgsql name, since this will let me update the
globalrev syncer and SQL repo lock implementation to require a HgsqlName
instead of a string and have the compiler prove that all callsites are doing
so.
Reviewed By: farnz
Differential Revision: D20942177
fbshipit-source-id: bfbba6ba17cf3e3cad0be0f8406e41e5a6e6c3d4
Summary:
See D20941946 for why this is being added. This just brings in the updated
Thrift definition.
Reviewed By: farnz
Differential Revision: D20942176
fbshipit-source-id: c060f80666cb79f1498023276b7a09ec12bf52b4
Summary:
This diff may not have quite the right semantics.
It switches `prefetch_content` to async syntax,
in the process getting rid of the old function `spawn_future`,
which assumes old-style futures, in favor of using
`try_for_each_concurrent` to handle concurrency.
In the process, we were able to remove a couple levels of clones.
I *think* that the old code - in which each call to `spawn_future`
would spin off its own future on the side but then also wait
for completion, and then we buffered - would run at most 256
versions of `prefetch_content_node` at a time, and the current
code is the same. But it's possible that I've either halved or
doubled the concurrency somehow here, if I lost track of the
details.
Reviewed By: krallin
Differential Revision: D20665559
fbshipit-source-id: d95d50093f7a9ea5a04c835baea66e07a7090d14
Summary: As titled, getting rid of Time.h and use std::chrono to compute the current time.
Differential Revision: D21005713
fbshipit-source-id: 7e9d31af4b8652199bbe36b6ef76968cadcb4f2c
Summary:
This flag is an obsolete duplicate of since-last-submit.
Eliminate it to facilitate convenient tab autocompletion and make
the world less complicated.
Reviewed By: xavierd
Differential Revision: D21017515
fbshipit-source-id: f3e4db602a69f1c7da886d455ac36c4a2ddb6b01
Summary:
The revisionstore is a large crate with many dependencies, split out the types part which is most likely to be shared between different pieces of eden/mononoke infrastructure.
With this split it was easy to get eden/mononoke/mercurial/bundles
Reviewed By: farnz
Differential Revision: D20869220
fbshipit-source-id: e9ee4144e7f6250af44802e43221a5b6521d965d
Summary:
By switching to the new futures api, we can save a few heap allocations
and reduce indentation of the code.
Reviewed By: krallin
Differential Revision: D20666338
fbshipit-source-id: 730a97e0365c31ec1a8ab2995cba6dcbf7982ecd
Summary:
We had accumulated lots of unused dependendencies, and had several test_deps in deps instead. Clean this all up to reduce build times and speed up autocargo processing.
Net removal is of around 500 unneeded dependency lines, which represented false dependencies; by removing them, we should get more parallelism in dev builds, and less overbuilding in CI.
Reviewed By: krallin, StanislavGlebik
Differential Revision: D20999762
fbshipit-source-id: 4db3772cbc3fb2af09a16601bc075ae8ed6f0c75
Summary:
RepoBlobstore is currently a type alias for the underlying blobstore type. This
is a bit unideal for a few reasons:
- It means we can't add convenience methods on it. Notably, getting access to
the underlying blobstore can be helpful in tests, but as-is we cannot do that
(see the test that I updated in the LFS server change in this diff for an
example).
- Since the various blobstores we use for wrapping are blobstores themselves,
it is possible when deconstructing the repo blobstore to accidentally forget
to remove one layer. By making the internal blobstore a `T`, we can let the
compiler prove that deconstructing the `RepoBlobstore` is done properly.
Most of the changes in this diff are slight refactorings to make this compile
(e.g. removing obsolete trait bounds, etc.), but there are a couple functional
changes:
- I've extracted the RedactedBlobstore configuration into its own Arc. This
enables us to pull it back out of a RedactedBlobstore without having to copy
the actual data that's in it.
- I've removed `as_inner()` and `into_inner()` from `RedactedBlobstore`. Those
methods didn't really make sense. They had 2 use cases:
- Deconstruct the `RedactedBlobstore` (to rebuild a new blobstore). This is
better handled by `as_parts()`.
- Get the underlying blobstore to make a request. This is better handled by
yielding the blobstore when checking for access, which also ensures you
cannot accidentally bypass redaction by using `as_inner()` (this which also
allowed me to remove a clone on blobstore in the process).
Reviewed By: farnz
Differential Revision: D20941351
fbshipit-source-id: 9fa566702598b916cb87be6b3f064cd7e8e0b3e0
Summary:
Filenode envelopes have metadata, let's display it as well.
Althouth I've never seen it being non-empty, whenever I investigate some
filenode difference, I would like to know for sure.
Reviewed By: StanislavGlebik
Differential Revision: D20951954
fbshipit-source-id: 188321591e0d591d31e1ca765994f953dc23221c
Summary:
Clean up the last two remaining pyre-fixme comments in this file.
I believe these casts were needed at one point to make mypy happy, but it
looks like they are no longer necessary.
Reviewed By: genevievehelsel
Differential Revision: D21007030
fbshipit-source-id: 6933425d9fde8b86272c68b955faf21348453f68
Summary: gcc warned that these functions did not return with a value on all code paths.
Reviewed By: genevievehelsel
Differential Revision: D21004224
fbshipit-source-id: 3ccd38b19bb4f4c0dbe0b75b4d11f351b6690591
Summary: Since the old Edenfs warning is usually for simply picking up new eden releases, we can suggest the user runs a graceful restart instead of a normal restart to avoid them running into `Transport not connected` errors. This path is only hit in unix environments, so windows users will not see this (since graceful restart isn't supported there yet). Since this is a manual step as well, it will be easier for a user to see if they run into an issue here. This can also enable us to get more telemetry from users running graceful restarts.
Reviewed By: wez
Differential Revision: D20901597
fbshipit-source-id: 9e5c9a90313901be159f66afcbbadc5d7af4fe28
Summary: As titled, fixing NowInSecFast to return current time in OSS.
Reviewed By: boryas
Differential Revision: D20996594
fbshipit-source-id: 69fb37ea3a6a01e6d0f61fb696121705da52f811
Summary:
Having some colors, even dull is better than no colors. For every "bright"
color found in the repo, also specify their non-bright variant.
Reviewed By: DurhamG
Differential Revision: D20972198
fbshipit-source-id: ca10c0eac13129f120fc45623d134f279a75b3c2
Summary: We're writing utf-8 data to it, decode it before returning it.
Reviewed By: DurhamG
Differential Revision: D20972741
fbshipit-source-id: fb23a6d1c3188e10598b839639cdd5e74322089a
Summary:
While keys are strings, values are bytes buffer and thus needs to be converted
sometimes.
Reviewed By: DurhamG
Differential Revision: D20974484
fbshipit-source-id: 13394f5dc43191e85e4b1d350cc4fbbd8489572a
Summary:
Symlinks are pointers to path, that are required to be utf-8, thus we can
decode the data.
Reviewed By: DurhamG
Differential Revision: D20973701
fbshipit-source-id: 8399dfb3462fea907758a01ed2fcea508833fbaa
Summary:
With the upgraded git, some error message aren't the same as before, update the
test to reflect that.
Reviewed By: quark-zju
Differential Revision: D20993735
fbshipit-source-id: d9b8bfc9c6d10f7c0898299659e4322589ea8077
Summary:
Instead of manually enumerating every method defined in eden.thrift to
enable histogram statistics, use Thrift's own metadata.
Reviewed By: genevievehelsel
Differential Revision: D20929642
fbshipit-source-id: 5a54eb03e75fcd08cf653e2c53a78c8137ba9553
Summary:
Unfortunately the Python standard library's `tempfile.NamedTemporaryFile`
class does not work very well on Windows: even though the temporary files are
named, they cannot actually be opened by other processes. Attempting to open
the file fails with a permission denied error.
This code extends our existing temporary directory management logic to also
add APIs for creating individual temporary files. This has the advantage of
better grouping all temporary files for a given test in the same directory. I
also updated the code to include the test function name in the temporary
directory prefix. This should make it a little easier to identify which test
is at fault when there are temporary files left behind after a test. (This
can happen if the test gets killed or if it leaves behind files or mount
points that cannot be removed normally).
Reviewed By: wez
Differential Revision: D20885160
fbshipit-source-id: 7267b2352e51214354eab7ead839bf166d690974
Summary: `hyperlink(url, title)` returns a terminal escape sequence for the url even if the title provided is empty. While the terminal displays nothing, the actual string in hg-template-land is non-empty (it contains a url), and all the template functions that check for empty strings don't see it as empty.
Reviewed By: fanzeyi, xavierd
Differential Revision: D20970733
fbshipit-source-id: 04436714f3827b98b8fb249b3eb1da82f366807c
Summary: In Python3, str is not a byte string, but a unicode one. Use bytes instead.
Reviewed By: sfilipco
Differential Revision: D20965794
fbshipit-source-id: b04ff004aac87fd3afc8070fc8d1d849ad48d0d3
Summary:
In order to grep, the body of the file is decoded to utf8 with the error
handling "replace". This is probably OK as I would expect histgrep to be used
on text files, not random binary ones where grepping would probably not make a
lot of sense.
Reviewed By: sfilipco
Differential Revision: D20965178
fbshipit-source-id: 9ba234f33e801a78537c22b61dee434625449c01