Commit Graph

51722 Commits

Author SHA1 Message Date
Xavier Deguillard
524c85d711 revisionstore: limit delta chain to 1000 entries
Summary:
We've seen a case where a datapack contains a circular delta chain, causing
Mercurial to fall into a infinite loop when trying to read it. Let's fail when
the chain is over 1000 entries.

Reviewed By: quark-zju

Differential Revision: D19458453

fbshipit-source-id: bfa503f7807122eca72cf94418abda161dafa41c
2020-01-21 08:50:59 -08:00
Jun Wu
b863b99cd2 pullcreatemarkers: print how many commits are marked as landed
Summary:
wez silenced the messages in D18796291. I think it's still useful to show why
commits get disappeared after pull. Let's just print a summary by default, and
print less or more things depending on flags:

- `-v`: print what commits are marked as landed, similar to pre-D18796291.
- `-q`: print nothing, hide the summary line.

Reviewed By: DurhamG

Differential Revision: D19437916

fbshipit-source-id: 130c5a24f0978674d363227f44089d307f7aff72
2020-01-21 07:36:34 -08:00
Jun Wu
0d15eb6227 graphql: translate globalrev to hg node in getlandednodes
Summary:
In www, Phabricator used to return both landed global rev and hg commit hashes.
Now it only returns global revs. The "mark landed" logic ignores global revs
and does not mark them as landed.

This diff changes it so the graphql client translates global revs automatically
so the "mark landed" logic can still work.

Reviewed By: DurhamG

Differential Revision: D19437915

fbshipit-source-id: 0e074bda9a0ee53c594750b2b1fd214f31dec843
2020-01-21 07:36:34 -08:00
Jun Wu
3da70a5d46 graphql: support translating GLOBAL_REVs in getmirroredrevmap
Summary: The function assumes binary nodes. Make it aware of GLOBAL_REVs.

Reviewed By: DurhamG

Differential Revision: D19437914

fbshipit-source-id: aa36b81be2f8e4c38c51667b4cf7048eeb7250da
2020-01-21 07:36:34 -08:00
svcscm
f500e432fa Updating submodules
Summary:
GitHub commits:

7e0af749fd
bac1c97d08
c3158f12c3
4a4ee49b61
72ac8de977
e4239acf0c
222ad248f8
fbdffcd048

Reviewed By: zpao

fbshipit-source-id: ff5380ccb1a3bb80f65b27f619c3505ecd02f8c9
2020-01-21 07:36:33 -08:00
svcscm
90aa2c188c Updating submodules
Summary:
GitHub commits:

4ee6b3db04
bc0bdcffb3
ce303f49ce
62852d0314
04a188eabe
bd0464d18e
a326210ae5
bb95be085e
9cfa89e1c1

Reviewed By: zpao

fbshipit-source-id: 9d6ad63625fbc4dea58bd6f6c233ae9dbc7872e1
2020-01-21 00:00:51 -08:00
Lukas Piatkowski
9e71027a0f opensource/fbcode_builder/getdeps.py: support cargo dependencies in cargo builds
Summary:
With this change the getdeps' CargoBuilder will support depencies between cargo builds.

The way how it works is documented in the code and required few assumptions about how a cargo project has to be defined in order to support this.

This change also adds the "mononoke" manifest and few Cargo.toml files to the mononoke project to prove that this new feature works.

Reviewed By: farnz

Differential Revision: D19468912

fbshipit-source-id: f299733cbbc2ec7bca399c898ec8d710334d0fa9
2020-01-20 23:01:17 -08:00
svcscm
c89da9e8ea Updating submodules
Summary:
GitHub commits:

81d58be729
2a761f3d57

Reviewed By: zpao

fbshipit-source-id: 3330c77aef1958f4e4b091f1c845f859317f2b4c
2020-01-20 23:01:17 -08:00
svcscm
f3a41c8da7 Updating submodules
Summary:
GitHub commits:

a8f2915efe

Reviewed By: zpao

fbshipit-source-id: f08cbd1022bcdde6f2412518a297cbeeec30fdc0
2020-01-20 10:33:36 -08:00
Mark Thomas
4958c4e342 tests: update tests-fb-*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457679

fbshipit-source-id: d1010f0d2eee69ecdee5c3feba772bd3684d4cec
2020-01-20 02:45:17 -08:00
Mark Thomas
d2730c3ba0 tests: update tests-[r-x]*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457676

fbshipit-source-id: 5bbab22ff0d98b725b63b906864037fae5fa5171
2020-01-20 02:45:16 -08:00
Mark Thomas
633382de11 tests: update tests-[i-p]*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457680

fbshipit-source-id: 2be941f22525ed2d9f5a1aa3c92af38fb612eb46
2020-01-20 02:45:16 -08:00
Mark Thomas
b361a8d1bd tests: update tests-[a-h]*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457677

fbshipit-source-id: 9f121837dfc6bf98ff4525c6535496b292409844
2020-01-20 02:45:15 -08:00
Mark Thomas
b654a9aae5 tests: use disable treemanifest in place of setconfig
Summary: Use `disable treemanifest` in place of `setconfig extensions.treemanifest=!`

Reviewed By: quark-zju

Differential Revision: D19457678

fbshipit-source-id: 47c8b3c4f4ed5cfc97275ca67afab4a86ffe7f0d
2020-01-20 02:45:15 -08:00
Mark Thomas
212cec117b tinit.sh: add configure for setting up standard configurations
Summary:
Add a new `tinit.sh` function: `configure`, which takes over from the
feature-enabling aspect of `enable`.

This provides a few features that are configurable:

  * `dummyssh` sets `ui.ssh` to `dummyssh`.
  * `mutation` and `mutation-norecord` enable mutation and visibility tracking
  * `evolution` enables evolution and disables mutation and visibility.
  * `noevolution` disables evolution, as well as mutation and visibility.

Since `enable` now only refers to extensions, it is joined by a corresponding `disable` to
disable an extension.

Some tests are updated to take advantage of these new functions.

Reviewed By: quark-zju

Differential Revision: D19427595

fbshipit-source-id: 03cc639918b4e667927330d3f3abf16121ebf161
2020-01-20 02:45:14 -08:00
svcscm
b2cd312ae5 Updating submodules
Summary:
GitHub commits:

5c0639dd6a

Reviewed By: yns88

fbshipit-source-id: a78d9300b7c6fe9ee80294774dfb4431576f7c4e
2020-01-20 02:45:14 -08:00
svcscm
cee0df9966 Updating submodules
Summary:
GitHub commits:

5df6800d3c
2329ca6bff
b57fc3f1f9
2680fac503
a3ec2972ca

Reviewed By: yns88

fbshipit-source-id: 188ac5075b7638ca8442b69b7c35189024cb63db
2020-01-19 14:27:32 -08:00
svcscm
ab7976db5f Updating submodules
Summary:
GitHub commits:

77d2b1c919
0b0707b6c1
49c8516330
a81097e814
d1ee1a8b78
b5c90de055
d5dbd7dbfc
e83e283df3

Reviewed By: yns88

fbshipit-source-id: 66649248fbc52e83c1e363f289297be7c1e52915
2020-01-19 12:22:57 -08:00
svcscm
0fb012b5b0 Updating submodules
Summary:
GitHub commits:

ea6039a6c9
0d30b8e0fc
7acedd4723
4db6e3b785
cd898afb5e
cf5dd11204
08bdcfd87e
fc84c09b8f
454d37976b

Reviewed By: yns88

fbshipit-source-id: 8bbf167844cb6be6b7988b10361cdd6eee5cc2ad
2020-01-18 11:59:39 -08:00
Shrikrishna Khare
f2ac7143d9 fbcode_builder: getdeps: OpenNSA: install more headers
Summary:
FBOSS needs to use header files from more directories in OpenNSA,
so make those available in include directory.

Differential Revision: D19461874

fbshipit-source-id: 1fe3fbbc39477baecf9cd4f7c7a964be40cbbb12
2020-01-18 10:54:09 -08:00
Jun Wu
124e275377 dag: make NameDag use MultiLog for data consistency
Summary: This ensures IdMap and IdDag are guaranteed consistent in the storage layer.

Reviewed By: DurhamG

Differential Revision: D19432658

fbshipit-source-id: 00f1a9b4c747baa1f14d78c31d925682317463b4
2020-01-17 21:49:57 -08:00
Jun Wu
907aadcdd7 indexedlog: add MultiLog
Summary: The MultiLog holds multiple Logs and can atomically sync them.

Reviewed By: DurhamG

Differential Revision: D19432659

fbshipit-source-id: 6ac7dc6f74468f985c6a6b0c419e888722a80037
2020-01-17 21:49:57 -08:00
Jun Wu
5aa872599c indexedlog: make ScopedDirLock remember which directory gets locked
Summary: This makes it possible to do extra sanity checks.

Reviewed By: DurhamG

Differential Revision: D19443783

fbshipit-source-id: 254c2537a6aadd25a67c5e48a768187ce65aa686
2020-01-17 21:49:56 -08:00
Jun Wu
2c9a3b9c61 indexedlog: use a method to create LogMetadata
Summary: This makes the code overall shorter.

Reviewed By: DurhamG

Differential Revision: D19443552

fbshipit-source-id: abd1db227830a88549c7eca1cfd08b67c4914518
2020-01-17 21:49:56 -08:00
Jun Wu
a78597c92d gitlookup: use nodemap index to speed up lookups
Summary:
Scanning through the plain git mapfile is slow. Use the nodemap to speed it up.
To avoid unnecessary risks, this only replace the "lookup" feature of the mapfile,
other features used by the hggit extension or wire-protocols are unaffected.

Reviewed By: singhsrb

Differential Revision: D19458406

fbshipit-source-id: 665184637d3e62590cc5d12ea3aa2563af4351d1
2020-01-17 19:21:40 -08:00
svcscm
5632a1257a Updating submodules
Summary:
GitHub commits:

6a78a48c5f
ca7d23d1cf
5e1e983534

Reviewed By: yns88

fbshipit-source-id: 21e0d641c6af863165a88406a36115edc164b8bd
2020-01-17 19:21:40 -08:00
svcscm
2c002d7d30 Updating submodules
Summary:
GitHub commits:

9b13f58aa1
044b292acc
e1f67bbf3d

Reviewed By: yns88

fbshipit-source-id: 21df26f60f436eb8c1766f66afac4a0d93dd33d1
2020-01-17 18:32:48 -08:00
Wez Furlong
8d85b68d6b hg: fsmonitor: fix sockpath propagation from WATCHMAN_SOCK env
Summary:
This unbreaks the watchman/hg integration tests in a more
sustainable and holistic way than the workaround in D19415053.

The issue is that the explicit fsmonitor sockpath configuration option didn't
take into account that the environment needs to take precedence in order for
the appropriate watchman instance to be used by the set of processes in a given
process tree.  It is not feasible to have them all pass `--config` options to
mercurial because that would require teaching several layers about the
fsmonitor extension, and then later to update them as we evolve how mercurial
works.

Reviewed By: quark-zju

Differential Revision: D19415252

fbshipit-source-id: 5872d0462e466bfb5d70f809c3c433d92fb78567
2020-01-17 17:36:03 -08:00
svcscm
fdaf9bffd8 Updating submodules
Summary:
GitHub commits:

d5f44c7299
931876e86e

Reviewed By: yns88

fbshipit-source-id: d8cd4297fc9a0b79c14c7b604cbd364d9d40bf9c
2020-01-17 17:36:02 -08:00
svcscm
8cc94838cc Updating submodules
Summary:
GitHub commits:

54b290f00f
e8df50310d
ef5c9efe12

Reviewed By: yns88

fbshipit-source-id: 7b6dc88d40e8fd8c396d4d12846db43b0fb4258c
2020-01-17 15:46:21 -08:00
Zeyi (Rice) Fan
1dcd227ccd eden: refresh union datapack store as well
Summary: This diff addresses the unreleased mapped pack files in the old datapack code.

Reviewed By: chadaustin

Differential Revision: D19399737

fbshipit-source-id: 86a6254a2939fd69e1ce2b25b8bfcb36b0deb16b
2020-01-17 15:00:01 -08:00
Zeyi (Rice) Fan
a431e64e4e eden: periodically refresh content store to give it chances to release mapped files
Summary:
As reported by JT, EdenFS may hold the file descriptor of mapped pack files too long even when it is deleted by external processes, thus taking more disk spaces.

This diff fixes this problem by making EdenFS periodically rescan the pack files.

Reviewed By: chadaustin

Differential Revision: D19395439

fbshipit-source-id: 4bfd6a7ac13dceb3099d2704d62b3825433aff4b
2020-01-17 15:00:01 -08:00
svcscm
2cdbbe3257 Updating submodules
Summary:
GitHub commits:

fc90f48a4f
74ecfdc32c
7db98531ff
a814bbb49e
7e5b04d04f
20ceba3d16
0c977864ef
ecd9d42738
98e12004d0

Reviewed By: yns88

fbshipit-source-id: 9b1cefeab7788385930be9bcfece5b85e053efa9
2020-01-17 14:21:29 -08:00
Wez Furlong
3eb293e32d hg: fixit quick! pywatchman client construction
Summary:
There was a typo in the name of the parameter; this commit
makes this code consistent with the upstream pywatchman code.

Reviewed By: fanzeyi

Differential Revision: D19453811

fbshipit-source-id: 033cf30c47ff327913a07e177457a4ac23505bbd
2020-01-17 14:11:48 -08:00
svcscm
2eabd59a89 Updating submodules
Summary:
GitHub commits:

29aba0a287
37a97eb4de
0efdd57292
6d886fc7eb
2e5854752a
931d1c643b
781986ef71
2e6d2903d7
e04348ff63
e8650fd560

Reviewed By: yns88

fbshipit-source-id: abd7ee4aaec8401b2c885335940773a0655b4496
2020-01-17 12:48:47 -08:00
Genevieve Helsel
0d5145389d documentation for paths
Summary: this is largely just markdownified comments from `eden/fs/utils/PathFuncs.h`. I've been a bit confused on the differences lately and how they interact, so I read through that file and thought a markdown file would be helpful for future reference, since the file is reaching 2000 lines.

Reviewed By: fanzeyi

Differential Revision: D19434132

fbshipit-source-id: 0ec5551e9da0a3202fcc3efff52f9f6f48f99db4
2020-01-17 12:08:42 -08:00
Shrikrishna Khare
1d1286fb8a fbcode_builder: getdeps: OpenNSA update source URL
Summary:
This is an interim solution that unblocks failing FBOSS OSS builds.

Broadcom's OpenNSA is available on github and contains large precompiled
libraries. For large files (> 100Mb), github uses git-lfs.

git clones to OpenNSA started failing yesterday with:

Error downloading object: lib/x86-64/libopennsa.a (7f21d94): Smudge error:
Error downloading lib/x86-64/libopennsa.a
(7f21d941ac32ccae38adb05b3386be739bdccd502a878364d386e7a5cb172f35): batch
response: This repository is over its data quota. Account responsible for LFS
bandwidth should purchase more data packs to restore access.

Github documents (refer:
https://help.github.com/en/github/managing-large-files/about-storage-and-bandwidth-usage)
“When you download a file tracked with Git LFS, the total file size is counted
against the repository owner’s bandwidth limit”. It appears we are hitting that
limit.

Thus, github is not a good choice here. Even if we create a 'github release
tarball', the tarball continues to carry lfs files and thus downloading those
counts towards the quota (which is limited).

Broadcom paid some amount to bump up the quota, but it is matter of time before
we hit it esp given that these builds run on-diff.

A better solution is to download a tarball (that contains real files, not lfs),
and then allow Facebook lfs to cache it.

While github does not support that, it seems bitbucket does.

Thus, we forked OpenNSA from github into a bitbucket repo and this patch
modifies the manifest to download a tarball from bitbucket that will be cached.

Broadcom is working on a cleaner solution but this will keep our FBOSS OSS build
clean in the interim.

Reviewed By: wez

Differential Revision: D19437386

fbshipit-source-id: b1213a186a0af57b9fd71b30e8899e80affd4cc0
2020-01-17 10:31:17 -08:00
Jun Wu
8f694e04a1 pull: update remote/master unconditionally
Summary:
This is inteneded to solve multiple problems:

- Mitigate issues where our CI system does not enable remotenames in some
  random code paths, which leads to missing or stale `remote/master`.
  This further mitigates bad cases with narrow-heads' phase calculation
  where a stale `remote/master` can cause many commits to become draft
  incorrectly.
- Mitigate issues in `remotenames` where race condition can happen for
  pushrebase (remotenames does a "listnames" after the push operation).
  See D18601035 for a hacky workaround.

Reviewed By: DurhamG

Differential Revision: D19380940

fbshipit-source-id: 4481ff114d35be37c331c72ac561c2a0894206cb
2020-01-17 10:13:40 -08:00
svcscm
060f83020a Updating submodules
Summary:
GitHub commits:

66a979523c
88efcd81f6

Reviewed By: yns88

fbshipit-source-id: a4030e5979c923872dabe27e786dc1d7117198db
2020-01-17 10:13:39 -08:00
svcscm
50886642c0 Updating submodules
Summary:
GitHub commits:

b9f837ee36

Reviewed By: yns88

fbshipit-source-id: 71fce781096a5acd12309385d4e0c9a526e901c4
2020-01-17 08:19:39 -08:00
Jun Wu
755a238a5d osutil: remove usage of ApplicationServices
Summary:
We recently saw a high rate of build failures on MacOS.
They all fail with compiler errors like:

    In file included from edenscm/mercurial/cext/osutil.c:1326:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:23:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:23:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:29:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/Security.framework/Headers/Security.h:38:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/Security.framework/Headers/SecProtocolOptions.h:28:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:158:19: error: missing ',' between enumerators
        kTLSProtocol12 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 8,
                      ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h:158:20: error: redefinition of enumerator '__AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_15'
        kTLSProtocol12 CF_ENUM_DEPRECATED(10_2, 10_15, 5_0, 13_0) = 8,
                   ^

It's unclear whether this is a compiler configuration issue, or the Apple SDK
being buggy.

The only user of ApplicationServices is `isgui()` when `$SSH_CONNECTION` is not
set on MacOS.

It seems to me that if we just replace `isgui()` to `True`, very few if nobody
will notice the difference. Therefore let's remove the problematic
ApplicationServices as an attempt to stabilize the build.

FWIW Git does not seem to have any sort of GUI detection. It seems to solely
rely on (static) user configuration.

This reverts part of https://www.mercurial-scm.org/repo/hg/rev/16118b4859a1.

Reviewed By: singhsrb

Differential Revision: D19441351

fbshipit-source-id: f1bfbaf0d015e8d577a83112b5ea0a4be6367156
2020-01-17 07:25:37 -08:00
Pádraig Brady
c8df1542f4 platform009: EdenMount.cpp: fix -Wreturn-std-move with clang-9
Summary:
stderr: eden/fs/inodes/EdenMount.cpp:1122:37:
  error: local variable 'unmountError' will be copied despite being thrown by name [-Werror,-Wreturn-std-move]
  eden/fs/inodes/EdenMount.cpp:1122:37: note: call 'std::move' explicitly to avoid copying

Reviewed By: simpkins

Differential Revision: D19408659

fbshipit-source-id: 1575104414daaeb06892586492cdb74e2df604c5
2020-01-17 04:58:15 -08:00
Jun Wu
4a98b00205 changelog: still migrate non-public commits to zstore
Summary:
This makes it safer to do revlog-fallback -> server-fallback switch in the
future, because the server might not know all the draft commits.

Reviewed By: DurhamG

Differential Revision: D19416287

fbshipit-source-id: 8d69c1c5465b50710110370d84d5fb7c8ba6a6c4
2020-01-17 04:01:05 -08:00
Jun Wu
733961456f indexedlog: fix try_clone external key buffer handling
Summary:
In both cases (clone with or without dirty content), the external key buffers
used by indexes should be re-created, since mem_buf location has changed.

Reviewed By: DurhamG

Differential Revision: D19432657

fbshipit-source-id: fe6f76e7ccfd16ccd2f5c1d89866687a3503603e
2020-01-17 03:58:00 -08:00
Jun Wu
85d7253edd indexedlog: add "shared metadata" abstraction
Summary: This allows us to build the multi-log structure.

Reviewed By: DurhamG

Differential Revision: D19431786

fbshipit-source-id: e0e09b0d5a73d293a80626924b74ddf2ce6d6fa3
2020-01-17 03:57:59 -08:00
Jun Wu
36e70264b6 indexedlog: avoid log::OpenOptions::create_in_memory
Summary: Migrate to the new API. This is more compatible with the next change.

Reviewed By: DurhamG

Differential Revision: D19431788

fbshipit-source-id: dba1a88fd003d17fc1774b0cec9157d32c5acdb0
2020-01-17 03:57:59 -08:00
Jun Wu
de5772cb30 indexedlog: replace Log's dir with a new GenericPath type
Summary:
This allows us to incrementally abstract away parts related to filesystem from
Log. For example, instead of using std::fs to access filesystem directly, use
methods on the GenericPath instead.

Right now the main motivation is to add support for "multi-logs" sharing a single meta
file. To do that, methods reading and writing metas are moved to the
GenericPath type.

This also unifies the open functions. Now OpenOptions::create_in_memory can be
private. Empty in-memory Logs can be opened via `open(())`.

Reviewed By: DurhamG

Differential Revision: D19431784

fbshipit-source-id: dbdf94f60261e09f131c6fdd9fe3b99242a28af5
2020-01-17 03:57:59 -08:00
Jun Wu
bf133b797e indexedlog: expose io::ErrorKind in the wrapped error type
Summary: This makes an upcoming change easier.

Reviewed By: DurhamG

Differential Revision: D19432656

fbshipit-source-id: 65adc883c3c3937aa7022196b83c75715b820721
2020-01-17 03:57:58 -08:00
Jun Wu
24393faaeb indexedlog: move log::tests to a separate file
Summary: The goal is to split log.rs to smaller modules so it's easier to reason about.

Reviewed By: DurhamG

Differential Revision: D19431787

fbshipit-source-id: 23b8346c461da322e7a2240b8224e6194867aaee
2020-01-17 03:57:58 -08:00
Jun Wu
38db4b5cdc indexedlog: move log::OpenOptions to standalone modules
Summary:
The goal is to split log.rs to smaller modules so it's easier to reason about.

OpenOptions has many dependencies. Move the most complicated one (repair) to
another standalone module.

Reviewed By: DurhamG

Differential Revision: D19431783

fbshipit-source-id: 28c3af7cd6e19588bfe9c395e2648244faf3179d
2020-01-17 03:57:58 -08:00