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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary: By default drawdag creates files. Make it possible to disable it using flags.
Reviewed By: muirdm
Differential Revision: D42102946
fbshipit-source-id: 0fa91ffb34d569238a477378bb87be37ef3b75c4
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
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