Commit Graph

79448 Commits

Author SHA1 Message Date
Jun Wu
b8b85e53da config: remove parser/CMakeLists.txt
Summary: It is no longer referred in other CMakeLists files.

Reviewed By: muirdm

Differential Revision: D42021268

fbshipit-source-id: d172a8ecf82c4764fc4477d0391015a3ec89961e
2022-12-14 14:53:51 -08:00
Jun Wu
b90a24fedc configparser: move set_overrides to hg.rs
Summary:
It is only used by hg.rs. Move it to decouple the core ConfigSet features from
hg's business logic (`--config` flags).

Reviewed By: muirdm

Differential Revision: D42018679

fbshipit-source-id: a33b9adf0217288ec7bea997a6e3b81fb35cc123
2022-12-14 14:53:51 -08:00
Jun Wu
0ce132f975 config: change Config::layers definition
Summary:
Previously it requires the sub-configs to match their parent config.
That actually seems inflexible. Relax the requirement so it can be
used in more places.

Reviewed By: muirdm

Differential Revision: D42018680

fbshipit-source-id: bf2be4cfe23175ce32738872a16efe906fbc5d29
2022-12-14 14:53:51 -08:00
Jun Wu
3842c4accc pyrevisionstore: migrate off ConfigSet
Summary: Use abstraction to be more flexible.

Reviewed By: muirdm

Differential Revision: D42011185

fbshipit-source-id: 419edb17376a6939a8eac98653b6cac20464544f
2022-12-14 14:53:51 -08:00
Jun Wu
f7a2a78c8c auth: migrate off ConfigSet
Summary: Use lighter weight `static_config!` for testing.

Reviewed By: muirdm

Differential Revision: D42011187

fbshipit-source-id: 3aadc94c5e06889d5de6a7435f90bb775074b393
2022-12-14 14:53:51 -08:00
Jun Wu
e5777d8a76 workingcopy: use abstraction for config reading
Summary:
This allows `workingcopy` to work with other config implementations like
`UnionConfig` not just `ConfigSet`.

Reviewed By: muirdm

Differential Revision: D42011186

fbshipit-source-id: a721922511b900a977e9e629088197f0742ea21c
2022-12-14 14:53:51 -08:00
Zhaolong Zhu
c503c7e3d7 github: move GraphQL queries into consts module
Summary: move GraphQL queries into consts module, so they can be reused by tests.

Reviewed By: bolinfest

Differential Revision: D42035497

fbshipit-source-id: 0f43e6b43a43c15b61f696858abdd5ae230a2c45
2022-12-14 14:39:39 -08:00
Michael Cuevas
9a209b751f combine exception strings
Summary: this formatting choice was a remnant of a codemod

Reviewed By: chadaustin

Differential Revision: D41755813

fbshipit-source-id: aee8dcd0231f807d205530478cb74bb36785fef5
2022-12-14 14:03:35 -08:00
Michael Cuevas
9531fa3f49 make redirect integration tests pass on macOS
Summary: on macOS, a redirection target is the absolute repo_path of the redirection. Therefore, we need to modify the expected output for macOS integration tests.

Reviewed By: fanzeyi

Differential Revision: D41691840

fbshipit-source-id: 6d6975c9e1f74b5ef56a95b2d0a49f76704ebde7
2022-12-14 14:03:35 -08:00
Michael Cuevas
2e5e017a9d make info integration tests pass on macOS
Summary: on macOS, we default to NFS instead of FUSE, therefore use_nfs() should always return True on macOS

Reviewed By: chadaustin

Differential Revision: D41707744

fbshipit-source-id: 0b987682fe3268a216770b8b0e0b2ee9a99c11e0
2022-12-14 14:03:35 -08:00
Michael Cuevas
b941e3a476 enable integration tests on macOS
Summary: Enable integration tests and disable all tests that are failing. We will slowly resolve all of these test failures over time.

Reviewed By: xavierd

Differential Revision: D41691841

fbshipit-source-id: b36eadee2cfdc5cc367bc5a3b4d224ba4a6968a5
2022-12-14 14:03:35 -08:00
Open Source Bot
5e9c233868 Updating submodules
Summary:
GitHub commits:

3dff3135e8
2d8cd1bddb
176bca929f

Reviewed By: yns88

fbshipit-source-id: ff367b3cee2dbec6464abc3ac7616e9d35970335
2022-12-14 14:02:03 -08:00
Open Source Bot
4bd31b525d Updating submodules
Summary:
GitHub commits:

519f664f3c
24dfbcf7ef
b938f0068e
e36ccff73f

Reviewed By: yns88

fbshipit-source-id: 5070fe534c7e942d2b5e2f46632a5a2a182f9c91
2022-12-14 11:05:51 -08:00
Open Source Bot
c35eec4158 Updating submodules
Summary:
GitHub commits:

33d4d035d9
caf015b47c
0121f95fab
90d64a7db5
097636fb70
b728038247
83fc2124f5
c11c68268a
c3bdb45817
38505ff7f8

Reviewed By: yns88

fbshipit-source-id: c6331686522fc4d7937b348a9d9dd40637f3fb0e
2022-12-14 10:14:15 -08:00
Open Source Bot
ef2a997f5e Updating submodules
Summary:
GitHub commits:

c43634f32c
f8d9085d79
6e421eddbb

Reviewed By: yns88

fbshipit-source-id: 017fee468f34ed44cfcca20d28d9ea4162c136dd
2022-12-14 09:05:10 -08:00
Mark Shroyer
a9322aeae7 Restore metadata size mismatch logging
Summary:
This re=implements the backed-out D41393677 (6384a0f39a) with some changes:

  - Only log if the size metadata is _less than_ the size of the file contents
    we're returning.  This way we avoid erroneously logging partial reads, as
    happened in T139036919.

  - Only log once per Nfsd3ServerProcessor instance.

Reviewed By: chadaustin

Differential Revision: D41751040

fbshipit-source-id: 2503ecb488b0600bdeabbb11e532e4590edbd280
2022-12-14 03:18:23 -08:00
Open Source Bot
54368fe005 Updating submodules
Summary:
GitHub commits:

35db9f330d
7a3c70741d

Reviewed By: yns88

fbshipit-source-id: b5ece34a0360487d9e580dec8d868e29377c20f6
2022-12-14 00:29:14 -08:00
Open Source Bot
9b0acf1262 Updating submodules
Summary:
GitHub commits:

937d00c39b
e0bb6f1526
0c5d06fc78
b06bf84f4d

Reviewed By: yns88

fbshipit-source-id: 8bb9476d603174fde43cfa7b79c6d72ca61a6f10
2022-12-13 15:00:11 -08:00
Andres Suarez
7496bd072c update various deps
Reviewed By: davidbarsky

Differential Revision: D42005719

fbshipit-source-id: 2b587ec2afda5d2f21d5ca5ff409262426489241
2022-12-13 13:37:15 -08:00
Open Source Bot
f8cc346697 Updating submodules
Summary:
GitHub commits:

31871f55ff
1b6e12a97f
1826fe20cf

Reviewed By: yns88

fbshipit-source-id: 146c00b7b13c238af885af7339089d065caf5fd7
2022-12-13 13:24:31 -08:00
Zhaolong Zhu
27b08f102a tests: add sl shell function
Summary: define `sl` as a shell function to `HGIDENTITY=sl hg`

Reviewed By: quark-zju

Differential Revision: D41965294

fbshipit-source-id: eb3eebb0dc184a3aae4bcb6ab541a42f9e8b82f8
2022-12-13 13:03:36 -08:00
Saul Gutierrez
11583aacb6 add Homebrew to install instuctions
Summary: Adds installation instructions for installing from Homebrew-core on macOS so that users don't have to manually download our bottle. It also adds one additional installation method for non-Ubuntu Linux users.

Reviewed By: bolinfest

Differential Revision: D42008426

fbshipit-source-id: 76757f43739bca3133e3265d5bbe6175edbc9f11
2022-12-13 12:12:03 -08:00
Saul Gutierrez
388343cc8b further improve compatibility with Homebrew
Summary:
This diff changes our versioning scheme from `MAJOR.MINOR-%Y%m%d-%H%M%S-rHASH` to `MAJOR.MINOR-%Y%m%d-%H%M%S-hHASH`

At the moment we cannot send another PR to Homebrew-core since our lastest release (`0.1.20221212-142634-r7ae28228`) gets detected [as an Erlang version](9c88c39bae/Library/Homebrew/version.rb (L411)) instead of a [hyphenated version](9c88c39bae/Library/Homebrew/version.rb (L427)). This was not an issue in the past since the hashes of our previous releases didn't happen to be of the form (`[Rr]\d+[AaBb]\d*(?:-\d+)?)`).

Reviewed By: bolinfest

Differential Revision: D42006425

fbshipit-source-id: 8dd4c52e1f49b79763bcc5863f7578a0f36dda73
2022-12-13 11:54:51 -08:00
Clara Rull
b3d61cfabf Fix pyre wrongly inferred type
Summary: In D34217873 (bb5656edfc) pyre wrongly assumed 'root' was int, while it is actually str. This diff solves that and removes the related coments

Differential Revision: D42003278

fbshipit-source-id: 91088303b2a671e20fe83aa156b97e97f9cc81d7
2022-12-13 11:16:32 -08:00
Muir Manders
3da7d0b7f2 goto: log "update_distance" on edenfs
Summary: Move the update_distance log up so it fires for the Edenfs case as well.

Reviewed By: quark-zju

Differential Revision: D41750022

fbshipit-source-id: 48df0a58c009bc5bb87d76495d942a53f3089d1a
2022-12-13 10:22:25 -08:00
Open Source Bot
5fcb68de1e Updating submodules
Summary:
GitHub commits:

af08b90aa1
f4805c4b3a

Reviewed By: yns88

fbshipit-source-id: ce9ba2cc3b27a2ce7f87c8b157cd5d32bb3962ee
2022-12-13 08:09:20 -08:00
Open Source Bot
96f4c4a376 Updating submodules
Summary:
GitHub commits:

38285998a3

Reviewed By: yns88

fbshipit-source-id: a2fe30df2c88df2337feb4038ee9cf01c72988cd
2022-12-13 07:25:40 -08:00
Michael Bolin
26526efb78 minor grammatical fixes in VS Code extension docs (#323)
Summary:
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/323).
* __->__ https://github.com/facebook/sapling/issues/323

minor grammatical fixes in VS Code extension docs

Pull Request resolved: https://github.com/facebook/sapling/pull/323

Reviewed By: sggutier

Differential Revision: D41981831

Pulled By: bolinfest

fbshipit-source-id: 7b94a6f3f741b17ccafea938b8b388e8d54057c8
2022-12-13 07:15:56 -08:00
Yan Soares Couto
89e558bf14 Change too many files error text
Summary: Point to the wiki, which is clearer and more similar to the error for large files.

Reviewed By: markbt

Differential Revision: D41840992

fbshipit-source-id: 292f30c0e92cf8627f0646ed503d0e0ba30eae82
2022-12-13 06:03:40 -08:00
Yan Soares Couto
9f03631b62 admin: Add fetch many command
Summary: This command allows fetching multiple keys at once. It can be used to tell how many exist, but is most useful to allow repairing/scrubbing many keys at once.

Differential Revision: D41660456

fbshipit-source-id: afcaf789479dc0050817d15c1f54299851cb81db
2022-12-13 04:50:17 -08:00
Yan Soares Couto
34e8c3f199 Clean last reference to bookmarks_update_log_lock from fbcode
Summary: This stopped being used on D39698723 (3338746679), but we forgot to remove the code that creates it on integration tests.

Differential Revision: D41874472

fbshipit-source-id: bbb2eccdd53103999523b3e5be2fd9ff7ba85e83
2022-12-13 03:11:15 -08:00
Open Source Bot
13dafa642f Updating submodules
Summary:
GitHub commits:

46222db4c9

Reviewed By: yns88

fbshipit-source-id: 182bf059159da66d08ac2b7f5c011de2bdbb03ad
2022-12-13 00:48:41 -08:00
Open Source Bot
c640df384e Updating submodules
Summary:
GitHub commits:

cd9f501ab0
e2802d7dd7
71335ddade

Reviewed By: yns88

fbshipit-source-id: 057d191e0256eddca0a4d0ff9e9933e9867e3f7e
2022-12-12 18:47:30 -08:00
Eddie Shen
da2a0530fc Migrate ratelimit_meter to governor
Summary:
`ratelimit_meter` is a deprecated crate. It's owner/maintainer has since forked their own library into `governor` which is actively being worked on and offers a similar API. They have also provided a migration guide.

While functional, `ratelimit_meter` is the only crate vendoring in `smallvec@0.6.13`, which is affected by [`RUSTSEC-2021-0003` - 2021-01-08: Buffer overflow in `SmallVec::insert_many`](https://rustsec.org/advisories/RUSTSEC-2021-0003.html). Since upgrading ratelimit_meter is not an option, the only path forward is to migrate away from it.

Notably, `governer`'s `RateLimiter` also offers an async api surface, which removes the need for portions of `async_limiter`. It also offers one algorithm, a slightly modified GCRA, unlike `ratelimit_meter` which offered two, but according to the author, both algorithms ultimately did the same thing.

Please see `governor`'s migration [guide](https://docs.rs/governor/latest/governor/_guide/index.html) and `ratelimit_meter`'s [github page](https://github.com/antifuchs/ratelimit_meter) for more information.

Reviewed By: chriskonstad

Differential Revision: D41690189

fbshipit-source-id: 0b686f95a9a0346b2b0426f660bcc41e8c6657d3
2022-12-12 18:42:35 -08:00
Open Source Bot
90376231ed Updating submodules
Summary:
GitHub commits:

91344d476e
e99596e0a2

Reviewed By: yns88

fbshipit-source-id: 1631770ac871bb3968243defd6604e5a086119b0
2022-12-12 18:06:45 -08:00
Open Source Bot
494a8f066c Updating submodules
Summary:
GitHub commits:

c34f31b433

Reviewed By: yns88

fbshipit-source-id: f5649c4f387510c249c24c4b72d0f5b07cc1927a
2022-12-12 14:48:23 -08:00
Michael Bolin
c63cefba4e prepare Sapling VS Code extension for release (v0.1.7)
Summary:
This fixes a fairly annoying issue in the VS Code extension.
Now outstanding issues fall more in the "feature request" than
"bug" category.

Reviewed By: ndmitchell

Differential Revision: D41976202

fbshipit-source-id: 31e6a38df50d90e4e0df2b21450f9175ba57f680
2022-12-12 14:46:22 -08:00
Michael Bolin
7ae28228a3 honor signed commits in sl pr
Summary: Pass `-S` with the keyid when `sl pr` calls `git commit-tree`, if appropriate.

Reviewed By: quark-zju

Differential Revision: D41914284

fbshipit-source-id: cd9a4333ef1a5b377595da8aa97b6936b4253cd8
2022-12-12 14:26:34 -08:00
Michael Bolin
0bbd19f6d9 honor signed commits in ghstack
Summary: Pass `-S` with the keyid when `ghstack` calls `git commit-tree`, if appropriate.

Reviewed By: quark-zju

Differential Revision: D41791483

fbshipit-source-id: 7384d5dfc2775e5268b6c3a221bc64a54ac32804
2022-12-12 14:26:34 -08:00
Michael Bolin
f6bef0c4c6 support signing Git commits using a GPG key
Summary:
This was requested for `sl pr` in
https://github.com/facebook/sapling/issues/218,
though this diff adds support for signing commits in general, in Sapling.
Here's how it works:

- `sl config --local gpg.key <KEY>` to specify your key
- Now `gitcommittext()` takes an optional `str` for the `gpgsigningkey` if `gpg.key` is set and `gpg.enabled` is `true` (which is the default).
- The text of the unsigned commit object is constructed and then signed using `gpg --status-fd=2 -bsau <KEY>` with the text passed via stdin.
- The resulting signature is embedded into the original text to sign it. Note that the original PGP key goes through some minor formatting (`\r` is removed; lines must start with a space to avoid a `\n\n` sequence) before it is embedded.

I documented things to the best of my knowledge in `eden/website/docs/git/signing.md`.

Follow-up items:

- Show signed status in smartlog?
- Update `sl ghstack` to honor signing configuration when running `git commit-tree`.
- Update `sl pr` to honor signing configuration when running `git commit-tree`.

Reviewed By: quark-zju

Differential Revision: D41778874

fbshipit-source-id: 5018a0d8bea1b5e9293c05954db65f35dd3c7aff
2022-12-12 14:26:34 -08:00
Michael Bolin
f65f499ba9 do not strip the final newline when running sl cat (#321)
Summary:
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/321).
* __->__ https://github.com/facebook/sapling/issues/321

do not strip the final newline when running `sl cat`

Pull Request resolved: https://github.com/facebook/sapling/pull/321

Test Plan:
Ran the dev version of the extension with this change and
verified it no longer shows a modification at the end of the file
suggesting a newline was added.

Reviewed By: ndmitchell

Differential Revision: D41974622

Pulled By: bolinfest

fbshipit-source-id: db1362fc4bad297a3e048ca44391f104a68c41c6
2022-12-12 14:18:12 -08:00
Jade Lovelace
500466bed0 website: Add a debugging guide pointing to the debug options (#287)
Summary:
![image](https://user-images.githubusercontent.com/6652840/204931166-61006e88-a178-4a72-ac7a-1ad75d372239.png)

Pull Request resolved: https://github.com/facebook/sapling/pull/287

Reviewed By: quark-zju

Differential Revision: D41972519

Pulled By: bolinfest

fbshipit-source-id: cbf494ba0989680941ddffaab178a95fcbb225eb
2022-12-12 13:24:17 -08:00
Michael Bolin
313ec4baf4 autoformat
Summary:
This was flagged in D41921132 (a443a6cfef), but I ignored it so I could
land the diff without commandeering to give sggutier credit
for authoring it while he's OOO.

Reviewed By: quark-zju

Differential Revision: D41972389

fbshipit-source-id: 9e0a4e6aff9371f70a4fba8257a88c4c77e2d190
2022-12-12 13:23:26 -08:00
Saul Gutierrez
a443a6cfef bump Python in Github macOS actions to 3.11 (#319)
Summary:
The latest Homebrew bottles for Apple Sillicon macOS built by our Github Actions were broken, as mentioned in https://github.com/facebook/sapling/issues/315 . This was caused due to updating the Formula template used by our Github actions to 3.11 but not updating the Github actions themselves to Python 3.11. This commit fixes that last part.

Pull Request resolved: https://github.com/facebook/sapling/pull/319

Test Plan:
Triggered a [build on a fork of the sapling repo](https://github.com/sggutier/sapling/releases/tag/0.1.20221211-120017-rcd410769), downloaded the bottle built by it, and checked that it ran properly on my M1 mac:

```
$ sl --version
Sapling 0.1.20221211-120017-rcd410769

$ file $(which sl)
/Users/sggutier/homebrew/bin/sl: Mach-O 64-bit executable arm64

$ otool -L $(which sl)
/Users/sggutier/homebrew/bin/sl:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60158.100.133)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
        /Users/sggutier/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        /Users/sggutier/homebrew/opt/openssl@1.1/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
        /Users/sggutier/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)

$ sl dbsh -c "import sys; print(sys.version)"
3.11.0 (main, Nov 28 2022, 13:49:33) [Clang 14.0.0 (clang-1400.0.29.202)]

$ sl clone https://github.com/sggutier/sapling/ saplingtest && cd saplingtest && sl
remote: Enumerating objects: 677771, done.
remote: Counting objects: 100% (2847/2847), done.
remote: Compressing objects: 100% (1469/1469), done.
remote: Total 677771 (delta 1396), reused 2692 (delta 1261), pack-reused 674924
Receiving objects: 100% (677771/677771), 175.60 MiB | 2.59 MiB/s, done.
Resolving deltas: 100% (454743/454743), done.
From https://github.com/sggutier/sapling
 * [new ref]               2857ac6b96 -> remote/main
6535 files updated, 0 files merged, 0 files removed, 0 files unresolved
@  2857ac6b9  Today at 11:33  mbolin  https://github.com/facebook/sapling/issues/317  remote/main
│  Add build instructions for Windows (https://github.com/facebook/sapling/issues/317)
~

$ touch something && sl st
warning: watchman has recently started (pid 1093) - operation will be slower than usual
? something

$ cd eden/scm && sl root
/Users/sggutier/saplingtest
```

Reviewed By: bolinfest

Differential Revision: D41921132

Pulled By: sggutier

fbshipit-source-id: 0ed4f2d6f214f02669e45c9c4b8cced7de9caa2e
2022-12-12 12:52:55 -08:00
Open Source Bot
e3d14e8636 Updating submodules
Summary:
GitHub commits:

227cac0360
61284a74c4
e44a379915
55b2b71a34
6b14cd89c7

Reviewed By: jailby

fbshipit-source-id: 9ee421a69604ca7424ac67404666f4a0664b89b7
2022-12-12 12:47:45 -08:00
Open Source Bot
67ceee2272 Updating submodules
Summary:
GitHub commits:

80b8991b80
00238a386b
468c6c76cf
29acf7dd92
2ce913afe4

Reviewed By: jailby

fbshipit-source-id: c8b5a71a08c0fde5a7a7f64fc08f79c8341c5176
2022-12-12 11:58:53 -08:00
Mateusz Kwapich
65756293fa make sparse profile checker consider changes in all sparse profiles not just monitored ones
Summary:
Currently the sparse profile checker treats the changes in unmonitored sparse
profile as-if they were files and will only report the size change in the
sparse profile size. Let's match them.

This also matches the behaviour of the legacy sandcsatle job.

Differential Revision: D41942576

fbshipit-source-id: e11768abaf57c85aa5ccdc72c528435f98ba9cee
2022-12-12 09:14:36 -08:00
Liubov Dmitrieva
8713ca868d fix "repo changed while backing up" errors for non best effort
Summary:
fix "repo changed while backing up" errors for non best effort runs

metalog reloads on transaction, so let's add a transaction

before that, we had lots of **false positives** "repo changed while backing up" errors because we read cached values

also, enable best effort mode for scm daemon, it locks the whole working copy after https://www.internalfb.com/diff/D34797187 (2e1b3436b3), which is not expected

Reviewed By: markbt

Differential Revision: D41871718

fbshipit-source-id: 14e222d0ccbcd6aa4a6dd773f2889aa0721c9842
2022-12-12 03:22:23 -08:00
Open Source Bot
b18ffd23de Updating submodules
Summary:
GitHub commits:

c7afa8dc95
bb801da8c8
e84e6797fd

Reviewed By: jailby

fbshipit-source-id: 1fe51aab71421989330a72499d2e40f3a6214377
2022-12-11 19:07:46 -08:00
Open Source Bot
643709869e Updating submodules
Summary:
GitHub commits:

ae031e4cf2

Reviewed By: jailby

fbshipit-source-id: 408982d546c32b6ed473804a2075fba75ba2c317
2022-12-11 11:04:42 -08:00