Commit Graph

62193 Commits

Author SHA1 Message Date
Jun Wu
8d66ade1de hgcommits: add API to get commit text in batch
Summary: The API will be used in Python bindings to avoid running Python in background threads.

Reviewed By: sfilipco

Differential Revision: D25513055

fbshipit-source-id: a108b55115271a256c0d43e0ff7b82c0b209be81
2020-12-14 19:10:44 -08:00
svcscm
23436747f9 Updating submodules
Summary:
GitHub commits:

feafc2639b
41f4344c11
1bbda51406

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d1dedada0c58e77e2e26162f91d068e2174a1f2a
2020-12-14 19:10:44 -08:00
svcscm
aead2263d9 Updating submodules
Summary:
GitHub commits:

ef291d8eea
7a6d7ecf54

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a3c8bb2a2a519227216488e2649f61ecd60376aa
2020-12-14 13:21:24 -08:00
Jun Wu
1a5755de2c smartset: make __iter__ do prefetch
Summary:
Previously only `iterctx` does prefetch. Make `__iter__` do prefetch via `iterctx`.
The old `__iter__` without prefetching was renamed to `iterrev`.

Reviewed By: sfilipco

Differential Revision: D24365404

fbshipit-source-id: db5c687066794257719bb64c673dc384b5460ff1
2020-12-14 13:12:43 -08:00
Jun Wu
4cde87b34b smartset: drop repo from iterctx
Summary:
Now smartset has a reference to repo. It does not need `repo` from external
source.

Reviewed By: sfilipco

Differential Revision: D24365405

fbshipit-source-id: 8a43697b7b84a8a41691ed8f095c271107a90f16
2020-12-14 13:12:42 -08:00
Jun Wu
1a1b3a3cb5 smartset: make repo required for baseset
Reviewed By: sfilipco

Differential Revision: D24365401

fbshipit-source-id: 4d0ee6d27717c1aa966086af68492295aa6ed372
2020-12-14 13:12:42 -08:00
Jun Wu
99c2440f9e smartset: make repo required for nameset
Reviewed By: sfilipco

Differential Revision: D24365402

fbshipit-source-id: 72282634dfba862eab39cef176f0073350921ffc
2020-12-14 13:12:42 -08:00
Jun Wu
0ef3c1aa32 smartset: make repo required for generatorset
Reviewed By: sfilipco

Differential Revision: D24365403

fbshipit-source-id: 8cdee2d344b6af02804c6c0dca3243057df0a643
2020-12-14 13:12:42 -08:00
Jun Wu
01553ffe03 smartset: make repo required for idset
Reviewed By: DurhamG

Differential Revision: D24365406

fbshipit-source-id: 17cbe8e5fc1ea6025b5006737dedb6f744c009a4
2020-12-14 13:12:41 -08:00
Jun Wu
1327b6ec3b smartset: add optional repo reference to smartset objects
Summary:
This will make `__iter__` to be able to do proper prefetch, or make it possible
for `__iter__` to return node instead of rev. To avoid cycles, weakref is used.

The smartset types are used widely. It's hard to migrate all callsites at once.
For now, `repo` is optional. Later, it will be required.

Reviewed By: DurhamG

Differential Revision: D24365400

fbshipit-source-id: 5dd40e3d930893c39f16da8f3169b026c8933bd2
2020-12-14 13:12:41 -08:00
Jun Wu
d55eae5fdb tests: remove test-extension.t
Summary:
The test is one of the most fragile tests (ex. it has traceback that is
fragile).  Since we don't support 3rd party extensions the test is less
meaningful. Let's remove it.

Reviewed By: singhsrb

Differential Revision: D25514727

fbshipit-source-id: cc3491597ba38ad84c4c2b69a275da6505ae2207
2020-12-14 13:12:41 -08:00
Jun Wu
90f40e79bd tests: mark test-atexit-epipe.t as chg incompatible
Summary:
It has a high chance of failing with:

```
   $ hg --config extensions.b=b.py --config 'pager.pager=head -1' init foo2
+  close failed in file object destructor:
+  IOError: [Errno 9] Bad file descriptor
   line1
```

when running with chg together with other tests.

Reviewed By: singhsrb

Differential Revision: D25514728

fbshipit-source-id: d9d2adea97bc6a436341be6f6d9aac43cb78c90a
2020-12-14 13:12:41 -08:00
Jun Wu
abc69ba70a remotefilelog: prefetch commit text during adjustlinknode
Summary: `adjustlinknode` needs commit text to resolve manifest. Prefetch it.

Reviewed By: DurhamG

Differential Revision: D24324798

fbshipit-source-id: 160f05947f3b54962acfa21ed6c973e196273e74
2020-12-14 13:12:41 -08:00
Jun Wu
fa8817c9b4 revset: prefetch text for ancestorsaged()
Summary:
This is a bit tricky - look-ahead does not work because the content of commit
texts decide whether the commit is in the resulting set or not.

Add a special case for `ancestorsaged` so it does not end up with 1-by-1
fetching.

Reviewed By: sfilipco

Differential Revision: D24324797

fbshipit-source-id: 844ac6a6637e25900eea00d99704a59dfc7a0345
2020-12-14 13:12:40 -08:00
Jun Wu
af45384c96 revset: prefetch text for related revset functions
Summary:
Some revset function need commit text data to be efficient. Prefetch commit
text explicitly for them.

Reviewed By: DurhamG

Differential Revision: D24322227

fbshipit-source-id: 49c0b4f8cd9d9a744e10d169a1b1247faa8edd8e
2020-12-14 13:12:40 -08:00
David Tolnay
b138fa6f12 Remove extern crate from bindgen src_includes
Summary: Made unnecessary by using 2018 edition for rust_bindgen_library targets (D25441322).

Reviewed By: jsgf

Differential Revision: D25441329

fbshipit-source-id: d00aaad09451c77c6d05ed5d671468a481ce4e25
2020-12-14 12:53:36 -08:00
svcscm
26bcf42d6e Updating submodules
Summary:
GitHub commits:

00f6c2b16b
b15522214f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 57cd409981fd444f15c2d888d2276dd6230508cd
2020-12-14 12:53:36 -08:00
svcscm
11ed1267ba Updating submodules
Summary:
GitHub commits:

f3e2675260

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 28fb550a6a78ba7b858bd04703c2c255c1167014
2020-12-14 10:51:50 -08:00
Mateusz Kwapich
f349501726 up the timeout for slowests tests
Summary:
Some of our tests are marked as flaky because of timeouts. They usually run
under timeout but because it's integration tests the times vary a lot.

The `#requre slow` is marking those tests as slow giving them more time to tun.

Reviewed By: krallin

Differential Revision: D25495555

fbshipit-source-id: 02bc3755992f56f5e743835318cf1233ab7c623d
2020-12-14 10:04:28 -08:00
Mark Juggurnauth-Thomas
5e549d348f derived_data: don't use default mapping in batch derivation
Summary:
Now that the mapping is separated from BonsaiDerivable, it becomes clear where
batch derivation is incorrectly using the default mapping, rather than the
mapping that has been provided for batch-derivation.

This could mean, for example, if we are backfilling a v2 of these derived
data types, we could accidentally base them on a v1 parent that we obtained
from the default mapping.

Instead, ensure that we don't use `BonsaiDerived` and thus can't use the
default mapping.

Reviewed By: krallin

Differential Revision: D25371963

fbshipit-source-id: fb71e1f1c4bd7a112d3099e0e5c5c7111d457cd2
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
e2cd66da84 derived_data_utils: fix typo
Reviewed By: quark-zju

Differential Revision: D25371969

fbshipit-source-id: bbcb3cece6b94096f328d453277b57c7f09dd398
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
db28ca7f59 derived_data_utils: ratelimit backfilling
Summary:
The backfiller may read or write to the blobstore too quickly.  Apply QPS
limits to the backfill batch context to keep the read or write rate acceptable.

Reviewed By: ahornby

Differential Revision: D25371966

fbshipit-source-id: 276bf2dd428f7f66f7472aabd9e943eec5733afe
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
078efc6112 session: add convenience methods for read and write qps limits
Summary:
The common case of limiting blobstore rates using a leaky bucket rate limiter
is cumbersone to set up.  Create a convenience method to do it more easily.

Reviewed By: ahornby

Differential Revision: D25438685

fbshipit-source-id: 821eda7bd0ddf71f22378c1b23e66b6d3f6454e7
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
90dc6adb1c derived_data: buffer fetching of mapping batches
Summary:
When fetching many derived data mappings, the use of `FuturesUnordered` means
we may fetch many blobs concurrently, which may overload the blobstore.

Switch to using `buffered` to reduce the number of concurrent blob fetches.

Reviewed By: ahornby

Differential Revision: D25371965

fbshipit-source-id: 30417e86bc33defbb821f214a5520ab1b8a8c18c
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
615537ef10 backfill_derived_data: add batch-size option to control batch size
Summary:
Large batches with parallel derivation can cause problems in large repos.
Allow control of the batch size so that it can be reduced if needed.

Reviewed By: krallin

Differential Revision: D25401205

fbshipit-source-id: 88a76a7745c34e4e34bc9b3ea9228bd5dad857f6
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
96d8ce4ad2 derived_data: add option for parallel batch derivation
Summary:
Re-introduce parallel backfilling of changesets in a batch using `batch_derive`,
however keep it under the control of a flag, so we can enable or disable it as
necessary.

Reviewed By: ahornby

Differential Revision: D25401207

fbshipit-source-id: f9aeef3415be48fc03220c18fa547e05538ed479
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
73cdac45e3 derived_data: use new derived data configuration format
Summary:
Change derived data config to have "enabled" config and "backfilling" config.

The `Mapping` object has the responsibility of encapsulating the configuration options
for the derived data type.  Since it is only possible to obtain a `Mapping` from
appropriate configuration, ownership of a `Mapping` means derivation is permitted,
and so the `DeriveMode` enum is removed.

Most callers will use `BonsaiDerived::derive`, or a default `derived_data_utils` implementation
that requires the derived data to be enabled and configured on the repo.

Backfillers can additionally use `derived_data_utils_for_backfill` which will use the
`backfilling` configuration in preference to the default configuration.

Reviewed By: ahornby

Differential Revision: D25246317

fbshipit-source-id: 352fe6509572409bc3338dd43d157f34c73b9eac
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
05225bcf90 derived_data: make derivation options a parameter to derive_from_parents
Summary:
Currently, data derivation for types that have options (currrently unode
version and blame filesize limit) take the value of the option from the
repository configuration.

This is a side-effect, and means it's not possible to have data derivation
types with different configs active in the same repository (e.g. to
server unodes v1 while backfilling unodes v2).  To have data derivation
with different options, e.g. in tests, we must use `repo.dangerous_override`.

The first step to resolve this is to make the data derivation options a parameter.
Depending on the type of derived data, these options are passed into
`derive_from_parents` so that the right kind of derivation can happen.

The mapping is responsible for storing the options and providing it at the time
of derivation.  In this diff it just gets it from the repository config, the same
as was done previously.  In a future diff we will change this so that there
can be multiple configurations.

Reviewed By: krallin

Differential Revision: D25371967

fbshipit-source-id: 1cf4c06a4598fccbfa93367fc1f1c2fa00fd8235
2020-12-14 09:24:57 -08:00
Mark Juggurnauth-Thomas
64be2e8d87 derived_data_utils: take parameters by reference
Summary: Take the parameters to `derived_data_utils` and `derived_data_utils_unsafe` by reference.

Reviewed By: krallin

Differential Revision: D25371970

fbshipit-source-id: d260650c2398e33667e1bc5779fbabdff04f1f98
2020-12-14 09:24:57 -08:00
Mark Juggurnauth-Thomas
9e1b1448e6 derived_data: split BonsaiDerived trait
Summary:
The `BonsaiDerived` trait is split in two:

* The new `BonsaiDerivable` trait encapsulates the process of deriving the data, either
  a single item from its parents, or a batch.
* The `BonsaiDerived` trait is used only as an entry point for deriving with the default
  mapping and config.

This split will allow us to use `BonsaiDerivable` in batch backfilling with non-default
config, for example when backfilling a new version of a derived data type.

Reviewed By: krallin

Differential Revision: D25371964

fbshipit-source-id: 5874836bc06c18db306ada947a690658bf89723c
2020-12-14 09:24:57 -08:00
Mark Juggurnauth-Thomas
01251de9bb sync configerator thrift
Reviewed By: StanislavGlebik

Differential Revision: D25246318

fbshipit-source-id: fd97296e3540b43c72af00ab045c81c496e06728
2020-12-14 09:24:57 -08:00
svcscm
cdac45a862 Updating submodules
Summary:
GitHub commits:

83a939ac16
1a6e63e659
0b55ddf667
38d981a188
b943595389
751d6fa6df

Reviewed By: bigfootjon

fbshipit-source-id: 519ba4a5e967dff2c50332693e761cd8ba3c62d4
2020-12-14 08:55:59 -08:00
Kostia Balytskyi
2db894e581 wireproto: fix incorrect name in timefunction
Reviewed By: krallin

Differential Revision: D25531699

fbshipit-source-id: ed620a7f00351251d3670ed1ce43240a584e76cd
2020-12-14 07:57:46 -08:00
svcscm
0f2d5c420f Updating submodules
Summary:
GitHub commits:

1b805ef11d

Reviewed By: bigfootjon

fbshipit-source-id: b7fffe2fca7b0572d6b7b1709b56da7b92b71a3f
2020-12-14 06:59:59 -08:00
Durham Goode
2333b25e75 tests: fix rust store test on windows
Summary: Looks like the permissions are different there. Let's glob it out.

Reviewed By: singhsrb

Differential Revision: D25507359

fbshipit-source-id: 6a5c19e41879798b829d9b6e79eba3009249c20c
2020-12-14 06:53:24 -08:00
Jan Mazur
64de2b3abf git_types: remove unused dependency on old futures
Summary: as in the title

Reviewed By: krallin

Differential Revision: D25531446

fbshipit-source-id: afa4858f8f18182f206234e69b242c20a2af6b2a
2020-12-14 06:39:01 -08:00
svcscm
89a5c10726 Updating submodules
Summary:
GitHub commits:

e047e2dbf4
2f9b85e653
288ce65a0c
c748032a25
92313218fe
0ebaea34f8
5186b0a80e

Reviewed By: bigfootjon

fbshipit-source-id: 99bf9594d6a0c2a941ae8806d03875eebdc20bb7
2020-12-14 04:32:56 -08:00
generatedunixname89002005325677
9c5eaa7c81 Daily arc lint --take RUSTFMT
Reviewed By: zertosh

Differential Revision: D25527687

fbshipit-source-id: 25c98dcb607ec7f469099b68f432f3412ca9988e
2020-12-14 03:56:02 -08:00
svcscm
93a1534f33 Updating submodules
Summary:
GitHub commits:

ab42eb8fb9

Reviewed By: bigfootjon

fbshipit-source-id: b7319b31e128ec4fde56ddad280993dede38f652
2020-12-14 03:51:48 -08:00
Stanislau Hlebik
cbe07f0d17 infinitepush: select infinitepush path only for scratch bookmarks
Summary:
At the moment "hg pull -B bookmark" always fetches from infinitepush path even
if we do something like "hg pull -B master".

Let's fetch from infinitepush only if a bookmark matches scratch mather

Reviewed By: markbt

Differential Revision: D25460577

fbshipit-source-id: 6563dcd3423c6a7a70ea1c1f7acdaf5db5e21875
2020-12-13 23:48:22 -08:00
svcscm
7c7c575d35 Updating submodules
Summary:
GitHub commits:

331500c91c
1ed48ba19b
4b584f0f45

Reviewed By: bigfootjon

fbshipit-source-id: 00aee6db375e104665cb946acb810e5f12cac4c4
2020-12-13 17:56:05 -08:00
svcscm
bc8616c8f3 Updating submodules
Summary:
GitHub commits:

70ee1c0a54

Reviewed By: bigfootjon

fbshipit-source-id: 08a42ed386ab883ff6ce7e3ac90cb03d968a27a5
2020-12-13 06:23:13 -08:00
svcscm
ab49244149 Updating submodules
Summary:
GitHub commits:

7da96e9960

Reviewed By: bigfootjon

fbshipit-source-id: ede7f0637d3bd56f897cda53887b3be0bc120435
2020-12-12 05:48:56 -08:00
Chad Austin
64ca0c83c6 skip failing doctor tests on macOS
Summary: Two doctor tests don't pass on macOS, so disable them for now.

Reviewed By: genevievehelsel

Differential Revision: D25509814

fbshipit-source-id: c3fa92daefd4fda67335bdc66f56e35e94ae4e6a
2020-12-11 23:35:11 -08:00
svcscm
0910aace18 Updating submodules
Summary:
GitHub commits:

9718b18852

Reviewed By: bigfootjon

fbshipit-source-id: a4605af7fa8e7c11411df1698eb6f90eedfe8c96
2020-12-11 19:32:09 -08:00
Arun Kulshreshtha
f98273063a auth: make auth_for_url validate certs
Summary: Make the auth crate validate the user's certificate before returning it. This way we can catch invalid certs before trying to use them.

Reviewed By: sfilipco

Differential Revision: D25454687

fbshipit-source-id: ad253fb433310570c20f33dbd0d0bf11df21e966
2020-12-11 18:55:03 -08:00
Arun Kulshreshtha
a8a9fa3246 auth: add x509 module for validating certs
Summary: Add a new module that can parse X.509 certificates and detect common issues (e.g., the certificate is missing, corrupt, or expired). This should allow us to provide better UX around certificate errors.

Reviewed By: sfilipco

Differential Revision: D25440548

fbshipit-source-id: b7785fd17fa85f812fd38de09e79420f4e256065
2020-12-11 18:55:03 -08:00
svcscm
e3d6cc84af Updating submodules
Summary:
GitHub commits:

5ce67f1a9a

Reviewed By: bigfootjon

fbshipit-source-id: abd0843d73fce512e7eb24ac43530667752a9d3f
2020-12-11 18:55:03 -08:00
svcscm
f84bbdedd8 Updating submodules
Summary:
GitHub commits:

6873524ad0
9aea8d1374
b1bb2842c5
a52d8cd161
491779514e
e5877c914d
e5961899ce

Reviewed By: bigfootjon

fbshipit-source-id: a5001788673ca4945f0cbd2d370f5f0e6f8f4474
2020-12-11 17:46:42 -08:00
Jun Wu
ec7c0659c9 dag: relax trait bounds for AbstractNameDag
Summary: This makes it more flexible.

Reviewed By: kulshrax

Differential Revision: D24467604

fbshipit-source-id: 63023cf0dde2fb7eac592ac79008e4b7a62340c1
2020-12-11 17:03:37 -08:00