Commit Graph

1681 Commits

Author SHA1 Message Date
Chad Austin
4ccb60e46d config: namespace facebook::eden
Summary: Start applying C++17 to our namespace definitions.

Reviewed By: fanzeyi

Differential Revision: D28964224

fbshipit-source-id: 72ad3f93c9304b34eef91d530e4e988420bd8fdc
2021-06-08 19:29:37 -07:00
Alex Hornby
f89dbebae8 rust: update zstd bindings to 1.5.0
Summary: Update to latest version.  This includes a patch to async-compression crate from [my PR updating it](https://github.com/Nemo157/async-compression/pull/125), I will remove once the crate is released.

Reviewed By: mitrandir77

Differential Revision: D28897019

fbshipit-source-id: 07c72f2880e7f8b85097837d084178c6625e77be
2021-06-08 07:57:29 -07:00
Jan Mazur
3054c4eb63 send additional data identifying client
Summary: This will be used for rate limiting decisions. Also, could be logged to scuba tables to get more info about clients.

Reviewed By: quark-zju

Differential Revision: D28750197

fbshipit-source-id: 83f54e38f998c9dd824ef2d3834c777a44d0ffed
2021-06-07 06:38:37 -07:00
Jan Mazur
b5c73dde5b x2pagentd for LFS
Summary: Let clients connect to lfs with HTTP through unix socket so we don't have to worry about certificates presence.

Reviewed By: johansglock

Differential Revision: D28683392

fbshipit-source-id: f6228b4099ef04fe584e320cb1892e6cb513e355
2021-06-07 04:57:49 -07:00
Liubov Dmitrieva
7fc42817cb edenapi: create a call to the lookup API for different types
Summary:
create end to end intergation for the lookup API on the client

Start prototyping of `hg cloud upload` command.

Currently, it just performs lookup for existing heads.

This way we can end to end test the new APIs.

Reviewed By: markbt

Differential Revision: D28848205

fbshipit-source-id: 730c1ed4a21c1559d5d9b54d533b0cf551c41b9c
2021-06-04 10:11:25 -07:00
Liubov Dmitrieva
e32102a1f1 skeleton lookup and upload API for files
Summary:
Files upload will be executed in 2 stages:

* check if content is already present
* upload missing files

The check api is generic, it could be used for any id type. Called 'lookup' API.

Reviewed By: markbt

Differential Revision: D28708934

fbshipit-source-id: 654c73b054790d5a4c6e76f7dac6c97091a4311f
2021-06-04 10:11:25 -07:00
Jeremy Fitzhardinge
c652f9a11f third-party/rust: update time to 0.2
Summary:
Time 0.2 is current, and 0.1 is long obsolete. Unfortunately there's a
large 0.1 -> 0.2 API change, so I preserved 0.1 and updated the targets of its
users. Also unfortunate that `chrono` has `oldtime` as a default feature, which
makes it use `time-0.1`'s `Duration` type. Excluding it from the features
doesn't help because every other user is specifying it by default.

Reviewed By: dtolnay

Differential Revision: D28854148

fbshipit-source-id: 0c41ac6b998dfbdcddc85a22178aadb05e2b2f2b
2021-06-03 13:52:54 -07:00
Meyer Jacobs
a1b4aa8117 scmstore: add tracing logging
Summary:
Instrument file scmstore with tracing logging. There's more we should add here, but this will be a good starting place - I've already discovered some issues from looking at the log output. (Why does drop run twice? How does it run twice?)

It'd also probably be nice to support formatting the output like https://crates.io/crates/tracing-tree, which will be a lot less cluttered by the logged fields (like `attrs` on `fetch`).

Reviewed By: DurhamG

Differential Revision: D28750954

fbshipit-source-id: 63baa602f7147d24ac3e34defa969a70a92f96a4
2021-06-02 14:15:40 -07:00
CodemodService FBSourceClangFormatLinterBot
9e789df34c Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D28826571

fbshipit-source-id: e3929280917dffcb00707823963ab2ba0e786bd1
2021-06-02 04:06:31 -07:00
Durham Goode
7b2bfe61a6 backingstore: add batch tree fetching to backing store C++ bindings
Summary:
Now that EdenFS is using EdenAPI more, let's let it take advantage of
EdenAPI's better batching. We alread have a batch API for files, let's copy the
pattern for trees as well. This adds the C++ bindings. The next diff consumes
this from EdenFS

This is largely just a copy of how batch blob fetching does this. But I'm a C++
noob, so feel free to tear this apart with nits.

Reviewed By: chadaustin

Differential Revision: D28426789

fbshipit-source-id: 88d359985e849018fb3c2b4ef9e52d07c96bf31a
2021-06-01 22:41:07 -07:00
Durham Goode
feb3792609 backingstore: add batch tree fetching to Rust backing store
Summary:
Now that EdenFS is using EdenAPI more, let's let it take advantage of
EdenAPI's better batching. We alread have a batch API for files, let's copy the
pattern for trees as well. This first diff just produces the Rust code. Future
diffs will add the C++ bindings then integrate it into EdenFS.

This is largely just a copy of how batch blob fetching does it.

Reviewed By: chadaustin

Differential Revision: D28426790

fbshipit-source-id: 822ef6e7b3458df5dba7a007657e85351162b9ff
2021-06-01 22:41:07 -07:00
Meyer Jacobs
09b49e5e06 scmstore: add python method for fetching contentshas for a list of keys
Summary:
Add the `fetch_contentsha256` python method to `filescmstore`, which accepts a list of keys and returns a list of (key, sha256).

This is intended to be used by the modified `status` command implementation, which will prefer comparing content hashes to directly comparing file content.

Reviewed By: DurhamG

Differential Revision: D28696618

fbshipit-source-id: a0304319b0a19d4f09d07bec02dc41964aec7255
2021-05-27 14:42:23 -07:00
Meyer Jacobs
d05571b3cf scmstore: refactor FileStore attributes support and separate computation from fetching
Summary:
Merge `found_file` and `found_aux_indexedlog` into a new `found_attributes` method, which simply "or"s the newly found attributes into the `found` map.

Replaces the `satisfies` concept with a new `pending` check, used the same way by each `pending_*` method, which considers a key pending if fetching from a store which returns a given set of attributes would allow us to resolve any requested by missing attributes, optionally taking into account attributes that can be computed from those already found. This will still need to be adjusted to support preferring remote fetching of attributes to local computation, but it is no longer as brittle as the previous implementation: there's no requirement that aux data be computed as content is fetched in order to avoid redundantly fetching content.

Move attribute computation to a separate phase, and filter out un-requested attributes in the `finish` function.

Reviewed By: DurhamG

Differential Revision: D28694192

fbshipit-source-id: 9b096c056736cadc0f97ff09243ed09d5266504d
2021-05-27 14:42:23 -07:00
Meyer Jacobs
6bc13e4b8b scmstore: modify attributes to use associated constants
Summary: Use associated constants instead of methods for `FileAttributes` bit masks.

Reviewed By: DurhamG

Differential Revision: D28724729

fbshipit-source-id: 441c0d2361166824c4ee7cfd5ad0b6f21ee1ac26
2021-05-27 14:42:23 -07:00
Meyer Jacobs
d1e8a913eb scmstore: extract errors to separate type to ease lifetime issues
Summary:
Previously, the `found_error` required `&mut self`, even though it only ever interacted with the error fields. This prevents Rust's type checker from validating the safety of logging errors while iterating over the `found` map, for instance.

Replacing the `&mut self` method call with a field access into an existing `&mut self` resolves this problem, and allows logging errors while mutating other fetch state.

Reviewed By: DurhamG

Differential Revision: D28722547

fbshipit-source-id: 59c6a530cbf331282d6f654a56e492d47cafcd2f
2021-05-27 14:42:23 -07:00
Meyer Jacobs
95abadf752 scmstore: FileStore bugfixes
Summary:
Don't try to fetch from a store if we don't have any pending keys.

Handle missing content when writing to cache after fetching from remote stores. Currently, `found_in_*` will be populated even if we don't store the content, having just used it for aux data computation. This change won't be necessary, but won't cause any problems either, after the next change which only prunes overfetching in the `finish` method, allowing remote blobs to be written to local cache even if we only fetched them to compute their attributes. I might revert this portion of the change, or warn if content is unexpectedly unavailable.

Reviewed By: DurhamG

Differential Revision: D28694964

fbshipit-source-id: 465211c9257cbf49b1cb68856473323fc940f10b
2021-05-27 14:42:23 -07:00
Meyer Jacobs
03c2fcded5 scmstore: add support for computing attributes from content
Summary: Extends the previous change to add support for computing aux data (currently only Content Sha256) and caching it locally. Introduces a `FetchState` config option, `compute_aux_data`, which controls if content will be fetched in order to compute aux data, or if unavailable aux data will be treated as "not found".

Reviewed By: DurhamG

Differential Revision: D28528456

fbshipit-source-id: 26189d18c8e453040f3c1f6e22a34d623a5aa40d
2021-05-27 14:42:23 -07:00
Meyer Jacobs
998be9b07d scmstore: construct aux data store in scmstore builder
Summary:
Extends the `FileScmStoreBuilder` to construct two new indexedlog stores for caching aux data. The stores will be created in a directory adjacent to the normal non-LFS indexedlog stores.

Currently aux data stores will not be constructed for production users, a configuration option will be introduced to gate this before `.store_aux_data()` is called in the `filescmstore` constructor bindings.

Reviewed By: DurhamG

Differential Revision: D28689693

fbshipit-source-id: e3ad1594e5beee00b1a8b9fe489e3b6af3a2e93e
2021-05-25 21:52:15 -07:00
Meyer Jacobs
3aa07eddaa scmstore: add basic attributes support to FileStore
Summary:
Modify `FileStore` to introduce basic aux data fetching. Aux data is currently read from a separate IndexedLog store, serialized with `serde_json` (chosen for expediency / ease of debugging, I intend to optimize the storage format before releasing this, at the very least to avoid unnecessarily serializing the key path).

Currently aux data fetching will never succeed, as aux data fetching is not supported in the EdenApi "files" API and nothing else exists to populate the local aux data stores. Later in this stack, computing aux data (currently only content sha256) to populate the aux data storage is implemented.

Reviewed By: DurhamG

Differential Revision: D28526788

fbshipit-source-id: c8e21a1377689d7913a68426a3a480d53148da66
2021-05-25 21:52:15 -07:00
Meyer Jacobs
580207279b scmstore: refactor FetchState in preparation for attributes support
Summary:
Simplify tracking of incomplete fetches in preparation for attributes support in the next change.

Now, all keys which have not been completely and successfully fetched are recorded in `pending`, and are removed only when the complete fetch is recorded in `found`. Keys are now removed from `lfs_pointers` and `pointer_origin` as they are completed, as they aren't needed for anything other than fetching from local LFS and remote LFS respectively.

Reviewed By: DurhamG

Differential Revision: D28546515

fbshipit-source-id: c657e5c6350cadc8da970f57bb7694ed71022efb
2021-05-25 21:52:15 -07:00
Jan Mazur
0e960695e0 put command renewing certificate in the error message
Summary: I have modified the places where most of the errors were raised that users reported and were resolved by renewal of certificates.

Reviewed By: krallin

Differential Revision: D28568561

fbshipit-source-id: 44fb127a49bde83efee1c934e0435b31f8602a8d
2021-05-25 01:05:16 -07:00
Thomas Orozco
846a983d67 thrift/lib/rust: update to Bytes 1.x
Summary:
Like it says in the title. The API between Bytes 1.x has changed a little bit,
but the concepts are basically the same, so we just need to change the
callsites that were calling `bytes()` and have them ask for `chunk()` instead.

This diff attempts to be as small as it can (and it's already quite big). I
didn't attempt to update *everything*: I only updated whatever was needed to
keep `common/rust/tools/scripts/check_all.sh` passing.

However, there are a few changes that fall out of this. I'll outline them here:

## `BufExt`

One little caveat is the `copy_to_bytes` we had on `BufExt`. This was
introduced into Bytes 1.x (under that name), but we can't use it here directly.

The reason we can't is because the instance we have is a `Cursor<Bytes>`, which
receives an implementation of `copy_from_bytes` via:

```
impl<T: AsRef<[u8]>> Buf for std::io::Cursor<T>
```

This means that implementation isn't capable of using the optimized
`Bytes::copy_from_bytes` which doesn't do a copy at all. So, instead, we need
to use a dedicated method on `Cursor<Bytes>`: `copy_or_reuse_bytes`.

## Calls to `Buf::to_bytes()`

This method is gone in Bytes 1.x, and replaced by the idiom
`x.copy_to_bytes(x.remaining())`, so I updated callsites of `to_bytes()`
accordingly.

## `fbthrift_ext`

This set of crates provides transports for Thrift calls that rely on Tokio 0.2
for I/O. Unfortunately, Tokio 0.2 uses Bytes 0.5, so that doesn't work well.

For now, I included a copy here (there was only one required, when reading from
the socket). This can be removed if we update the whole `fbthrift_ext` stack to
Bytes 1.x. fanzeyi had been wanting to update this to Tokio 1.x, but was blocked on `thrift/lib/rust` using Bytes 0.5, and confirmed that the overhead of a copy here is fine (besides, this code can now be updated to Tokio 1.x to remove the copy).

## Crates using both Bytes 0.5 & Bytes 1.x

This was mostly the case in Mononoke. That's no coincidence: this is why I'm
working on this. There, I had to make changes that consist of removing Bytes
0.5 to Bytes 1.x copies.

## Misuse of `Buf::bytes()`

Some places use `bytes()` when they probably mean to use `copy_to_bytes()`. For
now, I updated those to use `chunk()`, which keeps the behavior the same but
keeps the code buggy. I filed T91156115 to track fixing those (in all
likelihood I will file tasks for the relevant teams).

Reviewed By: dtolnay

Differential Revision: D28537964

fbshipit-source-id: ca42a614036bc3cb08b21a572166c4add72520ad
2021-05-20 09:44:41 -07:00
David Tolnay
d4f337c889 Resolve bare_trait_objects warnings in path components
Reviewed By: quark-zju

Differential Revision: D28558352

fbshipit-source-id: d4b85716096c43eed8e6172ade3dfe40e277e670
2021-05-19 22:03:56 -07:00
David Tolnay
cf6125221b Regenerate Rust thrift files
Reviewed By: quark-zju

Differential Revision: D28558333

fbshipit-source-id: a6ca6e6cb8b02849b27c53fcc1aa33f464aa0f84
2021-05-19 21:54:41 -07:00
David Tolnay
7354f2b557 Invoke thrift compiler using relative path from fbcode root
Reviewed By: quark-zju

Differential Revision: D28558767

fbshipit-source-id: a2299b374d714129fef7464f783c8cd1747bda68
2021-05-19 21:52:08 -07:00
Meyer Jacobs
156b81f94a scmstore: TreeStore & FileStore pyrevisionstore constructor integration
Summary: Modifies `treescmstore` and `filescmstore` to also construct `TreeStore` and `FileStore` respectively. Currently these newly constructed stores are not used anywhere, no application code behavior should change as a result of this.

Reviewed By: DurhamG

Differential Revision: D28237680

fbshipit-source-id: 2bf3fd4b96be8c26e5c1e55cfd2e865f98e6ba91
2021-05-19 16:48:20 -07:00
Meyer Jacobs
190b95ab57 scmstore: implement legacy storage traits for FileStore
Summary:
Implement `HgIdDataStore`, `RemoteDataStore`, `LocalStore`, `HgIdMutableDeltaStore`, and `ContentDataStore` for `FileStore`.

Currently I've left `RemoteDataStore::upload` unimplemented, as it's a little more complicated than the other functionality (with lots of private field accesses), and is probably worth building a good API for first. As a temporary workaround, I can store an `LfsRemote` (which requires an associated `LfsStore` for cache) and just call upload on that for now, but that's pretty ugly with the current design. I could also construct one on the fly, but it currently stores a bare `LfsRemoteInner`, not an `Arc<LfsRemoteInner>`. I'll take one of these three approaches after getting the integration tests running with the new `TreeStore` and `FileStore`.

Reviewed By: DurhamG

Differential Revision: D28235602

fbshipit-source-id: 13c72cd9379cba70a2ca7038dad419346fe0b14a
2021-05-19 16:48:20 -07:00
Meyer Jacobs
3aa13004a0 scmstore: implement legacy storage traits for TreeStore
Summary:
Implement `HgIdDataStore`, `RemoteDataStore`, `LocalStore`, `HgIdMutableDeltaStore`, and `ContentDataStore` for `TreeStore`.

Also add a `Drop` impl that flushes the local stores, which matches the behavior of `ContentStore` (such as impl does not exist for the underlying stores, but it might be more appropriate there).

Reviewed By: DurhamG

Differential Revision: D28235060

fbshipit-source-id: 5a12d8c2ecff9fcc204cf437bf6f2a98f08645b4
2021-05-19 16:48:20 -07:00
Meyer Jacobs
978f3a9eae scmstore: introduce simplified, non-async, non-generic, non-combinator FileStore
Summary:
Introduce a new, flat, FileStore implementation. This `FileStore`, like the previously submitted `TreeStore`, directly handles all the fallback, local caching, etc, necessary to implement our storage system.

The API supports fetching batches of `Key`s, writing batches of entries (currently only in the "hg file blob" format, with copy header embedded), and querying only the local subset of underlying stores (to allow implementing `get_missing`). Other store subsets and write features will be added in the future.

Reviewed By: DurhamG

Differential Revision: D28138800

fbshipit-source-id: ca5bb91c66fa078019a19180235dd632ea73a0b3
2021-05-19 16:48:20 -07:00
Meyer Jacobs
6db16d4b0b lfs: add some utility methods to LfsPointersEntry and LfsStore for use by scmstore
Summary:
Introduce `from_hg_file_blob` and `from_content` LfsPointersEntry constructors, which are used for creating the correct `LfsPointersEntry` for a `Delta` (HgId + file content).

Add `sha256` accessor to `LfsPointersEntry`. Comments on `LfsPointersEntry` and looking at the construction logic suggest there should always be an associated Sha256 content hash. We use it often, so an accessor is useful to avoid the cumbersome HashMap access + match.

Add `fetch_available` to `LfsStore`, which is used by scmstore for handling cases where either only the pointer, or both the pointer and data are available. Existing LFS code directly accesses the underlying blob and pointer store.

Reviewed By: kulshrax

Differential Revision: D28231747

fbshipit-source-id: e6b1f210605d821f542fcb8e87aea366a0864d44
2021-05-19 16:48:20 -07:00
Arun Kulshreshtha
5ad2c03fb6 http-client: optionally convert certs to PKCS#12
Summary:
Convert client certificates (which are expected to be supplied as PEM files) into an in-memory PKCS#12 archive to pass into libcurl. This is necessary on certain platforms (such as Windows) whose native crypto APIs do not support loading PEM files.

This was previously landed as D27637069 (5b759a2b52), which unconditionally converted the certificates under the assumption that all major TLS backends support PKCS#12. That assumption is still true, but it did not account for the fact that libcurl itself is dynamically linked on some platforms (such as MacOS), and the system libcurl may be too old to support support in-memory certs (via `CURLOPT_SSLCERT_BLOB` added in libcurl version 7.71.0). This diff gates this feature behind the `http.convert-cert` config option, which we can selectively set on platforms where it is needed.

Reviewed By: mzr

Differential Revision: D28524444

fbshipit-source-id: 4af9cdd60b8ef3977ad81abdb8e406c63795e628
2021-05-19 10:39:45 -07:00
Durham Goode
dcc9895392 http-client: backout "pass certs to libcurl as in-memory blobs"
Summary: This diff breaks edenapi tls on Mac.

Reviewed By: kulshrax

Differential Revision: D28451036

fbshipit-source-id: b5451bc1e174aa40acce1e42ef6c130b02f0fb58
2021-05-14 14:01:52 -07:00
Stanislau Hlebik
eab97b6123 mononoke: sync changeset implementation for megarepo
Summary: First stab at implementing sync changeset functionality for megarepo.

Reviewed By: ikostia

Differential Revision: D28357210

fbshipit-source-id: 660e3f9914737929391ab1b29f891b3b5dd47638
2021-05-13 10:04:21 -07:00
Jan Mazur
490cbbf0c3 mocking LFS in revisionstore tests
Summary: Mocking LFS server.

Reviewed By: krallin

Differential Revision: D28093406

fbshipit-source-id: fe6acb2e327ee26dd424d91b66ed725339f19431
2021-05-12 12:05:05 -07:00
Arun Kulshreshtha
5b759a2b52 http-client: pass certs to libcurl as in-memory blobs
Summary: Instead of passing a client certificate path to libcurl, load the certificate into memory and pass it to libcurl as a blob using `CURLOPT_SSLCERT_BLOB`. This allows us to convert the certificate format in-memory from PEM to PKCS#12, the latter of which is supported by the TLS engines on all platform (and notably SChannel on Windows, which does not support PEM certificate).

Reviewed By: quark-zju

Differential Revision: D27637069

fbshipit-source-id: f7f8eaafcd1498fabf2ee91c172e896a97ceba7e
2021-05-11 18:25:13 -07:00
Stanislau Hlebik
4e232ea94d mononoke: add mapping for megarepo
Summary:
Adding mappng to keep track of two things:
1) keep track of the latest source commit that was synced into a given target - this will be used during sync_changeset() method to validate if a parent changeset of a given changeset was already synced
2) which source commit maps to what target commit

Reviewed By: ikostia

Differential Revision: D28319908

fbshipit-source-id: f776d294d779695e99d644bf5f0a5a331272cc14
2021-05-11 02:54:01 -07:00
CodemodService Bot
e2a64a3088 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D28319288

fbshipit-source-id: fc879fab6d7c2abd5184ccfbacf2aa2a8f3d8003
2021-05-10 05:06:45 -07:00
Thomas Orozco
58f7f50188 revisionstore: include version in user agent
Summary: Right now this is not very useful. Let's make it more useful.

Reviewed By: DurhamG

Differential Revision: D28281653

fbshipit-source-id: ef3d7acb61522549cca397048c841d1afb089b9b
2021-05-10 01:36:14 -07:00
Jun Wu
9013d18a71 edenapi: debug log registered builder function
Summary:
This makes it easier to see what builder functions were registered:

  % EDENSCM_LOG=edenapi=debug lhg log -r .
  May 06 16:40:29.355 DEBUG edenapi::builder: registered eagerepo::api::edenapi_from_config to edenapi Builder

Reviewed By: DurhamG

Differential Revision: D28271366

fbshipit-source-id: f6c7c3aa9f29c3e47c2449e3d5fc16474aa338b0
2021-05-07 01:00:56 -07:00
Jun Wu
647ee078d0 dag: actually test server1 in test_sparse_dag
Summary:
The server1 was not used after D27629318 (ba7e1c6952) while the test intentionally wants to
exercise graph isomorphism. So let's revive server1 in the test.

Reviewed By: andll

Differential Revision: D28269926

fbshipit-source-id: 0a04031415f559f8a6eb81f1e2f2530329a2a3bc
2021-05-06 21:15:22 -07:00
Jun Wu
b6d24fc969 eagerepo: support "test:name" repo URLs
Summary: This makes it easier to use it in tests.

Reviewed By: DurhamG

Differential Revision: D28006549

fbshipit-source-id: 90e29b220453a3d7a260d0a62d697d64363d9a6c
2021-05-06 12:13:17 -07:00
Jun Wu
4c214bca8c dag: move some tracing logs from dag::namedag to dag::protocol
Summary:
This makes it easier to filter logs related to remote fetching.

The `DEBUG dag::protocol: resolve ids [0] remotely` means the lazy hash resolution is working.

Reviewed By: kulshrax

Differential Revision: D27971117

fbshipit-source-id: f2492204c70d793997d0c3865e500bbad56b1953
2021-05-06 12:13:17 -07:00
Jun Wu
e0b6773019 eagerepo: write commits to master group
Summary:
Write commit to master group. This provides proper "CloneData" and allows us to
actually test lazy commit hash backend (since only commits in the master group
can have lazy hashes).

Reviewed By: DurhamG

Differential Revision: D27971123

fbshipit-source-id: 4e19486007ddc89de7468be65445559f34d796f5
2021-05-06 12:13:17 -07:00
Stefan Filip
8faf9b07c5 edenapi_service: use custom_cbor_stream for trees
Summary:
The trees endpoint is another example where we try to send errors to the
client.  As it was done previously we would fail to log any errors on the
server side.  This diff corrects that by using custom_cbor_stream.

Reviewed By: kulshrax

Differential Revision: D28111102

fbshipit-source-id: 468095d024647f472b8ad9a9e17ca8364605ff98
2021-05-06 09:14:10 -07:00
Digant Kasundra
be43635087 Update rust-ini to 0.17.0
Summary: Updated rust-ini from 0.13.0 to 0.17.0

Differential Revision: D28242794

fbshipit-source-id: 249fc7d2ffdc46c4bfb4b575fb7aa8f5858a6e12
2021-05-06 06:50:28 -07:00
Jun Wu
7a0765ab25 edenapi: do not dependent on eagerepo
Summary:
eagerepo -> metalog -> git2 -> libgit2-sys -> libgit2 conflicts with edenfs'
non-Rust libgit2 dependency. Rust git2 crate does not seem to provide a way to
depend on specified libgit2.

Quote https://github.com/rust-lang/git2-rs/issues/263#issuecomment-450934287:

> It's expected that git2-rs builds its own copy of libgit2 and doesn't use the
> system version, as the system version is likely incompatible

It also seems non-trivial to make buck C++ use the libgit2 frm `libgit2-sys` crate.

Let's just avoid depending on eagerepo from edenapi directly for now to solve the
issue. This basically revives D27948369 and D27951632.

Reviewed By: xavierd

Differential Revision: D28243784

fbshipit-source-id: 0c38c20c2d3a80c550732129da572fe26a229799
2021-05-05 18:21:00 -07:00
Zeyi (Rice) Fan
9d64cd399d backingstore: fix winhttp linkage issue
Summary:
We have a linker issue on Windows when building EdenFS with CMake:

```
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpSetStatusCallback referenced in function winhttp_connect
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpOpen referenced in function winhttp_connect
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpCloseHandle referenced in function winhttp_close_connection
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpConnect referenced in function winhttp_connect
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpReadData referenced in function winhttp_stream_read
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpWriteData referenced in function winhttp_stream_read
backingstore.lib(winhttp.o) : error LNK2019: unresolved external symbol __imp_WinHttpQueryOption referenced in function certificate_check
```

This fixes that.

Reviewed By: xavierd

Differential Revision: D28230163

fbshipit-source-id: f74e42ee30ec8f3b81c1f80b7cf63a21ea97732c
2021-05-05 15:01:01 -07:00
Jun Wu
60e240b17e eagerepo: fix Windows compatibility
Summary: Windows path like `eagerepo:///C:\foo\bar` needs special handling.

Reviewed By: kulshrax

Differential Revision: D27971119

fbshipit-source-id: 9d4b87782eca2734b708565f0ee22a7495253cff
2021-05-05 12:01:50 -07:00
Jun Wu
e0f02950ea pyedenapi: add trees API unrelated to store
Summary: Add a way to fetch tree content without going through store.

Reviewed By: liubov-dmitrieva

Differential Revision: D28200387

fbshipit-source-id: 8f5b2214aafba39c7674f0f6b27af0c985f0ea72
2021-05-05 09:48:29 -07:00
CodemodService Bot
b4afda3890 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D28216338

fbshipit-source-id: 2384a332505881bbc8cd621694496cf9f37c3bea
2021-05-05 04:03:47 -07:00