Commit Graph

11 Commits

Author SHA1 Message Date
Pedro Rittner
e62faa2130 tp2/rust: add lettre and riker to rust-crates-io
Summary:
Adding [lettre](https://crates.io/crates/lettre) and [riker](https://crates.io/crates/riker).

Followed procedure in [the wiki](https://our.intern.facebook.com/intern/wiki/Rust-at-facebook/updating-rust/).

Note that there were [some changes in the upstream url 2 crate](7f1bd6ce1c (diff-2c09afcdc3c420ab0678ba9b5e83959cR22)) that necessitated some changes to Mononoke's URL parsing.

Reviewed By: fanzeyi

Differential Revision: D16465163

fbshipit-source-id: e889b8cfa27fef3e99c1fa0454d4f47115ae08b7
2019-07-24 20:04:48 -07:00
Stanislau Hlebik
4817255395 mononoke: replace Box::new with boxify()
Summary:
Originally that was part of D16361366 which turned BoxStream into struct with
must_use. However we decided to take another approach with must_use

That said, the cleanup is still useful even without must_use

Reviewed By: farnz

Differential Revision: D16376122

fbshipit-source-id: 295e9e71d7da82651e12139d35de5bd300e44153
2019-07-19 01:49:52 -07:00
Kostia Balytskyi
2521c87f0d mononoke: make PartId a public alias for u32, importable from mercurial_bundles
Summary: What title says. I am only doing this for readability. I don't think we'll ever change the `PartId` to be something else. But having an importable type for it seems useful.

Reviewed By: krallin

Differential Revision: D16073632

fbshipit-source-id: c11349e453c7b5e33b9d14097b6171eeb88865d8
2019-07-01 10:06:10 -07:00
Greg Cowan
041770b090 Transition fbcode Rust crates to 2018 edition
Summary: Marking all Cargo.tomls in fbcode as 2018 edition.

Reviewed By: jsgf

Differential Revision: D15951175

fbshipit-source-id: edf18449c214ee1ff285d6a2cb61839aaf58a8cd
2019-06-24 13:15:17 -07:00
Xavier Deguillard
f0862cbe16 mononoke: add getpackv2 wire protocol
Summary:
The getpackv1 protocol doesn't unfortunately support LFS blobs, which is
therefore blocking deploying remotefilelog.fetchpacks on ovrsource on the
clients.

The easiest way to get there was to simply add a getpackv2 API that is similar
in every way to getpackv1, but with the addition of a metadata field. While
full support for this was added to Mercurial, the Mononoke support is the
absolute minimum required as Mononoke doesn't support LFS.

I'm expecting that EdenAPI will completely remove the need for getpackv2 and
therefore for this code should be fairly short-lived.

Reviewed By: farnz

Differential Revision: D15954031

fbshipit-source-id: 465ac13ed8987191ccf9a7cec198d913143aaf13
2019-06-24 11:19:41 -07:00
Thomas Orozco
7f0e3eb64b mononoke: create scratch bookmarks from B2xInfinitepush
Summary:
This updates our receive path for B2xInfinitepush to create new scratch bookmarks.

Those scratch bookmarks will:

- Be non-publishing.
- Be non-pull-default.
- Not be replicated to Mercurial (there is no entry in the update log).

I added a sanity check on infinite pushes to validate that bookmarks fall within a given namespace (which is represented as a Regexp in configuration). We'll want to determine whether this is a good mechanism and what the regexp for this should be prior to landing (I'm also considering adding a soft-block mode that would just ignore the push instead of blocking it).

This ensures that someone cannot accidentally perform an infinitepush onto master by tweaking their client-side configuration.

 ---

Note that, as of this diff, we do not support the B2xInfinitepushBookmarks part (i.e. backup bookmarks). We might do that separately later, but if we do, it won't be through scratch Bookmarks (we have too many backup bookmarks for this to work)

Reviewed By: StanislavGlebik

Differential Revision: D15364677

fbshipit-source-id: 23e67d4c3138716c791bb8050459698f8b721277
2019-05-30 07:14:32 -07:00
Jeremy Fitzhardinge
4e76e98f45 Convert scm/mononoke/mercurial_bundles to Rust 2018
Summary:
Rust 2018 updates to:
  //scm/mononoke/mercurial_bundles:mercurial_bundles
  //scm/mononoke/mercurial_bundles:mercurial_bundles-unittest

Reviewed By: StanislavGlebik

Differential Revision: D15466966

fbshipit-source-id: ec8697f6b977f5ddb0c91ee2d876c572fc181d27
2019-05-28 15:50:26 -07:00
Jeremy Fitzhardinge
ae4a4a5b6c tp2/rust: update to Rust 1.35.0
Summary:
Side-effect changes:
- Doc comments on macro invocations generate a warning that they don't document what the macro expands to => make them non-doc comments
- New warnings from some bad borrowing patterns which were not previously diagnosed (T45010740)

Reviewed By: Imxset21

Differential Revision: D15515133

fbshipit-source-id: a71db51433598e338b660cbf9d2079f4bd51cfba
2019-05-28 14:28:48 -07:00
Stanislau Hlebik
8847d1b2a4 mononoke: add functions to merge bundles
Summary:
We might use it in the sync job to make sync job faster. Merging bundles allows
us to save on sql lock and opening/closing transactions

Reviewed By: ikostia

Differential Revision: D15080348

fbshipit-source-id: bf2e4ca3dd7ff8c399a3baa34ab542f67ea6efa9
2019-05-21 12:25:25 -07:00
Thomas Orozco
8e4d9e32af mononoke: add support for encoding obsmarkers
Summary: This adds supporting in mononoke for encoding obsmarkers, according to Mercurial's V1 format for obsmarkers.

Reviewed By: StanislavGlebik

Differential Revision: D14932828

fbshipit-source-id: fe7283554c9cdcfdeb303e19b28af60d49c26722
2019-05-21 12:25:16 -07:00
Kostia Balytskyi
e561682ecd mononoke: rename crates to contain underscores instead of dashes
Summary: Let's not use dashes in crate names.

Reviewed By: StanislavGlebik

Differential Revision: D14341596

fbshipit-source-id: 85a7ded60cf2e326997ac70ee47a29116af97590
2019-03-06 07:18:28 -08:00