Commit Graph

11081 Commits

Author SHA1 Message Date
Pedro Rittner
b91da1d115 Bump crossbeam from 0.7 to 0.8, lsp from 0.3 to 0.5, lsp-types from 0.73 to 0.89
Summary: Bumping the crossbeam version so we can use `recv_deadline`. This also necessitates updating the lsp and lsp-types crates.

Reviewed By: alunyov, dtolnay

Differential Revision: D29056473

fbshipit-source-id: 9434e9e0895d82482f4c70afa01a2f77702b965f
2021-06-11 21:57:21 -07:00
Meyer Jacobs
8e79a2ce47 scmstore: add support for writing LFS pointers directly via FileStore
Summary:
This functionality is exercised in `test-lfs-copytracing.t` and a few other tests, though I'm not sure if it's necessary outside of that. I've added a `TODO` to investigate and try to eliminate such cases.

Because we'd rather not support this, I implemented it on top of ContentStore - it looks like we might have some lingering datapack-related tests where I think this comes up, too.

Reviewed By: DurhamG

Differential Revision: D29056647

fbshipit-source-id: e6bd5ec31dde06d8c509665f738cfe19270ddc76
2021-06-11 18:53:11 -07:00
Meyer Jacobs
ee1b174558 scmstore: update scmstore ExtractInnerRef types
Summary:
Modify the `ExtractInnerRef` implementations for `filescmstore` and `treescmstore` to return the new scmstore objects rather than the deprecated ones.

Modify `pycheckout` to use a new methods, `get_oldscmstore`, to access the deprecated scmstore instead (native checkout will be updated to use the new scmstore later on).

Reviewed By: DurhamG

Differential Revision: D29056498

fbshipit-source-id: 09b4655941bca048b01e6d365fcca1ccfb1cd700
2021-06-11 18:53:11 -07:00
Meyer Jacobs
41bc3699f8 scmstore: implement LFS upload for FileStore via legacy codepath
Summary: Temporarily implement `upload` on `FileStore` by forwarding to the existing `upload` implementation using `LfsRemote`. Eventually we'll want to re-implement this entirely inside `FileStore`.

Reviewed By: DurhamG

Differential Revision: D29045264

fbshipit-source-id: 8ebbaead4c1032949e5bdd1dcf9a733d0086a77c
2021-06-11 18:53:11 -07:00
Meyer Jacobs
5dfcaeefbd scmstore: add contentstore Python methods to filescmstore and treescmstore
Summary: Implement `ContentStore`'s Python methods on `filescmstore` and `treescmstore`.

Reviewed By: DurhamG

Differential Revision: D29042603

fbshipit-source-id: e077d7a2efc7780a384132703a2a1dc983612194
2021-06-11 18:53:10 -07:00
Meyer Jacobs
062fc5be4b scmstore: implement get_shared_mutable for TreeStore for compatibility with ContentStore
Summary: Add a `get_shared_mutable` method to `TreeStore` which behaves like `ContentStore::get_shared_mutable`, returning a store which will read/write only to the local cache stores (aka shared stores).

Reviewed By: DurhamG

Differential Revision: D29042716

fbshipit-source-id: f2236ff8b47ef213b2ffc61501ca301da02dc492
2021-06-11 18:53:10 -07:00
Meyer Jacobs
7bf2eccf87 scmstore: implement get_shared_mutable for FileStore for compatibility with ContentStore
Summary: Add a `get_shared_mutable` method to `FileStore` which behaves like `ContentStore::get_shared_mutable`, returning a store which will read/write only to the local cache stores (aka shared stores).

Reviewed By: DurhamG

Differential Revision: D29042485

fbshipit-source-id: e28af0bafac5eba87523b0ef522f32355106b467
2021-06-11 18:53:10 -07:00
Meyer Jacobs
47bbb75678 scmstore: track remote fetches in FileStore with FetchLogger
Summary: Add `FetchLogger` to `FileStore` to track remote fetches which match `remotefilelog.undesiredfileregex`.

Reviewed By: DurhamG

Differential Revision: D29042243

fbshipit-source-id: 08ec69d979d66ef93e8bbe8659171a412ade7e22
2021-06-11 18:53:10 -07:00
Meyer Jacobs
8be436187f scmstore: extract out FetchLogger from ReportingRemoteDataStore for use by scmstore
Summary: `ReportingRemoteDataStore` wraps a store and records all fetches which match `remotefilelog.undesiredfileregex`. Since scmstore doesn't use a hierarchical store composition, this change extracts out the matching/reporting logic into `FetchLogger` so that it can be re-used by both `ReportingRemoteDataStore` and scmstore.

Reviewed By: DurhamG

Differential Revision: D29041488

fbshipit-source-id: db0c4b545886ffebcf2a2841a506d301b2f2f230
2021-06-11 18:53:10 -07:00
Jun Wu
f1411b154f setup: add IPython deps for Python 3
Summary:
The files are listed by:

    python3 -m pip download IPython pip

Reviewed By: DurhamG

Differential Revision: D29072480

fbshipit-source-id: 96be7142bee4cc9ee67cbdea35a3e1e91170dbe7
2021-06-11 16:20:51 -07:00
Lauren Bentley
a2e7c666a4 remove .buckversion file from fbcode
Summary: Buck has not relied on the .buckversion file for a while now. Trying to clean up the number of configs at the root of the cell for buck. This diff attempts to remove .buckversion code referecnes. Instead of calling `cat .buckversion` to get the buckversion hash, you can call `buck --fast-version` which parses the `buck-java11` file without downloading buck. Alternatively, you can also do something like ` cat .buck-java11 | grep -o -E -e "[0-9a-f]{40}" | head -1`  to get the buckversion hash.

Reviewed By: DrMarcII

Differential Revision: D28553844

fbshipit-source-id: ab90fa6a5e7467f6d5c11ffa9d0e10a03433975f
2021-06-11 16:16:47 -07:00
Meyer Jacobs
a292d63d7f scmstore: update debugscmstore to use new scmstore
Summary: Straightforward update of `debugscmstore` from old scmstore to new scmstore. I'll want to improve this command a bit more in the future, but this at least enables you to easily test arbitrary fetches.

Reviewed By: DurhamG

Differential Revision: D29047527

fbshipit-source-id: 4e10cb88cba4b572d3e413640ca3d800940d675d
2021-06-11 12:40:08 -07:00
Simon Farnsworth
58f1cba9ba Simplify the logic in store_file_change
Summary: In the previous diff, we took out most of the complexity around Mercurial-style filenodes. Rearrange the code to have fewer early returns, and thus be easier to follow when trying to debug

Reviewed By: yancouto

Differential Revision: D29060994

fbshipit-source-id: 830f6c8d4a42725d7096a0d5c4a4a4d6797b187a
2021-06-11 12:24:56 -07:00
Durham Goode
63884d65c1 rotatelog: add fix cleaning up partially cleaned up logs
Summary:
Our log deletion is a two step process. First it deletes the meta file,
then it deletes the log. There was a bug where if the meta file deletion
succeeded but the log deletion failed (often because Eden has the log open) then
future attempts to delete the log will fail because it fails to delete the meta
file.

Reviewed By: quark-zju

Differential Revision: D29035913

fbshipit-source-id: 33ab9a4e46b285819c4bf14031426983d2b4342f
2021-06-11 11:36:05 -07:00
Durham Goode
60001b5161 rotatelog: add debug logging for rotatelog cleanup
Summary:
Since all the errors are eaten, we don't have good insight into the
rotatelog cleanup process. Windows users were seeing large growth in their
hgcache and this logging would've been useful, so let's add it.

Reviewed By: quark-zju

Differential Revision: D29035914

fbshipit-source-id: 54f0f05aa8bed1911b6b95438cd2d3ccc45e8ec9
2021-06-11 11:36:05 -07:00
Durham Goode
7a10894540 py3: fix crecord for non-utf8 files
Summary:
The crecord width calculation used a function that requires a string,
so we tried to force the rows from bytes to columns, which crashed if the row
wasn't utf8. Let's just use the error="replace" utf8 error handler since we
don't care if the row computation is slightly off.

Reviewed By: quark-zju

Differential Revision: D29043385

fbshipit-source-id: a00d867bca9c62007ae4f68b6198d159deeb6016
2021-06-11 11:33:15 -07:00
Andrey Chursin
c82b8867f6 dag: introduce PreparedFlatSegments::parents_and_head
Summary: This method will be used to get all Ids that needs to be included into CloneData::id_map during fast forward pull.

Reviewed By: quark-zju

Differential Revision: D29045538

fbshipit-source-id: f6eb04f537aa5365f7588391ea4c60b3dc010a53
2021-06-11 11:26:54 -07:00
Stanislau Hlebik
8a099e5808 mononoke: allow disabling derived data by type
Summary:
In the previous diffs we allowed disabling all derived data for a given repo.
Now let's also allow disabling it only for a single type.

Reviewed By: farnz

Differential Revision: D29031081

fbshipit-source-id: b5bddcde9b1710addfeb40c1acfb7ba2e0241e76
2021-06-11 07:00:14 -07:00
Stanislau Hlebik
b6bbd21600 mononoke: make it possible to quickly cancel derivation for a given repo
Summary:
We've had a few sevs where expensive derivation for a single repo overloaded
our backends. This diff adds a tunable that makes it possible to quickly cancel
all derivations for a given repo. And one important caveat - it doesn't only
cancel derivations for a given repo, it also cancels the initial commit
traversal stage which can be quite expensive.

Note that it cancells all derivations for a given repo, at the moment there's
no way to cancel deriving just a single derived data type. I'd like to add it,
but in the next diffs since it might require changing the tunables - they don't
support tuning a list of strings for a given repo. Besides, having a way to
quickly disable all derivations for a given repo might be useful anyway.

Reviewed By: farnz

Differential Revision: D29028444

fbshipit-source-id: 559917e0e25eb060fe5be77a412bfec4ac3f1779
2021-06-11 07:00:14 -07:00
Stanislau Hlebik
879d8f3596 mononoke: add support for by repo vec of strings tunables
Summary: It will be used in the next diff to disable only certain derived data types

Reviewed By: yancouto

Differential Revision: D29031082

fbshipit-source-id: 9621a5eec522e369fef2b78e94599a056eda5317
2021-06-11 05:53:24 -07:00
Simon Farnsworth
9a3fbfe311 Make filenodes for merge commits more like unodes and less like Mercurial does
Summary:
Mercurial has a lot of complex logic to try and create the "best" possible filenode for a given merge commit.

However, it works fine with imperfect filenodes, as long as they are semantically correct. Generate imperfect filenodes to speed up data derivation.

We are importing git repos to use here, which have some significantly mergy history; this change both reduces the number of filenodes we end up creating in data derivation, and speeds up data derivation by an order of magnitude overall.

Reviewed By: StanislavGlebik

Differential Revision: D28903515

fbshipit-source-id: 436ca4f43158533b32cf0d41db72228dda2688c3
2021-06-11 04:53:09 -07:00
Alex Hornby
4457092322 rust: revert zstd crates
Summary: revert the zstd crates back to previous version

Reviewed By: johansglock

Differential Revision: D29038514

fbshipit-source-id: 3cbc31203052034bca428441d5514557311b86ae
2021-06-11 04:39:54 -07:00
CodemodService Bot
cb6754e1d8 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D29058106

fbshipit-source-id: e114f36939ad24a41e1211258824184552b7655e
2021-06-11 04:13:52 -07:00
Liubov Dmitrieva
65366c688b implement known method
Summary:
implement `known` method based on the existing `lookup` API that has been already implemented

this might be useful for eden api pull project / wireproto deprecation, as the pull algorithm queries the server for whether commits are known by the server

Differential Revision: D29030429

fbshipit-source-id: 4d78c8b1e7983d89de917951d9765b1bd1d90fb0
2021-06-11 01:38:41 -07:00
Andrey Chursin
fb8aba2a6a edenapi: introduce EdenApi::fast_forward_master
Summary: This will be used in fastpath pull

Reviewed By: quark-zju

Differential Revision: D29010304

fbshipit-source-id: 9a7464fbc42544f8c5cc52f6fa25db5f7b5d6bd9
2021-06-10 21:59:43 -07:00
Andrey Chursin
63ea075334 dag: IdDag::idset_to_flat_segments
Summary: idset_to_flat_segments allows to return intersection between flat segments and span set

Reviewed By: quark-zju

Differential Revision: D28980521

fbshipit-source-id: da90c66a021a1e8bb95edbbc2e06cd2a850d7dcd
2021-06-10 21:59:43 -07:00
Andrey Chursin
44c8583c3b dag: impl Subspan for FlatSegment
Summary: Allows to intersects spans and flat segments

Reviewed By: quark-zju

Differential Revision: D28980522

fbshipit-source-id: 0c9c97dc9987348931931f79e9b1b36c07c30b3e
2021-06-10 21:59:43 -07:00
Andrey Chursin
4b4d54c876 dag: general span intersection
Summary:
This diff introduces Subspan trait for objects that contains spans and allows to take a 'subspan' of an object

Implementing Subspan trait allows to intersect arbitrary objects and spans

Reviewed By: quark-zju

Differential Revision: D28980523

fbshipit-source-id: 29a2e58ec3c79a838db751d8a37227b4cdaaa372
2021-06-10 21:59:42 -07:00
Meyer Jacobs
3aea083727 edenapi: separate ContentMetadata fetching into separate method
Summary: Separate `content_metadata` into a new method so that it can be used for both file and tree aux data fetching.

Reviewed By: DurhamG

Differential Revision: D28898226

fbshipit-source-id: 2dbca95fd02384e434ea80cad78793c8d8b2f489
2021-06-10 20:32:07 -07:00
Jun Wu
8cc60851cb clindex: remove the extension
Summary:
It is only useful for Python revlog-based changelog, which was removed by the
previous diff.

Reviewed By: DurhamG

Differential Revision: D29020190

fbshipit-source-id: 3332f1532a510dc72f21d68801e093b5eba10145
2021-06-10 20:28:27 -07:00
Meyer Jacobs
8f9bcf232a scmstore: basic scmstore & sha256-based status
Summary:
Modify the status command to prefer comparing content sha256 when comparing files over comparing content directly, using cached aux data when possible and writing newly computed hashes to cache.

A new config option, `scmstore.status`, gates this new behavior.

When `scmstore.status` is enabled, the `status` output should be more accurate, not assuming files with non-matching `HgId`s in an arbitrary pair of revisions are different. As written, this will cause fetching of data that wouldn't otherwise be fetched, but remote fetching of aux data is planned.

This change also doesn't introduce batch fetching, this is planned.

Reviewed By: DurhamG

Differential Revision: D28826219

fbshipit-source-id: dcd253f169723983738148559d61ba655dd453a4
2021-06-10 18:24:59 -07:00
Meyer Jacobs
4d1dac0001 scmstore: add config to enable aux data persistence
Summary: Introduce a config for enabling separate indexedlogs for storing "aux data" in scmstore. The storage format is not yet finalized, and isn't used in production yet, so we gate the constructing it on a cofig.

Reviewed By: DurhamG

Differential Revision: D28826209

fbshipit-source-id: 1ed8c20329f21b3ced598eea16d9fac0f40112e6
2021-06-10 18:24:59 -07:00
Jun Wu
fa7466cf90 doctor: work with non-revlog changelog
Summary:
Make `doctor` aware of non-revlog changelog and do not hide commits
incorrectly.

Reviewed By: DurhamG

Differential Revision: D29020189

fbshipit-source-id: af7fab75a877997e3f11dd21e506c965da078f83
2021-06-10 14:44:27 -07:00
Jun Wu
6f63fe94d0 test-doctor: demonstrate it hides commits incorrectly for non-revlog changelog
Summary: The doctor command assumes revlog changelog, which does not cover all setups.

Reviewed By: DurhamG

Differential Revision: D29020188

fbshipit-source-id: 68bb4e20efb49482df84a71ab7d86a20a6fa93ce
2021-06-10 14:44:27 -07:00
Jun Wu
3765f8bd76 changelog: remove Python revlog-based changelog
Summary: For all clients and tests we're using revlog changelog based on Rust.

Reviewed By: DurhamG

Differential Revision: D29020191

fbshipit-source-id: 44ab603ea07b8891831692285e94ea0e4df849f5
2021-06-10 14:44:27 -07:00
Jun Wu
e4c9a1ae17 verify: make verify a no-op
Summary:
Verify is tightly coupled with revlog details, and assumes a non-lazy repo.
Revlog is going away and our repo is lazy typically, so let's just make verify
a no-op.

Reviewed By: DurhamG

Differential Revision: D28974546

fbshipit-source-id: 487dc65ceb9a1e445b58d03a53353a8382aefc08
2021-06-10 14:44:27 -07:00
Durham Goode
fde02a6e12 getdeps: fix oss-eden_scm-darwin-getdeps
Summary: More python 3 shenanigans.

Reviewed By: quark-zju

Differential Revision: D29005541

fbshipit-source-id: 210d90b0258927019a08fa79a26e38e0f01b4eaa
2021-06-10 14:24:25 -07:00
Jun Wu
b2d5645a09 changelog: remove inline to non-inline changelog migration
Summary:
Practically, our client-side revlog changelogs should be non-inline now for a
long time. There is no need to keep the migration logic.

The revlog is being deprecated too so its implementation details (inline) is
going to be irreverent. The related test is then removed.

Reviewed By: DurhamG

Differential Revision: D28974551

fbshipit-source-id: ea456c46dac11d6a8b225c269b49598ab34c2548
2021-06-10 13:56:59 -07:00
Jun Wu
827bea0b58 linkrevcache: remove the extension
Summary: It was only useful server-side and will be incompatible with upcoming changes.

Reviewed By: DurhamG

Differential Revision: D28974549

fbshipit-source-id: 70a715ce170baa78adb8b1fcf7d29e3d1479c05e
2021-06-10 13:56:59 -07:00
Jun Wu
7dca190311 test-hgsql: remove more hgsql related tests
Summary: hgsql is irrelevant. Remove more tests that will be broken by upcoming changes.

Reviewed By: DurhamG

Differential Revision: D29019287

fbshipit-source-id: 6fd04d2eb088a0ca9c975b25a4f28a5772f0e088
2021-06-10 13:56:59 -07:00
Jun Wu
ceaf71e9bc test-bundle2-remote-changegroup: remove the test
Summary:
This test uses bundle2 details that are hard to maintain.
Let's just remove the test.

Reviewed By: DurhamG

Differential Revision: D29019286

fbshipit-source-id: a64918736039331bf2fc3cd23e9c67dd77510c22
2021-06-10 13:56:59 -07:00
Jun Wu
8fcb63ccd3 test-strip-cross: remove the test
Summary:
This test is too tricky to maintain with modern setups. Namely, we don't
support strip and are dropping revlog usage. Let's just remove the test.

Reviewed By: DurhamG

Differential Revision: D28974550

fbshipit-source-id: e8d30e726735432820ceaf4ef27d1b83753122a4
2021-06-10 12:32:26 -07:00
Jun Wu
1deab38235 test-treemanifest-server: remove the test
Summary:
We no longer uses this code base for hg server logic.

The test requires non-Rust commit backend which will be removed.

Reviewed By: DurhamG

Differential Revision: D28974547

fbshipit-source-id: 433a6697f6cbf08450c43ce810490fcdb53cf718
2021-06-10 12:32:26 -07:00
Jun Wu
97d1414888 test-revlog: remove the test
Summary: It tests revlog details that are going to be irrelevant.

Reviewed By: DurhamG

Differential Revision: D28974552

fbshipit-source-id: 3ff08473be236849442c3c30d5cf1e1c2a1b628d
2021-06-10 12:32:26 -07:00
Jun Wu
7b3c6a8e7f test-generaldelta: remove the test
Summary: It tests revlog details that are going to be irrelevant.

Reviewed By: DurhamG

Differential Revision: D28974548

fbshipit-source-id: a44e97daa24aece446d899e7711a59cb4a133398
2021-06-10 12:32:26 -07:00
Jun Wu
1f045a5683 debugchangelog: fix help text
Summary: Revise the help text so it matches the latest implementation.

Reviewed By: DurhamG

Differential Revision: D28971683

fbshipit-source-id: 3f8fb7ccc42a71fdb65b87e2b99d06fb347983f3
2021-06-10 12:32:26 -07:00
Andrey Chursin
ae4ef064e6 debughiddencommit: add --no-ignored-files option
Summary: This option allows to exclude ignored files, this way if user specifices wildcard patterns in --include, they will still not include ignored files

Reviewed By: mrkmndz

Differential Revision: D29007062

fbshipit-source-id: a8458811b4c16e11a91abdc31967b53c3cdf2ed7
2021-06-10 11:11:24 -07:00
Alyssa Verkade
82cc0881de Implement rust.name and emit raw identifiers for rust keywords
Summary:
Previously, if someone had included a service definition like the following:
```
service Foo {
    void match(1: string bar);
}
```

rustc could not compile the generated code because functions like `fn match(...)` would be emitted. This commit emits [raw identifiers](https://rust-lang.github.io/rfcs/2151-raw-identifiers.html) when possible (ie we still mangle `crate`, `self` `super`, and `Self` -- so in the previous example we now emit `fn r#match(...)`). The thrift compiler will also now throw an exception when trying to emit a keyword that participates in name resolution (ie `crate`, `super`, `self`, and `Self`).

 This commit also implements the `rust.name` annotation for enums, enum values, fields, functions, types, and typedefs.

Reviewed By: yfeldblum, jsgf

Differential Revision: D28612277

fbshipit-source-id: a86ec1b3fd880c42a82d0e2239f616e3364edcba
2021-06-10 10:52:36 -07:00
Yan Soares Couto
08ec6737f2 Use constants for args on redaction subcommand
Summary: I'm going to touch these files soon, found this easy improvement to do before.

Reviewed By: StanislavGlebik

Differential Revision: D28993265

fbshipit-source-id: 89fe9ac52f6d99e1b5ce7cb24d949e048226436a
2021-06-10 09:05:42 -07:00
Mark Juggurnauth-Thomas
98ada843e3 rage: include Windows disk usage information
Summary:
`df` doesn't exist on Windows, so this part of `rage` isn't populated.

The closest equivalent on Windows is `wmic LogicalDisk`.  Use this to query the
free space and size of the disks.

Reviewed By: quark-zju

Differential Revision: D28997337

fbshipit-source-id: 08b3b74d70928f2e9801061f049359a58108f4bf
2021-06-10 02:44:14 -07:00