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
Summary:
This removes the historical check in our Mercurial codebase that
disallows underscores in names (modulo a substantial allowlist).
Incidentally, upstream Mercurial also relaxed this restriction in Oct 2019:
https://phab.mercurial-scm.org/D2010 (40bbe7b4da).
Note it is neither the goal nor the expectation that we start going around
renaming existing members to include underscores. We expect files to
maintain internal consistency, at least as far as their API names are
concerned. Inevitably, code authored under the old convention may
call into other APIs that favor underscores (and vice versa) such that
we cannot demand 100% consistency within a file.
Reviewed By: quark-zju
Differential Revision: D35597630
fbshipit-source-id: 5e3c02ec2e5810aa58123b5e75b59241a4a1bdbb
Summary:
Version 2 profiles are only respected when they are included by the
top-level sparse config. Instead of loading top-level config, debugsparsematch
and debugsparseexplain were loading the profile directly. This meant they didn't
see the version 2 metadata.
Let's fix it by loading a fake top-level config that simply includes the profile
in question. This matches the production behavior of how sparse profiles are
loaded anyway.
Reviewed By: StanislavGlebik
Differential Revision: D35592415
fbshipit-source-id: 71c1df08ce62ed2aba198940e7cb396e7cc5c96d
Summary:
When processing v2 profiles, the root config (i.e. .hg/sparse) is
special in that any v2 profile it loads will be unioned together. To do this, we
need to mark the root profile as isroot. Unfortunately, any command that
manually loaded a sparse profile directly, bypassed the isroot setting. This
meant loading v2 profiles was incorrect for debug commands.
Let's always set isroot for initially loaded configs. This means we should never
call getsparsepatterns with a sparse profile directly. Instead we should call it
with a .hg/sparse equivalent (like a string "%include $sparse_profile"). The
next diff will update some callsites to do this.
Reviewed By: StanislavGlebik
Differential Revision: D35594323
fbshipit-source-id: 8755d92b4fba49a0a27ae1e6298102f5b33b02be
Summary: Chunk by public node types param has only a subset of `NodeType` as possible values. This diff declares `ChunkByPublicArg` enum to represent these variants.
Reviewed By: markbt
Differential Revision: D35532343
fbshipit-source-id: 9177a1767840c50a32a9f8387ad1ff54dc522b6f
Summary: Interned type params allow to pass `all` as one of the possible values. This diff declares `InternedTypeArg` that represent enum with all the possible values.
Reviewed By: markbt
Differential Revision: D35503706
fbshipit-source-id: 29e51d2601dd0306ef6456d88b611e11f656a9df
Summary: Declare `HashValidationArg` that represents specific possible values for the hash validation params.
Reviewed By: yancouto
Differential Revision: D35503707
fbshipit-source-id: da6890ca0905eae810b97827e47d26db5cfe8b1c