Commit Graph

51220 Commits

Author SHA1 Message Date
svcscm
f4b697e65b Updating submodules
Summary:
GitHub commits:

b94ef9fb23
4462a7f00a
16e629c415
50770702ad
5b632a5deb
d2fa2cbcd6
4e152f651e
54c89b5f03

Reviewed By: yns88

fbshipit-source-id: 766783d00f8440c1264f13045ae6411233355af6
2019-12-04 14:54:55 -08:00
Stefan Filip
73a64f6685 manifest: fix gettreepack for commit changing file to folder
Summary:
When changing a file to a folder in a commit this function would try to query
the storage using the path and the id of the file. Storage would not have
such an entry and would cause the operation to fail.

Fixing the issue by filtering out ids of files in the section for known
manifests. Filtering already occurs in the section for transmitted manifest.

Reviewed By: quark-zju

Differential Revision: D18797368

fbshipit-source-id: 2ed727b5eaaab2f17cd988d6c8a3a1055ac8bd2a
2019-12-04 14:11:56 -08:00
Chad Austin
be9ea834ca remove the redundant inode number from UnloadedInode
Summary:
Each entry in InodeMap::unloadedInodes_ stored the InodeNumber
twice. Remove one of them.

Reviewed By: wez

Differential Revision: D18651007

fbshipit-source-id: be85c34cb2b38fc0b2875d0874cecd1ef274aca4
2019-12-04 13:30:19 -08:00
Chad Austin
6b168708d9 readability improvements to diff code
Summary: Small readability improvements I noticed while reading the diff algorithm.

Reviewed By: genevievehelsel

Differential Revision: D18650987

fbshipit-source-id: 19346362711455ae87d6770812e647544a4576bf
2019-12-04 13:30:18 -08:00
Chad Austin
f930a40434 make PathComponentPiece and RelativePathPiece constexpr
Summary: Allow creation of PathComponentPiece and RelativePathPiece values at compile-time.

Reviewed By: wez

Differential Revision: D18642594

fbshipit-source-id: 209e5c27e8fab1e877ccee8558fa757b68078e66
2019-12-04 13:30:18 -08:00
Thomas Orozco
e2d1a43146 keepalive: send message body with the headers
Summary:
On the LFS Server, we've noted that LFS batch requests from Mercurial have
about ~40ms latency, but that the same request sent through curl doesn't.
Those requests, when sent through curl, complete in < 1ms, so thats a lot of overhead.
After adding more logging in the LFS server (D18636703), it turned out that that is
because the body of the request shows up 40ms after the request itself.

After capturing the traffic on the backend (D18689109), it turned out that
Mercurial is sending the headers and the response body in 2 separate TCP
packets.

The reason for that is delayed TCP acks. What happens is that when we call
`h.endheaders()`, that calls `send(2)`, which in turns send the packet with the
headers. Later, when we call `h.send(data)`, we make another `send(2)` syscall,
but that doesn't go over the wire immediately: because of Nagle's algorithm, we
wait for an ACK for the first packet we send before sending a new one, and
because of delayed ACKs, the ACK takes 40ms for this ACK to show up (which is
over 40 times the roundtrip latency!).

This diff passes the data to `h.endheaders()`, which in Python's httplib will
concatenate the headers and the data into a single  `send(2)` syscall if the
data isn't a file-like object (which it isn't for batch requests), and
otherwise fall back to doing exactly what we're doing right now.

This will result in everything in a single packet if we're fetching a single
file (and AFAICT, without further delay if we're fetching enough files that the
request doesn't fit in a single packet).

An alternative approach would be to set `TCP_NODELAY` on our socket here, but
for now this seems less intrusive and just as effective, so I've opted for that
approach.

Reviewed By: farnz

Differential Revision: D18811419

fbshipit-source-id: 4cf5719e5eed90e5dd994e6c8861aceb69373d89
2019-12-04 12:10:22 -08:00
Xavier Deguillard
ff36d65b5d typing: enable pyre
Summary:
The Mercurial codebase contains over 500 errors, let's ignore them for now, we
can go back to them later to fix them.

Besides the manual change to .pyre_configuration.local, the changes were
generated with:
  pyre --output=json check | pyre-upgrade fixme

Reviewed By: singhsrb

Differential Revision: D18803908

fbshipit-source-id: 724db7bd864c0de47a97ef2092bdee9f2cda531f
2019-12-04 10:55:00 -08:00
Xavier Deguillard
1866de92b3 remotenames: workaround pyre infinite loop bug
Summary:
The line causes pyre to enter an infinite loop, for now, let's simply ignore it
when type checking is enabled.

Reviewed By: singhsrb

Differential Revision: D18803909

fbshipit-source-id: d89b4cd0311a4a5416dd31197a8c69f4a6b65944
2019-12-04 10:55:00 -08:00
svcscm
140fe7da11 Updating submodules
Summary:
GitHub commits:

e0a9c73213
0caffc4165
8b4020ff4e

Reviewed By: yns88

fbshipit-source-id: a60355f8a940ea878b7592c2765547576d1927f0
2019-12-04 10:50:28 -08:00
Wez Furlong
c03af477eb eden: remove legacy bind mount concept from redirections
Summary:
Now that we've transitioned to the newer redirections
configuration we can remove the older bind mounts configuration
parsing, and that is what this diff does.

This is helpful because in situations where the user has run
`hg co null` as part of some troubleshooting advice, the legacy
bind mounts would remain mounted and obstruct some of the
steps that would have fixed up the users repo.

Reviewed By: pkaush

Differential Revision: D18337246

fbshipit-source-id: 23f27787d609e1c38a9c98b8b6596bb40743b9ca
2019-12-04 10:47:14 -08:00
Mateusz Kwapich
735a2fd691 use the lastest successor in phrevset
Summary:
When user types Dxxx as a revset locally they usually mean the latest version
of the commit - not neccesarily the one in phabricator. This usecase was
usually handled by doing local lookup which can be very slow in case of slow
commits: see for example those user complaints:
https://fb.workplace.com/groups/scm/permalink/2487795837936688

Reviewed By: farnz

Differential Revision: D18809252

fbshipit-source-id: b3442d6fa2ef9c9c0dff4909c874689810fbfa88
2019-12-04 10:38:59 -08:00
svcscm
a1e20d2abf Updating submodules
Summary:
GitHub commits:

79ce5d694f
644b49220f
02784cf261
b3d94bf10e
72f4dd408e
17925179d8
2cf584d3b1
d40d96146c
d4a0e4a2f2

Reviewed By: yns88

fbshipit-source-id: 5e4f6b78bddd30383f1136b0912e4d96b71f4375
2019-12-04 09:31:32 -08:00
Wez Furlong
bb01c59162 eden: call eden redirect unmount at unmount time
Summary:
The intent is to allow macOS to make a best effort attempt
to detach any disk images associated with redirections.

D18795800 taught redirect to detach rather than a simple unmount,
and we need to give it an opportunity to detach when we unmount
gracefully so that all resources are released on shutdown.

The implementation of this diff ties into the same mechanism that
we use to shutdown the buck daemon when we unmount or restart which
has the nice side effect of showing the output from the underlying
`eden redirect unmount` command.

In an earlier iteration of this diff I tried making the server code
run `eden redirect unmount` but it happened too late in the process
to be effective: the thrift server had already been torn down in the
shutdown case and we need privs to perform the unmount.

Reviewed By: pkaush

Differential Revision: D18804080

fbshipit-source-id: 0b409130752121c56a46c9b2e46b50e5abee8200
2019-12-04 08:45:26 -08:00
Wez Furlong
34636666ac eden: cli: add redirect unmount command
Summary:
The purpose of this command is to unmount/unlink any configured
redirections without removing their configuration.

The intent is to call this for a mount when we are unmounting; I'll do
that bit in a follow on diff.

Reviewed By: pkaush

Differential Revision: D18801872

fbshipit-source-id: 096d9595091da72aa85f4259cbab022a1fe0c01f
2019-12-04 08:45:26 -08:00
Wez Furlong
a0ffcaa0b0 eden: redirect: use hdiutil detach to unmount images
Summary:
unmount will unmount from the VFS but still leave the image
associated with the disk image machinery and visible to `hdiutil info`.

This leaves resources associated with the mount even after it has
logically gone away, and that is undesirable.

This diff switches to using `detach` instead which unmounts and removes
the image from the disk image state.

The effect of this is that running `hg co null ; eden redirect fixup`
will completely unmount the redirections.

However, it doesn't cause them to be unmounted when the eden daemon is
stopped: that is something to address in a separate diff.

Also worth noting: only HFS+ mounts get detached successfully using this method.  APFS mounts will remain regardless, so its another reason for switching to HFS+ in D18795799.

Reviewed By: pkaush

Differential Revision: D18795800

fbshipit-source-id: dfc86d86016a0c78e67f6ae2651db681669a5b14
2019-12-04 08:45:25 -08:00
svcscm
e230a1e72e Updating submodules
Summary:
GitHub commits:

fff0c03259
ea7006f401
2b647dff96
4ebeeefb93
090c1ea867
4fc3ca2fda
174345aba3
3d2f38c05b

Reviewed By: yns88

fbshipit-source-id: d7458b1bc0bc2b70020523cd8544fda71a481478
2019-12-04 07:29:06 -08:00
Lukas Piatkowski
f90766f95b rust-shed: change the workspace member definition to point to the newly moved project directories
Summary: The projects have been moved to a "shed/" subdirectory, so the root Cargo.toml with workspace has to be adjusted to that move.

Reviewed By: farnz

Differential Revision: D18807189

fbshipit-source-id: 0fd66fa7edd38ab4fdf905872f38fac57ae0230e
2019-12-04 06:44:14 -08:00
svcscm
1467a82d57 Updating submodules
Summary:
GitHub commits:

e9b43ed326
13ad6c8823
fe6c371b45

Reviewed By: yns88

fbshipit-source-id: 33216fdaab1473b86790ef3ce3b2d4b6ea799649
2019-12-04 06:44:14 -08:00
svcscm
0f97b0d563 Updating submodules
Summary:
GitHub commits:

f8e3918ecc
2da2a36ba6
7d9a4c55df
029d33f6bb
79b97b0bd8
f25c45976d
9177935736
b4c8675269
aaeec96017

Reviewed By: yns88

fbshipit-source-id: bec18df91fdfc84d282e50945e0509ecb41c459d
2019-12-03 23:36:57 -08:00
Adam Simpkins
a49f4274d6 install the edenfsctl program during the CMake build
Summary:
Update Eden's CMake build to use the new `install_fb_python_executable()`
function to install `edenfsctl`

Reviewed By: wez

Differential Revision: D18774538

fbshipit-source-id: 462c0127d79edcb6235a629cb97ea481493e1906
2019-12-03 21:42:28 -08:00
Adam Simpkins
e3dff39f45 getdeps: add an install_fb_python_executable() function to the CMake utilities
Summary:
Add a `install_fb_python_executable()` function to `FBPythonBinary.cmake` for
helping to install python executables generated with
`add_fb_python_executable()`.  This primarily helps by automatically looking
up the correct output file to install from the generated targets.

Reviewed By: wez

Differential Revision: D18774539

fbshipit-source-id: 4b397580d72ac448f21d1db6d2cdd653cf3635df
2019-12-03 21:42:27 -08:00
svcscm
1c5371352d Updating submodules
Summary:
GitHub commits:

f71571b0e8
f47108d35e
9cf762612e
273c145999

Reviewed By: yns88

fbshipit-source-id: 16c3a9f8229a674701c8ad00566afc3fbe7ff1cb
2019-12-03 21:23:28 -08:00
Jessie Liu
a219882211 Log manual merged files to dev command timers
Summary: Log files that required manual merge during a rebase to dev command timers so we have an idea of how often they happen and on which files

Reviewed By: simpkins

Differential Revision: D18648175

fbshipit-source-id: 83ffe6d9177ca00b8fd1095745c585186bc2c8e9
2019-12-03 20:12:16 -08:00
svcscm
ea2d8e3854 Updating submodules
Summary:
GitHub commits:

504a63b8cd
c495ea0e4f
6472b9cbf1
8290e1bac3
df32a11747
473c2dd1e4
4edb4284e7
f132dc5c7f
f5238e18a4
35478666ea
1012d059cc
c386a3348f

Reviewed By: yns88

fbshipit-source-id: cff0bbcca0b7467542294172e01063dc928e1754
2019-12-03 20:12:16 -08:00
svcscm
13b8748da5 Updating submodules
Summary:
GitHub commits:

a71e70a2a5
4e786dbf80
1cb1d800e4
3fbb64cb1a
53707dfe26
0776cc5cca
28e4c3c2cb
b7a0f8fcbf
e60ff79e4e

Reviewed By: yns88

fbshipit-source-id: dcab56606e48129499fb26e948945a8d80264ad1
2019-12-03 16:07:11 -08:00
Wez Furlong
4d10fdb354 hg: suppress marking DXXX as landed as YYY
Summary:
It's pretty verbose and dominated my screen just now:

{P123338424}

Reviewed By: sfilipco

Differential Revision: D18796291

fbshipit-source-id: 211f43a5e35aaf6153eea9068b014499abbf6e49
2019-12-03 15:16:47 -08:00
Wez Furlong
829c722974 getdeps: rocksdb: don't enable -Werror
Summary:
It's impossible for a consumer of a released version of
rocksdb to do anything about this except not use it, and this particular
version of rocksdb ships with a number of shadow warnings.

Disable warning to error promotion.

See also: https://twitter.com/pcwalton/status/1201679307552083968

Reviewed By: chadaustin

Differential Revision: D18785637

fbshipit-source-id: 1db2b00b3c397d6c0b8f05b9d1c658877685c961
2019-12-03 15:07:56 -08:00
Chad Austin
3a625fda68 build cleanly with -Wextra-semi
Summary: Remove unnecessary semicolons in preparation for adding -Wextra-semi.

Reviewed By: wez

Differential Revision: D18784373

fbshipit-source-id: 2fe8366defc2b8d79a4585a4e961a6fe84b91c67
2019-12-03 15:04:27 -08:00
Wez Furlong
54f8bafbc3 eden: redirect: use HFS+ rather than APFS
Summary:
We've seen occasional weirdness with "resource temporarily unavailable" when working with disk images.

The internet, in the form of this stackoverflow post: https://stackoverflow.com/q/48368389/149111
suggests that this is related to APFS.

This commit switches over to HFS+ in the hope that we won't see it any more.

Reviewed By: chadaustin

Differential Revision: D18795799

fbshipit-source-id: 68e08e852770e311bcf04a8d12cb20670babf889
2019-12-03 14:54:21 -08:00
Chad Austin
edd7a8f5c8 enable -Wmismatched-tags
Summary:
On Windows, structs and classes mangle differently. Detect mismatches
on Linux too.

Reviewed By: simpkins

Differential Revision: D18774928

fbshipit-source-id: 6962076902c8363550625eb30a7c348b092cb090
2019-12-03 14:43:12 -08:00
Chad Austin
918d153789 enable -Wunreachable-code
Summary: We build unreachable-clean, so enable the warning.

Reviewed By: fanzeyi

Differential Revision: D18668374

fbshipit-source-id: e356c75c5090aa08b5cfb7c267efd0452c0aa228
2019-12-03 14:43:12 -08:00
svcscm
66529c711f Updating submodules
Summary:
GitHub commits:

afb64d406e
80b7c7a2e6
b0ec302149
a58d6a4964
f32a311f0d
aa33d68d83
22f0ea3b98
4faec0f231
75b51602d9
80ee4f461a

Reviewed By: yns88

fbshipit-source-id: 7a015b90c67635edc24db0df8889f9a2cda02169
2019-12-03 14:43:11 -08:00
svcscm
cffcaa5f7a Updating submodules
Summary:
GitHub commits:

1e549f95d0
380c720be4
f27abc0fe1
b51ac9fd52

Reviewed By: yns88

fbshipit-source-id: 6c3a515e6730a6e3d6a8e380074546dc3212289b
2019-12-03 11:56:46 -08:00
Shrikrishna Khare
b4394c413d fbcode_builder: getdeps: fboss: OpenBCM depends on git-lfs
Summary:
OpenBCM libraries are stored with git LFS. As a result, fetcher fetches LFS pointers and not the contents. Use git-lfs to pull the real contents before copying to install dir using NoopBuilder.
In future, if more builders require git-lfs, we would consider installing
git-lfs as part of the sandcastle infra as against repeating similar
 logic for each builder that requires git-lfs.

Reviewed By: wez

Differential Revision: D18759806

fbshipit-source-id: f988a0460107bc0685e7aba107daba9ed88f71e7
2019-12-03 11:43:41 -08:00
Shrikrishna Khare
b2f5da202e fbcode_builder: getdeps: fboss: add git-lfs fetcher
Summary:
As titled. This is needed by OpenBCM, and in future, possibly by other
manifests as well.

Reviewed By: wez

Differential Revision: D18759807

fbshipit-source-id: d445dfa382cea4bf96443ab9889926a4abbf0757
2019-12-03 11:43:41 -08:00
Wez Furlong
fbf697b7be mercurial: remove hg_watchman_client and watchman_client crates
Summary:
These are not currently used by mercurial and are superseded
by the newer more general `watchman_client` crate on crates.io:

https://docs.rs/watchman_client/0.2.0/watchman_client/

Some of the implementation of that crate was based on the work I'm
removing here.

I was going to update hg_watchman_client to be implemented in terms
of the new crate, but since it isn't used and it would only be a thin
wrapper, I figure that it is best to delete this code instead so that
we can integrate it in terms of the new API when we're ready.

Reviewed By: singhsrb

Differential Revision: D18777161

fbshipit-source-id: efacb749e6d35ff4cc1fdc7d99cdca9ed42c9cfe
2019-12-03 10:59:41 -08:00
svcscm
ab9997718b Updating submodules
Summary:
GitHub commits:

5510b30ef6
f873f5d761
1d8ebfaf58
7043e743d2

Reviewed By: yns88

fbshipit-source-id: e76342a4266a99290c1b8a592bbb2f1f0b865e9f
2019-12-03 10:38:10 -08:00
Zeyi (Rice) Fan
6ae87b04f6 eden: remove hg_import_helper.py
Reviewed By: simpkins

Differential Revision: D18602771

fbshipit-source-id: bf004911251b7380d1c4c21c07241c7d0a853c61
2019-12-03 09:30:09 -08:00
Zeyi (Rice) Fan
6d31b0b0dc eden: use the zipapp_main instead of main so return code gets correctly returned
Summary:
`edenfsctl` on macOS is not returning the status code correctly when build with `make-client.py`.

We should be using [`zipapp_main`](https://fburl.com/diffusion/3eot1k7a) that uses `sys.exit` to propagate the exit code from [`main`](https://fburl.com/diffusion/k7t8vqmx).

Reviewed By: simpkins

Differential Revision: D18772986

fbshipit-source-id: 1714be9665b0779d30e5c86fb1e498466fee56f9
2019-12-03 09:20:42 -08:00
Mateusz Kwapich
7a0665c9fc remove dead code from fbconduit hg extension
Summary:
Since it's not calling conduit anymore we can remove all conduit related
functions.

Reviewed By: quark-zju

Differential Revision: D18733121

fbshipit-source-id: 20a6022d9ac7ae6e9afea2791a8daac57cefb22c
2019-12-03 05:56:20 -08:00
Mateusz Kwapich
fa8571f49a migrate log_v2 to grpahql
Summary:
conduit is going away, phabricator team wants us to stop using
it in hg.

Reviewed By: quark-zju

Differential Revision: D18732257

fbshipit-source-id: c4faf83e36af80fc616e91adede141ba12de5446
2019-12-03 05:56:20 -08:00
Mateusz Kwapich
fd3b110471 migrate get_mirrored_rev to graphql
Summary: conduit is going away, phabricator team wants us to stop using it in hg

Reviewed By: quark-zju

Differential Revision: D18727399

fbshipit-source-id: c208f5fec5fefd83aa37629b56d2bbaa2532d30e
2019-12-03 05:56:20 -08:00
svcscm
d08e07175f Updating submodules
Summary:
GitHub commits:

0faaa9b25a

Reviewed By: yns88

fbshipit-source-id: 518ec6c1b67dbd5b47814d76d9732c3a4ef8e590
2019-12-03 05:56:19 -08:00
svcscm
201899f02a Updating submodules
Summary:
GitHub commits:

74d60d1019
16fa6fd2a6
24fcf9254b

Reviewed By: yns88

fbshipit-source-id: 335a587ef07f2d2fd4f2662ec18ad07f819773bd
2019-12-02 16:46:00 -08:00
Stefan Filip
1f76f9e63f manifest: restructure InsertError to give back arguments
Summary:
It would be nice if the insert method would give back the path that
it failed to insert.

Reviewed By: dtolnay

Differential Revision: D18739978

fbshipit-source-id: 4c16d09750ade2f01397161129c31bcf0059a957
2019-12-02 15:53:41 -08:00
Stefan Filip
30045a27ba manifest: update python bindings to allow insertions before deletions
Summary:
The Mercurial code has the bad habbit of inserting files in what can
appear impossible locations. Sometimes files with directory names and
sometimes directories in file locations. This happens because the initial
code would do additions before deletions on Manifest implementations that
were rudimentary. As soon as we introduce validation various code paths
surface.

I tried to fix the codepaths that modify manifests but it's a losing game.
I fixed the issue that appeared in tests and a couple of issues people
reported but more situations crop up.

This is giving up on the python code.

Reviewed By: quark-zju

Differential Revision: D18737678

fbshipit-source-id: 0c97128ff67e5ba2334942b6afc404aa64a2e5f4
2019-12-02 15:53:41 -08:00
Joseph Friesen
74b914e6b5 change mode of lock file to workaround flock behavior with NFS v4.x
Summary:
In NFS v4.x, flock ends up inheriting some semantics of fcntl,
including that write locks can only be created against file handles
opened for O_WRONLY or O_RDWR.

This diff changes the mode of 'lockpath' to O_RDWR to solve this.

Reviewed By: simpkins

Differential Revision: D18714734

fbshipit-source-id: 84ba4a6a5de034a4942b1ca3aa8b0c92f882ce38
2019-12-02 15:34:23 -08:00
svcscm
87db99ed72 Updating submodules
Summary:
GitHub commits:

2ce5773e6a
4ffa566369

Reviewed By: yns88

fbshipit-source-id: a271092b34710dc52a664af58228abd40240f3c6
2019-12-02 15:34:22 -08:00
svcscm
d7e4926b82 Updating submodules
Summary:
GitHub commits:

7b3a807de9
3a8812435b
19eadc885c
771cc9afb7
26311e3c19
6baa7358e1
0fe1a224cc
5b1f1d66b3

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d08b7dce46f8ed8cbaf89aeb401ca8c12d0668ef
2019-12-02 08:39:34 -08:00
Ahmed Soliman
30ee55c5c5 Install wheel and cython on fbcode_builder venv environments
Summary:
This is an update to the fbcode_builder codebase to allow setting up the python virtualenv with python dependencies installed. I've included wheel and cython (with a pinned version to 0.28.6 which is the only version that works with thriftpy3 at the moment, due to https://github.com/cython/cython/issues/2985) as standard packages since these are required by some of our top-level dependencies (folly and thrift)

As far as I know, there are no other projects that use PYTHON_VENV at the moment except LogDevice so the impact should be minimal.

Reviewed By: lucaspmelo

Differential Revision: D18758383

fbshipit-source-id: 264941311c5e3a19dc4ef2bb78c9a1baa34dfd8c
2019-12-02 07:38:34 -08:00