Commit Graph

90 Commits

Author SHA1 Message Date
Lukas Piatkowski
fa1a195fd0 mononoke/blobstore: pass CoreContext via borrowed instead of owned value
Summary: Follow up after removing 'static from blobstore.

Reviewed By: StanislavGlebik

Differential Revision: D25182106

fbshipit-source-id: e13a7a31d71b4674425123268e655ae66127f1b7
2020-11-27 03:31:07 -08:00
Thomas Orozco
acf1453e12 mononoke: rename BlobManifest to HgBlobManifest
Summary:
We have `HgBlobChangeset`, `HgFileEnvelope`, `HgManifestEnvelope` ... but we
also have `BlobManifest`. Let's be a little consistent.

Reviewed By: markbt

Differential Revision: D25122288

fbshipit-source-id: 9ae0be49986dbcc31cee9a46bd30093b07795c62
2020-11-26 11:26:50 -08:00
Thomas Orozco
015331583d mononoke: remove HgBlobEntry
Summary:
HgBlobEntry is kind of a problematic type right now:

- It has no typing to indicate if it's a file or a manifest
- It always has a file type, but we only sometimes care about it

This results in us using `HgBlobEntry` to sometimes represent
`Entry<HgManifestId, (FileType, HgFileNodeId)>`, and some other times to
represent `Entry<HgManifestId, HgFileNodeId>`.

This makes code a) confusing, b) harder to refactor because you might be having
to change unrelated code that cares for the use case you don't care about (i.e.
with or without the FileType), and c) results in us sometimes just throwing in
a `FileType::Normal` because we don't care about the type, which is prone to
breaking stuff.

So, this diff just removes it, and replaces it with the appropriate types.

Reviewed By: farnz

Differential Revision: D25122291

fbshipit-source-id: e9c060c509357321a8059d95daf22399177140f1
2020-11-26 08:22:05 -08:00
Thomas Orozco
c43aa44aca mononoke/mercurial_types: use manifest::Entry instead of HgEntryId
Summary:
I'd like to remove the number of places that use HgEntryId, and make its usage
a little more consistent. Indeed, right now, HgEntryId is used in some places
to upload things where we just give it a fake entry type, and sometimes to
represent an actual entry in a manifest; This isn't great.

Let's remove it from here.

Reviewed By: markbt

Differential Revision: D25122289

fbshipit-source-id: 5075383e037e4e890af203d133f0a25118c19823
2020-11-26 08:22:05 -08:00
Thomas Orozco
34fbac34e1 mononoke/mercurial_types: remove unused ContentBlobInfo
Summary:
This contains a path, which it turns out is actually never used throughout the
codebase. Remove it.

Reviewed By: markbt

Differential Revision: D25122292

fbshipit-source-id: eab528bfb1e3893bca4d92d62c30499cf9eead6c
2020-11-26 08:22:05 -08:00
Lukas Piatkowski
15f0f924e6 mononoke/blobstore: use async_trait instead of BoxFuture
Reviewed By: farnz

Differential Revision: D25124793

fbshipit-source-id: 1ebe72d1db8043fabf9f20538f3e95c755e049e0
2020-11-23 07:58:34 -08:00
Lukas Piatkowski
0f54cc3d63 mononoke/blobstore: make Blobstore generic over lifetime
Summary: Remove 'static requirement for async methods of Blobstore, propagate this change and fixup low hanging fruits where the code can become 'static free easily.

Reviewed By: ahornby, farnz

Differential Revision: D24839054

fbshipit-source-id: 5d5daa04c23c4c9ae902b669b0a71fe41ee6dee6
2020-11-20 05:51:52 -08:00
Thomas Orozco
d3235ff615 mononoke: remove name from HgBlobEntry
Summary:
This isn't actually being consulted anywhere save for a single test, so let's
just remove it (it's not like the test checks anything important — that field
might not as well exist given we never read it).

Reviewed By: farnz

Differential Revision: D25093494

fbshipit-source-id: 5f4a53f8666fc0e8a89ceade44baa96e71fb813f
2020-11-19 12:55:28 -08:00
Thomas Orozco
dae48357ac mononoke/mercurial_types: remove redundant passing of path in upload
Summary:
This is a bit unnecessary as it stands — we roundtrip the path through
execute() just to return it back. This path was used for trace logging, but
given we literally never look at this log, let's just simplify this logging a
little bit.

Reviewed By: StanislavGlebik

Differential Revision: D25089344

fbshipit-source-id: 15b0f1cce8c9b2938429de19ff063e5677794912
2020-11-19 12:55:28 -08:00
Alex Hornby
04c26ffd11 mononoke: add an output option to walker scrub
Summary: add an output option to walker scrub so we can dump out debug representation of any type the walker can walk

Reviewed By: farnz

Differential Revision: D24996433

fbshipit-source-id: a332d89d65e4d928159155a34bd39b0e2e1131de
2020-11-18 04:47:47 -08:00
Thomas Orozco
26e06ef1a0 mononoke/filestore: update fetch methods to return 0.3 stream
Summary:
This updates the external facing API of the filestore to use 0.3 streams.
Internally, there is still a bit of 0.3 streams, but as of this change, it's
all 0.3 outside.

This required a few changes here and there in places where it was simpler to
just update them to use 0.3 futures instead of `compat()`-ing everything.

Reviewed By: ikostia

Differential Revision: D24731298

fbshipit-source-id: 18a1dc58b27d129970a6aa2d0d23994d5c5de6aa
2020-11-06 07:26:04 -08:00
Thomas Orozco
184310158b mononoke/filestore: update fetch external API to 0.3 futures
Summary:
Like it says in the title. This required quite a lot of changes at callsites,
as you'd expect.

Reviewed By: StanislavGlebik

Differential Revision: D24731299

fbshipit-source-id: e58447e88dcc3ba1ab3c951f87f7042e2b03eb2c
2020-11-06 07:26:03 -08:00
Thomas Orozco
b6949dbc26 mononoke/filestore: update store to futures 0.3
Summary: Like it says in the title. This updates `store()` and its (many) callsites.

Reviewed By: ahornby

Differential Revision: D24728658

fbshipit-source-id: 5fccf76d25e58eaf069f3f0cf5a31d2c397687ea
2020-11-06 07:26:03 -08:00
Lukas Piatkowski
3c3de9e954 rust-shed/futures_01_ext: rename futures_ext to futures_01_ext
Summary: As part of the effort to deprecate futures 0.1 in favor of 0.3 I want to create a new futures_ext crate that will contain some of the extensions that are applicable from the futures_01_ext. But first I need to reclame this crate name by renaming the old futures_ext crate. This will also make it easier to track which parts of codebase still use the old futures.

Reviewed By: farnz

Differential Revision: D24725776

fbshipit-source-id: 3574d2a0790f8212f6fad4106655cd41836ff74d
2020-11-05 06:07:16 -08:00
Lukas Piatkowski
2a779e82d8 mononoke/mercurial_bundles: use futures 0.3 in Bundle2Item
Summary: This is a step towards modernizing unbundle crate to use futures 0.3.

Reviewed By: farnz

Differential Revision: D24682963

fbshipit-source-id: 55c17fd699846a24647a23ea1c22888407643dfd
2020-11-03 00:12:21 -08:00
Thomas Orozco
24560ded2e thrift: call hooks from Rust codegen
Summary:
This updates Thrift codegen for Rust to call hooks on a context stack in a
similar fashion as the C++ codegen.

There is still a bit of room for improvement here. Notably, we don't know how
much data we actually read or sent to the client, so for now those are
hard-coded to zero in the codegen. That's better than not calling those hooks
at all (which is what happens right now), but it could stand to be improved.

Reviewed By: jsgf

Differential Revision: D24445298

fbshipit-source-id: 470daf03057424dc300b6a193668be835ae28452
2020-10-22 17:01:47 -07:00
Lukas Piatkowski
87db93687e rust/shed/hostname: rename hostname dependency to unbreak doctests (#15)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/15

With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: https://github.com/rust-lang/cargo/issues/6819

This diff also removes the TravisCI build as it was broken and unused for some time.

Reviewed By: krallin

Differential Revision: D24390815

fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
2020-10-19 07:21:38 -07:00
Thomas Orozco
c7478113a3 mononoke/mercurial_types: get rid of HgManifest & HgEntry
Summary:
This trait is no longer used all that much outsides of a handful of tests, the
walker, and an admin subcommand, as it has been replaced by the `Manifest`
trait, which works over all kinds of Manifests, and has stronger typing (its
sub-entries always have a path, and they are wrapped in an enum that knows if
they're leaves or trees).

This left a bunch of old legacy code here or there, which is worth removing
to make sure we don't introduce any new callsites to this. Another motivation
is that this legacy code is often not very compatible with new code, and has
historically made it a bit tricky (everything owns a blobstore in this code,
which is pretty awkward and not at all how we do things nowadays).

There is, I think, a bit more potential here since we could also perhaps try to
remove the `HgBlobEntry` struct, but that has a callsites still, so I'm not
doing this here.

Reviewed By: StanislavGlebik

Differential Revision: D24306946

fbshipit-source-id: 8a73dbbf40a904ce19ac65d791b732091c206263
2020-10-15 04:56:13 -07:00
Kostia Balytskyi
2ea25308ab commit_rewriting: use is_empty() where possible
Summary: `clippy` often complains about the use of `.len() != 0`, `.len() > 0` or `.len() == 0`and proposes to use `.is_empty()` instead. This diff does that across Mononoke.

Reviewed By: aslpavel

Differential Revision: D24099427

fbshipit-source-id: 1bba2f958485b7efb3f41bf3eae820879c92b0e5
2020-10-04 10:03:42 -07:00
Lukas Piatkowski
3615a09d6f remove fbsource version, import github version
Summary:
This is (I think) the last step required to make rust-partial-io be github-first.

The diff was created using:
* `zbgs partial-io` and remove all instances of it in fbsource
* `hg rm common/rust/partial-io`
* add `partial-io` to `third-party/rust/Cargo.toml`
* `common/rust/tools/reindeer/vendor` to vendor
* `buck build eden/mononoke/mercurial/...` to check that it builds correctly
* `buck run //common/rust/cargo_from_buck:cargo_from_buck` to run autocargo

Reviewed By: aslpavel

Differential Revision: D23849634

fbshipit-source-id: 339fc3976cc9a0b6f10a0538d643b87797e2bc3c
2020-09-26 09:25:29 -07:00
Lukasz Piatkowski
772676a23f third-party/rust: bump third-party code versions
Reviewed By: aslpavel

Differential Revision: https://phabricator.intern.facebook.com/D23930000

fbshipit-source-id: d2f7a926e0a188694254a6f1f77f8408c4b1a0dd
2020-09-26 18:13:40 +02:00
Aida Getoeva
b92c64af7d shed/sql: make queries! macros work with new Rust mysql client
Summary:
shed/sql library used mainly to communicate with Mysql db and to have a nice abstraction layer around mysql (which is used in production) and sqlite (integration tests). The library provided an interface, that was backed up from Mysql side my raw connections and by MyRouter.
This diff introduces a new backend - new Mysql client for Rust.

New backend is exposed as a third variant for the current model: sqlite, mysql (raw conn and myrouter) and mysql2 (new client). The main reason for that is the fact that the current shed/sql interface for Mysql
(1) heavily depends on mysql_async crate, (2) introduces much more complexity than needed for the new client and (3) it seems like this will be refactored and cleaned up later, old things will be deprecated.
So to not overcomplicate things by trying to implement the given interface for the new Mysql client, I tried to simplify things by adding it as a third backend option.

Reviewed By: farnz

Differential Revision: D22458189

fbshipit-source-id: 4a484b5201a38cc017023c4086e9f57544de68b8
2020-09-11 06:33:37 -07:00
David Tolnay
0cb8a052f5 Update formatter to rustfmt 2.0
Reviewed By: zertosh

Differential Revision: D23591021

fbshipit-source-id: e664aa2fdd3aaa457796a59080be6b94f604a112
2020-09-09 07:52:33 -07:00
David Tolnay
be0786f14b Prepare for rustfmt 2.0
Summary:
Generated by formatting with rustfmt 2.0.0-rc.2 and then a second time with fbsource's current rustfmt (1.4.14).

This results in formatting for which rustfmt 1.4 is idempotent but is closer to the style of rustfmt 2.0, reducing the amount of code that will need to change atomically in that upgrade.

 ---

*Why now?* **:** The 1.x branch is no longer being developed and fixes like https://github.com/rust-lang/rustfmt/issues/4159 (which we need in fbcode) only land to the 2.0 branch.

 ---

Reviewed By: StanislavGlebik

Differential Revision: D23568780

fbshipit-source-id: b4b4a0aa683d236e2fdeb5b96d723ac2d84b9faf
2020-09-08 07:33:16 -07:00
David Tolnay
75c2118e01 Remove crate_root from Rust dependency info
Reviewed By: danobi

Differential Revision: D23430948

fbshipit-source-id: c4b374021325fc247121ceecd0e82a0291aa75d6
2020-08-31 14:43:24 -07:00
Alex Hornby
5631157574 mononoke: use sorted_vector_map when parsing hg manifest blob
Summary:
Use sorted_vector_map when parsing hg manifest blob, as blobs are usually stored sorted, which can result in high cost of BTree insertion when traversing large repos.

Also uses the size_hint() from the parsing Split to save reallocations during insert.

Reviewed By: markbt

Differential Revision: D22975883

fbshipit-source-id: 1faff754f03d7b2c20ebb741fec4f97b310852f9
2020-08-12 02:51:17 -07:00
Mark Thomas
b56a1b5b2c scs_server: add repo_list_hg_manifest
Summary:
To allow EdenFS to get aux manifest data from Mononoke without needing to derive fsnodes, provide
a mechanism to list a manifest using the hg manifest id that returns the size and content hashes
of each of the files.

NOTE: this is temporary until the EdenAPI server is fully online and serving this data.

Reviewed By: krallin

Differential Revision: D22975967

fbshipit-source-id: 0a25da6d74534d42fc3b5f38ba3b72107b209681
2020-08-06 11:28:11 -07:00
Mark Thomas
3afceb0e2c bookmarks: extract BundleReplayData from BookmarkUpdateReason
Summary:
Separate out the `BundleReplayData` from the `BookmarkUpdateReason` enum.  There's
no real need for this to be part of the reason, and removing it means we can
abstract away the remaining dependency on Mercurial changeset IDs from
the main bookmarks traits.

Reviewed By: mitrandir77, ikostia

Differential Revision: D22417659

fbshipit-source-id: c8e5af7ba57d10a90c86437b59c0d48e587e730e
2020-07-10 04:50:24 -07:00
Mark Thomas
5c95bf6be2 mutation_store: make separate requests by primordial and successor
Summary:
D22206317 (9a6ed4b6ca) added requesting of predecessor information for suspected primordials
by the successor ID.  This allows recovery of earlier predecessors when partial
data upload resulted in the history of a commit being extended backwards.

Unfortunately, while the individual requests are fast, the combined request
using `OR` in SQL ended up being very slow for some requests.

Separate out the requests at the application level, and aggregate the results
by concatenating them.  `collect_entries` already handles duplicates should any
arise.

Most of the time the successor query will very quickly return no rows, as
it only matters when history is extended backwards, which is expected to be
rare.

Reviewed By: ikostia

Differential Revision: D22456062

fbshipit-source-id: 1e6094b4ac1590a5824e9ae6ef48468766560188
2020-07-09 09:21:01 -07:00
Thomas Orozco
dd1aaf90fe mononoke/{hgproto,mercurial_bundles}: eliminate O(N^2) behavior in decoding
Summary:
This updates the AsyncRead implementations we use in hgproto and
mercurial_bundles to use a LimitedAsyncRead. The upshot of this change is that
we eliminate O(N^2) behavior when parsing the data we receive from clients.

See the earlier diff on this stack for more detail on where this happens, but
the bottom line is that Framed presents a full-size buffer that we zero out
every time we try to read data. With this change, the buffer we zero out is
comparable to the amount of data we are reading.

This matters in commit cloud because bundles might be really big, and a single
big bundle is enough to take an entire core for a spin or 20 minutes (and they
achieve nothing but time out in the end). That being said, it's also useful for
non-commit cloud bundles: we do occasionally receive big bundles (especially
for WWW codemods), and those will benefit from the exact same speedup.

One final thing I should mention: this is all in a busy CPU poll loop, and as I noted
in my earlier diff, the effect persists across our bundle receiving code. This means
it will sometimes result in not polling other futures we might have going.

Reviewed By: farnz

Differential Revision: D22432350

fbshipit-source-id: 33f1a035afb8cdae94c2ecb8e03204c394c67a55
2020-07-08 08:07:13 -07:00
Arun Kulshreshtha
5f0181f48c Regenerate all Cargo.tomls after upgrade to futures 0.3.5
Summary: D22381744 updated the version of `futures` in third-party/rust to 0.3.5, but did not regenerate the autocargo-managed Cargo.toml files in the repo. Although this is a semver-compatible change (and therefore should not break anything), it means that affected projects would see changes to all of their Cargo.toml files the next time they ran `cargo autocargo`.

Reviewed By: dtolnay

Differential Revision: D22403809

fbshipit-source-id: eb1fdbaf69c99549309da0f67c9bebcb69c1131b
2020-07-06 20:49:43 -07:00
Simon Farnsworth
b1c85aaf4b Switch Blobstore to new-style futures
Summary:
Eventually, we want everything to be `async`/`await`; as a stepping stone in that direction, switch the remaining lobstore traits to new-style futures.

This just pushes the `.compat()` out to old-style futures, but it makes the move to non-'static lifetimes easier, as all the compile errors will relate to lifetime issues.

Reviewed By: krallin

Differential Revision: D22183228

fbshipit-source-id: 3fe3977f4469626f55cbf5636d17fff905039827
2020-06-26 03:54:42 -07:00
Simon Farnsworth
454de31134 Switch Loadable and Storable interfaces to new-style futures
Summary:
Eventually, we want everything to be `async`/`await`; as a stepping stone in that direction, switch some of the blobstore interfaces to new-style `BoxFuture` with a `'static` lifetime.

This does not enable any fixes at this point, but does mean that `.compat()` moves to the places that need old-style futures instead of new. It also means that the work needed to make the transition fully complete is changed from a full conversion to new futures, to simply changing the lifetimes involved and fixing the resulting compile failures.

Reviewed By: krallin

Differential Revision: D22164315

fbshipit-source-id: dc655c36db4711d84d42d1e81b76e5dddd16f59d
2020-06-25 08:45:37 -07:00
Mark Thomas
9a6ed4b6ca mutationstore: deal with history being extended backwards
Summary:
If the first client to send mutation data for a commit is only aware of partial
history for that commit, the primordial commit that is determined will be the
earliest of those commits.  If another client comes along later with a longer
history, the new set of commits will be assigned a different primordial commit.

Make sure that when this happens, we still fetch the full history.  We do this
by including the successor in the search-by-primordial case, which allows us
to join together disconnected histories at the cost of one extra round-trip to
the database.

Note that the fast path for addition of a single mutation will not fill in the
missing history.  This is an acceptable trade-off for the faster performance
in the usual case.

Reviewed By: mitrandir77

Differential Revision: D22206317

fbshipit-source-id: 49141d38844d6cddc543b6388f0c31dbc70dcbc5
2020-06-25 06:29:15 -07:00
Mark Thomas
0f229aff4c mutationstore: deal with cycles when determining primordial changesets
Summary:
By design, the mutation history of a commit should not have any cycles.  However,
synthetic entries created by backfilling obsmarkers may inadvertently create
erroneous cycles, which must be correctly ignored by the mutation store.

The mutation store is affected by cycles in two ways:

* Self-referential entries (created by backfilling "revive" obsmarkers) must
  be dropped early on, as these will overwrite any real mutation data for
  that successor.

* Larger cycles will prevent determination of the primordial commit for
  primordial optimization.  Here we drop all entries that are part of the cycle.
  These entries will not be shareable via the mutation store.

Note that it is still possible for cycles to form in the store if they are
added in multiple requests - the first request with a partial cycle will
allow determination of a primordial commit which is then used in subsequent
requests.  That's ok, as client-side cycle detection will break the cycle in
these entries.

As we move away from history that has been backfilled from obsmarkers, this
will become less of a concern, as cycles in pure mutation data are impossible
to create.

Reviewed By: mitrandir77

Differential Revision: D22206318

fbshipit-source-id: a57f30a19c482c7cde01cbd26deac53b7bb5973f
2020-06-25 06:29:15 -07:00
Pavel Aslanov
d91ca5004f remove HgPhase type
Summary: `HgPhase` type is redundant and was adding dependency on mercurial in phases crate.

Reviewed By: farnz

Differential Revision: D22162716

fbshipit-source-id: 1c21841d34897d0072ff6fe5e4ac89adddeb3c68
2020-06-22 13:51:33 -07:00
Pavel Aslanov
371a3a5366 move Globalrev for mercurial_types to mononoke_types
Summary: Globalrev does not have any dependencies on mercurial so it can be moved to mononoke_types since it is used in BlobRepo

Reviewed By: StanislavGlebik

Differential Revision: D22092491

fbshipit-source-id: 1dded88eb2ace08e8c6c3673e2d50ae1fbb9850d
2020-06-22 07:29:19 -07:00
Kostia Balytskyi
76471a8505 fix unused dependencies breakages
Summary: A bunch of our dependencies weren't really used, and this fact has recently became a source of hard failures. This diff is an attempt to fix it.

Reviewed By: StanislavGlebik

Differential Revision: D22136288

fbshipit-source-id: 4ae265a93e155312ae086647a27ecf1cbbd57e9c
2020-06-19 06:49:04 -07:00
Jeremy Fitzhardinge
1b4edb5567 eden: remove unused Rust dependencies
Summary:
Remove unused dependencies for Rust targets.

This failed to remove the dependencies in eden/scm/edenscmnative/bindings
because of the extra macro layer.

Manual edits (named_deps) and misc output in P133451794

Reviewed By: dtolnay

Differential Revision: D22083498

fbshipit-source-id: 170bbaf3c6d767e52e86152d0f34bf6daa198283
2020-06-17 17:55:03 -07:00
Mark Thomas
080f455000 mutationstore: insert mutation info in a stable order
Summary:
When inserting multiple rows using `INSERT IGNORE`, it's possible to hit
deadlocks if two competing transactions insert the same rows in a different
order.

This can be triggered in the mutation store if two clients are pushing
overlapping sets of commits, and the arbitrary changeset order from the
`HashSet` gives the commits in a different order.  For example the first
transaction might be inserting "A, B, C", be holding the lock on row A, and be
waiting for the lock on row C, meanwhile another transaction is inserting "C,
D, A", holding the lock on row C, and waiting for the lock on row A.

To avoid these deadlocks, always insert the mutation changesets in a stable
order (sorted by changeset hash or successor hash).

Reviewed By: krallin

Differential Revision: D22067338

fbshipit-source-id: aa54c8a9c0cac4e4ae35855b44e759f8b6cb4f59
2020-06-16 10:33:41 -07:00
Stanislau Hlebik
6fd0284b72 mononoke: rename comments() to message()
Summary:
Some of the hg changeset structures use `comments` as the name for commit
message. But this is confusing - let's rename

Reviewed By: HarveyHunt

Differential Revision: D21974571

fbshipit-source-id: e7c5c5ad8db9b2f1343abe9101fc56a6d4287548
2020-06-11 01:24:47 -07:00
David Tolnay
5609aa9509 cargo_from_buck: Hide generated code from rustfmt
Differential Revision: D21966217

fbshipit-source-id: f540a2e233cc2645ae71df5134b1a810d4425053
2020-06-10 19:29:49 -07:00
Arun Kulshreshtha
cde0436ca9 edenapi_types: move EdenAPI types into separate crate
Summary:
Several of the structs used by EdenAPI were previously defined in Mercurial's
`types` crate. This is not ideal since these structs are used for data interchange
between the client and server, and changes to them can break Mononoke, Mercurial,
or both. As such, they are more fragile than other types and their use should be
limited to the EdenAPI server and client to avoid the need for extensive breaking
changes or costly refactors down the line.

I'm about to make a series of breaking changes to these types as part of the
migration to the new EdenAPI server, so this seemed like an ideal time to split
these types into their own crate.

Reviewed By: krallin

Differential Revision: D21857425

fbshipit-source-id: 82dedc4a2d597532e58072267d8a3368c3d5c9e7
2020-06-10 19:29:44 -07:00
David Tolnay
cf412e0d6b rustfmt: Use use_try_shorthand default
Summary:
I observed that for whatever reason our setting of `use_try_shorthand = true` in rustfmt.toml was causing entire functions to not get processed by rustfmt. Even files that contain neither `try` nor `?`. Remove it and reformat fbsource.

Documentation of that config:

- https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#use_try_shorthand

We don't particularly care about the value anymore because nobody writes `r#try!(...)` in 2018 edition code.

Minimized:

```
fn f() {
    g(
        )
        // ...
        .h
}
```

This function gets formatted only if use_try_shorthand is not set.

The bug is fixed in the rustfmt 2.0 release candidate.

Reviewed By: jsgf

Differential Revision: D21878162

fbshipit-source-id: b028673c0eb703984d24bf0d2983453fc2a8c212
2020-06-10 19:29:15 -07:00
Stefan Filip
60966c93e7 autocargo: regenerate
Summary: maintenance

Reviewed By: StanislavGlebik

Differential Revision: D21640322

fbshipit-source-id: d0b2ce604735c05d540d06835c8e4c8a940fbf5c
2020-05-19 16:08:40 -07:00
Stanislau Hlebik
a5dcef86b1 mononoke: remove getfiles serialization
Summary: No longer needed!

Reviewed By: farnz

Differential Revision: D21623157

fbshipit-source-id: 8d033a61b8dd4c3ec990928e2921f9b46cbbdb94
2020-05-19 04:43:00 -07:00
Mark Thomas
c1b3bc1104 mutationstore: exit early if there is nothing to do
Summary:
If a push or pull operation doesn't involve any changesets for which mutation
information might be relevant, don't spend any time querying the database, and
instead exit early.

Reviewed By: krallin

Differential Revision: D21549937

fbshipit-source-id: a6f992e621456b826acd1bddde3591e751d23b31
2020-05-13 11:00:58 -07:00
Mark Thomas
57cfcf96d5 mutationstore: avoid SQL requests with empty sets
Summary:
MySQL returns an error for a query of the form `WHERE value IN ()`.  Avoid
these by checking that collections are not empty before making the query.

Reviewed By: krallin

Differential Revision: D21549690

fbshipit-source-id: 1507d36e81f7a743d2a1efb046e52a5479633ab9
2020-05-13 11:00:57 -07:00
Mark Thomas
14dfeecda8 getbundle: include mutations in getbundle response for draft commits
Summary:
When the client pulls draft commits, include mutation information in the bundle
response.

Reviewed By: farnz

Differential Revision: D20871339

fbshipit-source-id: a89a50426fbd8f9ec08bbe43f16fd0e4e3424e0b
2020-05-13 11:00:56 -07:00
Mark Thomas
5774dbde9d unbundle: accept mutation entries and store them in the mutation store
Summary:
Advertise support for `b2x:infinitepushmutation`.  When the client sends us
mutation information, store it in the mutation store.

Reviewed By: mitrandir77

Differential Revision: D20871340

fbshipit-source-id: ab0b3a20f43a7d97b3c51dcc10035bf7115579af
2020-05-13 11:00:56 -07:00