Commit Graph

61871 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
ccfb13ae0c tests: enable skeleton manifests
Summary: Enable skeleton manifest derivation in tests.

Reviewed By: farnz

Differential Revision: D25019342

fbshipit-source-id: a558abafa5a1f0b210c43638d94364b8603ebf4c
2020-11-18 02:10:55 -08:00
Mark Juggurnauth-Thomas
eddc285862 skeleton_manifest: add first_case_conflict method
Summary:
Add a method to `SkeletonManifest` which finds the paths to the first case
conflict, if there is one.

First means lexicographically first within directories, and with the shortest path.

Reviewed By: ahornby, StanislavGlebik

Differential Revision: D24990175

fbshipit-source-id: ec10f66582b81c40740823e32362ca489a6ebb4d
2020-11-18 02:10:55 -08:00
Mark Juggurnauth-Thomas
aea605a82d bookmarks_movement: cache loaded additional changesets
Summary:
Refactor loading of additional changesets so that it is cached.  This will
allow us to access them multiple times but only load them once.

Differential Revision: D24990176

fbshipit-source-id: c21cd1a811ede8fe2c2b03444de0f071ecf5a38c
2020-11-18 02:10:55 -08:00
svcscm
50c4200f7f Updating submodules
Summary:
GitHub commits:

af7efc246c

Reviewed By: wittgenst

fbshipit-source-id: cac8507df5e5bd8a250a5e253f3e9db7cc3aaa5c
2020-11-18 02:10:55 -08:00
svcscm
c2526280ef Updating submodules
Summary:
GitHub commits:

5862996c19
b9f4f847af

Reviewed By: wittgenst

fbshipit-source-id: 93074a1ce1cf122a29446a9317a65b34cbe2bf23
2020-11-17 15:39:14 -08:00
svcscm
fdfda4f5c8 Updating submodules
Summary:
GitHub commits:

a5bb54c28e
166b0b1df4
d35236ff07
76af87b385
62f23d96d1

Reviewed By: wittgenst

fbshipit-source-id: b4da9924c4c2c38e5efe51d6498c2f86c98961ed
2020-11-17 15:39:14 -08:00
svcscm
370d936296 Updating submodules
Summary:
GitHub commits:

99cf68de09
7088b928ff
9ba2c4c683
699411b2ca
6a95dd92f7
3c8cab4392
263625af07

Reviewed By: wittgenst

fbshipit-source-id: 78a0a77a9d3c28bc83d56686297021c510a6b428
2020-11-17 13:52:29 -08:00
Chad Austin
4299003775 return a better error message if something includes . or .. in their glob
Summary:
We used to produce a confusing error message during glob evaluation
when . or .. was specified as a glob component. Instead, fail early,
with an error message that more directly explains the problem.

Reviewed By: genevievehelsel

Differential Revision: D24969096

fbshipit-source-id: fe70a8f4db1fdce8eec13890d20913b63a516518
2020-11-17 12:53:39 -08:00
Chad Austin
20d032231c improve PathComponent parse failure error messaging
Summary:
Be more specific about which PathComponent string failed to validate
in order to help diagnose downstream issues like glob syntax errors.

Reviewed By: genevievehelsel

Differential Revision: D24966004

fbshipit-source-id: cd3bc0aeaeb389caa13c86b91149d48c5afdb306
2020-11-17 12:53:39 -08:00
Alex Hornby
4e6045eb4f mononoke: propagate error when parsing node and edge type in walker cmdline
Summary:
Previous code used flat_map on the result which discarded the errors.
Fix it and add a test

Reviewed By: StanislavGlebik

Differential Revision: D24989246

fbshipit-source-id: 075c8e40dceebc480ad722fb467a8a9e9bef5905
2020-11-17 12:24:52 -08:00
svcscm
75be23901b Updating submodules
Summary:
GitHub commits:

0eca82c5e8
3d1eca0c9f

Reviewed By: wittgenst

fbshipit-source-id: 9ad2c90040c6f8b37a452882e7311486a9678e62
2020-11-17 12:24:52 -08:00
svcscm
f51152908d Updating submodules
Summary:
GitHub commits:

8659ee3f6f
2978f8ec7f

Reviewed By: wittgenst

fbshipit-source-id: 5274381a133cf4a7fd67e4299673f3c550c8d514
2020-11-17 10:36:06 -08:00
Kostia Balytskyi
c85fe51f5f hooks: allow two types of bypasses for the same hook
Summary:
There seem to be legitimate cases when we want to have both bypass mechanisms available: via the commit message and via the pushvar. The need to be able to use a commit message arises from the fact that engineers rarely have access to push CLI, so they cannot use pushvars. Still, pushvars are useful if we want to push an existing commit without any changes to its message.

NB. Since I wanted to make `HookBypass` a multi-option, I had to change it from `enum` to `struct`. If I left fields `pub` in that struct (the way it's commonly done in `metaconfig`, I would've allowed `HookBypass` instances with both options `None`. This is not a big deal, but is a bit ugly as we already store `Option<HookBypass>` instead, so it's better if `Some(hook_bypass)` symbolizes that there indeed is some way to bypass the hook. So I opted in for constructors, getters and private fields.

Reviewed By: StanislavGlebik

Differential Revision: D25000578

fbshipit-source-id: ad13076c9690ee8d45fc4a93e32a6026ff5bdd09
2020-11-17 06:02:30 -08:00
Mateusz Kwapich
1cb9ad2aaf fix the construction of full_bundle2_content in dechunker
Summary:
Dechunker has a feature of saving entire dechunked bundle contents in memory
 this is used to save the raw bundles to manifold. Unitl now this feature worked
 properly when accesed via `Read` trait methods. When accessed via `BufRead`
 trait the logic that was collecting the read contents was skipped.

 This manifested in the saved infinitepush bundles being always trimmed to 4kb.

Reviewed By: markbt

Differential Revision: D25020371

fbshipit-source-id: c606c9fb116a1cd00ae7f4558a7249364faa9c13
2020-11-17 04:56:39 -08:00
Alex Hornby
802a217229 mononoke: add Blame to walker
Summary:
Add Blame to walker so that we can scrub it.

For public commits, if blame is requested we wait for blame to be derived before traversing unodes. This saves traversing the unode tree twice.

For non-public commits they are not expected to have blame, so for those we don't wait for blame to be derived before traversing unodes.

Reviewed By: farnz

Differential Revision: D24896243

fbshipit-source-id: 66226a8e47f115bcda62269ade63874e0fff4ba0
2020-11-17 03:53:33 -08:00
Alex Hornby
b6f2ef5c94 mononoke: consolidate public phase checks in the walker
Summary:
This change allows the walk steps to check the underlying WalkState's phase information to see if a changeset is public. Its exposed to the steps via Checker::is_public().

This saves repeat checks from the changeset phase from the bonsai_to_hg_mapping_step if the walk state already knows its public, and makes sure we are passing the get_phase ephemeral_derive flag from just one place (it should always be the opposite of enable_derive).

Reviewed By: farnz

Differential Revision: D24954837

fbshipit-source-id: b911d69837db8ef34fbe2c27f642d6819ea46908
2020-11-17 03:53:33 -08:00
Alex Hornby
094f51dadb mononoke: use auto_impl for Arc<trait> in walker
Summary: Removes some boiler plate

Reviewed By: farnz

Differential Revision: D24954836

fbshipit-source-id: dcd13affbfeae5027c74e29829c4838c86573f83
2020-11-17 03:53:33 -08:00
generatedunixname89002005325677
e0776a86ed Daily arc lint --take RUSTFMT
Reviewed By: ahornby

Differential Revision: D25018239

fbshipit-source-id: b07b444fc3076b1754a98b5dd1cc9b6026e0a0be
2020-11-17 03:49:35 -08:00
Saurabh Singh
44be130a9d phabricator: ensure retrieved landed commits are in the repository
Reviewed By: mitrandir77

Differential Revision: D24968246

fbshipit-source-id: 6b68f93986a1d91abc676ca94f59d4ee7d3d34de
2020-11-17 03:46:44 -08:00
Alex Hornby
5e24a70160 mononoke: delegate FromStr, AsRef and sampling_fingerprint from BlameId
Summary:
delegate FromStr, AsRef and sampling_fingerprint from BlameId to the
inner FileUnodeId

Reviewed By: markbt

Differential Revision: D24917140

fbshipit-source-id: 1f39b15c91c1f90f371baf03d97f03d00d8798ea
2020-11-17 01:28:34 -08:00
Alex Hornby
50bfe98ec2 mononoke: no need to pass storage-id in walker tests if its the repo default storage
Summary: Remove some boiler plate from tests

Reviewed By: markbt

Differential Revision: D24864067

fbshipit-source-id: b4729f1004fdd0164ca5394b1c9f850ef0c9f25f
2020-11-17 01:28:34 -08:00
Alex Hornby
8cbafc574b mononoke: shorten NodeType variant names in the walker
Summary:
The NodeTypes variants and the EdgeType variants generated from them were getting rather long which makes them hard to work with.

This change shortens them by
   - changing BonsaiChangeset* to Changeset (this also has better consistency with changeset its blobstore keys)
   - updating Bonsai*Mapping to *Mapping )except for BonsaiHgMapping where it disambiguates with HgBonsaiMapping)

Due to the way walker output is sorted it made more sense to do these in one diff rather than two.

Reviewed By: markbt

Differential Revision: D24864061

fbshipit-source-id: dbd395a89be828ac97cf056f03787097d8f1491d
2020-11-17 01:28:34 -08:00
svcscm
d99112b0a6 Updating submodules
Summary:
GitHub commits:

4ce16473dd
4f459135ac

Reviewed By: wittgenst

fbshipit-source-id: 5292ab8cc282045a37170fb2332b8bf42258ee82
2020-11-17 01:28:34 -08:00
svcscm
d0da020016 Updating submodules
Summary:
GitHub commits:

e7f34876f6
137bd84102
7e06aa2077
d4900c878a
9627e342c8
a30b49b914

Reviewed By: wittgenst

fbshipit-source-id: 7ac9bed4a4687c7af3cfb2634bc9c63cf81a142e
2020-11-16 21:26:27 -08:00
Xavier Deguillard
02ee056b71 inodes: make TraverseTest compile on Windows
Summary: The test wasn't compiling due to these 3 missing headers, add them.

Reviewed By: genevievehelsel

Differential Revision: D24997597

fbshipit-source-id: 6e3be0763362e41be138c670dc88a63bd9e88024
2020-11-16 16:25:22 -08:00
svcscm
e447f103b1 Updating submodules
Summary:
GitHub commits:

5ddb53b5f7
a2a858c9d4
438191e195
387e7db04a

Reviewed By: wittgenst

fbshipit-source-id: 4aa8c09db38743784f7d54ea8c28528b3bbeebc6
2020-11-16 16:25:22 -08:00
svcscm
fe3c3b1066 Updating submodules
Summary:
GitHub commits:

c1e64174b7
5ea5dc9b04
222043065a
cabc72fbe4

Reviewed By: wittgenst

fbshipit-source-id: 9e0828966c94042228ab83ac57d747a16d6277f1
2020-11-16 10:10:59 -08:00
Durham Goode
dacb852353 edenapi: make http version configurable
Summary:
We've seen some hangs with http 2 in lfs. Switching to http 1.1 seems
to fix it. Let's make this configurable so we can tweak this if we see it in
edenapi. For now we continue to default to http 2.

Reviewed By: krallin

Differential Revision: D24901201

fbshipit-source-id: 9806e2c37fa299e4bd381ebdcb17d00800408de3
2020-11-16 10:05:19 -08:00
Johan Schuijt-Li
ec414a7f86 add support for HTTP preamble
Summary:
To support the ability for Mercurial to talk to Mononoke directly while going
through an HTTP proxy, we need to be able to accept HTTP prefixed requests.
This adds the support for Mononoke side. Mercurial client will be added in
subsequent diff.

Reviewed By: krallin

Differential Revision: D24989335

fbshipit-source-id: 597eaa974cea661332967e34abc80b2b609b94ff
2020-11-16 09:12:05 -08:00
Xavier Deguillard
2b1d0a9483 inodes: rename the fuseRefcount in InodeMap
Summary:
This is a preparatory phase to make the refcount usuable on Windows. For more
details, see D24716801 (e50725d2cb)

Reviewed By: chadaustin

Differential Revision: D24764568

fbshipit-source-id: 1e8c6ab00d4c1ec79c347fd5ae7167b2ce1dff68
2020-11-16 09:03:18 -08:00
Xavier Deguillard
4038c01e9f utils: remove //eden/fs/utils/test:linux_test
Summary:
The skip_on_mode_mac argument to cpp_unittest doesn't exist on Windows, and to
be consistent with the rest of the code, we can simply ifdef the code that
either doesn't compile, or doesn't run.

Note: For some reason the accessIncrementsAccessCount test fails when running
on Windows, but only if running after accessAddsProcessToProcessNameCache...

Reviewed By: chadaustin

Differential Revision: D24496450

fbshipit-source-id: fe18fe1d791a27fbe4bd03bd3e8c811feeb23f5f
2020-11-16 08:29:04 -08:00
Xavier Deguillard
b733f70ec2 cli: fix eden debug modified alias
Summary:
This is what `eden debug` shows:
  modified (m, a, t, e, r, i, a, l, i, z, e, d)
                      Enumerate all potentially-modified inode paths

Reviewed By: chadaustin

Differential Revision: D24908570

fbshipit-source-id: 62e91b6f0212c70de4bb1705539d3674e6e000d9
2020-11-16 08:25:03 -08:00
Xavier Deguillard
932e7152fb service: fill the file size for debug file_stats on Windows
Summary:
On Windows, `eden debug file_stats` would crash due to the fileSize not being
filled. Since computing the file size is just a matter of calling stat(2) on
the file, let's simply do that.

Reviewed By: chadaustin

Differential Revision: D24908430

fbshipit-source-id: 07ffb97ada15a07565bea397b436fd21d09b5565
2020-11-16 08:25:03 -08:00
Thomas Orozco
fad04d1b02 mononoke/lfs_import_lib: update to futures 0.3 / tokio 0.2
Summary: Like it says in the title.

Reviewed By: ahornby

Differential Revision: D24918676

fbshipit-source-id: 041823d72fe0ba36262fd71b7ff5be5c42dae283
2020-11-16 04:27:17 -08:00
Stanislau Hlebik
7b3990c080 mononoke: add an option to check service identity in hgcli
Reviewed By: krallin

Differential Revision: D24786082

fbshipit-source-id: 7cd709d19490defb39fcebad08f95c00af54216c
2020-11-16 03:27:29 -08:00
Stanislau Hlebik
0dce99888f cmdutil: fix amending a reverted file
Summary:
We had a bug: if two files were reverted and then we try to amend one of them
mercurial will actually amend both of them.

Looks like the problem was caused by "Prune files reverted by amend" block.
Previously this block was considering every file that was changed in a commit we
are about to amend and comparing with working copy. If a file is the same in a
commit we are about to amend and in the working copy then it will amended as
well.

This diff attempts to fix it by considering only files that were selected for
amending.

Reviewed By: DurhamG

Differential Revision: D24949727

fbshipit-source-id: cf6cb95af3f67ec769e8a58db3b829945133b830
2020-11-16 02:58:24 -08:00
Stanislau Hlebik
daa28549c4 cmdutil - add a test that shows invalid amend behaviour
Summary:
We have an edge case - if we reverted two files and then we try to amend only a
single one  then both of them will be amended.

This diff adds a test for this and other edge-cases. The next diff will fix it

Reviewed By: DurhamG

Differential Revision: D24949726

fbshipit-source-id: c5c53de1d67f161efa8564f89127e61ac2f28ac9
2020-11-16 02:58:23 -08:00
Mark Juggurnauth-Thomas
4a123568d3 mononoke_types: store ChangesetId in frozen BonsaiChangesets
Summary:
`BonsaiChangesets` are immutable.  Rather than recomputing their changeset ids
every time (which involves cloning, serializing, and hashing the changeset),
instead store it alongside the changeset data, computing it once at the point
the changeset is frozen.

When loading the changeset, we already know the id, so there's no need to
compute it at all.

Reviewed By: farnz

Differential Revision: D24951230

fbshipit-source-id: 5350e94eb6ea799a89ced2a211baa657a06b83d0
2020-11-16 01:53:08 -08:00
svcscm
916c9774f2 Updating submodules
Summary:
GitHub commits:

b327138522
a698401e2b
eaa7c42440

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c744c2155f530aeb4f0938e45cad391d690507a1
2020-11-15 16:23:07 -08:00
svcscm
cee3a5784d Updating submodules
Summary:
GitHub commits:

aff76a39f5
8d3ba4fd5a
2b9c95237f
360e9190d8

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5eb37158ab4d43c5c01b4dfdb2daa9ac0e24ef59
2020-11-14 16:00:33 -08:00
Thomas Orozco
3a7014ed80 streamclone: send files that might be un-inlined soon first
Summary:
When we streamclone, we snapshot the revlogs under a lock, then we start
sending. That works fine, unless we have a file whose size changes during
the sending phase. This can happen if it's promoted from a single `.i` to a
`.i` and a `.d`.

When that happens, the clone fails (the client reports it received a bunch of
corrupted data because it starts interpreting parts of files as inputs). Since
the breakage is also confusing client side, I updated the server side to also
assert that it's sending what it thinks it's sending.

Reviewed By: DurhamG

Differential Revision: D24958885

fbshipit-source-id: a0349c651b7cb63ab27546adf9944e7fba63a95d
2020-11-14 08:02:21 -08:00
svcscm
f4e9f1c95c Updating submodules
Summary:
GitHub commits:

6b29295250

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 3960bf61b676a473789fb91785dab8eef2dcef87
2020-11-14 08:02:21 -08:00
svcscm
507fd5f180 Updating submodules
Summary:
GitHub commits:

bd48128e22
3e46a01b5d
575b36b5c8
7062f63712

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 8557b2a824a3a1800beb9c9fe56fa9b224fdf27c
2020-11-13 15:34:32 -08:00
Xavier Deguillard
27f08fc126 utils: remove ServiceAddress
Summary: This is unused, except in tests, so let's just remove it.

Reviewed By: chadaustin

Differential Revision: D24930011

fbshipit-source-id: cb132962e1dff9d12ce12e7eb75bd34a026c58b7
2020-11-13 15:19:38 -08:00
svcscm
d4aef93bad Updating submodules
Summary:
GitHub commits:

768b204f12
067e147382

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 160febddedf3575486e724abfc4c588bb90fecf3
2020-11-13 15:19:37 -08:00
svcscm
d69875cdfb Updating submodules
Summary:
GitHub commits:

d28f475cae
cfb8b1be23
a7a7940e71
7e012e8f4e
3f07673354
214dc0a1cd

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 3a25080f11536d479b7fdb73a2c5db0ff7ec31b2
2020-11-13 14:33:24 -08:00
Xavier Deguillard
8b82dc96cb prjfs: make readdir asynchronous
Summary:
As of right now, opendir is the expensive callbacks due to fetching the sizes
for all the files in a directory. This strategy however breaks down when
timeouts are added as very large directories would trigger the timeout, not
because EdenFS is having a hard time reaching Mononoke, but because of
bandwidth limitation.

To avoid this issue, we need to have a per-file timeout and thus makes opendir
just trigger the futures, but not wait on them. The waiting bit will happen
at readdir time which will also enable having a timeout per file.

The one drawback to this is that the ObjectFetchContext that is passed in by
opendir cannot live long enough to be used in the size future. For now, we can
use a null context, but a proper context will need to be passed in, in the
future.

Reviewed By: wez

Differential Revision: D24895089

fbshipit-source-id: e10ceae2f7c49b4a006b15a34f85d06a2863ae3a
2020-11-13 14:27:26 -08:00
svcscm
dca309c1e5 Updating submodules
Summary:
GitHub commits:

95d61e29df
0ca5262dc6
9b8c1eb7f9
04eafeb6f1
1aae41786a
ef77860a2f
6b5f792b42
441fd72296
84920f2679
bc70f0be9d
76fce83ee7
9b0131179f
e022b59047
0212cce374

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 47d908e7ebef6818fcd52386c60178fd502ad768
2020-11-13 13:57:54 -08:00
Katie Mancini
219a7ff280 Change Prefetch Profiles command name
Summary:
The rest of the non debug commands use - instead of _.

Lets flip the prefretch profiles cli to be consistant.

Reviewed By: genevievehelsel

Differential Revision: D24910172

fbshipit-source-id: a5f18a9c9d5fb4ef9417f14ef9d053cdc1599d76
2020-11-13 12:28:15 -08:00
Katie Mancini
e35c20640a Fix Prefetch Profile Summary
Summary:
The second line of the summary got cut off due to a bad multiline comment
signals_oops

Reviewed By: wez

Differential Revision: D24909886

fbshipit-source-id: 844778e7d47a2b7b413fdd0c4fa0ef71dec9dadb
2020-11-13 12:28:15 -08:00