Summary:
Internally, config tracks "source" at byte offset level. But that is not
friendly for end-users. Update "source" to provide a line number.
Reviewed By: sggutier
Differential Revision: D56592496
fbshipit-source-id: 2a67922abf811b8d08d5cff1285ae5bd7ed00850
Summary:
This should stop `git fetch` (triggered via the gitstore layer) from polluting the stderr and integrate with `IO`
and pager well.
Reviewed By: sggutier
Differential Revision: D56610228
fbshipit-source-id: 3cda83e6671ad6ea7fe081d12882cdb4f54d4f57
Summary:
Thrift codegen can produce bad code, like:
error[E0583]: file not found for module `mock`
--> ...\cargo-target\debug\build\fb303_core_clients-b3d87b870456fabb\out\lib.rs:9:1
|
9 | pub mod mock;
| ^^^^^^^^^^^^^
|
Do not treat it as failure.
Reviewed By: muirdm
Differential Revision: D56607940
fbshipit-source-id: 23d3e0602085f01f6fd5ed195589cd46c66124fc
Summary:
Allow websockets to connect to the current browser's port of choice (if available)
Adds a check for the current window's protocol. Defaults to ws:// but will switch to wss:// in secure contexts. This assumes the upstream server will handle converting from wss to ws.
Pull Request resolved: https://github.com/facebook/sapling/pull/886
Test Plan:
Import github project to replit. Run a server by doing:
`sl web --no-app`
open the replit webview with the token, see if it loads the smartlog.
Reviewed By: quark-zju
Differential Revision: D56526564
Pulled By: evangrayk
fbshipit-source-id: d241e2f2bfc7fb3fb30d9be9e8206970b8d57cd3
Summary:
Add a config flag to control if you want to run `sl resolve --all` before `sl continue`. This runs automated merge drivers to regenerate generated artifacts.
Sometimes `sl continue` would complain, "you have generated artifacts, run `sl resolve --all` to regenerate". We should just do this automatically for you. We provide a setting so you can opt out of the behavior. That might be useful since merge drivers can be expensive sometimes.
I support we should be doing this in sapling itself? Maybe via a flag when called from ISL?
If we do as a separate command, you'll see if it's `sl resolve --all` that's taking a long time when running in the UI (as opposed to `sl continue`). So we could add special UI documentation that shows that explains it's running merge drivers.
For OSS, I think merge drivers may be less common, so I made this false by default. We could reevaluate this later, and anyone who hasn't tweaked the setting would get the new default.
I also made an inline setting checkbox next to the continue/abort buttons to control this. But only for internal users, since it would likely just be clutter for OSS users. If we determine from analytics that everyone always leaves this active, we could just leave this buried in settings and not show it inline.
Reviewed By: quark-zju
Differential Revision: D56642944
fbshipit-source-id: a8ad580eaf98a618360c92b65d46a0101da4ba31
Summary: This feature was previously not supported, and it's a nice to have
Reviewed By: muirdm
Differential Revision: D56598268
fbshipit-source-id: 29d8247fef5841f5feae5b16ba1b81055befa8dd
Summary:
Splitting D56490217
This one makes "failed_to_kill" a list instead of a string as we want to log all processes that we couldn't kill instead of one (currently we give up on first fail, but I believe since the user will have to do some manual work we might as well do as much work as we can).
(note: change on behavior other than this will happen in the last diff of the stack)
Reviewed By: jdelliot
Differential Revision: D56588913
fbshipit-source-id: 596a0ad34e7f0e75e93c418aeba7515c80d51748
Summary: In `xdb.commit_cloud` we store CSIDs hex-encoded. These functions add a little abstraction so we can run the same query but slighly different depending on wheter we're using a mysql database or an sqlite one.
Reviewed By: markbt
Differential Revision: D56586031
fbshipit-source-id: 29237d79fc31b177b48d314003d9eb3aa289e442
Summary: The commit cloud service needs some extra operations when we execute queries so we're backwards compatible with the existing db. E.g commits are hex encoded in `xdb.commit_cloud`, so when retrieving data we need to be able to decode them to then pass them up the service.
Reviewed By: markbt
Differential Revision: D56193597
fbshipit-source-id: b45e233a09ab581d6aed7a6193e864fae9faf3f1
Summary: Most endpoint are unimplemented rigth now. Will fill them out little by little
Reviewed By: markbt
Differential Revision: D56042552
fbshipit-source-id: 2dbeb2ed7c8ce339b7c00f7b7ca8353319150540
Summary: When debugging a slow `hg st`, I saw that a lot of time was spent evicting items from the `BlobCache`. This adds the ability to turn blob caching off. This mirrors the same option from `TreeCache`
Reviewed By: MichaelCuevas
Differential Revision: D56045141
fbshipit-source-id: 8c401bf9b9b302352fa5a85365b1e10838ef86a8
Summary:
If you drag & drop a commit to rebase, we want the drag target to be a bit forgiving. Currently, it's only EXACTLY the title. So if you dragged onto the diff badge or buttons, it wouldn't work.
This often feels incorrect, for example if you have a commit with a long title, you drag from near the end of the title upwards, near remote/main, it won't preview the rebase unless you get exactly onto the bookmark name.
Instead, we can extend the non-layout part of the <DragToRebase> so that it recieves dragEnter events.
This is done the same way we support dragging from the avatar, with a positive padding and negative margin. This keeps layout the same, but increases the area available for mouse events.
Note that we need to be careful doing this to make sure this new area is not stealing mouse events that were intended for buttons or other UI elements. We can do this with z-index, which seems to work pretty well in my testing.
Reviewed By: jakebolam, sggutier
Differential Revision: D56649406
fbshipit-source-id: 7f091ba4cbd3a675597ca2da370dcd3626657d4a
Summary: This is the GC that runs in the background on Windows and in `eden doctor`, we've had a user request to manually run this, but rather than having to run `eden debug thrift`, this adds this endpoint as its own debug command for ease of use, and because the `age` parameter is silghtly confusing.
Reviewed By: jdelliot
Differential Revision: D56478945
fbshipit-source-id: d46f38d7626af5753da8db2111af4aa4d5876755
Summary:
The hint was firing when just running "sl". This was because the Rust dispatcher was setting Python's `sys.argv` to its args post-processing (which includes adding the default command "sl" on to the list of args). This made it impossible for Python to know if the user typed "sl" or "sl sl" (always appearing as the latter).
Fix by initializing the Python interpreter with the original args. We still pass the processed args to `sapling.run()`, so this should only affect the value of `sys.argv`.
Reviewed By: evangrayk
Differential Revision: D56640367
fbshipit-source-id: 43f2e20edccc54750a170319f806ad8dc79d9ca9
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
Summary:
This is done in preparation for D56220000. In all of our new kind of tests,
`modernclient` and `newclientrepo` should be used instead of the `eagerepo`
from `tinit.sh` since this function causes a number of issues when used.
Additionally, a relatively new feature, updating on clone, is tested here.
Reviewed By: muirdm
Differential Revision: D56220003
fbshipit-source-id: bb54a016b382e2eec138618b7e8c9118a3fb14cf
Summary:
On .t tests `drawdag()` allows creating a commit graph and at the same time
create bookmarks there. If we start having many tests that clone eager
repos and want to easily push all of our bookmarks there, just like we do in
D56220003, allowing to do both steps in the same bash function should be
easier.
Reviewed By: muirdm
Differential Revision: D56220002
fbshipit-source-id: 097e7624e5e958e240136358ea45d3a61a285d86
Summary: It turns out that the bash echo command prints escaped newlines as actual newlines on bash; we need this kind of behavior in D56220002, so let's fix that
Reviewed By: muirdm
Differential Revision: D56598270
fbshipit-source-id: de590fbf1262e7d35d2000eea434f124611a6608
Summary: Use <RadioGroup> instead of <VSCodeRadioGroup> for the cwd selector in the cwd dropdown
Reviewed By: muirdm
Differential Revision: D56499709
fbshipit-source-id: fbb4d1109aa67a759a3d0d4f32f9729dd04d14f4
Summary:
If there's more than one cwd available, make the cwd tooltip into a ButtonDropdown, so you can quickly change cwds. This is a bit of a shortcut to the larger UI. This addresses a complaint I've heard that it's harder to change cwd, which some repos do a lot.
This UX pattern is a bit peculiar I suppose, but it feels intuitive enough to me. Open to any opinions about this.
Reviewed By: quark-zju
Differential Revision: D56498233
fbshipit-source-id: 6b909292a24eab4a6a1408e22c8534f24c743a78
Summary: Use the new prop for aligning here
Reviewed By: muirdm
Differential Revision: D56532296
fbshipit-source-id: 15556622d18302dacf86e19ebd760a8da8d5de61
Summary:
<Column> is very useful, but the default is to center align items. flex-start is very often useful (perhaps even more often than center??).
Add a prop to set the align-items to flex start so you can use `<Column alignStart>` instead of `<Column style={{alignItems: 'flex-start'}}>` which is cumbersome.
Reviewed By: muirdm
Differential Revision: D56532249
fbshipit-source-id: fb61b447037ef6b908dcce19d971c589c6f3facc
Summary: This component is not directly accessible in the UI, but let's migrate their checkboxes anyway.
Reviewed By: muirdm
Differential Revision: D56531553
fbshipit-source-id: fe26bc529d597bcd05891e10a273d6837d3213ec
Summary:
Migrate from <VSCodeCheckbox>. One small spacing adjustment is needed when there's no children of the checkbox.
This allows us to remove a hacky use of `onClick` instead of `onChange`, which we prefer.
Reviewed By: muirdm
Differential Revision: D56531022
fbshipit-source-id: a343d2c98edcab649ee6a27fd97ac59167077ade
Summary: This is the last user of <VSCodeRadioGroup>.
Reviewed By: muirdm
Differential Revision: D56529591
fbshipit-source-id: 5bb66ec43e252eae5c3281665b98225113d509fc
Summary: The commit/amend selector can migrate to <RadioGroup>. This does require adding a "horiztonal" mode, but it's quite easy to do.
Reviewed By: muirdm
Differential Revision: D56528619
fbshipit-source-id: 856f93dccb42b0156dc18677ffd9055fb705865f
Summary: Use <Checkbox> now that it supports indeterminate states
Reviewed By: muirdm
Differential Revision: D56527595
fbshipit-source-id: 8f24523e4d66789b36f1c3837dfe3eebc5a8b8b0
Summary:
This indeterminate state is useful for checkboxes that represent a condensed view of child checkboxes, and if some are checked and some are unchecked, we show neither true nor false.
<VSCodeCheckbox> has this too, and we use the same sort of styling (rounded rectangle inside)
Reviewed By: muirdm
Differential Revision: D56526950
fbshipit-source-id: e2e3ab28b72d6e199c6f13ba3c5fd4d7a030cd84
Summary: This lets you give more description for elements
Reviewed By: muirdm
Differential Revision: D56499710
fbshipit-source-id: e6c228d243df70fc0d377c55b39965d2b30dac4e
Summary: Allow specifying a testid for ButtonDropdown, for use in tests
Reviewed By: quark-zju
Differential Revision: D56599851
fbshipit-source-id: fb425b351706a7a7347e83b6eddb23b2c099dc01
Summary: Add styles for `kind='icon'` for `<ButtonDropdown>`. This styles it like a `<Button icon>`. We previously didn't support this because we added it before we had the border around icon buttons. Now it fits much better. This lets us do more subtle dropdown selectors.
Reviewed By: muirdm
Differential Revision: D56496853
fbshipit-source-id: 72433d4bd774536142b0739ede1bb44c2f1cc488
Summary: Move this file to components and rename it for consistency
Reviewed By: muirdm
Differential Revision: D56494154
fbshipit-source-id: fda53c8d31113c79a7669e325cf4768665657944
Summary: Give folly depends on and picks up libdwarf, add a manifest for libdwarf to make it explicit and stop it being found via other means
Reviewed By: markbt
Differential Revision: D56630711
fbshipit-source-id: 7b9386b4b93788e7efda13e51e35c9fec4fd6df2
Summary:
Before this diff, no changeset id was logged to scuba.
This can be useful information to avoid having to jump around between the bookmark update log and the mononoke_xrepo_backsync scuba table.
Log these fields after backsync if they are present.
Reviewed By: mitrandir77, singhsrb
Differential Revision: D56628219
fbshipit-source-id: 6a139ddd7e4a43f06ad02dbb1019cdc98b10c653
Summary: Seems like there are a couple of bugs in these two commands, so let's add some examples of where they fail so that we can fix them later.
Reviewed By: muirdm
Differential Revision: D56598269
fbshipit-source-id: 64fe4ee2a669745e054bd4777a8116b53fb3f044
Summary: This adds support for "RemoveSmallestPrefix" substitutions in the debugruntest bash interpreter, allowing it to process arguments like `${parameter#somepattern}`. This will later be used in D56220002
Reviewed By: zzl0
Differential Revision: D56493927
fbshipit-source-id: db0b3d9f277811b5a33bc83d0d39c08b612ad701
Summary:
One of the initial reasons for us to enabling EdenFS on .t tests was to test
differing behavior between EdenFS and non-EdenFS on various commands at the
same time. The `goto` command is known for having differences between those
two, so let's actually test this. This test in particular also has the
advantage of using the "proper" way of initializing and conducting tests
(i.e., using `modernclient` and `newclientrepo`), which also makes it a
good candidate for this.
Enabling EdenFS on this test already surfaced some differences, which will
be fixed later.
Reviewed By: muirdm
Differential Revision: D56220001
fbshipit-source-id: a5d36881c9d15ea5b52c9d2820f01f4796b3b2bc
Summary:
On D56220001 EdenFS will be enabled for one of our `sl goto` tests. On EdenFS we
usually don't output the number of files that have been updated, and this is
expected behavior. This diff will help us to not having to add a special case
for EdenFS on each case.
Reviewed By: quark-zju
Differential Revision: D56382866
fbshipit-source-id: 0f51f7514918b3c983a5622f63f33b0153713947
Summary: In some cases, such as when comparing EdenFS test output we need to add a few exceptions. This diff should be useful for that kind of cases
Reviewed By: quark-zju
Differential Revision: D56580976
fbshipit-source-id: a6f392cf94e0c61ac6002d2c43bdfebbb6bd5b2d
Summary: We want to create a new version of `GitDeltaManifest` that uses git's diff algorithm to generate deltas, and we need to be able to use it alongside the current version. In order to do this, this diff creates traits that encapsulate what is needed out of `GitDeltaManifest` and makes the packfile generation code generic over them. This diff also implements a `fetch_git_delta_manifest` method to get whatever `GitDeltaManifest` version is configured in derived data types repo config.
Reviewed By: markbt
Differential Revision: D56578016
fbshipit-source-id: a6bf23836ebe81c421e99cb44b0b652aa74c5394
Summary:
introduce augmented manifests types (storage layer).
Background:
**Augmented Manifest** is our new data structure represented familiar tree manifest with **two** pointers: traditional mercurial hgid and a newly introduced content-addressed blake3 pointer that would be a hash of child entry serialised with a **custom serialisation format**. We also include size of that serialised blob to form a Digest compatible with CAS.
The new data structure will allow storing Source Control data in CAS, and provide efficient way for Eden to fetch AUX data together with trees, replacing the current slow and inefficient implementation, that triggers fetching lots of blobs (per leaf file entry).
The new format also supports sharing from the beginning, that is important for Mononoke performance for large manifests.
The HgAugmentedManifestEnvelope is the type internal to Mononoke for storing.
Reviewed By: markbt
Differential Revision: D55635473
fbshipit-source-id: 39d2adf1874512d3ed42b0e6d2e1cb785246b493
Summary:
Every (default) 5 minutes, we will now only reload the Repo if the on-disk sapling config files have changed since last time we checked. We check for mtime/size difference, and missing/added files. Everything is "best effort" (i.e. low effort) - we don't handle errors, and there are some minor race conditions where we could miss a config update.
Previously we always reloaded the sapling Repo every 5 minutes, but this could theoretically interact badly with kernel caches (wrt the sapling cache's huge mmaped files), or have other unwanted side effects.
Reviewed By: zzl0
Differential Revision: D56501713
fbshipit-source-id: 9d7d21844422226f70afb8fb974660713fd88303
Summary: Add config loading entry point embedded_load() for callers like EdenFS. EdenFS's embedded Sapling version string will not match the system sl version string, so we set the minimize_dynamic_gen so we don't have dynamic config flapping between EdenFS and sl.
Reviewed By: zzl0
Differential Revision: D56546444
fbshipit-source-id: a7b48173e05a8c31abe2d5072ef21c8ab41bec2a
Summary:
In addition to the paths, also record the content hash of each underlying config file.
I want to use a content hash so I don't have to use mtime and file size to infer changes. mtime in particular doesn't work because we intentionally update hgrc.dynamic's mtime without changing its contents.
Also, recording the content hash during config loading is the only good place to do it (if you check it later you are open to race conditions).
Reviewed By: zzl0
Differential Revision: D56546445
fbshipit-source-id: c6afe747825e7fb3bc2104693e9bfb0b76efff45