Commit Graph

79564 Commits

Author SHA1 Message Date
Open Source Bot
2a041295c3 Updating submodules
Summary:
GitHub commits:

629a5e208f

Reviewed By: jurajh-fb

fbshipit-source-id: 7ea75fcf3496b2d7d893702805f796439a4dd802
2022-12-19 19:00:25 -08:00
Open Source Bot
dd26ee58d8 Updating submodules
Summary:
GitHub commits:

953f3c2b89
825f7204ad
ae1e238ae0
7f9e6f0172
63ca100430
53b703eafe
363fe887e8
3ccddeab54

Reviewed By: jurajh-fb

fbshipit-source-id: 57d0a5fe85aa5ba2a3d12070e6bc1fc9957b61c9
2022-12-19 17:32:03 -08:00
Chad Austin
604825a558 rename edenfs rage to eden rage in hg rage
Summary:
We call it "eden rage" everywhere else, so searching hg rages for
"edenfs rage" is always unintuitive to me. Let's rename the header to
"eden rage".

Reviewed By: quark-zju

Differential Revision: D42152264

fbshipit-source-id: 32ecb8f935aaf386c5148586fb9cb8f9e4a4089f
2022-12-19 14:36:37 -08:00
Open Source Bot
da99b37042 Updating submodules
Summary:
GitHub commits:

8d61382350

Reviewed By: jurajh-fb

fbshipit-source-id: 3c1be39ec9031aa99d824e5025a281b579888189
2022-12-19 14:29:37 -08:00
Saul Gutierrez
cfbb6a256b add an additional exception for gdbm
Summary: There are some OSS users that have the `gdbm` module installed, but for some reason it doesn't contain the `open` function. This diff adds an additional check for it.

Reviewed By: quark-zju

Differential Revision: D42116597

fbshipit-source-id: 0700650120f5442a0dd738221e7d4dee57552012
2022-12-19 14:28:44 -08:00
Zhaolong Zhu
8ba7dc7272 push: fix TypeError when deleting remote bookmark
Summary:
Currently, we append both `tuple` and `list` types to `outbookmarks`, which causes TypeError like below:

```
  - Traceback (most recent call last):
      File "/opt/fb/mercurial/edenscm/commands/__init__.py", line 4984, in push
        pushop = exchange.push(
      File "/opt/fb/mercurial/edenscm/exchange.py", line 506, in push
        _pushdiscovery(pushop)
      File "/opt/fb/mercurial/edenscm/exchange.py", line 620, in _pushdiscovery
        step(pushop)
      File "/opt/fb/mercurial/edenscm/ext/remotenames.py", line 624, in expushdiscoverybookmarks
        return exchange._pushdiscoverybookmarks(pushop)
      File "/opt/fb/mercurial/edenscm/exchange.py", line 757, in _pushdiscoverybookmarks
        pushop.outbookmarks.sort()
    TypeError: '<' not supported between instances of 'tuple' and 'list'
```

Reviewed By: quark-zju

Differential Revision: D42151253

fbshipit-source-id: e9eacc6530d8302ce102f0bed069066ec6932e88
2022-12-19 13:57:19 -08:00
Chad Austin
ea87aa398e ImmediateFuture: allow implicit conversion from Future
Summary:
Future can be implicitly converted to SemiFuture, because it's a safe
operation in general. SemiFuture is a weaker interface.

The same reason allows us to implicitly convert SemiFuture to
ImmediateFuture.

Therefore, allow an implicit conversion from Future to
ImmediateFuture.

Reviewed By: xavierd

Differential Revision: D42086161

fbshipit-source-id: ef185101728755c099c87c2b5c15c2fe28e88b83
2022-12-19 13:11:02 -08:00
Chad Austin
35db05f424 switch FaultInjector to ImmediateFuture
Summary:
Most of the time, FaultInjector is a no-op, so it's a perfect
candidate for ImmediateFuture.

Reviewed By: xavierd

Differential Revision: D42086041

fbshipit-source-id: e93f0c707a8d8f42be967b2b394d1724a0b83649
2022-12-19 13:11:02 -08:00
Chad Austin
6457758810 use std::string_view in FaultInjector
Reviewed By: xavierd

Differential Revision: D42085804

fbshipit-source-id: 30069a2026990e9e269647920fc81cbd9ff45469
2022-12-19 13:11:02 -08:00
Chad Austin
f4d8aba2bf replace ImmediateFuture's default constructor with an in_place constructor
Summary:
For parity with Future and SemiFuture, remove ImmediateFuture's
default constructor and replace it with `makeEmpty()` and a
`std::in_place` constructor overload.

Reviewed By: xavierd

Differential Revision: D41293865

fbshipit-source-id: 43abae81fed3d99a5b4124d8c598dcce921ef65b
2022-12-19 13:11:02 -08:00
Open Source Bot
d7f00698ac Updating submodules
Summary:
GitHub commits:

e2e4c8e812
692d6be358
aaa704df6f

Reviewed By: yns88

fbshipit-source-id: 69f93bb5e3923881dec4e3e8047342016491db7f
2022-12-19 12:17:37 -08:00
Xavier Deguillard
aea27923a3 service: address a comment
Summary:
This is merely accepting Chad's suggestion from the previous diff to make it
more clear and less confusing.

Reviewed By: chadaustin

Differential Revision: D42116849

fbshipit-source-id: 2a6f33729dabdc3b38e3027d38f5c061cb23f94a
2022-12-19 10:42:27 -08:00
Michael Bolin
650673762e add parse_stack_information() helper
Summary:
Introduces a helper function to parse the stack information
originally written to a pull request body by
`create_pull_request_title_and_body()`.

Reviewed By: zzl0

Differential Revision: D42117514

fbshipit-source-id: 43c6580a3774ae2e44108298a88b3b597a3b2c01
2022-12-19 10:39:24 -08:00
Michael Bolin
fad11abbfb move create_pull_request_title_and_body() into its own file
Summary:
In a subsequent diff, we need to add logic for parsing
the pull request body, so we should encapsulate this in
its own file.

This also makes `submit.py` 50 lines shorter!

Reviewed By: zzl0

Differential Revision: D42117031

fbshipit-source-id: da5837f619c9cc02ba01dd04f227f63c73cd39fb
2022-12-19 10:39:24 -08:00
Michael Bolin
8910d18fe8 change how Sapling stack information is written into a pull request body
Summary:
As suggested on https://github.com/facebook/sapling/issues/191,
this moves the Sapling stack information below a horizontal rule
so the author's commit message appears first.

As noted in the PR, this will require a complementary change to
ReviewStack to recognize this new pattern.

Reviewed By: zzl0

Differential Revision: D42116914

fbshipit-source-id: c2e3afbf2233849046c5986133f43fcb0e527ed7
2022-12-19 10:39:24 -08:00
Michael Bolin
8ca54814b8 include body in PullRequestDetails
Summary:
We need this for two things:

- In `sl pr submit`, we can often avoid updating every pull request
  when the user runs `sl pr submit --stack`, but we need to make
  sure the message does not have to change.
- In `sl pr get` (upcoming change), we need to be able to parse the
  stack information for the pull request we are importing.

Reviewed By: zzl0

Differential Revision: D42114153

fbshipit-source-id: 31a3407c509ec4809c5dfcfeb85b6b147be7c70a
2022-12-19 10:39:24 -08:00
Michael Bolin
eef4d49ab9 do some renaming around add_pr_head_to_archives()
Summary:
Renames `add_pr_head_to_archives()` to `add_commit_to_archives()`
to more accurately describe what the function does.
Includes additional documentation cleanup to reflect this change.

Reviewed By: zzl0

Differential Revision: D42112392

fbshipit-source-id: 42f3e0b816117da0ab002aa1490e9cab3b4db453
2022-12-19 10:39:24 -08:00
Michael Bolin
69b0176db5 split add_pr_head_to_archives() into its own file
Summary:
This moves `add_pr_head_to_archives()` out of `submit.py`
and into its own file, `archive_commit.py`. Of note:

- This makes `submit.py` 300 lines shorter.
- This makes it possible to reuse `add_pr_head_to_archives()` in `sl ghstack`

Note that the `run_git_command()` and `none_throws()` functions
are shared across `submit.py` and `archive_commit.py`, so they
were moved into their own files.

Reviewed By: zzl0

Differential Revision: D42108697

fbshipit-source-id: 27827658ea56a6644b4a024a0e839c5d74e71b47
2022-12-19 10:39:24 -08:00
Michael Bolin
48e349f725 add missing assertion to doctest
Summary:
This appears to have been an oversight when this function
was written as the example for the doctest was written
but never evaluated.

Reviewed By: zzl0

Differential Revision: D42110434

fbshipit-source-id: f1af32514324ef7bf2683612deb4f1dbd60a4bb7
2022-12-19 10:39:24 -08:00
Michael Bolin
166e2640d3 experiment with the "single" commit pull request workflow
Summary:
This introduces an experimental new pull request workflow
named "single" because it creates a single PR per commit.
To enable it, run:

```
sl config --local github.pr_workflow single
```

It is similar to ghstack with the following notable differences:

- Instead of creating three branches for each commit
  (`orig`, `base`, `head`), it creates only one. This makes it
  straightforward to work with the branches directly, if desired.
- It updates a stack via force-pushing. This can be problematic
  in GitHub where comments on earlier versions may get lost
  in the course of force-pushing. Our hope is that we can
  use ReviewStack to workaround this issue.

See https://github.com/facebook/sapling/issues/302

Reviewed By: zzl0

Differential Revision: D42062506

fbshipit-source-id: 2d29784cfbf40ab09421cc364d10230a4463fba6
2022-12-19 10:39:24 -08:00
Open Source Bot
299d988798 Updating submodules
Summary:
GitHub commits:

28474f391d
ed5602d5ac
d70a8d4cec

Reviewed By: yns88

fbshipit-source-id: 688749ab33d5471f5de19877fb6bcfd629aa5a7b
2022-12-19 10:29:00 -08:00
Michael Bolin
0d29158be2 prefer sl clean to sl purge in the docs
Summary:
Note this fixes a broken link due to the `<Command>` change.

Fixes https://github.com/facebook/sapling/issues/335

Reviewed By: muirdm

Differential Revision: D42121142

fbshipit-source-id: 5a06757f1cc73c2b01cc9ddae1ed29bb9c9ea056
2022-12-19 09:20:44 -08:00
Zhaolong Zhu
35a456ca23 github: add test for sl pr submit
Summary: added tests for `sl pr submit`, the test uses `extensions.wrapfunction` to wrap the original `make_request` and `run_git_command` functions (registered in `mock_create_one_pr.py`), so we can replace the network requests with mock data.

Reviewed By: bolinfest

Differential Revision: D42037042

fbshipit-source-id: 011bfcb2400200baecf547ec0b18b0154ff580a9
2022-12-19 06:13:27 -08:00
Zhaolong Zhu
a7bee24f4d github: add merge into branch request for MockGitHubServer
Summary: as title

Reviewed By: bolinfest

Differential Revision: D42116786

fbshipit-source-id: 61c0cc1b8d64fb73e0a10ebd627faf3ae6795cec
2022-12-19 06:13:27 -08:00
Zhaolong Zhu
e02a3873ee github: add get username request to MockGitHubServer
Summary: as title

Reviewed By: bolinfest

Differential Revision: D42116125

fbshipit-source-id: 4f453dc2c909a39835dfaa2798386a4b1a0d498c
2022-12-19 06:13:27 -08:00
Zhaolong Zhu
ea4b37208f github: add update pr request to MockGitHubServer
Summary: as title

Reviewed By: bolinfest

Differential Revision: D42115796

fbshipit-source-id: 5db80224ddc251b9ffcb9431595022944ed2a334
2022-12-19 06:13:27 -08:00
Zhaolong Zhu
647e05a5dd github: add get pr details request to MockGitHubServer
Summary: added get pr details request to MockGitHubServer

Reviewed By: bolinfest

Differential Revision: D42112944

fbshipit-source-id: 521cd29855695113b133e697574f0f1928e3a791
2022-12-19 06:13:27 -08:00
Zhaolong Zhu
ef9830b244 github: add mock utils for testing GitHub
Summary: add mock utils (e.g. MockGitHubServer) for testing GitHub

Reviewed By: bolinfest

Differential Revision: D42078459

fbshipit-source-id: 91cbbdd74747c2a10c5a5a65a1f98460810bc0a6
2022-12-19 06:13:27 -08:00
generatedunixname89002005307016
3ef2cb3cad Add annotations to eden/scm/edenscm/ext/conflictinfo.py
Reviewed By: yancouto

Differential Revision: D42139518

fbshipit-source-id: 5c7ae479f3d70ac3064e5150c05d5203dbd85bd3
2022-12-19 05:40:13 -08:00
kurtz.brandon@gmail.com
a19989225f fix hg reference in readme to reference sl (#338)
Summary: Pull Request resolved: https://github.com/facebook/sapling/pull/338

Reviewed By: mitrandir77

Differential Revision: D42121166

Pulled By: bolinfest

fbshipit-source-id: f3de24093206e008ac662789d227bd179d3b081f
2022-12-19 04:50:10 -08:00
Yan Soares Couto
aa8219bc6a bssm: Change from rollout tunable to revert tunable
Summary:
Tunables should be used for rollouts and to quickly revert stuff, not be permanently turned on.

It's also nice because it means all tests will test this on by default.

Differential Revision: D42068169

fbshipit-source-id: 859de56a2e29aee19534f3c0be3a7c2ca6efaca0
2022-12-19 04:00:57 -08:00
Yan Soares Couto
06066e1c51 Log suffixes on commit_find_files request
Summary:
These are not logged because it was added recently but the logging code was not added.

I would prefer to use some destructuring here to guarantee we consider all fields, but it goest a bit against the idea of the `_dot_dot_Default` field.

Differential Revision: D42096917

fbshipit-source-id: b22ac79f42747f3d8891b2dd31202bd30c618dc6
2022-12-19 01:36:29 -08:00
Open Source Bot
a5b64222c2 Updating submodules
Summary:
GitHub commits:

21785a19c0
fab6ed53fe
ed7d57f42d
fe6b239232
8b43abad30
62386a54e3
cbd49b629b
4c7cfb0b8e
4050c9a85c
ebbec17359

Reviewed By: yns88

fbshipit-source-id: ab4d47dde9710e48a6dbdbba9f45a87813ae90b7
2022-12-18 22:24:06 -08:00
Open Source Bot
128f98bce2 Updating submodules
Summary:
GitHub commits:

fea72d61b7
a52f593255

Reviewed By: yns88

fbshipit-source-id: add31edf558f4689f987fc267ffda2f40b16fc6a
2022-12-18 09:46:43 -08:00
Andres Suarez
53bd19ada6 Remove bundlr-sdk
Summary: This is unused.

Reviewed By: aaronabramov

Differential Revision: D42130909

fbshipit-source-id: 4d48e82eae8493b58026e6a3558f87d219ad4b0d
2022-12-18 09:05:23 -08:00
Open Source Bot
6adf5a2d20 Updating submodules
Summary:
GitHub commits:

fb7497adcd

Reviewed By: yns88

fbshipit-source-id: 839b92e474e1d57420d5284090d06922d11af929
2022-12-18 01:07:22 -08:00
Open Source Bot
442d01c6e8 Updating submodules
Summary:
GitHub commits:

fa08eb63b6
26616888e1
738819ebba
b8c8d6ff5c
0d1fbb9735
8de9f75fb3
d671d21382

Reviewed By: yns88

fbshipit-source-id: 5ccbe3b87a6b7b9193ebb4ae5ba7864d97541dbf
2022-12-17 14:58:26 -08:00
Xavier Deguillard
62b96bc53a service: keep the lease alive while unloading inodes
Summary:
When the GC period is very short, we can have GC and unload running at the same
time and compete with each other. It's slightly easier to reason about if we
prevent further GC to run when unload hasn't completed.

Reviewed By: chadaustin

Differential Revision: D42088585

fbshipit-source-id: f6f890608e05e72c5bad000ef04c95249fe8037f
2022-12-16 17:36:25 -08:00
Xavier Deguillard
692bfa3c5b service: only run GC on fully mounted mounts
Summary:
Right after a mount is created, the inodes can't be accessed just yet as FSCK
or other setup might be running. Since periodic tasks might be running at the
same time as a mount is occuring, we need to make sure the mount is ready to
start a GC. The function EdenServer::getMountPoints does exactly that.

Reviewed By: chadaustin

Differential Revision: D42088584

fbshipit-source-id: 1fecb5c660246ddb9b25ce39d83990ee93907052
2022-12-16 17:36:25 -08:00
Xavier Deguillard
1e59cf1bfa inodes: actually ensure that a single GC can run concurrently
Summary:
The WorkingCopyGCLease destructor was slightly wrong as it always reset the
gcRunning_ flag, which is wrong as the destructor would be called on moved
objects too. Thus even if a previously obtained lease was moved into a future,
a second GC could start running as soon as the previous lease was destructed
from the stack.

Reviewed By: chadaustin

Differential Revision: D42087849

fbshipit-source-id: 8c1c8296fc24e8c4a819bd6d22ff81cad1d7b832
2022-12-16 17:36:25 -08:00
Open Source Bot
5387bc8edd Updating submodules
Summary:
GitHub commits:

4c15dda89e
0ba815e70a
b31e3c875c

Reviewed By: yns88

fbshipit-source-id: e89b670d548daa440e6d7c92496119c965b54996
2022-12-16 17:17:45 -08:00
Open Source Bot
c304aa820d Updating submodules
Summary:
GitHub commits:

4f14e93873
25df5da432

Reviewed By: yns88

fbshipit-source-id: 9c8ac61d26d4a4f7f43c188832c2ae5d878efbb7
2022-12-16 16:37:33 -08:00
Michael Cuevas
5399fe1544 Back out "enable integration tests on macOS"
Summary: This backs out D41691841 (b941e3a476) because it possibly breaks macOS build/test/release jobs on Sandcastle. It seems like Apple Privacy prompt may be causing the integration tests to hang on Sandcastle workers

Reviewed By: fanzeyi

Differential Revision: D42111331

fbshipit-source-id: 878f0d4433bb4acfd99b4f10c3d0276845b02ad5
2022-12-16 16:06:37 -08:00
Open Source Bot
6487a86750 Updating submodules
Summary:
GitHub commits:

82a8c9c1f2
6c9a305950

Reviewed By: yns88

fbshipit-source-id: 761f3faf44b68875c2705a0bdedada3ac93fd1dd
2022-12-16 15:50:59 -08:00
Mark Shroyer
daca25042b Move directory size calculation functions to scratch module
Summary:
Moves the usage_for_dir function and its dependencies to the redirect::scratch
module so that it can be used by redirect library functions in following
changes.

Reviewed By: chadaustin

Differential Revision: D41990824

fbshipit-source-id: d481c6e6062cb449b8164fe7435c98961c266f28
2022-12-16 15:28:19 -08:00
Open Source Bot
77cc0cc566 Updating submodules
Summary:
GitHub commits:

1d48ae16a1
e216d45ba0
5d78926a5e
1b5f7d4fab
fc07a0eefc
07483683df
0132d1954f
a87223a536

Reviewed By: yns88

fbshipit-source-id: fb58fd2e9c6b12d81b148da8121ee3704fc74b51
2022-12-16 15:06:30 -08:00
Open Source Bot
0067f1dbd8 Updating submodules
Summary:
GitHub commits:

8d4d4504dd
7a79eb1b16
5c012d8574
6d828425c7
4829ad6379

Reviewed By: yns88

fbshipit-source-id: d3fc09fc504cc062f97824af82491536cca15e18
2022-12-16 14:23:10 -08:00
Jun Wu
115a33bf0e drawdag: support --no-files
Summary: By default drawdag creates files. Make it possible to disable it using flags.

Reviewed By: muirdm

Differential Revision: D42102946

fbshipit-source-id: 0fa91ffb34d569238a477378bb87be37ef3b75c4
2022-12-16 14:04:17 -08:00
Jun Wu
4aaae1619f debugexportrevlog: use .hg instead of .sl
Summary:
The command creates a revlog repo for compatibility with Mononoke blobimport
and open-source Mercurial. Threrefore it should always use `.hg`.

Reviewed By: muirdm

Differential Revision: D42102948

fbshipit-source-id: 341ccbc35cbdae86311bcf7c8c8b076168332f5a
2022-12-16 14:04:17 -08:00
Jun Wu
91ec693716 config: color bold => brightcolor bold
Summary:
Most modern terminals "auto-bright" when text is also bold. However, the
website ANSI -> HTML converter does not do that. In practice we pretty
much rely on the "auto-bright" behavior. So let's update the smartlog
colors with bright versions to make it more explicit.

Reviewed By: muirdm

Differential Revision: D42102947

fbshipit-source-id: 867d6947a5db0fe59a627ff2bd9a82621d28bfe5
2022-12-16 14:04:17 -08:00