Summary: Eden's `getEntryInformation` API currently loads Inodes for all paths queried, force-materializing the path component's Inodes. This often isn't required, and eden could be fetching non-loaded data from the object store instead.
Reviewed By: chadaustin
Differential Revision: D35372760
fbshipit-source-id: e31a450a20b09249f03339dcd1aeca2eb363046e
Summary: There's no need to materialized iNodes to request the content Sha1 and/or BlobMetadata, as that can be fetched from the objectStore.
Reviewed By: chadaustin, xavierd
Differential Revision: D35467564
fbshipit-source-id: 2848f4d21725a9f5d40251fde2e0eb29ea81302e
Summary: Instead of stripping anyhow context off all errors, only strip within the concrete error handler "specific_error_handler". This way, the fallback error handler (that produces the beloved RustError) gets the top level error with all the anyhow context.
Reviewed By: DurhamG
Differential Revision: D35602091
fbshipit-source-id: 547ae7e1a2352af74817f90ab08cadb0fce65efc
Summary:
Following diff D35738033 adds another crate and reindeer generates unrelated changes.
Run
```
fbcode/common/rust/tools/reindeer/vendor
```
without any changes.
Reviewed By: dtolnay
Differential Revision: D35738034
fbshipit-source-id: 0539b8abbd694479dbe89939cb8c5ddc6272bd71
Summary: This code has enough risk of a copy paste error that it deserves a unit test.
Reviewed By: chadaustin
Differential Revision: D35161787
fbshipit-source-id: 5691d13a74a0f059dfd6a93ea2852dca8399a165
Summary:
Most hghave checks are "immutable" results. Memorize them to reduce cost.
If some checks depend on actual tests, we can special case them later to
not be memorized.
Reviewed By: DurhamG
Differential Revision: D34725137
fbshipit-source-id: f010bddb856df1950854b839aa8c311c6a40bdbd
Summary:
This allows using the hghave library without shelling out to a `hghave` binary
in tests.
Reviewed By: DurhamG
Differential Revision: D34725136
fbshipit-source-id: 1b8115a791414a68ebd2e7ec077f77bca2a0833a
Summary: `sed 's/a/b'` (and other sed commands) are used frequently in tests. Implement it.
Reviewed By: DurhamG
Differential Revision: D34790212
fbshipit-source-id: 76bfac795e6b14a8d83cbee9fd5c74341112786e
Summary:
`grep` is commonly used. Implement it.
This diff might also serve as an example about how to extend the stdlib.
Reviewed By: LynBusch
Differential Revision: D34725127
fbshipit-source-id: 32ba5cdfc521f538923f05c09c2fa9afb6e88f05
Summary:
To be able to execute .t test without bash, and to be future
proof so tests can use Python more easily instead of bash.
Define a way that supports both classic .t and pure Python
and a mix of them.
See the docstring for details.
Not all `.t` features are handled in this diff.
Namely `#testcases` support is missing.
Reviewed By: LynBusch
Differential Revision: D34725133
fbshipit-source-id: f68c88a2e5c0fa4f3ce3de0b39ff17e11350b1be
Summary:
See the added module docstring for details.
Unlike testutil/dott (D16172901 (27908b883c)), this implementation behaves
much more closely to a real shell thanks to conch-parser.
For reviewers: This is a large change but still relatively
simple compared to other shell implementations. It might be
easier just looking at the tests.
Differential Revision: D34725134
fbshipit-source-id: 1ec54ae2c0146ba2533c16f3fbc27f4275ca80f4
Summary:
This makes it easier to export the AST in other formats (ex. Python objects).
Conflicted names (ex. Parameter::Star vs SimpleWord::Star) are attributed with serde(rename) so they can be distinguished more easily.
Reviewed By: LynBusch
Differential Revision: D34725130
fbshipit-source-id: d91a80cec5b858669f5d16c95aa63046470730e1
Summary: Add TARGETS so it can be used in buck builds.
Reviewed By: yancouto
Differential Revision: D34725122
fbshipit-source-id: 00b958738b05a30a4b9a1470978645b5fad0ad8d
Summary: This makes the code compile with future versions of rustc.
Reviewed By: LynBusch
Differential Revision: D34725123
fbshipit-source-id: ec0d4b0e5fee338487dbb817ac64333a6f7a1040
Summary:
Import https://github.com/ipetkov/conch-parser commit
e1d3ef269684f46c9696bf3f83e81c37e711570d under MIT license.
The conch-parser seems to be a decent shell parser that
solves the shell syntax parsing headache. For example,
it handle heredocs with substitution (`<< EOS`, `$V`
should be substituted) or no-substitution (`<< 'EOS'`,
`$V` or a slash does not have special meaning) properly.
Heredoc is frequently used in our tests. Most other
shell parsing libraries I checked lack proper heredoc
handling, and/or have an incompatible license. Although
it seems some corner cases can be improved, for example,
`A=1 for i in $A; do ...; done` treats `for` as a
normal command instead of a shell loop keyword. But
that does affect the main test use-cases.
In a later diff the library is modified to support serialization.
Given that the public crates.io is too old and the modification
needed, I imported it into edenscm's own vendor directory
for local customization.
Differential Revision: D34725119
fbshipit-source-id: 3e7d3d3d4f92380a0fd104275e75863332b429db
Summary: A script to run the benchmark for ```setPathObjectId```
Reviewed By: chadaustin
Differential Revision: D35271074
fbshipit-source-id: a0f6d9ab1fe6ace929f615a620e2cd4c36fdcc0e
Summary:
Part of T117105786 -- a set of test failures that bisect to {D35558601 (238a176019)}.
D35558601 (238a176019) already made these same changes to eden/hg-server/lib/indexedlog/src/base16.rs and eden/scm/lib/indexedlog/src/base16.rs. I didn't imagine that there would be not 2 but **4** identical copies of this data structure and tests. :O
Reviewed By: zertosh
Differential Revision: D35660712
fbshipit-source-id: b2e624da04eafd1b2f3b13a0219d84645d96fcdd
Summary: Merging a repo that has multiple refs / heads / unmerged branches (relatively to master) can be dangerous. Let's make users aware of that.
Reviewed By: farnz
Differential Revision: D35608687
fbshipit-source-id: a103862ebd89c034cfe23b27606aa558cddb069c
Summary: This part of segmented changelog was never tested and we depend on this behaviour for emergencies. We're going to depend on it even more now that we won't reload the SC every hour.
Reviewed By: yancouto
Differential Revision: D35614793
fbshipit-source-id: cd10deceab7fb1be5a77f26ef904c09ea7562996
Summary:
We should not reload and reset the server-side segmented changelog if the
tailer has not written a new version since we last loaded - instead, we should
keep our existing one in-memory, because it will be more up to date than the
one we load.
In situations when the tailer is not working properly this might mitigate the issue for the customers instead of exposing them to it.
Reviewed By: farnz
Differential Revision: D35408139
fbshipit-source-id: 10d30b6d2d055fc938f9d0f22f3c633f7d7495c2
Summary:
We use completely different codepath for testing, let's go through the same as
we go in prod.
Reviewed By: farnz
Differential Revision: D35408141
fbshipit-source-id: 05f3f026c0c15b7b460c554828089247f8680eaf
Summary:
This makes 'buck build mode/win //eden/scm:hg' work on Windows. The
resulting binary doesn't actually run though, since buck run depends on hg.sh
which doesn't work on Windows. That will need to be converted later.
Reviewed By: quark-zju
Differential Revision: D35133291
fbshipit-source-id: 15070930612b56a381a8c8e311f6eaac3f1d9856
Summary:
This diff makes the manager return the loaded segmented changelog version
which is going to allow us
Reviewed By: farnz
Differential Revision: D35408143
fbshipit-source-id: 748901c992e2e67e561970f836892a13c6d88e27
Summary:
To avoid unnecessary reloads we need a facility to check the latest version (so
we can compare it with one currently loaded)
Reviewed By: farnz
Differential Revision: D35408138
fbshipit-source-id: 14021edda52105fad71ce430feee42bc42659546
Summary: This will allow me to augment it with other stuff.
Reviewed By: yancouto, farnz
Differential Revision: D35408140
fbshipit-source-id: 1096255eabd84c995ba0bb71209eafd3974c0610
Reviewed By: zertosh
Differential Revision:
D35615001
Ninja: need to fix autocargo and oss-eden-darwin-getdeps is taking forever
fbshipit-source-id: 1dfc74532615823be3e4cb39ff82e1f7cc0ea1a6
Summary:
By lifting construction of the BackingStores into main, the core
"service" target no longer needs to depend on their
implementations. This shaves almost 60% off the unit test runtime on
my devserver. The tests could be made even faster by decoupling all of
our core logic from HgBackingStore and friends.
Reviewed By: xavierd
Differential Revision: D34774356
fbshipit-source-id: 87c2d5f44cfd84d6e01bea44dd4105f6415ce162
Summary:
Some backing stores have a 1:1 relationship between blobs and their
IDs. Others don't. If they do, checkout can compare blob contents more
quickly.
In addition, add a config knob that we can use to opt hg into the fast
path, at the risk of correctness. It might be useful for getting out
of sticky situations where any update triggers a ton of fetches.
Reviewed By: xavierd
Differential Revision: D34761024
fbshipit-source-id: 36d513d37c38fc29a708e583ebc2614f07f11bb4
Summary:
We currently have no default. Untracked files can be very large (like binaries and such), and easy to miss. We already had an option for that, but were not using it by default. Should the default be even smaller?
It also didn't work with invalid symlinks, as `Path.stat` tried to follow symlinks, so I fixed that.
If a client really wants to upload a large file, they can specify the command line argument by themselves.
Reviewed By: farnz
Differential Revision: D35498620
fbshipit-source-id: 7c21c779a680fb209b82943ec59aa5523cd1608c
Summary:
This diff imports the most recent version of `schema.docs.graphql`
available on https://docs.github.com/. Details explained in the `README.md`
included in this commit.
Reviewed By: quark-zju
Differential Revision: D35600010
fbshipit-source-id: 52050db604ca884ce7465da58c3ed2aa3fb85dbc
Summary:
Currently unit tests that need a segmented changelog create it separately from the repo because in test repo there is only a `DisabledSegmentedChangelog`. I am making it possible to have an `OnDemandUpdateSegmentedChangelog` that is both useful and can be updated to include needed commits.
Look on new `test_is_ancestor` test to see what is made possible.
Reviewed By: markbt
Differential Revision: D35053513
fbshipit-source-id: 221600b50c8a0140b08f633dc3758489f2524f60
Summary: Segmented Changelog requires `CoreContext` for construction, so we can create a test mock if `TestRepoFactory` has a `FacebookInit`.
Reviewed By: markbt, mitrandir77
Differential Revision: D35251021
fbshipit-source-id: 57051e227804669794f19fc2ca130f52cb938b0c