Commit Graph

60218 Commits

Author SHA1 Message Date
Xavier Deguillard
4f9e1750c2 cli: enable doctor on Windows
Summary:
Most of the fixes are pretty trivial as the code was using functions not
present on Windows, either work around them, or switch to ones that are
multi-platform.

Of note, it looks like `hg doctor` doesn't properly detect when Mercurial and
EdenFS are out of sync, disabling the  tests until we figure out why.

Reviewed By: genevievehelsel, fanzeyi

Differential Revision: D23409708

fbshipit-source-id: 3314c197d43364dda13891a6874caab4c29e76ca
2020-08-28 19:49:37 -07:00
svcscm
6b498dfa02 Updating submodules
Summary:
GitHub commits:

86a15594f4
a4191b64fa
22ddfcb288
963314ffd6
20d994faf4

Reviewed By: bigfootjon

fbshipit-source-id: d872e2a2dbf3e57a909ae7464b49fa4c97c4746a
2020-08-28 19:49:37 -07:00
svcscm
08230e8225 Updating submodules
Summary:
GitHub commits:

cc04af2926
8dc2d39f8e
50ef7df1a4

Reviewed By: bigfootjon

fbshipit-source-id: 2001f26ded598a966f37cc965d5bcbcd54aaf673
2020-08-28 16:54:23 -07:00
Stefan Filip
a86409361c thrift: sync repos.thrift to fbcode
Summary:
`fbcode` sync after adding the `update_algorithm` option to
`RawSegmentedChangelogConfig`.

Reviewed By: quark-zju

Differential Revision: D23376694

fbshipit-source-id: df8a378303ec00d5d7d7ac3fff7a4a8cffc99328
2020-08-28 16:37:57 -07:00
svcscm
a94fd1f718 Updating submodules
Summary:
GitHub commits:

4eec8b81bf
db7a54ac3c
1e59800718
a3f588cc0a
127ebf2ef2
982e74de54

Reviewed By: bigfootjon

fbshipit-source-id: aa5a21c34f309a1053d1b9807006e5ed694e6cb2
2020-08-28 16:26:07 -07:00
Jun Wu
fbc9b865b6 changegroup: do not calculate how many files received commits include
Summary:
This is practically just 0 in our production setup during `pull`s. In the
future when the commit data become lazy, it's no longer possible to read the
files locally. So let's just don't scan the commits.

Reviewed By: DurhamG

Differential Revision: D23390438

fbshipit-source-id: 4c54c4aac5fd840205296ab86955ec1b8ab76607
2020-08-28 13:40:18 -07:00
root@sandcastle5869.frc3.facebook.com
5f749ee470 suppress errors in eden - batch 1
Differential Revision: D23401295

fbshipit-source-id: 01fe0ff888d074c503a445c6d97f17bf0ec2b79c
2020-08-28 12:46:36 -07:00
svcscm
3327171011 Updating submodules
Summary:
GitHub commits:

f00d5462f3

Reviewed By: bigfootjon

fbshipit-source-id: a3a16b3449b12e9654f8a91d7e0b2347a39d83f4
2020-08-28 12:46:36 -07:00
svcscm
2b469854e2 Updating submodules
Summary:
GitHub commits:

dc667acde0
defe385bcc
6244fa0ce9

Reviewed By: bigfootjon

fbshipit-source-id: 3d2288c094b624ad20da97e074a1570681431c0c
2020-08-28 10:35:03 -07:00
Durham Goode
08c938e859 dirstate: block addition of paths containing "." and ".."
Summary:
Mergedrivers can call dirstate.add directly and are adding paths with
"." and "..". Let's block those paths.

Reviewed By: quark-zju

Differential Revision: D23375469

fbshipit-source-id: 64e9f20169cfd50325ecd8ebcc1dd3be7a5cb202
2020-08-28 09:42:25 -07:00
svcscm
3adb4358ae Updating submodules
Summary:
GitHub commits:

7f7fb182e4

Reviewed By: bigfootjon

fbshipit-source-id: bf332ef50b1642d41c6212fbc5785a0fc59271f2
2020-08-28 09:42:25 -07:00
svcscm
b84ee302fb Updating submodules
Summary:
GitHub commits:

4c6cb73618
6f42044542

Reviewed By: bigfootjon

fbshipit-source-id: daeff573e04be9bed7630b950f04bed0535306f2
2020-08-27 19:26:19 -07:00
Durham Goode
2f5130c882 py3: fix extdiff
Summary:
extdiff uses shutil.rmtree which calls os.rmdir with new python 3
options. Since we pathc os.rmdir, we need to support those options.

Reviewed By: quark-zju

Differential Revision: D23350968

fbshipit-source-id: 081d179dcd67b51ffdeb6b85899adf4e574a8d0f
2020-08-27 19:15:22 -07:00
Jun Wu
f271d882e6 hgcommands: make commands! macro define modules
Summary: Similar to D18528858 so module names do not need to be spelled twice.

Reviewed By: markbt

Differential Revision: D23091380

fbshipit-source-id: a2a261abc9c78c8805cea62b38498ba65398796d
2020-08-27 19:02:27 -07:00
svcscm
9e32b45b04 Updating submodules
Summary:
GitHub commits:

8e34195422
c2485f2d81
bf087a7fb2
6dea19cad4
b0dbab25ee

Reviewed By: bigfootjon

fbshipit-source-id: e19acce6b5742cb085ac9ab0bd5c9cde7b96469e
2020-08-27 18:50:50 -07:00
Arun Kulshreshtha
cb3f95d06e configparser: make code compile without "fb" feature
Summary: This crate would fail to build without the "fb" feature because `serde_json` was listed as an optional dependency (but is used in a way that isn't conditional on the `fb` feature). This diff makes the dependency non-optional, and also silences several dead code warnings that are emitted when building without the "fb" feature.

Reviewed By: quark-zju

Differential Revision: D23386786

fbshipit-source-id: b00a8b0b8b0b978c1cfab2838629fcb388a076e9
2020-08-27 18:28:46 -07:00
Jun Wu
d586a40ada hgcommands: add debugfsync
Summary:
The `debugfsync` command calls fsync on newly modified files in svfs.
Right now it only includes locations that we know have constant number
of files.

The fsync logic is put in a separate crate to avoid slow compiles.

Reviewed By: DurhamG

Differential Revision: D23124169

fbshipit-source-id: 438296002eed14db599d6ec225183bf824096940
2020-08-27 18:26:03 -07:00
Xavier Deguillard
eb57ebb4d8 eden: decrease verbosity of "fetching tree" message
Summary:
A warning means that every tree fetched will be printed in the edenfs log,
which is way too much. Let's decrease this to a debug message.

Reviewed By: genevievehelsel

Differential Revision: D23385778

fbshipit-source-id: d77f1cac3efb945d4b95750822f2f12f48c75ffe
2020-08-27 18:16:51 -07:00
Jun Wu
c2d36d03c4 changegroup: avoid using rev numbers
Summary: `len(repo)` can no longer predicate the next rev number. Use nodes instead.

Reviewed By: DurhamG

Differential Revision: D23307791

fbshipit-source-id: cc20e53f039eee2a714748352e8e98aab253095a
2020-08-27 18:14:29 -07:00
Jun Wu
d8e775f423 tracing-collector: limit maximum count of spans
Summary:
Some functions might be called very frequently. For example,
`phases.phasecache.loadphaserevs` might be called 100k+ times.
That makes the tracing data harder to process.

Limit the count of spans to 1k by default so the data is cheaper to process,
and some highly repetitive cases can now be reasoned about. Note the limit
is only put on static Span Ids. If a span uses dynamic metadata or ask for
different Span Ids each time, they will not be limited.

In debugshell,

  td = %trace repo.revs('smartlog()')
  len(td.serialize())

dropped from 6MB to 0.87MB.

It's also possible to reason about:

  td = %trace len(repo.revs('ancestors(.)'))

in debugshell (taking 30s, 98KB serialized, vs 21s without tracing), while
previously the result would be too large to show (`%trace` just hangs).

Reviewed By: DurhamG

Differential Revision: D23307793

fbshipit-source-id: 3c1e9885ce7a275c2abd8935a4e4539a4f14ce83
2020-08-27 18:14:29 -07:00
Jun Wu
9f4dac104f dag: truncate output in <SpanSet as Debug>::fmt
Summary: Set a default limit so the output won't be too long.

Reviewed By: DurhamG

Differential Revision: D23307792

fbshipit-source-id: 7e2ed99e96bbde06436a034e78f899fc2e3e03f8
2020-08-27 18:14:29 -07:00
Jun Wu
54cd73b41b profiling: do not profile debugshell command
Summary:
The debugshell command can be long running and contains uninteresting stuff.
Do not profile it.

Practically this hides showing the background statprof thread when using `%trace`.

Reviewed By: DurhamG

Differential Revision: D23278597

fbshipit-source-id: bad97de22e1be2be8b866bee705ea3a6755aa54b
2020-08-27 18:14:29 -07:00
Jun Wu
d92c80ebcc dispatch: enter ipdb for "NameError 'ipdb' is not defined"
Summary:
This allows entering ipdb for code like: `ipdb` or `ipdb()`. It can be handy to
debug something.

Reviewed By: DurhamG

Differential Revision: D23278599

fbshipit-source-id: 4355dd1944617aeb795450935789f01f66f094eb
2020-08-27 18:14:28 -07:00
Jun Wu
28fa0e1cfe debugshell: add %trace and %hg magics
Summary: This makes it possible to get tracing results, or run hg commands directly.

Reviewed By: DurhamG

Differential Revision: D23278601

fbshipit-source-id: e7dc92080d2881cb4155a481df5ca93f324828fc
2020-08-27 18:14:28 -07:00
Jun Wu
ed78542610 dispatch: add --trace flag
Summary:
The `--trace` flag enables tracing Python modules.
For compatibility reasons, it also enables `--traceback`.

It can be used with debugshell to make `%trace` more useful.

Reviewed By: sfilipco

Differential Revision: D23278600

fbshipit-source-id: d6d0b34bd5c48111f8cd33d7df115f349b0e95b6
2020-08-27 18:14:28 -07:00
Jun Wu
3bbdfd3743 revset: successors(x) should only show visible commits
Summary:
I found this when I aborted an rebase Dxxx and trying rebasing again and it
complained about "nothing to rebase". It was caused by Dxxx resolving into
a hidden commit.

Reviewed By: sfilipco

Differential Revision: D23307794

fbshipit-source-id: f7a956b5300240089b6a4648f28cf4a152ee2433
2020-08-27 18:14:28 -07:00
svcscm
0a56e32a06 Updating submodules
Summary:
GitHub commits:

54f7ccf14d
d530325c9c
0b4775fb05
a970f838e7
9af2fee53b
328ea1c5b3

Reviewed By: bigfootjon

fbshipit-source-id: 36c070e3d1b88c6620235cc712c326eba4b4d743
2020-08-27 18:14:28 -07:00
svcscm
c60e12c2c9 Updating submodules
Summary:
GitHub commits:

673f740f75
b72aa0e465
9fdb0d52e3
5043960623
3286132e56
9a1fb1d292
5d5cb096a0

Reviewed By: bigfootjon

fbshipit-source-id: db24089e15024e046497e47579c0e4ba421b8643
2020-08-27 14:47:43 -07:00
Arun Kulshreshtha
767570d298 lfs_server: remove PerfCounters from post-request callback signature
Summary:
`PerfCounters` was the only application-specific type exposed as a parameter to the post-request callbacks, and it was only being used in one place. To facilitate making the post-request callback functionality more general, this diff makes the callback in question capture the `CoreContext` in its environment, thereby giving it access to the `PerfCounters` without requiring it to be passed as an argument.

This should not change the behavior since regardless of how the callback obtains a reference, it will still refer to the same underlying `PerfCounters` from the request's `CoreContext`.

Reviewed By: DurhamG

Differential Revision: D23298417

fbshipit-source-id: 898f14e5b35b827e98eaf1731db436261baa43bb
2020-08-27 14:15:25 -07:00
Arun Kulshreshtha
0b9ca4e83b hgcommands: remove unused imports in dynamicconfig module
Summary: Remove unused imports.

Reviewed By: quark-zju

Differential Revision: D23356940

fbshipit-source-id: 31b81eac11946aa8b24ec23c98ddb14716fbea3a
2020-08-27 14:06:52 -07:00
Genevieve Helsel
3eb96cfb62 fix dictionary changed size during iteration in patch
Summary:
We shouldn't delete from a dictionary while iterating over it, instead we should iterate over a copy and then delete from the original.

`.items()` returns a view of the dict, while wrapping it in `list` makes a deep copy.

Reviewed By: DurhamG

Differential Revision: D23283668

fbshipit-source-id: a168eef1ed2a1ce02fe71b3f6e3aed090965d2a4
2020-08-27 13:14:36 -07:00
Durham Goode
fe56f44ca0 treemanifest: prevent fetching nullid
Summary:
Mononoke throws an error if we request the nullid. In the long term we
want to get rid of the concept of the nullid entirely, so let's just add some
Python level blocks to prevent us from attempting to fetch it. This way we can
start to limit how much Rust has to know about these concepts.

Reviewed By: sfilipco

Differential Revision: D23332359

fbshipit-source-id: 8a67703ba1197ead00d4984411f7ae0325612605
2020-08-27 09:59:40 -07:00
Genevieve Helsel
92eba77a06 remove duplicated code in proc_utils
Summary: I refactored this method to be a member fuction of `EdenFSProcess` and I thought this instance of the method was deleted, but I came across it while working in this area again.

Reviewed By: fanzeyi

Differential Revision: D23113075

fbshipit-source-id: 2c257cca2da3a4bfefb974753eb00c7580c5a104
2020-08-27 09:53:10 -07:00
Chad Austin
0683ab6586 fix hg importer test regression
Summary:
Enabling hg dynamicconfigs in D23309090 (d643f48c8c) changed the output of `hg
manifest --debug` and broke HgImportTest. Set TESTTMP to avoid
production configs.

Reviewed By: DurhamG

Differential Revision: D23335847

fbshipit-source-id: 7ffd0394aa7a8466b266000b18f8742ed4a6b53f
2020-08-27 09:44:37 -07:00
Durham Goode
4d4e425624 configs: add fbitwhoami tiers to dynamicconfig inputs
Summary:
Corp has a different concept of tier than prod. Let's load the corp
tier into our tier set as well.

Reviewed By: quark-zju

Differential Revision: D23354056

fbshipit-source-id: c9543b8253f042c7b1224578e0687b4bdf21738e
2020-08-27 09:24:28 -07:00
Durham Goode
c190d283ec py3: don't use universal newlines for patch import
Summary:
The Python 3 email library internally stores the message as text, even
though our input and requested output is bytes. Let's make our own wrapper
around the parser to use ascii surrogateescape encoding so we can get the
actual bytes out later and not get universal newlines.

Based off the upstream 7b12a2d2eedc995405187cdf9a35736a14d60706,
which is basically a copy of the BytesParser implementation (https://github.com/python/cpython/blob/3.8/Lib/email/parser.py) with
newline=chr(10) added.

Reviewed By: quark-zju

Differential Revision: D23363965

fbshipit-source-id: 880f0642cce96edfdd22da5908c0b573887bed12
2020-08-27 09:21:04 -07:00
svcscm
37e5484ee3 Updating submodules
Summary:
GitHub commits:

be94e45cb6

Reviewed By: bigfootjon

fbshipit-source-id: 6936d5c47be9e0abf837d487e5dcfa9e6ceafffb
2020-08-27 08:28:08 -07:00
Liubov Dmitrieva
06c1d37383 move try up in the rejoin command
Summary:
`hg cloud rejoin` command is used in fbclone and it is supposed to print a
message on RegistrationError but this has been broken recently.

Reviewed By: markbt

Differential Revision: D23342773

fbshipit-source-id: 4f3318848953656dea65a2b5d4d832694f6b353c
2020-08-27 06:53:28 -07:00
Viet Hung Nguyen
d6895d837d mononoke/repo_import: generate repo import settings for push-redirected repo
Summary:
Once we discover that the (small) repo we import into push-redirects (D23158826 (d3f3cffe13)) to a large repo,
we want to import into the large repo first, then backsync into the small one (see previous diff summary).
The aim of this diff is to setup the variables (e.g. bookmarks) needed for importing into
the large repo first before backsyncing the commits into the small repo.

Next step: add functionalities to control how we backsync from large repo to the small repo

Reviewed By: StanislavGlebik

Differential Revision: D23294833

fbshipit-source-id: 019d84498fae4772051520754991cb59ea33dbf4
2020-08-27 02:38:26 -07:00
svcscm
88f69f365d Updating submodules
Summary:
GitHub commits:

5b5cbf2fde

Reviewed By: bigfootjon

fbshipit-source-id: 629570d6dbd2e568cec42f22a0889bf82bf6f7a2
2020-08-27 02:38:26 -07:00
svcscm
42f650e0cd Updating submodules
Summary:
GitHub commits:

8af2de838e
59558e60c9

Reviewed By: bigfootjon

fbshipit-source-id: 3eb42cdad091f79664bfee165a1180d327b952d8
2020-08-27 01:26:06 -07:00
Chad Austin
8e848c7a77 stop using RequestContext
Summary:
Setting up, tearing down, and querying RequestContext has some
overhead that I would like to avoid in the inner FUSE loop, so replace
RequestData with a single class that's heap-allocated at the start of
a request and is guaranteed to survive until the request ends, and is
otherwise explicitly passed where it's needed.

Reviewed By: kmancini

Differential Revision: D22712310

fbshipit-source-id: fc30d0b0f7e22b39306b857194ea07a913110b0f
2020-08-27 00:19:04 -07:00
Liubov Dmitrieva
bd63a78f96 add more information to hg cloud leave command
Summary:
There are users who prefer run `hg cloud leave` if they notice they are
connected to commit cloud sync.

Proving more information and add a prompt might help them to change their mind.

For some users who left new fbclone will connect them back. So on next leave they can learn more information about Commit Cloud Workspaces.

Reviewed By: markbt

Differential Revision: D23346091

fbshipit-source-id: 72f170f7133cd64b772ec75ae29a85dc8809e351
2020-08-26 22:43:20 -07:00
Durham Goode
8f9c0899cc update: fix performance of updating to null commit
Summary:
When updating to the null commit, the logic that computes the update
distance was broken. The null commit is pre-resolved to -1, which when passed to
a revset raw gets resolved as the tip commit. In large repositories this can
take a long time and use a lot of memory, since it's computing the difference
between tip and null.

Let's fix it to not pass the raw rev number, and also to handle the case of a 0
distance update.

Reviewed By: quark-zju

Differential Revision: D23358402

fbshipit-source-id: 3b0a1fe1bbcb07effba4d0ab2c092e66bdc02e67
2020-08-26 22:14:59 -07:00
svcscm
47243ce531 Updating submodules
Summary:
GitHub commits:

3ca273d2eb
665b36bb9f

Reviewed By: bigfootjon

fbshipit-source-id: 8a8d0c82ef905200ea4e2eccc9a6f7a54183e6aa
2020-08-26 22:14:59 -07:00
svcscm
18d3e81df1 Updating submodules
Summary:
GitHub commits:

5e8c70b939
d351ad6825
7729d46a64

Reviewed By: bigfootjon

fbshipit-source-id: f7ca61ad2c13e074a7f6d02e55ca32dc21250923
2020-08-26 21:04:09 -07:00
Jun Wu
12d23ba64d revisionstore: fix GitHub build (#46)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/46

See https://github.com/facebookexperimental/eden/runs/1034006668:

   error: unused import: `env::set_var`
      --> src/lfs.rs:1539:15
       |
  1539 |     use std::{env::set_var, str::FromStr};
       |               ^^^^^^^^^^^^
       |
  note: the lint level is defined here
      --> src/lib.rs:125:9
       |
  125  | #![deny(warnings)]
       |         ^^^^^^^^
       = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`

  error: unnecessary braces around method argument
      --> src/lfs.rs:2439:36
       |
  2439 |         remote.batch_upload(&objs, { move |sha256| local_lfs.blobs.get(&sha256) })?;
       |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
       |
  note: the lint level is defined here
      --> src/lib.rs:125:9
       |
  125  | #![deny(warnings)]
       |         ^^^^^^^^
       = note: `#[deny(unused_braces)]` implied by `#[deny(warnings)]`

  error: aborting due to 2 previous errors

  error: could not compile `revisionstore`.

I dropped `#![deny(warnings)]` as I don't think warnings like the above ones
should break the build. (denying specific warnings that we care about explicitly
might be a better approach)

Reviewed By: singhsrb

Differential Revision: D23362178

fbshipit-source-id: 02258f57727edfac9818cd29dda5e451c7ca80a7
2020-08-26 20:40:25 -07:00
svcscm
712ebc2840 Updating submodules
Summary:
GitHub commits:

a8968aff77
65a79d5cd2
02ea1dc016

Reviewed By: bigfootjon

fbshipit-source-id: e80c84ed70d69e6b8000f7dd872ddeb74e1ada2d
2020-08-26 19:36:33 -07:00
Arun Kulshreshtha
30e2cf4413 cargo_from_buck: reenable autocargo for edenapi
Summary: Now that it is possible to control which features are enabled on manually-managed dependencies, we can reenable autocargo for `edenapi`. See D23216925, D23327844, and D23329351 (840e6dd6f6) for context.

Reviewed By: dtolnay

Differential Revision: D23335122

fbshipit-source-id: 8ce250c3a106d2a02f457f7ed531623dd866232f
2020-08-26 19:16:48 -07:00
Stefan Filip
902bdfd46a tests: set --noproxy localhost for all sslcurl calls
Summary:
Without the `--noproxy localhost` flag curl will obey the `https_proxy` env
variable but will not respect the `no_proxy` env variable or `curlrc`.
This means that tests running in a shell with `https_proxy` will likely fail.
The failures may vary in aspect based on what logic is running at the time.

Reviewed By: kulshrax

Differential Revision: D23360744

fbshipit-source-id: 0383a141e848bd2257438697e699f727d79dd5d2
2020-08-26 18:40:52 -07:00