Summary: Makes it explicitly mention that `sort` method sorts the set in topo descending order, this is different than the `sort` function in revset, which sort the set in ascending order by default.
Reviewed By: quark-zju
Differential Revision: D44728173
fbshipit-source-id: aa95993b237ebacc587147da9caccdf43ff48b80
Summary: Add test utilities for testing copy trace logic, also added a simple test case as an example.
Reviewed By: quark-zju
Differential Revision: D44559585
fbshipit-source-id: b03796fa3869d94edc528d570d511b1d84b15861
Summary:
add vertex_fn parameter to ImportAscii trait, so that we can control
how to generate Vertex from a string: for example HgId expects 20-bytes vertex.
Reviewed By: quark-zju
Differential Revision: D44739947
fbshipit-source-id: c82c95ce4d6c45562c32ad4ccc3e5b40fd517770
Summary:
Commit messages may be very long in the sidebar. This pushes useful info like files changed to an unreasonably far scrolling distance.
Instead, we can show the first bit of each field, and truncate it if it's too long. Then we add a "see more" button which uncollapses the rest of the field.
This requires us to measure the rendered height of the content we're hiding, and determining if we should show the "see more" button or not. It's always slightly annoying to have to deal with measuring DOM heights, here we have to do one extra trick to our useLayoutEffect to ensure we rerender often enough. Otherwise the UI may be too long and get truncated without rendering the "see more" button, which is confusing.
Reviewed By: zzl0
Differential Revision: D44734415
fbshipit-source-id: 06d821ae68fc7d04e00ab4071adf7da2b916beb2
Summary:
Now that we're moving towards dynamic commit message field configs, we should make it easier to define. The "key" value we had here was purely for convenience in typescript, so we could use things like `commitMessageFields.testPlan`. However, since this is dynamic, we can't really do this anyway, so it makes more sense to just unify everything to use the same label value.
So, if we parse a commit message like:
```
my commit
Summary: my summary!
Test Plan: my test plan!
```
Then we would extract this into an object like:
```
{
"Title": "my commit",
"Summary": "my summary!",
"Test Plan": "my test plan!",
}
```
This makes the field config simpler to define.
We may need to add a new field back into this config, which allows for display-only names, which may be useful internally (e.g. we could show "Diff" instead of "Differential Revision").
Reviewed By: muirdm
Differential Revision: D44689896
fbshipit-source-id: c95afd83e06f444cd735302524b589f3cba6a305
Summary:
The field config schema defines which fields we expect in commit messages in this repo, and how the user should interact with them.
Previously, we had the field config schema defined as a global constant, overwritten for internal builds.
instead, we want this to be a fully dynamic value, which could be set by an sl config. This allows repos to configure their own commit message field formats, in case you want to always have a summary/test plan/fixes PR #xyz, etc.
Making this get set in recoil means we can dynamically update this schema and use it for rendering.
Reviewed By: muirdm
Differential Revision: D44688584
fbshipit-source-id: 286b52990266848fce752d980a2849b7fffc60e4
Summary:
like the previous diff, but for parsing from string into commitMessageFields instead of converting into a string.
This uses the logic we use internally (adapted slightly for generality). Again, this is overkill for OSS, where we just take the entire description. Eventually, this will be possibly useful in OSS where you might set this via config.
Reviewed By: muirdm
Differential Revision: D44688587
fbshipit-source-id: 4b4f178283732bf94c137f7ed58c7d8bfaaf027a
Summary: Continue refactoring as in previous diff, now for conversion from commitMessageFields back into a string. This is much more complicated than necessary for OSS right now, because OSS only uses the title and entire description. But soon we'll support arbitrary fields for OSS too, so they'll need this as well.
Reviewed By: muirdm
Differential Revision: D44688586
fbshipit-source-id: e33b4d10e972d556cdc531504b4d66ee36c471c9
Summary: Continue refactoring as in previous diff, now for the various fieldsBeingEdited utils.
Reviewed By: muirdm
Differential Revision: D44688582
fbshipit-source-id: 9f870cfb57d3460f2d469ef929fb077d5ff8deff
Summary:
Context:
Start a set of incremental refactors which will make the CommitMessageFieldsUtils type only contain the field schema, and no other utils. From there, we'll make that field config a recoil atom so it can be determiend completely dynamically by the server / sl config.
This is part 1, where we make `emptyCommitMessageFields` not part of the utils object, and instead just a util function which takes in the config.
Reviewed By: muirdm
Differential Revision: D44688585
fbshipit-source-id: d9ed56fa0975514452ff547bdea58aaaed120653
Summary:
Previous diffs made the types for commit message fields be generic and statically typed, differing between internal and external. We're instead going to go for a completely dynamic field config determined by sl config. This means we should make these types not statically known at all. This diff is the first step in doing this.
Next, we can remove the internal only implementations of utils and make the field config be returned by the server.
Reviewed By: muirdm
Differential Revision: D44688588
fbshipit-source-id: e63d6343596e48a0563975763c438e45d615f5b4
Summary:
After splitting the commit info view into fields, it broke a lot of tests. We need to go fix some of our test utils and some tests themselves.
These tests were extremely useful, I caught at least 5 bugs I hadn't noticed thanks to them, noticeably around edge cases like focus and optimistic state.
Reviewed By: muirdm
Differential Revision: D44648335
fbshipit-source-id: f4e222480f7fba12a55b2f7f6287f3114be73b03
Summary:
After the last diff added fields to the commit info view, there were many bugs remaining, most of which I found while fixing unit tests.
One such bug was that we lost our autofocus behavior which was both now missing and would have been incorrect even if it was kept.
The old behavior focused the description if the title wasn't being edited, and focused the title otherwise.
Instead, we need to go through fields one-by-one down in order until we find one that's being edited. Only that field should be focused.
Reviewed By: muirdm
Differential Revision: D44648086
fbshipit-source-id: 1117cff205f2ab65cdc3a8e9157a8a8f929ca484
Summary:
Change commit info view to render individual fields rather than just one big text box.
Well, at least internally there are differnet fields. In OSS, we don't know what format to use so its still just one big text box.
The idea is that we have a config that defines what fields there are, and what kind. Some are expandable text areas for lots of text, others are one-line fields which will need tokenization and autocomplete etc.
With the fields config, we can render a generic `<CommitInfoViewField>` for each which handles all cases.
Most of the heavy lifting is done by the CommitMessageFieldsUtils (which differs between internal and OSS).
The bulk of this diff is migrating things that previously hardcoded `'title'` and `'description'` fields to now use arbitrary fields.
Note that the design is not final in this diff. This is just rough draft to get something resembling fields. We'll probably do some work to better handle fields with lots of content and better information density for other fields, etc.
{F929608384}
Reviewed By: muirdm
Differential Revision: D44598445
fbshipit-source-id: 195dcc81d7cd6779fd47aa140e6d0c0e94493c48
Summary: In preparation for adding fields to the commit info view, define how internally/externally we define and parse commit message fields.
Reviewed By: muirdm
Differential Revision: D44597627
fbshipit-source-id: f20b6936bff2ea782a3ebb25e1437c61cbad68db
Summary:
Even though we only need the Enumeration in the future's callback, if we don't
move the Enumerator it can get dereferenced while we're awaiting the future
returned by prepareEnumeration().
Reviewed By: xavierd
Differential Revision: D44770398
fbshipit-source-id: a9fc91c0766b4a9f43f566887d714cbde66b1cf3
Summary:
This allows errors to be caught and raised as well as getting file sizes bigger
than off_t which is 32-bits on Windows.
Reviewed By: chadaustin
Differential Revision: D44737139
fbshipit-source-id: 16b00c7f436da361b41ffbe8074958519e9bfc81
Summary:
When the FileInode is materialized, the NonMaterializedState is entirely unused
but still consume memory. On Windows, we've seen cases where the working copy
contains 100k modified files leading to diff taking a really long time due to
EdenFS spending most of its time computing the sha1 of materialized files,
since these are not cached, this computation would be done repeatadly.
For now, this merely creates the scaffolding to enable this caching, future
diffs will move the sha1 and sizes currently stored in the Linux/macOS
OverlayFileAccess in the MaterializedState and care will be taken to invalidate
these on materialization/writes.
For now I've gone with a `union` approach as the existing `Tag` is sufficient
to know which branch of the `union` should be looked at. This is however
potentially error prone, reviewers' opinion on whether I should revamp this and
switch to a `std::variant` would be very welcome.
Reviewed By: chadaustin
Differential Revision: D44652779
fbshipit-source-id: e769f4cc0cd7e8eea0c4cde863cd37f4ceadb01f
Summary:
Tweak revlog commit import to maintain a stable order (this broke after recent change to top sort the commits).
Unfortunately the new stable order is inconsistent w/ fullsegments output in test-eager-exchange.t, so separate the tests.
Reviewed By: quark-zju
Differential Revision: D44768930
fbshipit-source-id: 6757450d7d446373d1b8c943d6cbcc6029b07443
Summary:
This works better with Git. The old filenode-based logic does not seem correct
since it might not trigger adjustlinkrev.
Reviewed By: zzl0
Differential Revision: D44751613
fbshipit-source-id: e5a2367e544f1d55c6a2c149fd33db13af623e46
Summary:
There is a collision between Blob and BlobMetadata ObjectId causing crashes in
EdenFS. To avoid these collision, let's just split the request tracker. Kudos
to chadaustin for finding the root cause of the crashes.
Reviewed By: chadaustin
Differential Revision: D44728974
fbshipit-source-id: 52bbc3f5317342ed975507f0a431bf4d3f712d8b
Summary:
return usage of commit graph for revlog clones
Disabling is no longer needed after D44734552
Reviewed By: quark-zju
Differential Revision: D44760863
fbshipit-source-id: 0ba65f63bf8c980fc0ab9b0dce1ec895f6b5f10d
Summary:
I'm getting nfs to run on windows to prototype it and see how feasible it
might be as an option on Windows. PrjFS has a very different model than EdenFS,
and that has made EdenFS correctness on Windows very difficult. NFS may be
easier to get correct, though the performance is suspect. Just exploring
options here.
After this change theoretically we should be able to mount an NFS repo.
This isn't totally true, because I cannot get the Windows NFS client to point
at a specific port, so some port mapper changes are probably going to be needed
before that really works.
NOTE: this one is more than removing ifdefs, please review carefully
Reviewed By: xavierd
Differential Revision: D44155041
fbshipit-source-id: ae424a01dc2073138070253d80e3d101863840fd
Summary:
I'm getting nfs to run on windows to prototype it and see how feasible it
might be as an option on Windows. PrjFS has a very different model than EdenFS,
and that has made EdenFS correctness on Windows very difficult. NFS may be
easier to get correct, though the performance is suspect. Just exploring
options here.
After this change the NFS Server opens a socket to accept incoming connections!
Reviewed By: xavierd
Differential Revision: D44154505
fbshipit-source-id: 10c679cb390c2bab99591656d6fe96ccdf4443fe
Summary:
I'm getting nfs to build on windows to prototype it and see how feasible it
might be as an option on Windows. PrjFS has a very different model than EdenFS,
and that has made EdenFS correctness on Windows very difficult. NFS may be
easier to get correct, though the performance is suspect. Just exploring
options here.
After this change NFS builds on Windows!
NOTE: this one is more than removing ifdefs, probably the most non trivial in the stack, please review carefully
Reviewed By: xavierd
Differential Revision: D44153443
fbshipit-source-id: b07e19f8bde1aa455eec97647ea450849133041f
Summary: Version bump and chagnelog entry for new OSS vscode extension release
Reviewed By: zzl0
Differential Revision: D44726134
fbshipit-source-id: aed6bf966367ed01204099c7bdf297034f622887
Summary: Sometimes it's desirable to set the value for a by-repo tunable for all repos (e.g. to roll out a change everywhere after testing on some of the largest repos, or to quickly roll back) or to specify a default value, and right now the only two ways of doing this is either to specify the value for every single repo separately, or to have another non-by-repo tuanble that overrides it. Instead let's have two special keys: ":override:" and ":default:", so whenever we try to lookup a by-repo tunable we first check if it's set for ":override:" and use its value if so, otherwise we lookup the repo specific value, otherwise we lookup the value for ":default:".
Reviewed By: markbt, RajivTS
Differential Revision: D44750394
fbshipit-source-id: d8fe074ec700f69e52129dfa7de87b7972d11012
Summary:
This continues my slashing of fetch retries. This diff is -1 fetch retry.
DatapackStore::getTree is not a local only tree access. It may fallback to
fetching from edenAPI.
DatapackStore::getTree is used in the hg importer fallback code path for when
normal edenAPI rust binding fetching fails. It's unnessecary to be doing this
extra network fetch here, because we only want one edenAPI attempt and then to
fall back to the importer.
If I had to guess why this is here:
IIRC this method use to be a local only access to the hgcache. That seems to
line up with the logging comments around this fetch. So I think when the
datapack store gained remote fetching capabilities this one just wasn't changed.
With this change we are now down to what looks like 5 network fetch attempts.
Reviewed By: xavierd
Differential Revision: D44523824
fbshipit-source-id: f5e784660b396ad3a8f1e7effcd7551c3b126521
Summary:
We use React Testing Library for testing our UI states, which is mostly awesome. Sometimes it's annoying if a lot of tests fail, because it spews out the entire DOM that doesn't match a particular selector. If more than 1-2 tests fail, then the test output is truncated and you can't see which tests in particular failed.
There's a way to configure the error messages, which lets you remove this extra context. Here I set this config when an env var is set, so that you can run `HIDE_RTL_DOM_ERRORS=1 yarn test` and get more readable output
Reviewed By: zzl0
Differential Revision: D44725386
fbshipit-source-id: 6f62739f9bfa7417361cc00aa421010e715062bf
Summary: I noticed our CI job that runs `verify-addons-folder` was somewhat flakey, always on the comparison view test. It was timing out when waiting for the comparison view to load and send a diff fetch request to the server. I think this is because of dynamic importing of the comparison view javascript, which seemingly takes time on the CI machines. So just bumping the timeout on this `waitFor` assertion to reduce flakiness.
Reviewed By: zzl0
Differential Revision: D44727954
fbshipit-source-id: de09a8f1e8a186d42a32b903bfa1dab0b1921241
Summary:
intro high level transaction for cloud sync
this is for syncs that are not running with best effort option
the transaction is needed to eliminate repo changed while backing up errors
this is a follow up after https://www.internalfb.com/diff/D41871718 that hasn't resolved the errors fully
Reviewed By: markbt
Differential Revision: D44664729
fbshipit-source-id: da411cd20fb909c22ff8976dd31bd46034a28226
Summary:
In certain edge cases, during pull we are using EdenAPI to fetch nodes and feeding them into a revlog changelog (via doublewrite). This was erroring out since the RevlogCommits.add_commits expected nodes to be sorted parent-before-child. Work around by sorting the nodes.
[MSDK] Update icsp_domain_config_type_linter component on ICSP:master
```
Reviewed By: quark-zju
Differential Revision: D44734552
fbshipit-source-id: 7f00a93b93921baa827a55c7c1ec9388b74ac0f7