Commit Graph

62294 Commits

Author SHA1 Message Date
Jun Wu
6dd2e4c2d8 edenapi: remove unused variable
Summary: Resolve a compiler warning.

Reviewed By: sfilipco

Differential Revision: D25350917

fbshipit-source-id: 5de3f613953c9ad3e35e149cb4abaa611c63a9ae
2020-12-10 12:37:31 -08:00
Jun Wu
fa18f70f8f pyhgtime: resolve a compiler warning
Summary:
```
warning: attribute should be applied to a function or static
  --> pyhgtime/src/lib.rs:70:13
   |
70 |             #[no_mangle]
   |             ^^^^^^^^^^^^
71 |             static timezone: c_long;
   |             ------------------------ not a function or static
   |
   = note: `#[warn(unused_attributes)]` on by default
```

Reviewed By: ikostia

Differential Revision: D25345233

fbshipit-source-id: 4b6f753544af1e3e8479dceed908299f6dc57ad5
2020-12-10 12:37:31 -08:00
svcscm
9fa2c2ca3a Updating submodules
Summary:
GitHub commits:

20e5a1f253
f8c8b74f07
b322b42a06
645aba0329
c167eb3886
ac3eb576cb

Reviewed By: bigfootjon

fbshipit-source-id: daabf9e0815a667c3ce3c70f97c446e2016ab13e
2020-12-10 12:33:00 -08:00
Michael Samoylenko
9009f86713 Add Debug/Copy/Clone to PoolSizeConfig
Summary: Makes it a bit easier to use.

Reviewed By: markbt

Differential Revision: D25439113

fbshipit-source-id: 2c5da338a7000573ac92435c8982f5adff71bf42
2020-12-10 12:05:16 -08:00
Thomas Orozco
b766407054 mononoke/caching_ext: unify our cache stats reporting
Summary:
I'd like to lower the bar to entry as much as possible to use caching in e.g.
mappings. One thing that's a little annoying to setup right now is stats. Let's
unify those.

This does mean the stats names for mappings that had them will change, but I
think that's probably OK here.

A few notes about the implementation:

- I made the stats objects singletons, because ultimately that *is* what stats
  are under the hood.
- I made a macro to define the singleton because that was otherwise really
  verbose.

Reviewed By: farnz

Differential Revision: D25461182

fbshipit-source-id: f30d0908c40d8e0010c546ec95a385a06d557757
2020-12-10 12:01:45 -08:00
Stanislau Hlebik
c67102082e unbundle: add perftrace functions for b2partsgenerators
Reviewed By: quark-zju

Differential Revision: D25458920

fbshipit-source-id: 1f13bc950861e2dc5646176cddb58d67c8dc2266
2020-12-10 11:47:31 -08:00
Kostia Balytskyi
a76550859d admin: make rsync capable of working across repos
Summary:
This adds support for replacing things in the small repo with the things from
the large repo. This is useful when changing the bind.

This diff slightly changes how `rsync` is called: now `--source-csid`,
`--target-csid`, `--from-dir` and `--to-dir` are all specified before the
`copy`/`remove-excessive-files` subcommands.

There's still an ability to use this within a repo, as you can pass identical
source and target repos.

Reviewed By: StanislavGlebik

Differential Revision: D25087893

fbshipit-source-id: 6e5881f80d91ef4b794a967cf9f26dd3af7f56c9
2020-12-10 11:45:08 -08:00
Stanislau Hlebik
52e7d42458 mononoke: fix blobimport importing a 0 revision only
Summary:
We had a small bug in blobimport. If mononoke repo is empty and blobimport
tries to import a single revision whose rev number is 0 then it will
successfull import it but it will report that no revision were imported
i.e. it will print "didn't import any revision" to stderr and won't update the
manifold latest imported revision marker.

That was because we didn't update max_rev_and_bcs_id if rev is equal to
max_rev. This diff fixes it.

Reviewed By: ahornby

Differential Revision: D25421164

fbshipit-source-id: 639ead0ac326a14051d3a4faba568ecb797857a2
2020-12-10 11:29:37 -08:00
svcscm
58e9132bd9 Updating submodules
Summary:
GitHub commits:

40f2b65008
f9ee3e2280
80b5ee3e26
ab0a34b3e5

Reviewed By: bigfootjon

fbshipit-source-id: 7d0ee387a0226e5ca799415e0ce252bfda0fd715
2020-12-10 10:39:12 -08:00
Thomas Orozco
701c4116ab mononoke/caching_ext: limit concurrency of memcache operations
Summary: See D25396203 for discussion. 100 is better than nothing.

Reviewed By: StanislavGlebik

Differential Revision: D25460398

fbshipit-source-id: 608a2dca9c381c78daf0e7d9bcbd1a32f201030a
2020-12-10 10:24:58 -08:00
Thomas Orozco
01d5bd2c4e mononoke/caching_ext: rename CacheDispositionNew
Summary:
I had to have two of those while I was refactoring away the old style of
doing get or fill, but now that that's gone, we can have a single one and clean
up.

Reviewed By: StanislavGlebik

Differential Revision: D25396201

fbshipit-source-id: 459e9ec7e44e8b349c585212c2758d64077e56d1
2020-12-10 10:24:58 -08:00
Thomas Orozco
c844c0c74b mononoke/caching_ext: remove 0.1 futures
Summary:
All the code that needed it basically gone. Might as well push the compat()
calls a little further down and be done with 0.1 futures here.

Reviewed By: StanislavGlebik

Differential Revision: D25396202

fbshipit-source-id: ae85f61c03cb2c38eabbaf0d45387f9d4422b336
2020-12-10 10:24:58 -08:00
Thomas Orozco
6427a8e10d mononoke/caching_ext: remove 0.1 GetOrFillMultipleFromCacheLayers
Summary: All the callsites are gone now.

Reviewed By: StanislavGlebik

Differential Revision: D25396205

fbshipit-source-id: 74d0595c4528dc739d254f5dc950157e087b00dd
2020-12-10 10:24:58 -08:00
Thomas Orozco
06b6e35a85 mononoke/phases: update to futures 0.3 get_or_fill
Summary:
Like it says in the title. The upshot here as well is a lot less cloning.

While in there, I removed the "caching" module since it basically only
contained a couple of things that were all needed in the sql module anyway.

Reviewed By: StanislavGlebik

Differential Revision: D25396208

fbshipit-source-id: aa6381c78f45a94fecd04544196180d2a918f97d
2020-12-10 10:24:58 -08:00
Thomas Orozco
bf8f4048e3 mononoke/caching_ext: add fill_cache to 0.3 variant
Summary: We need this in Phases, so let's add it there.

Reviewed By: StanislavGlebik

Differential Revision: D25396207

fbshipit-source-id: 34174f205028b95c9aa382c343b1344265391df2
2020-12-10 10:24:58 -08:00
Thomas Orozco
a56d1509d1 mononoke/changesets: update to futures 0.3 get_or_fill
Summary:
Like it says in the title. This reduces cloning.  Unlike our cached mappings,
changesets have only way of being queried, so other than cloning, it doesn't
make a huge difference.

Reviewed By: StanislavGlebik

Differential Revision: D25396206

fbshipit-source-id: 45d3ebd403142a3f1d9e3ba7de5de2bf18317165
2020-12-10 10:24:58 -08:00
Thomas Orozco
dbf26aed73 mononoke/changesets: rename futures -> futures-old
Summary:
Like it says in the title. I need the new futures module in there later in this
stack so this makes it cleaner.

Reviewed By: StanislavGlebik

Differential Revision: D25396200

fbshipit-source-id: 0148003c83b3dd0da5142eb468cf3a6ae2f74b7a
2020-12-10 10:24:58 -08:00
Thomas Orozco
eb96570de3 mononoke/bonsai_hg_mapping: update to futures 0.3 get_or_fill
Summary:
Like it says in the title, this updates bonsai_hg_mapping to a futures 0.3
implementation of get_or_fill.

The upshot is that this requires less cloning (in fact, no cloning at all if
the rest of the code was 0.3 here), and in this particular instance it also
lets us completely get rid of the `from_bonsai` flag we were threading through
the whole method and checking many times.

Reviewed By: StanislavGlebik

Differential Revision: D25396199

fbshipit-source-id: f8126c96aad8d982c3deb535530484bec841929f
2020-12-10 10:24:58 -08:00
Thomas Orozco
3ef4906113 mononoke/bonsai_globalrev_mapping: update to 0.3 futures get_or_fill
Summary:
Like it says in the title. Let's update this to the new get_or_fill
implementation that uses 0.3 futures.

Reviewed By: StanislavGlebik

Differential Revision: D25396204

fbshipit-source-id: 06bf449a0d15bd19625acfdcbb4578948e57cde7
2020-12-10 10:24:58 -08:00
Thomas Orozco
0708585c16 mononoke/caching_ext: introduce a futures 0.3 GetOrFillMultipleFromCacheLayers
Summary:
Like it says in the title, this adds a futures 0.3 variant of
GetOrFillMultipleFromCacheLayers. However, I didn't just port the code as-is,
since the code as it stands wouldn't have been very idiomatic if I did.

Instead, I refactored this to be a function and a few traits. I've also kept
the old code for now, and I'll remove it once I've converted all the callistes.

The upshot of the proposed refactor here is that it should be easier to use
this without having to heavily duplicate the instantiation of the "cacher" in
places where we have multiple variants that are cached (e.g. mappings), all the
while being able to leverage the type checker. See D25334478 (13255301b0) for a discussion
on this. This new approach also makes it much easier to work with the tests for
this (you can just mutate the store and access its fields).

Reviewed By: StanislavGlebik

Differential Revision: D25396203

fbshipit-source-id: d706729a800faa4b12fcf5e608c6dee93c5a909e
2020-12-10 10:24:57 -08:00
svcscm
717b02277e Updating submodules
Summary:
GitHub commits:

9a1bfc6930
5eda5bf229

Reviewed By: bigfootjon

fbshipit-source-id: 983a2e706a48c0cd5f9faf94244f3dc6c7bb33ad
2020-12-10 08:33:38 -08:00
Xavier Deguillard
754d132783 Back out "prjfs: handle concurrent file/directory removal"
Summary: Something is wrong with this which causes Unity to freak out.

Reviewed By: fanzeyi

Differential Revision: D25453230

fbshipit-source-id: 89f61fd97817403fa65071ddac022a226b775e53
2020-12-10 07:42:38 -08:00
Durham Goode
1712864779 metadatastore: add config to write local history to indexedlog
Summary:
We already have a config to write shared history to an indexedlog. Let's
add a similar config for local history.

Reviewed By: quark-zju

Differential Revision: D23910457

fbshipit-source-id: eca21db0350895f573a60e4e1a6b05514e70f1c7
2020-12-10 07:28:13 -08:00
Durham Goode
a5f8e0a301 revisionstore: allow persistent IndexedLogHistory
Summary:
In a future diff we'll use the indexedlog stores for local history. We
want those to exist forever, so let's move IndexedLogHgIdHistoryStore to use a
Store under the hood, and add an enum for distinguishing between the two types
at creation time.

Reviewed By: quark-zju

Differential Revision: D25429675

fbshipit-source-id: 5f2dc494e1175d4c1dc74992d3311d2e55d784ca
2020-12-10 07:28:13 -08:00
Alex Hornby
8d997846e3 mononoke: remove fsnode from default walker params
Summary: Switching to specify derived data types other than hg explicitly on the command line

Reviewed By: farnz

Differential Revision: D25367323

fbshipit-source-id: 0e0aea1aab46b43b325486ed6161ea322f7cec4b
2020-12-10 05:28:45 -08:00
Thomas Orozco
c9568598fb mononoke/manifest: add Entry::map_leaf and Entry::map_tree
Summary: It's useful sometimes, like in the next diff.

Reviewed By: mitrandir77

Differential Revision: D25422597

fbshipit-source-id: 0ebb5dcc349bbaacac3dddf03f19e5e092042468
2020-12-10 03:07:45 -08:00
svcscm
0578e28081 Updating submodules
Summary:
GitHub commits:

d733c91dc2
70663b1baa
8ff6557e7f

Reviewed By: bigfootjon

fbshipit-source-id: fabfc9b75f16a5baff9c8085b43221846f052f00
2020-12-10 03:07:45 -08:00
svcscm
717240f8db Updating submodules
Summary:
GitHub commits:

1d045c52be
a37bd85d91
caf722e4a5
1e90876ea6
2015cbb29d
e388db9ea3
cd9c64d624
19a14e1fa8
833b71666c
72125389a9
1a69536923
d489df2bce

Reviewed By: bigfootjon

fbshipit-source-id: 5f7ffd6bc0fcc9dc09c52f2843b5aded5573e334
2020-12-09 18:12:45 -08:00
Zeyi (Rice) Fan
55c313e1b7 GitHub Action: fix Windows build
Summary:
Watchman's GitHub Action has been failing because of the use of `set-env` is deprecated due to security issues. See https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ for details.

See https://github.com/facebook/watchman/runs/1520165260?check_suite_focus=true for example of failures.

To fix it we just need to write to the special environment file.

Reviewed By: chadaustin

Differential Revision: D25412442

fbshipit-source-id: d31ef025189c8aebfa08d434d9373f5da7d4690e
2020-12-09 17:47:48 -08:00
svcscm
23b24749b8 Updating submodules
Summary:
GitHub commits:

7b65100fd8
8a1488efbf

Reviewed By: bigfootjon

fbshipit-source-id: 4d3fb5282bbf96c21ec2e73d72cdab88ee660329
2020-12-09 17:47:47 -08:00
svcscm
0790830498 Updating submodules
Summary:
GitHub commits:

5db8c1751d
3add44304f
89cc06b3e7

Reviewed By: bigfootjon

fbshipit-source-id: a341f549472ffa47e3afff28a48061cf7530b7c3
2020-12-09 16:49:05 -08:00
Saurabh Singh
0f465f7dc9 hooks: show the size of the large commit being blocked
Summary:
This is useful data to see how much we are over the limit. I noticed
the missing data while resolving
https://fb.workplace.com/groups/scm/permalink/3450652774984318/ as the oncall.

Reviewed By: StanislavGlebik

Differential Revision: D25414427

fbshipit-source-id: ec4bbca9c21a4bf0e675ec1cd82e4e703cd88631
2020-12-09 16:44:41 -08:00
Arun Kulshreshtha
ef67b259ee edenapi: allow single cert file
Summary: Previously, the EdenAPI client (and Mercurial's `http-client`) required both a client certificate and private key to be specified individually in order to use TLS mutual authentication. However, libcurl supports having both the certificate and key concatenated together into a single PEM file. This diff makes it possible to simply specify the combined file as the `cert`, leaving the `key` unset.

Reviewed By: quark-zju

Differential Revision: D25323786

fbshipit-source-id: 1800be3ef82ec4dfa89d725f5860190172994c89
2020-12-09 15:07:19 -08:00
Arun Kulshreshtha
b45dbd49ff auth: treat empty cert paths as unset
Summary: Treat empty paths as `None`, which allows certificate and key paths to be unset via a `--config` flag (e.g. `hg debughttp --config auth.edenapi.key=`). This would normally require adding an `%unset` line to the appropriate hgrc, which adds friction to ad-hoc command line usage.

Reviewed By: quark-zju

Differential Revision: D25416531

fbshipit-source-id: 15aae78d9b3a82227278f33def45fa960aa65a98
2020-12-09 15:07:19 -08:00
svcscm
8c1922cf4d Updating submodules
Summary:
GitHub commits:

2d5c3bb1e3
c61e867720
47b39c2376

Reviewed By: bigfootjon

fbshipit-source-id: b2deeded890f3f65464670921232e551f2ad3f1d
2020-12-09 15:07:19 -08:00
svcscm
196f1d4fb7 Updating submodules
Summary:
GitHub commits:

b021039720
31a9cac553
98236fb10e
cd4fe23b9f
ca8d1abccd

Reviewed By: bigfootjon

fbshipit-source-id: 51584721668cde276ea79ed48cd83a1e7a765878
2020-12-09 13:57:37 -08:00
Arun Kulshreshtha
23569dfc4d Regenerate all autocargo-managed Cargo.tomls
Reviewed By: singhsrb, dtolnay

Differential Revision: D25417653

fbshipit-source-id: 81057698ae457a28b7aac6f7a1b32bcec9517eff
2020-12-09 12:44:29 -08:00
svcscm
657df6d789 Updating submodules
Summary:
GitHub commits:

9c36cd18a1
74cdae318b
2324f1fee8
fddbf10de5
0a2e7beaca
123a0bd1ff
c5369485be
6c7e239ecf

Reviewed By: bigfootjon

fbshipit-source-id: 4889ee4525991ae6aeb1560efb9601ea49ff1914
2020-12-09 10:51:57 -08:00
Jun Wu
2e7f12ab4c template: fix ifcontains(rev, revset('.'), ...) compatibility with f64 compatibility
Summary:
The f64 compatibility added by D25079001 (e91552fefe) changes the `{rev}` template output.
However, the revset object is not aware of the rev mapping so the following
pattern will stop working:

  ifcontains(rev, revset('.'), '@', 'o')
  # rev: mapped, but not contains in `revset('.')`

Fix it by teaching `ifcontains(a, b, ...)` to disable f64 compatibility when
evaluating `a`, since `a` is not going to be printed out.

This fixes an issue in VSCode ISL that "You are here" is missing on non-master
commits.

Reviewed By: singhsrb

Differential Revision: D25404673

fbshipit-source-id: 3e53a2ce1f135f8825c195c5a3061dad0359c4b2
2020-12-09 10:36:28 -08:00
svcscm
eef0634c31 Updating submodules
Summary:
GitHub commits:

cd39f451c7
1e4fcfabc2

Reviewed By: bigfootjon

fbshipit-source-id: 872a1d472ffec65b1989bef462cbebf4bf09ecb8
2020-12-09 09:16:19 -08:00
Genevieve Helsel
279af4b5ef externally log prefetch profile deactivation
Summary: In addition to tracking profile activation, it would be nice to see when people deactivate profiles.

Reviewed By: kmancini

Differential Revision: D25372256

fbshipit-source-id: e6bfefe3c838465ba9ed10d622342bdf3df1c40a
2020-12-09 09:12:37 -08:00
Genevieve Helsel
cbd827cd96 add external logging for prefetch profiles
Summary: It would be interesting to track which profiles are activated most often. Also, it may be helpful to track which users are using this feature and generally track usage.

Reviewed By: kmancini

Differential Revision: D25372255

fbshipit-source-id: 2107cdce2a997180547dc63ec654c8d72ced5eb4
2020-12-09 09:12:37 -08:00
Xavier Deguillard
77f3f239a2 store: replace use of ctreemanifest with small manifest parser
Summary:
The code still took a dependency on Mercurial's old manifest code to parse
manifests. It turns out the manifests have a very simple format that we could
parse directly.

This avoids various copies, conversions, std::list, removes ~1k lines of code,
at the expense of adding ~100 lines of code (some of them being C++
boilerplate).

Reviewed By: fanzeyi

Differential Revision: D25385018

fbshipit-source-id: 90d4cda2b7797584bc48c086d5592a7ecaa05dfc
2020-12-09 08:40:38 -08:00
Durham Goode
476c8b7b30 contentstore: add config to write local data to indexedlog
Summary:
We already have a config to write shared data to an indexedlog. Let's
add a similar config for local data.

Reviewed By: xavierd

Differential Revision: D23909569

fbshipit-source-id: 87317554beb6bef8237e6a900403701662c3c0d0
2020-12-09 07:07:40 -08:00
Durham Goode
4f611364eb revisionstore: add repair support to IndexedLogHgIdDatatore
Summary:
We temporarily dropped repair support when transitioning to using Store instead
of a raw RotateLog. Let's add that back now.

Reviewed By: xavierd

Differential Revision: D25371622

fbshipit-source-id: e28fc425a6ffb50c93540672b0df75a172ebbe9c
2020-12-09 07:07:40 -08:00
Durham Goode
925e457ae7 revisionstore: allow persistent IndexedLogData
Summary:
In a future diff we'll use the indexedlog stores for local data. We
want those to exist forever, so let's move IndexedLogHgIdDataStore to use a
Store under the hood, and add an enum for distinguishing between the two types
at creation time.

Reviewed By: xavierd

Differential Revision: D23915622

fbshipit-source-id: 296cf6dfcd53e5cf1ae7624fdccedf0a60a77f22
2020-12-09 07:07:40 -08:00
Durham Goode
b9464c4718 revisionstore: add repair functions to Store
Summary:
In a future diff we'll be moving the IndexedLogHgIdDataStore to use the Store
type (that hides the differences between IndexedLog and RotateLog). To do so, it
needs to support repairs. Let's do some minor refactoring to enable this.

Reviewed By: xavierd

Differential Revision: D25371623

fbshipit-source-id: 846cb5f8c21f1e6b550a45259cc8da24cc65b13b
2020-12-09 07:07:39 -08:00
svcscm
9503303473 Updating submodules
Summary:
GitHub commits:

35d5f61e46

Reviewed By: bigfootjon

fbshipit-source-id: 6e206a00455075aad5933231d85ee4cd0f1d4c95
2020-12-09 07:07:39 -08:00
svcscm
b55f6ab136 Updating submodules
Summary:
GitHub commits:

1e9d6cac5f
a7572ee3d9

Reviewed By: bigfootjon

fbshipit-source-id: d8a81c480f14576de432a0a4f7edb2d7c6b4780a
2020-12-08 18:58:46 -08:00
Stefan Filip
e7be876b6f blobrepo: update factory to set SegmentedChagelog on the production setup
Summary:
Same as development branch. Without configuration changes, nothing changes for
the production codepath.

Reviewed By: quark-zju

Differential Revision: D25405026

fbshipit-source-id: aff705aa5f96814f1f1d7552454ab1d0c13afd92
2020-12-08 18:30:25 -08:00