Summary: In production we do currently see some cases of lfs_read_hash_mismatch. I realized it may be due to missing chunks rather than bad chunk integrity. The new "skip_hash_on_read" path is still able to detect size mismatch, so tweak things to only log mismatch message if the sizes match.
Reviewed By: quark-zju
Differential Revision: D33928640
fbshipit-source-id: 5b63db2b05bc7b53779cdb5ae0041a7d22bb3962
Summary:
## Context
See D33771940
## This diff
I move `pull.httpbookmarks` and `infinitepush.httpbookmarks` to True.
Reviewed By: quark-zju
Differential Revision: D33891956
fbshipit-source-id: cbc3d92aa7ac7ac9edf90b4f99ab9804e9d750be
Summary:
## Context
There are some config options that have been rolled out to 100% of users for some time, but they're still not used in tests by default, which makes our coverage worse.
The best way to change the behaviour of hg regarding config is to change the default value on `configitems.py`, and then (eventually, when this rolls out everywhere), delete them from the configerator overrides config.
The other option would be to leave them in configerator (or in eden/scm/lib/configparser/src/fb/mod.rs), but then they would also need to be replicated in all tests that want to use it, or at the very least duplicated in the base hgrc for integration tests, which is very prone to errors (or simply forgetting to do it, the state we are in today).
Notice that this still allows us to set them to false via configerator quickly, if necessary.
## This diff
This diff defaults `pull.httpmutations` to true: It was previously always set to true on configparser/src/fb/mod.rs
Reviewed By: quark-zju
Differential Revision: D33771940
fbshipit-source-id: 987db9cfaff720645eac4ad65edf560f875b3655
Summary: Delegate to git's own bundle implementation for bundle and unbundle.
Reviewed By: DurhamG
Differential Revision: D33895676
fbshipit-source-id: 3d17160c6f83c2f43ff41bcf3f74c00aecded630
Summary:
The flag is not supported by git older than 2.28. There are still places
running older git. Change the command from `git init -b x` to
`git -c init.defaultBranch=x init` so it becomes compatibile with older
git.
We don't use the default branch. So set it to `_unused_branch` to
make it more explicit.
Reviewed By: DurhamG
Differential Revision: D33851129
fbshipit-source-id: 93534362b02353728d72d0ebef31c6a25737398f
Summary:
With a local git store all trees are local. There is no need to prefetch.
Forcing prefetch trees would cause errors, since the protocol is incompatible.
Reviewed By: DurhamG
Differential Revision: D33837781
fbshipit-source-id: c41281ac96aff1501bd056901213b912a77f6c31
Summary: It is a left-over from D33518822 (b897a19073).
Reviewed By: DurhamG
Differential Revision: D33837780
fbshipit-source-id: f42fb7f9099ab4cb388c7bd8f038839fd6976cbf
Summary:
Previously `clone` has to use git URLs with `git+` prefix in scheme such as
`git+ssh://...`, `git+file://...`, `git+https://...`. That was the same
behavior as the `hg-git` extension but is inconvenient for scp-like URLs
like `git@github.com:git/git.git` (provided by GitHub). That URL needs to be
translated to ssh form `git+ssh://git@github.com/git/git.git` manually,
which can be annoying.
Let's use a `--git` flag so `clone --git` can use the scp-like URL directly.
The `--git` flag also makes `clone` more consistent with `init`.
Reviewed By: DurhamG
Differential Revision: D33837782
fbshipit-source-id: 7fe11be6cf63932bde1f400cdfc2fc8120f5067a
Summary:
Packs are long dead. Let's remove the logging for hg rage. This logic
also doesn't work on Windows, due to depending on cmd commands, resulting in
some errors in the hg rage since we now use powershell.
Differential Revision: D33925868
fbshipit-source-id: c071f8f5685dbf7a9174cad31a0a8cd99a84cf88
Summary: There was an edge case where native checkout "up --clean" wasn't clearing the merge state if the working tree was clean. Add a check so we use fallback non-native code path if there is an active merge state.
Reviewed By: quark-zju
Differential Revision: D33893832
fbshipit-source-id: a0e4a8d23818a1e40582cede0afee62ac53cb680
Summary: Since `Repo` will soon contain more logic on its own not related to `clidispatcher`, we are moving its own crate.
Reviewed By: DurhamG
Differential Revision: D33883867
fbshipit-source-id: 94414e1e2692962bf491cc2abb4e1d3799cbcc03
Summary: Due to a bug in the x2pagent with websocket connection polling in h2 we had to force h1. Now it's fixed and the new version of the agent with the fix should be rolled out to (almost - it's corp) 100% of users.
Reviewed By: quark-zju
Differential Revision: D33842574
fbshipit-source-id: aaf5c66143806a900253120a9f750e37ebe55b80
Summary: On Windows we apparently can't send a USR1 to trigger a trace on an eden helper process. This commit makes it possible to touch a file to trigger a particular long running process to write out its sigtrace.
Reviewed By: DurhamG
Differential Revision: D33904056
fbshipit-source-id: d42f6c071bcfaa8dfc352f65df31bdc5ea201823
Summary: Make "sparse enable" normalize profile names. It is not clear it wants a canonical path from the root of the repo, so now it makes some attempts to convert the given path(s) to that form. It now works with paths relative from cwd, and normalizes the path separator.
Reviewed By: quark-zju
Differential Revision: D33851998
fbshipit-source-id: 91a3d59b91266bb8941408d23d5021fa1f9e7025
Summary:
Point the thrift-types at the rust target, no need for the checked in generated code anymore
Saves generation, gives quicker signal on thrift changes (no codegen step), and stops thrift lib vs generated thrift code mismatches
Reviewed By: yancouto
Differential Revision: D33843588
fbshipit-source-id: 856faeb16dc0a2a42f2f07fd3005079a01b6e7bd
Summary: I moved some stuff around and am having trouble getting everything to be happy. One thing I forgot was to actually pipe the "fb" feature down from the entry point crates (hgcommands and backingstore).
Reviewed By: xavierd
Differential Revision: D33852732
fbshipit-source-id: aabdd145452e66435e130fcbab0ba8a80f9d943a
Summary:
Sometimes kill was exiting with non-zero exit code. Lets make the test machinery kill ncat.
Also during stress runs, we couldn't reuse ports. Let's just randomly allocate them. The test suite does the same thing. but in a different range.
Reviewed By: HarveyHunt
Differential Revision: D33818127
fbshipit-source-id: d875495d590bf8247374ba59396e7032acbdd351
Summary:
Use the _tail() function which can limit size and has some other smarts.
Also, tweak some progress spinner messages to show up better. "collecting information" was too long and you only saw "collecting". The sub-section spinners "collecting {something}" were also too long and you also only saw "collecting".
Reviewed By: quark-zju
Differential Revision: D33830014
fbshipit-source-id: cb3693c7cb52ac2d060a2da400c9f21ba03f9048
Summary:
This gets rid of some config boilerplate and allows for centralized cert checks in the http client object.
I left the subtle cert validation checks as-is. We will revisit these later.
Reviewed By: DurhamG
Differential Revision: D33717226
fbshipit-source-id: e9787f7068e5988b83d7c18b60d15ac6eae3c72c
Summary: This gets rid of some config boilerplate and allows for centralized cert checks in the http client object.
Reviewed By: DurhamG
Differential Revision: D33717225
fbshipit-source-id: c3baf271ac0bc56b1c21eab3fd363bccd7dcff37
Summary: This allows TLS config to flow through the http client object rather than being manually configured by each http user.
Reviewed By: DurhamG
Differential Revision: D33717227
fbshipit-source-id: e8f2a49b81f5d30aaedce3517bad8630fb770dfc
Summary:
Move the remaining hg_http::HgHttpConfig fields into http_client::Config. hg_http::http_config() now can derive these config fields from the hg config.
This change cause HTTP requests via EdenFS to:
1. Support x2pagentd unix socket proxy
2. Set X-Client-Info header
3. Respect the http.verbose hg config item to dump request details
Previously the above config items were only set by hg.
Reviewed By: quark-zju
Differential Revision: D33148772
fbshipit-source-id: 4359399aa2d915a2e833fa9ebf8c8860372f0810
Summary: Don't set the "fb" cargo feature via cmake unless we are in fb build.
Reviewed By: quark-zju
Differential Revision: D33781554
fbshipit-source-id: 39c61dc1631ebfd8a2c858b5e214c6a09ce0b005
Summary: fb303_core is used. fb303 is not, so remove it
Reviewed By: HarveyHunt
Differential Revision: D33815465
fbshipit-source-id: 149ef2cc48e2eed17fc859707300db555ea5b6b4
Summary:
This is especially useful when there is long-running test or a test that's stuck. With this path it will be possible to at least look at logs or configs that are being used in the test environment.
I also considered outputting it by default if isatty() == True, but some folks might not like that and it might be too noisy.
Reviewed By: yancouto
Differential Revision: D33792360
fbshipit-source-id: 5c440c3be63242791d92b0decb523c70f4527ee9
Summary:
Fixes a XXX comment. I think it was there because there is a code path that
incorrectly uses matchfn instead of visitdir for directories. But now tests
are passing. The problematic code path seems to have been resolved by
D17099990 (b7680284ca), which tests `kind == dirkind` and then uses `dirignore` or `ignore`
correctly.
Reviewed By: DurhamG
Differential Revision: D33702579
fbshipit-source-id: a06d6a661a552996d90cbe96dd75cb3d4ec5c4d9
Summary:
Auto pulling commit hashes does not actually work. Fix it and add a test.
Note: This pulls the commit hash as a "draft" if it's based off selected
branches. If we have "public visibleheads" we might use that instead.
Reviewed By: DurhamG
Differential Revision: D33698406
fbshipit-source-id: eac5e4a5536e2c639dee6c7f8b295388b33d26f7
Summary:
The `url` parameter is no longer used since we maintain git remote config in
hgrc and no longer calls `git remote add`.
Reviewed By: DurhamG
Differential Revision: D33698407
fbshipit-source-id: db891b4370d1b5a42783930c5bda540c799f7211
Summary:
It seems there are other tests using `run-tests.py` that do not want the git
env reset behavior. Let's move the env reset logic to a separate optional script.
Reviewed By: DurhamG
Differential Revision: D33752371
fbshipit-source-id: 9465f251ec410595652f1335d1017974876953d7
Summary: This is especially useful when there is long-running test or a test that's stuck. With this path it will be possible to at least look at logs or configs that are being used in the test environment.
Reviewed By: DurhamG
Differential Revision: D33751471
fbshipit-source-id: 6d131266acfef04b0aedad09eae8e5165175705f
Summary: Previously if a removed file was shadowed through a new symlink, addremove would get confused and try to add back the removed file. Fix by "auditing" removed files before we categorize them as "forgotten" (forgotten files are added by addremove).
Reviewed By: DurhamG
Differential Revision: D33748793
fbshipit-source-id: e118baab18b7117d08d87ffb9119530ecdb21acc
Summary:
When a directory is replaced with a file, Mercurial does some extra
checks. Those extra checks invoke merge._filesindirs() which currently iterates
over every file in the manifest.
This diff uses manifest.matches() to do it way faster.
Reviewed By: danielocfb
Differential Revision: D33722132
fbshipit-source-id: 229e0273f07af71728109db132c6ec72d6ac3dd9
Summary:
On Windows we're reconverting certs for every request. Let's cache
them.
I thought about trying to store the cache on the client or something, but it
seemed more straight forward and fairly safe to just have a global cache.
Reviewed By: quark-zju
Differential Revision: D33690775
fbshipit-source-id: d3216f5403ea2912f3e49a37aad154d22922487c
Summary:
There is a name collision `a` vs `A` on OSX. Fix it by reusing the lower-case
name.
Reviewed By: DurhamG
Differential Revision: D33749197
fbshipit-source-id: 27249632f5cc5621b47208ad95c68ca62269be85
Summary: `find` without parameter does not work on osx.
Reviewed By: DurhamG
Differential Revision: D33746542
fbshipit-source-id: 9a3665a9d4b25dfe61e72e61e27de36db8f7691c
Summary: The test was made pass for D33352777 (cf612fcd26) but didn't update for D33518822 (b897a19073).
Reviewed By: DurhamG
Differential Revision: D33746543
fbshipit-source-id: 6e3655a1c1806f6a177b1422b7800f56a5ddac17
Summary:
The message will be repeated for O(tests) times in hgbuild output and makes it
harder to find the actual error message.
Reviewed By: DurhamG
Differential Revision: D33745363
fbshipit-source-id: 67054c9d984c2c07922fc1e82fdec6f55ebf4eb2
Summary:
the mount helper has a security vulnerability on older versions of rust
let's set the minimum version of rust to use
Reviewed By: fanzeyi
Differential Revision: D33721467
fbshipit-source-id: de78ad38d0b70c236c10c83c4a97c08464b97832
Summary: hgmn will connect directly to mononoke by default. There are some cases when it's not possible yet. These tests have `NO_MONONOKE_DIRECT_PEER=1` added and need to be adjusted in a more complex way.
Reviewed By: HarveyHunt
Differential Revision: D33683117
fbshipit-source-id: 61fe2c66a3fdcfebd9f5efba27d4de43e38b515f
Summary:
When doing a revert, Mercurial keeps a copy of reverted files in the
.hg/origbackups directory. If we put symlinks in this directory it can mess up
future file backups, since they might accidentally be put inside the symlink
(which can result in a failure if the symlink is to another device).
Since these backups are almost never used, and are relatively janky, let's just
never backup symlinks.
Differential Revision: D33689167
fbshipit-source-id: 0b227b84122c84e7ea1d12e5219e6b6946c882af