Summary: It seems we were not properly subscribing to changes in the vscode workspace folders. We used `onConnectOrReconnect` inside the lazyAtom, which means it was not triggered on first connect. Since reconnects don't happen in most cases (maybe never for vscode connection...?), it would never actually subscribe. Instead, we could either move this to a not lazy atom, or make it just call the subscribe directly. I opt to make the atom not lazy, since we use this in the cwdSelector immediately on startup, there's no real use having it be lazy. Maybe that made sense when the cwd dropdown didn't use this state.
Reviewed By: quark-zju
Differential Revision: D57136047
fbshipit-source-id: 8298b8b94b06e109f78240d20cb42014f3d18e00
Summary:
Add new config flag rebase.reproducible-commits that tweaks two date related things to achieve "reproducible" rebases (i.e. different "rebase" invocations will produce exactly the same commit(s) given fixed "source" and "dest" commits):
- Enable the tweakdefaults.rebasekeepdate behavior of not bumping the source commits' commit date
- Don't record "mutdate" in commit extras since the mutation date is always "now". The mutation info stored in commit extras is not load bearing, so this should be fine.
Reviewed By: markbt
Differential Revision: D57065563
fbshipit-source-id: 77d17ca622605739866385213c29a448b1504775
Summary:
The tweakdefaults extension is always enabled, so we can start moving its tweaks inline.
Previously operations such as "sl fold" or "sl next --rebase" were running "rebase" without the tweakdefaults changes due to how command wrapping works. It seems like these uses do want the rebase tweaks (e.g. bumping rebased commit date to "now"), so I just updated the tests.
Reviewed By: quark-zju
Differential Revision: D57125799
fbshipit-source-id: e00ce7e5049e3a0312bb15d9747f3bf5dc2b7a3c
Summary: Previous diff got rid of mutation.date interfering with realism, and here I also enable the "mutation" configs (which in particular enabled "mutation.record") and avoid use of "--keep" flag (which influences mutation/extras contents).
Reviewed By: markbt
Differential Revision: D57065562
fbshipit-source-id: d81246a271ecf81173def68cb879fa16c5e1dbd2
Summary: It doesn't make sense to change "now" for one part of Sapling but not another. Let's consolidate on the "devel.default-date" config setting (which is set to "0 0" in default_hgrc.py for tests).
Reviewed By: markbt
Differential Revision: D57065561
fbshipit-source-id: 4104a68b3a79bb14574144db98542bfd75c201e9
Summary: This diff implements capability to parse and accept filter arguments from git client. A follow up diff will add actual support for filter at the server
Reviewed By: markbt
Differential Revision: D57052433
fbshipit-source-id: 7bedaa398d938f33f18570fe96e36ac3c83df0ed
Summary: This integration test is part of the TDD for filter support in Mononoke GRit server. Currently the test outputs `warning: filtering not recognized by server, ignoring` which will later get removed once we add proper server side support for filtering.
Reviewed By: markbt
Differential Revision: D57101700
fbshipit-source-id: ce405b40c723928113519e3f7cbdce85609414bf
Summary:
Update the SCS integration test for submodule expansion.
- I'm extending this test case before publishing the support for forward syncing in SCS.
- I'm renaming the test file because it will also start testing backsyncing changes with xrepo lookup command.
- I added the `small-repo-sot` suffix because the entire test case will have small repo as the source of truth.
One important thing to mention:
Backsyncing isn't actually supposed to work now. It only works because there's a bug in the `get_strip_git_submodules_by_version` function (described in D56881703) which is returning the default submodule action (STRIP) when it's called for backsyncing.
Coincidentally it's actually doing pretty much what we want to do right now: it's backsyncing changes **as long as they don't touch the submodule expansion**.
In the backsyncing tests I use newadmin to derive almost all data types for the backsynced commits to show what happens in those cases.
Reviewed By: mitrandir77
Differential Revision: D56828900
fbshipit-source-id: 506c652cd034ccc746267c99c3f54eef19e7f8c3
Summary:
Introduce helpers that will log to both slog (i.e. terminal) and Scuba.
This will be useful when to debug/follow the initial import command. It might also help debug cross_repo_sync stuff in general.
This diff is supposed to be a no-op! I'm updating/adding logs in the next diff.
Reviewed By: andreacampi
Differential Revision: D56925258
fbshipit-source-id: b914c59964ca9be8b9068336713d0953042c1bd1
Summary: Use the declared getdeps system dependencies from ws_airstore build. As they come from the OS packages they are dynamically linked, which makes the python build happy.
Reviewed By: zhaoduow
Differential Revision: D57047488
fbshipit-source-id: 751fd2b71c5e81d987d9fe6d9502cd5f4613ac66
Summary: Report them as network errors so the network doctor related logic can handle it.
Reviewed By: muirdm
Differential Revision: D57133393
fbshipit-source-id: 773011de0111630db949ab946624a9f225d4f263
Summary: This might be useful in other places.
Reviewed By: muirdm
Differential Revision: D57133390
fbshipit-source-id: 1dbe64a5fb33a8f727497e4df7a606011202f5c8
Summary: Now all APIs use anyhow errors. We can return early without converting error types.
Reviewed By: muirdm
Differential Revision: D57133391
fbshipit-source-id: a301103bab0759729b9fc058bbd77cd0761f7043
Summary:
This makes the `get_local` API disable remote fetching, which matches more
closely to the API contract.
Reviewed By: muirdm
Differential Revision: D57129510
fbshipit-source-id: 133c544ee212d31b7f6c97b62134b883c030a8da
Summary: This allows us to mix-in network errors that do not exist in `git2::Error`.
Reviewed By: muirdm
Differential Revision: D57129509
fbshipit-source-id: 736d9722b5e7293aab1b484b823367ee1dceb6c5
Summary:
If you view uncommitted changes in "tree" mode, we should have checkboxes on each level to let you select/deselect all files "under" that level.
We can use the "indeterminate" state if there's a mix of selected files in a level of the tree, or if some files are themselves partially selected (via chunk selection)
This involves iterating all files inside a level in the tree, both to calculate the checked state and to select/deselect on click.
I added a few iterator utils so we don't need to make new arrays out of all the file paths when computing this (since we would do that for each level, that could be somewhat expensive). [These helpers are actually coming soon to js itself, they're at stage 3!](https://github.com/tc39/proposal-iterator-helpers?tab=readme-ov-file) Can't depend on that just yet though.
Reviewed By: muirdm
Differential Revision: D57124747
fbshipit-source-id: 3ba0bf5d593b153a2d6beef69a9592944e6e9e3f
Summary: this runs on github... but also not what i really care about
Reviewed By: terrelln
Differential Revision: D57125977
fbshipit-source-id: 39d7fd319a0ce45a36ba11c4301f5a27356b6c9f
Summary: This makes the error more friendly.
Reviewed By: sggutier
Differential Revision: D57067113
fbshipit-source-id: 4e16a37b22c5476a357ddee2bcff0cec69b112f7
Summary:
Makes `SL_LOG=gitstore=debug` print the git store location, url, filter
information for easier debugging.
Reviewed By: sggutier
Differential Revision: D57067115
fbshipit-source-id: 193eccfd0ca8bb57f3556c43124db109495fdbb2
Summary:
Autodeps doesn't like having multiple headers and always tries to remove the
dependency on it even though it's needed. Let's split the windows_notifier in
half to prevent that.
Reviewed By: MichaelCuevas
Differential Revision: D57115799
fbshipit-source-id: b36047d970c7deec3fac50c0157e2165783aa915
Summary: zzl0 pointed out that we were mixing the `*args` and `**kwargs` too loosely in the cache key. Fix by using a nested tuple to keep `args` and `kwargs` separate rather than combining into a single tuple.
Reviewed By: zzl0
Differential Revision: D57078104
fbshipit-source-id: 324697c7f4ecebd2004bb73d798b6aac2a1a18bf
Summary: Like the file tree, indent files within a section of a sectioned file list. This make it more visually clear which files belong to which section.
Reviewed By: quark-zju
Differential Revision: D57121562
fbshipit-source-id: a51bec0df37dcb059ffdb547aec5cd7800791d83
Summary:
Add a checkbox next to sections so you can toggle all files within a section at once. This is much more convenient if you need to make a partial commit from files in just one section.
In the next diff, we'll also indent these nested files so the checkboxes are differentiated better
Reviewed By: quark-zju
Differential Revision: D57121564
fbshipit-source-id: 19b96143042f35675318b6cc232959fd7648f264
Summary: migrate to <Button> instead of <VSCodeButton> here. This also fixes a font size issue.
Reviewed By: quark-zju
Differential Revision: D57121563
fbshipit-source-id: 188286cf3bdb1f05cf0cd77894fe0fbc31c6fc36
Summary: Previously, we sent the repo root and the relative cwd to have the UI combine into a display cwd. We can instead use realpath and join them on the server to get a label for the UI to use. We don't even really need to send the repoRelativeCwd, just the label.
Reviewed By: quark-zju
Differential Revision: D57116811
fbshipit-source-id: 7f1f9d6f8be3751daf5242a7fccbde9c8e6008f8
Summary:
The previous cwd selector used minimalDisambiguousPaths for the cwd selector. This meant that typically you'd only see the basename of the cwd as an option for the cwd.
Instead, we can first find the repo root for each cwd option, and thus render the cwd as relative to that rpeo root. This also lets us know ahead of time which cwd options are invalid, so we can disable them.
I also hide invalid options from the quick cwd picker.
We could later augment this data too, for example labelling git or sl repos.
Reviewed By: quark-zju
Differential Revision: D57083696
fbshipit-source-id: 5e7a0e0f1e96019e9512d711e773d97e2d62c352
Summary:
Instead of showing the basename of the cwd in the cwd dropdown, show the repo root basename + the relative path to the cwd.
For example, "sapling/addons/isl" instead of just "sapling" (or just "isl").
This makes it more clear what your cwd is within the repo, which can give you more information in some cases.
Reviewed By: quark-zju
Differential Revision: D57083698
fbshipit-source-id: 3832eb7cf8504f2545bff2e9745de78940086e6d
Summary: Add an API to use `sl root` to validate a cwd without actually creating a whole RepositoryInfo. This can be used slightly more cheaply to check the validity of all available cwd options, so the UI can show you cwds relative to the repository root.
Reviewed By: quark-zju
Differential Revision: D57083699
fbshipit-source-id: 1ac064ae926bd475931dc9569f6d122390f07e98
Summary: Allow disabling RadioGroup options via a `disabled` value in the option.
Reviewed By: quark-zju
Differential Revision: D57083700
fbshipit-source-id: b3cb8b0370ed37e2195ebac8ef400022297f2cc8
Summary:
If a platform has its own dedicated message handling, we previously might pass in a null RepositoryContext. However, we are always be able to create a RepositoryContext from the information we have.
Constructing one will make it easier to use platform-specific messages, for example to determine more info about the cwd.
Reviewed By: quark-zju
Differential Revision: D57083697
fbshipit-source-id: 6d3f3cfcca1ae76d7075156e462187891fceaa08
Summary:
`test-gitbundle-mononoke-remote-gitimport.t` is currently failing:
```
JustKnobs Rule Source WHOAMI_DEVICE_RAM could not be loaded. Failure: Reason: Failed to find fbwhoami field 'DEVICE_RAM'
```
However, this was just a warning, the real erorr is SCS_Server taking slightly longer to start:
```
+ SCS server did not start in 120 seconds, took 131
```
So I've increased the timeout.
The causes for startup increase have not been investigated
Reviewed By: mitrandir77
Differential Revision: D57099503
fbshipit-source-id: 0c4146e55419b50347dd968a5d003abbc0ee91e7
Summary:
It's sometimes annoying to run EdenFS .t tests without having autofix for them, which is why this diff was created.
In order for EdenFS .t tests to run properly, some env vars have to be set. Ideally we would modify the existing `run_tests_py_eden` target, but the problem with this is that Buck doesn't allow Python binary targets to take env vars as input.
Reviewed By: zzl0
Differential Revision: D57010488
fbshipit-source-id: 9155f39c2ba479bf763a24075316b439453ab6e1
Summary: As of D56766291 these lines are no longer necessary since that's turned on by default, so let's delete them
Reviewed By: zzl0
Differential Revision: D57005745
fbshipit-source-id: 639b689aaf6e9223c601d266166878169fca5079
Summary: This extension should have been added to D56766291, but was accidentally deleted
Reviewed By: muirdm
Differential Revision: D57021765
fbshipit-source-id: f260fa6d47b1386d36fa1b2aa6a88226c74dbcbd
Summary:
As titled, remove picking system boost for centos9 oss builds.
We are seeing the following error (https://tracker.ceph.com/issues/54265) when building qsfp service with c++20 and on CentOS9. We need boost 1.77 or more to build with c++20.
Discussion: https://fburl.com/workplace/4u3glapv
Reviewed By: chadaustin
Differential Revision: D55758008
fbshipit-source-id: dae0bb5a70de3de2988032412eaafbd1b6d4e53d
Summary:
`eden prefetch` does not in fact read patterns from stdin. This diff
corrects the help message and adds support for reading patterns from
stdin when the file is `-`.
Went with `--pattern-file -` rather than just reading from stdin because
that would box in the stdin API to just this.
Reviewed By: genevievehelsel
Differential Revision: D57064448
fbshipit-source-id: 03e61c7b44ec7d2cbcc979c016d5b19a7cf45f0f
Summary:
Sort and append `**kwargs` to `*args` so we can cache based on named args as well.
Note that we don't know what the default args are, so:
```
# If you have
util.lrucachefunc
def foo(a, b=123):
...
# Both of these will actually invoke foo():
foo(a)
foo(a, b=123)
```
Reviewed By: quark-zju
Differential Revision: D56954509
fbshipit-source-id: ecf9d7ab8d9e17766a52154454398f005609ee7c
Summary:
Small bug in the fetch command where adding the '-v' flag will fetch the predictive prefetch even when turned off.
Discovered when testing the end to end flow
Reviewed By: genevievehelsel
Differential Revision: D56794816
fbshipit-source-id: e2c1484e7d565689be126ee54f62c148c8a8b8bc
Summary:
Next to the "fill commit message" section in the commit-mode commit info view, add a dropdown button that lets you choose to clear the commit message. This is useful if you use the fill commit message button but want to go back and not have all of the fields filled in.
in the future, I suspect we'll add more fill methods like filling from a task/diff, and if so we may need to move some fill methods to this context menu as well for space savings.
Note: we only show this for "commit" mode because amend mode alredy has a "cancel" button to go back to the original message. But "cancel" doesn't really work for commit mode.
Reviewed By: zzl0
Differential Revision: D57013039
fbshipit-source-id: 201c6e380defd2f53fc67b6ef0309bcba829e163
Summary:
Show that if date is the only thing that differs, duplicate rebases will produce the exact same commits.
Note that this requires tweakdefaults.rebasekeepdate=true so that we re-use the source commits' date instead of bumping the date to "now".
Reviewed By: quark-zju
Differential Revision: D56955920
fbshipit-source-id: 7378a736a4580370fa092014046aa5cf2fce342f