Commit Graph

57076 Commits

Author SHA1 Message Date
Chad Austin
77d8cd3aae remove a dead eden thrift client method
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
2020-04-14 15:13:24 -07:00
svcscm
78e3a0fc65 Updating submodules
Summary:
GitHub commits:

ad8484f1db
02a2effec6
61f744df0a
e18d1fdae6
76d57da2b4
234e2ed5b6
d424d61c65

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 0897f66b03ee5de66dd565c52e0c47a3c9afb7eb
2020-04-14 13:08:52 -07:00
Chad Austin
db73eb37fd make deleted default constructors explicit
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
2020-04-14 12:47:03 -07:00
svcscm
9c47e79f36 Updating submodules
Summary:
GitHub commits:

be2fa79fa1
b87085650d

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 16a0c3e3fb16e7ab0622e8f2b92c8af6ca89a30a
2020-04-14 10:53:59 -07:00
Thomas Orozco
69b09c0854 mononoke/hg_sync_job: use hgsql name in integration test
Summary: What it says in the title.

Reviewed By: farnz

Differential Revision: D20943176

fbshipit-source-id: 8fae9b0bad32e2b6ede3c02305803c857c93f5e7
2020-04-14 10:26:11 -07:00
Thomas Orozco
eefb43237c mononoke/repo_read_write_status: use HgsqlName
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
2020-04-14 10:26:11 -07:00
Thomas Orozco
d84ba9caae mononoke/hg_sync_job: use the hgsql repo name for globalrevs
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
2020-04-14 10:26:10 -07:00
Thomas Orozco
5186d4e694 mononoke/metaconfig: include the repository hgsql name in the config
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
2020-04-14 10:26:10 -07:00
Thomas Orozco
92d3000204 mononoke: sync repos.thrift from Configerator
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
2020-04-14 10:26:10 -07:00
Steven Troxler
a70c6755e4 Asyncify prefetch_content code
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
2020-04-14 10:19:00 -07:00
Srikrishna Gopu
27d32bff2f getting rid of Time.h
Summary: As titled, getting rid of Time.h and use std::chrono to compute the current time.

Differential Revision: D21005713

fbshipit-source-id: 7e9d31af4b8652199bbe36b6ef76968cadcb4f2c
2020-04-14 09:53:10 -07:00
David Pletcher
147de1f274 Eliminate obsolete since-last-arc-diff flag
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
2020-04-14 09:09:12 -07:00
Lukas Piatkowski
6afe62eeaa eden/scm: split revisionstore into types and rest of logic
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
2020-04-14 07:50:19 -07:00
Steven Troxler
5c87595a4b Change fetch_all_public_changesets to new stream API
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
2020-04-14 07:12:33 -07:00
Simon Farnsworth
92fce3d518 Clean out unused deps from our TARGETS files
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
2020-04-14 03:38:11 -07:00
Thomas Orozco
ee2e6fd8e2 mononoke/blobrepo: make RepoBlobstore an actual struct
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
2020-04-14 03:19:25 -07:00
Kostia Balytskyi
66eb788549 admin: report metadata for filenodes
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
2020-04-14 02:01:35 -07:00
Jun Wu
4413d92cad pushrebase: add a test showing suboptimal abort
Reviewed By: simpkins

Differential Revision: D20911925

fbshipit-source-id: 81c7fe27b5cb85d6bdf5be385d3f1db84ed1b73b
2020-04-13 20:46:21 -07:00
Adam Simpkins
dd12bff33d clean up some pyre-fixme comments in eden/fs/cli/config.py
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
2020-04-13 19:36:47 -07:00
svcscm
6fd5044195 Updating submodules
Summary:
GitHub commits:

cf6ab27951

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 9708dcd6ca9bd9aa9dc1ddcdcaf11d01058dd576
2020-04-13 18:57:16 -07:00
Adam Simpkins
8ccbba9608 fix a couple compiler warnings about unhandled return code paths
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
2020-04-13 16:54:10 -07:00
Genevieve Helsel
a98dd1fa6b suggest graceful restart in hg status / old edenfs warnings
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
2020-04-13 16:25:58 -07:00
Srikrishna Gopu
a75c4ac770 return time for NowInSecFast
Summary: As titled, fixing NowInSecFast to return current time in OSS.

Reviewed By: boryas

Differential Revision: D20996594

fbshipit-source-id: 69fb37ea3a6a01e6d0f61fb696121705da52f811
2020-04-13 16:10:41 -07:00
Durham Goode
955013fdbc py3: fix test-bundle2-format.t
Summary: It now passes

Reviewed By: xavierd

Differential Revision: D20995130

fbshipit-source-id: c262cd8f3ef1c41cd52fd5ec5894be145059f045
2020-04-13 15:28:25 -07:00
Durham Goode
2f8cb4b6ec py3: fix test-bundle2-exchange.t
Summary: It now passes

Reviewed By: xavierd

Differential Revision: D20971712

fbshipit-source-id: d962c5f0171c056edfadb5cc795d1c8662456afa
2020-04-13 15:28:25 -07:00
Durham Goode
d9a508dfba py3: fix various wireprotocol related tests
Summary: They now pass

Reviewed By: xavierd

Differential Revision: D20970190

fbshipit-source-id: 8610e0877181c5e8b8842559f7a3e4a943c0c3fe
2020-04-13 15:28:24 -07:00
Xavier Deguillard
69ad493984 color: always specify alternate colors
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
2020-04-13 15:04:16 -07:00
Xavier Deguillard
b6cb2f37f2 tests: fix test-parse-date.t in python3
Reviewed By: DurhamG

Differential Revision: D20972880

fbshipit-source-id: 6436fb9af8bb8adf48d6c23a0e8cc453d9336c47
2020-04-13 14:59:41 -07:00
Xavier Deguillard
e8c2e7a280 tests: fix test-perftweaks-remotenames.t in python3
Summary: Reading needs to be done via readutf8.

Reviewed By: DurhamG

Differential Revision: D20972835

fbshipit-source-id: 0705c04f1db8b20cc4679852d75ea1790a5cf5f9
2020-04-13 14:59:41 -07:00
Xavier Deguillard
6b85ee4edb remotenames: decode the content of selectivepullenabled
Summary: We're writing utf-8 data to it, decode it before returning it.

Reviewed By: DurhamG

Differential Revision: D20972741

fbshipit-source-id: fb23a6d1c3188e10598b839639cdd5e74322089a
2020-04-13 14:59:41 -07:00
Xavier Deguillard
d2c56495e4 metalog: fix for python3
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
2020-04-13 14:55:11 -07:00
Xavier Deguillard
8178dfd89b context: fix symlink validation
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
2020-04-13 14:55:11 -07:00
Xavier Deguillard
ffd876d967 tests: fix test-filelog.py for python3
Reviewed By: DurhamG

Differential Revision: D20973502

fbshipit-source-id: dc3201dcc25509d569442a240fa8361a819f1f5f
2020-04-13 14:55:11 -07:00
Xavier Deguillard
17855deb17 tests: fix test-extdiff.t for python3
Reviewed By: DurhamG

Differential Revision: D20973286

fbshipit-source-id: 3a2d3cfc61567934d53e58ce561c367746c02403
2020-04-13 14:55:10 -07:00
Xavier Deguillard
4d5515e6ef tests: fix test-revlog.t for python3
Reviewed By: DurhamG

Differential Revision: D20973212

fbshipit-source-id: 1535d50a0cb2a7350083600e4e6c6506e0749072
2020-04-13 14:55:10 -07:00
Xavier Deguillard
5f4d53cb54 tests: fix test-hggit-illegal-contents.t
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
2020-04-13 14:25:35 -07:00
Chad Austin
7df52781c8 automatically register histograms for all EdenService functions
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
2020-04-13 14:13:02 -07:00
Adam Simpkins
772369731c implement our own temporary file management during integration tests
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
2020-04-13 13:12:04 -07:00
svcscm
a5dcac4e2d Updating submodules
Summary:
GitHub commits:

22a81c850f
9e6e570094
9eca6d651d
68d6d9203a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7904ed7bf02e21df04b60b72c171af4bddd8cf22
2020-04-13 12:09:19 -07:00
Nitzan Shaked
7833fd08d5 fix "empty link" bug in hyperlink
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
2020-04-13 11:45:39 -07:00
Xavier Deguillard
cdb0fbdb71 convert: do not try to re-encode in python3
Summary: The encoding is utf-8 already.

Reviewed By: sfilipco

Differential Revision: D20966808

fbshipit-source-id: ade012588bf14df07772db0819be8670ecdb3b09
2020-04-13 08:53:51 -07:00
Xavier Deguillard
aa836d38ea tests: enable histedit for python3
Summary: These are now passing

Reviewed By: sfilipco

Differential Revision: D20966083

fbshipit-source-id: c9a34ee23a1552200756a4e1f75a29574c37960d
2020-04-13 08:53:51 -07:00
Xavier Deguillard
c256ee21ef treemanifest: fix flat manifest conversion
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
2020-04-13 08:53:51 -07:00
Xavier Deguillard
9d1a53ef48 shelve: make it python3 compatible
Reviewed By: sfilipco

Differential Revision: D20965583

fbshipit-source-id: c1cfc9c8ecfa8681ddb46cbfa8b71c3da591f265
2020-04-13 08:53:50 -07:00
Xavier Deguillard
5aed0fe552 tests: fix test-important-remote-names-t.py for python3
Reviewed By: sfilipco

Differential Revision: D20965390

fbshipit-source-id: 790a712c8cc44d6a634ca4bfa7c37f9034a3f571
2020-04-13 08:53:50 -07:00
Xavier Deguillard
6939c33e06 tests: fix test-revlog-mmapindex.t for python3
Reviewed By: sfilipco

Differential Revision: D20965267

fbshipit-source-id: c75601f0cddec0a8388adca3d522d668b7b2a787
2020-04-13 08:53:50 -07:00
Xavier Deguillard
56c0cdb002 histgrep: fix for python3
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
2020-04-13 08:53:49 -07:00
Xavier Deguillard
ed8875ce70 tests: fix test-obsmarker-template-t.py for python3
Reviewed By: sfilipco

Differential Revision: D20964714

fbshipit-source-id: c92708336a6d75a645bd7725bf3dcca9abbe7029
2020-04-13 08:53:49 -07:00
Xavier Deguillard
e6f3aca0b0 cleanobsstore: write to the file with bytes
Reviewed By: sfilipco

Differential Revision: D20964696

fbshipit-source-id: 3dc81cfaa2172b494e89503e50b3c2d69ef153b4
2020-04-13 08:53:49 -07:00
Xavier Deguillard
a800e3e4ce tests: enable bunch of tests
Summary: These appear to pass now.

Reviewed By: quark-zju

Differential Revision: D20954747

fbshipit-source-id: ffd4dd4dc4832ed7cf84815ff1af9dad4361b26a
2020-04-13 08:53:48 -07:00