Summary: It's worth making backing repos easier to find. This should help us remove hardcoded paths from our wikis/reclone instructions. This should also make it easier for users who use custom backing repos to find their backing repo location if they ever forget.
Reviewed By: chadaustin
Differential Revision: D40455968
fbshipit-source-id: 107b7325ff64015b814c4c30680f982a3518de56
Summary: This is the latest version number [on crates](https://crates.io/crates/fbinit_macros/0.1.2).
Reviewed By: jsgf
Differential Revision: D40536148
fbshipit-source-id: 86fc58f09cdb716e2aed8571a8ddee65f5dfc844
Summary:
The case sensitive change broke a number of other tests. This wasn't
caught earlier because it only happens on OSX.
Reviewed By: muirdm
Differential Revision: D40557023
fbshipit-source-id: aae6564f355b6370a37ee0e3eaf098115c079d87
Summary:
The Rust watchman code was flushing the dirstate after every status.
This is excessive and causes things like VS Code to trigger, which then run hg
status, and forms an infinite loop.
To fix it, we A) only flush if the treestate is dirty, and B) don't mark things
as needs_check which are already needs_check.
Reviewed By: muirdm
Differential Revision: D40532717
fbshipit-source-id: 95b07c1b8feb86af4c7556394992d255bfb553ff
Summary:
In a later diff we'll want to detect if the TreeState has pending
changes, so we can avoid flushing if it doesn't. We need a dirty-bit on the root
object so we can tell if it's been modified.
Reviewed By: muirdm
Differential Revision: D40532718
fbshipit-source-id: e0bf980bd045093db551928008a3156f68fca3ac
Summary: To facilitate the split of the `IOverlay` class, split the `removeOverlayData` function into `removeOverlayFile` and `removeOverlayDir`
Reviewed By: chadaustin
Differential Revision: D40529005
fbshipit-source-id: 32a7a397aa3b97a8949f337b5afecdca1b500d67
Summary: To facilitate the split of the `IOverlay` class, split the `hasOverlayData` function into `hasOverlayFile` and `hasOverlayDir`
Reviewed By: chadaustin
Differential Revision: D40526835
fbshipit-source-id: 5b075c3103e5ae3d1f1df32edb1384621bac35bd
Summary:
backfill_mapping command in Mononoke was using an old version of clap.
In this Diff I am switching the command to use clap3. Options for this command are now defined using `derive`.
By re-using **RepoArgs** and **EnvironmentArgs** from `mononoke_app` we have introduced slight changes in the parameters the most important being `repo-id`, previous option was `--repo_id` and current is `--repo-id`.
New `--help` output can be found here: https://www.internalfb.com/phabricator/paste/view/P539779098
Old `--help` output can be found here: https://www.internalfb.com/phabricator/paste/view/P539774336
Reviewed By: mitrandir77
Differential Revision: D40440025
fbshipit-source-id: c0070bd7cc78eca2e42b2fb84327a499cfe9131e
Summary:
The git objects assume everything coming in is a hash. The context.py
code however occasionally produced -1 (i.e. the nullrev). This caused crashes in
some circumstances. This diff fixes it by removing nullrev from context.py
Reviewed By: quark-zju
Differential Revision: D40517513
fbshipit-source-id: bcabca05be9ba43ab1f095903ca86fa8c938927f
Summary:
This extension is on the permanent naughty list, so let's clean up it's traces.
I came across this when I was looking for stuff to remove from the opensource static config.
Reviewed By: quark-zju
Differential Revision: D40474870
fbshipit-source-id: 9c8a618e3c6ab3ae17dc37ad1aa9700be4800150
Summary:
We no longer need a local patch to RocksDB now that it has been merged
into upstream rocksdb.
#forceTDhashing
Reviewed By: xavierd
Differential Revision: D40522069
fbshipit-source-id: 68ffa62b59a71343ea2555960046b6cac93f65c8
Summary: An upcoming `bindgen` upgrade requires a newer version of syn than what is currently in fbsource, so get this out of the way since it is a relatively larger commit.
Reviewed By: zertosh
Differential Revision: D40539092
fbshipit-source-id: de891f3662057ea6c136f3f1eb216be4618db62e
Summary: Restore the env var check that avoids loading the real user config when HGRCPATH is set. I accidentally removed this in D40449283 (1cdbde8b5b) somehow.
Reviewed By: DurhamG, zzl0
Differential Revision: D40514299
fbshipit-source-id: a6628f9624cafaf71318eb9199511a989ff7ec28
Summary:
I can't easily reproduce the failure case, but D39900481 (29d29e0f14) caused early
stats() during doctor and mount that don't handle the case that a
broken EdenFS mount underlies where want to place a new one.
We don't care about sniffing the .hg directory, so lazily search for
it.
Reviewed By: muirdm
Differential Revision: D40530670
fbshipit-source-id: 0b10eb0778575f1e69a998d3fcb84866dd383229
Summary: if the mount is busy when we run `sudo umount`, users will need to pass the lazy flag as well. Let's suggest it by default since it doesn't hurt
Reviewed By: genevievehelsel
Differential Revision: D40477030
fbshipit-source-id: 03539cd0418232c92942359435cfc5497355800f
Summary: I'd like to get rid of the old backing repo location entirely (to simplify code and documentation). Let's use the "new" location in our test EdenInstance.
Reviewed By: chadaustin
Differential Revision: D40407306
fbshipit-source-id: 674914b54bde22e6175324e3950d64b3c262e365
Summary:
Users have noticed that commands like `eden redirect del` and `eden redirect fixup` are failing because buck is holding references to files underneath the failed-to-be-removed redirection.
This diff should prevent these failures by killing all buck daemons that could be holding references to files underneath the redirection.
Reviewed By: fanzeyi
Differential Revision: D40353668
fbshipit-source-id: d9ddfe93aec27298f7f4b047dfa62fff9ce0c09b
Summary: The current way we find and kill running buck instances when running `redirect fixup` is incorrect. This diff adds the correct way to find/kill running buck instances for Meta specific projects.
Reviewed By: genevievehelsel
Differential Revision: D40353226
fbshipit-source-id: 3f043a7b3277c4305a9750cc622bb541bea89c63
Summary:
When Eden kills Buck programmatically (for redirect subcommands and eden rm), we set a number of environment variables to ensure Buck functions correctly. One of the environment variables we set is BUCKVERSION. We set this env var to "last" in order to avoid downloading new versions of Buck when we're simply trying to kill buck in the first place.
This environment variable has started causing issues for stale repos. A stale repo is any repository that's checked out to a commit that's sufficiently old (we currently don't know what age this is, but typically 4-5 day-old commits seems to trigger the issue).
We should stop using this environment variable until we figure out a workaround or a fix for Buck
Reviewed By: mshroyer
Differential Revision: D40517904
fbshipit-source-id: 419d09814dc315ec79410cafebbb50b172992fd9
Summary: This release makes async trait methods work better with rust-analyzer's "go to definition" and other IDE functionality.
Reviewed By: zertosh
Differential Revision: D40532047
fbshipit-source-id: 1871d1819ebe1aab0846b0135f051c45e6e8821b
Summary:
We can use C++17 and operator""sv replaces the need for `literal` in
GlobMatcherTest.cpp.
Reviewed By: genevievehelsel
Differential Revision: D40108769
fbshipit-source-id: dcce96fd76cff212d93d175ee69e44f9b098ae8a
Summary: This was hiding a double-`Arc`.
Reviewed By: quark-zju
Differential Revision: D40357644
fbshipit-source-id: a2d63d3367a6a2aec4354e3fe9ccb867dbcac11f
Summary:
These mappings are nearly always stored as `Arc<dyn Mapping>`, so we can remove
the generics and switch to always expecting dynamic dispatch.
The generic versions of `MemWrites` and `Caching` mappings can be converted to
always expecting `Arc<dyn Mapping>` as the inner mapping (in practice they
always got this except in some unit tests).
The cache implementations no longer need to be generic over the inner cache type.
We can remove `Clone` from the mappings themselves to ensure we only ever clone
the `Arc`.
Differential Revision: D40357649
fbshipit-source-id: 988f96d9b68e827a4afedfeb785c9731783cc6b6
Summary:
Everywhere an `AclProvider` implementation is used, it is as an `Arc<dyn
AclProvider>`. This means making these methods generic in terms of `impl
AclProvider` is pointless, as we can more simply accept `&dyn AclProvider` and
avoid the compile-time overhead.
Reviewed By: yancouto
Differential Revision: D40357645
fbshipit-source-id: 004eaaf7b2f69c262074e706f38453a05e782fc6
Summary:
Remove `auto-impl` where it is not necessary. Add documentation for cases
where it's known to be necessary for valid reasons.
Reviewed By: quark-zju
Differential Revision: D40357646
fbshipit-source-id: d37c8ae36c1034bbb3e646d278b54c84d183ed58
Summary: That facet was created prior any of repo_attributes, since now it's a default location for the facets, lets move it there
Reviewed By: yancouto
Differential Revision: D40382977
fbshipit-source-id: 856195c25472ca1d2080a605e091ecf754768b6c
Summary: add normalize_patterns util, which will be used by build_matcher function.
Reviewed By: quark-zju
Differential Revision: D39893862
fbshipit-source-id: 02b43298c0830ce828d7ba99003cab0dddaa5b7f
Summary:
Add new "--user" flag to replace "--edit". "--user" edits the user config, analagous to "--local" and "--system".
"--edit" is still allowed for backwards comapt.
Also, rename "--global" to "--system". "--global" is still allowed for backwards compat.
Reviewed By: bolinfest
Differential Revision: D40321860
fbshipit-source-id: 5858e7a75f40ce233a8f944c67f9c4ff04f139e5
Summary: This diff adds the `MononokeConfigs` struct which would then be used later to implement the hot-reloading functionality with `MononokeApp`
Reviewed By: markbt
Differential Revision: D40244649
fbshipit-source-id: fde03a83d86780201a7171399495cd52a24af163
Summary:
`Megarepo API` defines a state struct for holding configs, factories and few other constructed traits (e.g. mutable renames, blobstore, etc.). This results in wasted runtime costs (and also duplicated code) since the service constructs traits like `RepoBlobstore` or `MutableRenames` out of these configs and factories at runtime even though the same is already present under `MononokeRepos<Repo>`. Additionally it makes it impossible to update the configurations through hot-reloading if services keep their own copy of the configs.
Now that facets are in place, we can leverage the facetized `Repos` under `MononokeRepos` to prevent re-initialization of `MutableRenames` and `RepoBlobstore` on every request. Additionally, this also allows us to get rid of caching logic built on top of that. Note that `MegarepoMapping` and `AsyncMethodRequestQueue` structs are still constructed by `Megarepo API` since these are not facets and are Megarepo specific entities.
The references to direct configs and factories have been removed. These are now exposed via `MononokeApp` and thus implementing hot-reloading in `MononokeApp` will ensure that `Megarepo API` gets the latest configuration.
Reviewed By: markbt
Differential Revision: D40124095
fbshipit-source-id: a60ecdea1d5d3d81cb84ad5a77fb3e24600e7988
Summary: We've fixed various issues, so more of these tests are now passing.
Reviewed By: quark-zju
Differential Revision: D40487597
fbshipit-source-id: 995e6fa2844bf6d394925f4322a225f7635436aa