Summary: Expose the `NameSet::to_parents` API so it can be used in Python.
Differential Revision: D34017427
fbshipit-source-id: 9a602031eb9f709f43d89a0cd23448d9b8285021
Summary:
A nameset is a "flat" set without graph (parents) informatin.
In certain cases (ex. graph log, annotate) the parents information
is needed. Add an API for that.
This might potentially replace some logic in Python `graphmod.py`.
Differential Revision: D34017425
fbshipit-source-id: 38d0bccb5c455cd9ec2d60113c18207a90645de9
Summary:
When doing a clone, the nativecheckout action plan included a remove
action for every file not in the sparse checkout. This is because it didn't
account for the file not existing in the old manifest and just blindly queued
the remove.
On Linux this is pretty fast, but on Windows this is extremely slow to do for
every path. It's probably slow because of NTFS, but also because we do some path
auditing logic for Windows and Mac.
This fixes it to not do remove for a file that wasn't in the old manifest.
Reviewed By: sggutier
Differential Revision: D34188271
fbshipit-source-id: 714b2dcf98cfa9ebec287f00d7cd5397126f693e
Summary:
The old tracing info was noisy and hard to follow. The new one is much
more concise and provides useful insight into what is being fetched, at what
stage, and what errors happen at each stage.
Reviewed By: quark-zju
Differential Revision: D34159138
fbshipit-source-id: e1de87de9f9f64deb7e33ef76e6441bb6721f9b9
Summary:
These produce a ton of hard to read trace output, with enter/exit's
everywhere. Let's delete them. In the next diff we'll add more human readable
explanations of what's going on in scmstore.
Reviewed By: quark-zju
Differential Revision: D34159139
fbshipit-source-id: 48d1175edd20d3de952f12dc8fcf7a6661469d64
Summary:
scmstore was writing lfs pointers via the contentstore. This meant that
when we disabled the contentstore fallback, this path failed. This path is used
during unbundle (like in 'jf get') when the bundle contains an lfs pointer.
Reviewed By: quark-zju
Differential Revision: D34127065
fbshipit-source-id: d50245b78dd87e6c71d8775123fe954084289e2b
Summary:
When initializing a new repo in the old new repo initialization, directories would be created recursively if the target path did not exist. This diff fixes the new repo initialization not doing that.
The unit test for directory creation was also reworked.
Reviewed By: quark-zju
Differential Revision: D34093210
fbshipit-source-id: 3aa0aade9bd3034448615678a005966a7da6ef5c
Summary: Storing errors instead of their string representation should be much more useful for showing errors. This diff does that for `InitError`.
Reviewed By: quark-zju
Differential Revision: D34161428
fbshipit-source-id: 4f77428ef379db6b42b492bb5424a8fdd04b954a
Summary:
Add some counters to track lfs transient/fatal error response codes:
- "lfs.transient_error.{method}.{code}" counts error codes we got but ended up
succeeding after retries
- "lfs.fatal_error.{method}.{code}" counts errors we got and then ended up not
succeeding
- "lfs.success.{method}" counts successful queries
Reviewed By: quark-zju
Differential Revision: D33962157
fbshipit-source-id: 901625eb72cac2eba57f4b2424a778f4f8ac1779
Summary:
This feature is only used for e-discovery, and we don't need to build a
new e-discovery package from eden/scm anymore. Let's remove this feature since
the monkeypatch interferes with updating the hg status paths.
Reviewed By: quark-zju
Differential Revision: D34124434
fbshipit-source-id: b41382bc1a3cfeda82e1dd2af511244ad16a9fb8
Summary:
Convert type comments to type annotations.
Produced by running:
```
python -m libcst.tool codemod convert_type_comments.ConvertTypeComment eden
```
from a parent directory
Reviewed By: shannonzhu
Differential Revision: D34110680
fbshipit-source-id: 23081a8867b93cd349271075428176af514efa2b
Summary:
Convert type comments to type annotations in eden/scm/edenscm/hgext
Produced by running:
```
python -m libcst.tool codemod convert_type_comments.ConvertTypeComment eden/scm/edenscm/hgext
```
from a parent directory.
Reviewed By: grievejia
Differential Revision: D34110682
fbshipit-source-id: acf8d32290411ca8673904e4f80ddd846ebceef0
Summary:
Convert type comments to type annotations in eden/scm/edenscm/mercurial
Produced by running:
```
python -m libcst.tool codemod convert_type_comments.ConvertTypeComment eden/scm/edenscm/mercurial
```
from a parent directory.
Reviewed By: grievejia
Differential Revision: D34110681
fbshipit-source-id: 3f21aa39de9384cdf7d5b09a232d9605eadc1481
Summary: Support the case of a snapshot modifying a symlink by removing the symlink destination before trying to create the symlink.
Reviewed By: yancouto
Differential Revision: D34097684
fbshipit-source-id: 48d4a05f61a69e686e5bd530a7ed150326a32765
Summary: Unlike the python repo lock files, the rust lock files are not deleted when the lock is released. That means if the locks are created as root, they will break future commands run as other users. Try to mitigate that eventuality by chmoding the lock files to 0o666 on unix.
Reviewed By: quark-zju
Differential Revision: D34016719
fbshipit-source-id: 2bd1ec9d5da0e27a12eb95da5c2a4cb3f6286137
Summary:
The published `terminfo` crate has a WTFPL license which is forbidden from being used by Meta.
{F687594009}
However the WTFPL allows forking and relicensing, so I've gone ahead and relicensed the same code as dual MIT OR Apache 2.0 for fbsource to use. We can patch the properly licensed code in place of all transitive dependencies on the `terminfo` crate, as they have the same public Rust API.
The relevant changes: 9b4e1c6aae
Reviewed By: metajack
Differential Revision: D33190944
fbshipit-source-id: 0a9002b8799b5ceeaca3c20a211f15beec5a407f
Summary: Sometimes we can get errors, debugging info, or advices in headers returned from services and proxies. We know some headers that we can parse, but we don't have a comprehensive list. To improve debugging we might as well just print all headers of a response on failure. As of now we don't handle that in one place (like D33918785), because technically HTTP 5xx is a valid response from the POV of http library. It's the caller's logic that need to decide if it's a failure or not. In the future we could perhaps have such debugging logic in a trait like `ResponseExt` that could have `fn debug_failed_req` to be called by multiple callers if they decide a particular request was indeed an unrecoverable failure.
Reviewed By: quark-zju
Differential Revision: D34035084
fbshipit-source-id: 8247462ed9875b6530f215fb161c311325ea83fe
Summary: Added bubble id to FetchSnapshotResponse. Also updated hg client to store latest bubble information when updating snapshot.
Reviewed By: yancouto
Differential Revision: D34042287
fbshipit-source-id: 3c206caba4fa7b833cf1f8e23123b5b6006e2890
Summary:
Sometimes hg might recognise an untracked file as being added, but by the time it tries to load it, the file is gone, causing a crash.
For snapshots, it should be fine in this case to simply ignore this file. That is what this diff does. It specifically ignores `FileNotFoundError`, meaning other files still get classified as errors and we're not swallowing anything we shouldn't be.
Reviewed By: mitrandir77
Differential Revision: D34043083
fbshipit-source-id: cec7d528652c1704f3a3db707eafc0e43f24ac74
Summary:
This just adds a `with_context` call to when we're loading files from disk, so it prints which file failed to load.
I've seen several `[Errno 2] No such file or directory (os error 2)` and they're really annoying.
To do this, I had to refactor the lambda into a function, because try blocks are not stable yet :(.
Reviewed By: markbt
Differential Revision: D34043084
fbshipit-source-id: e0fd4142d75d6b392440f7763217a9b23ee8c8a4
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/101
public_autocargo already existed for edenfs, but needed to move up a level so to make edenfs thrift definition visible via autocargo.
Reviewed By: markbt
Differential Revision: D32693522
fbshipit-source-id: 4c070cfa2d6294a28c17697338f0309dcab1576f
Summary: Used the dirstate object to pull the current rebase related commits. If there exists a merge conflict, the commits are included in the error message (otherwise no change [e.g. non-conflicting interrupted rebase])
Reviewed By: quark-zju
Differential Revision: D34022102
fbshipit-source-id: 51bfacaf79cac5d4df4cdb99f8c92a493972ffd1
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/103
Automate maintenance of the edenscm_* github actions yamls
Add job file and name options and support for the Rust install section
Reviewed By: fanzeyi
Differential Revision: D34044422
fbshipit-source-id: 7d5f07d37bab1eff5de30a88e710dbf7479ca192
Summary:
Now both IdDag stores have remove_flat_segment implemented, let's test the
resize feature based on remove_flat_segment.
Reviewed By: DurhamG
Differential Revision: D33821387
fbshipit-source-id: 5b92adadf8cc6989298b2637e3fb7141898c4503
Summary:
The `index_parent_key` function can derive `group` from its `child_id`
parameter. So let's drop the redundant parameter.
Reviewed By: DurhamG
Differential Revision: D33821382
fbshipit-source-id: 3a31c3fa5d4049ec36974421c21347cbdc6c473c
Summary:
The `StoreId` is an implementation detail of `InProcessStore`. It does
not apply to other kind of stores. Move it to a better place.
Reviewed By: yancouto
Differential Revision: D33821388
fbshipit-source-id: d7d20d9a61ebeea58e22f3f779fc9651097857df
Summary: Previously the assertions run per entry. Make them only run once.
Reviewed By: yancouto
Differential Revision: D33821389
fbshipit-source-id: 6a7380071a3f014d2034dfbc5760f94bd6d99dc2
Summary:
See previous diff for context. Implements segment deletion for
`InProcessStore`. Extra care needs to be taken for serialization.
Reviewed By: DurhamG
Differential Revision: D33821381
fbshipit-source-id: ace59345425988c2dae30b9bd55388679c36ae63
Summary:
See D33779403 for context. This is a step forward to implement "strip".
This diff defines the API that can be used to remove or "shrink"
a flat segment and adds some sanity checks.
The actual implementation is in upcoming diffs.
Testing will focus on "remove" first, "resize" tests will be added later.
Differential Revision: D33821386
fbshipit-source-id: 61848593e698fe7f9358b25a4cb72788637c50a5
Summary:
See D31146158 (39f61996c7) for reasons why SegmentWithWrongHead exists.
The tl;dr is the parent->child index in the indexedlog implementation (key:
(parent, child), value: segments) can point to old segments that were replaced.
Let's ignore the "segments" from the index and just do an extra lookup
using "child" to find the up-to-date (replaced) segment. This simplifies
upcoming changes and provides better error messages in some cases.
Differential Revision: D33821383
fbshipit-source-id: 3f63ac0e3a3953d0ddcccebe2be4de2a3a3e0589
Summary:
Upcoming changes need the ability to query ranged parent->child for the entire
graph, not just the master group. Update the range query API to do that.
The only user of `iter_master_flat_segments_with_parent_span` is
`IdDag::to_first_ancestor_nth_known_universally_with_errors` and it is fine with
the change. Even better, by returning non-master segments we can answer the
`to_first_ancestor_nth` query with non-master ids. That makes the server more
flexible, as shown by the added `test_lazy_hash_on_non_master_group` test.
Differential Revision: D33821379
fbshipit-source-id: 330bd84f8535f857f6306f9ce791066688a39d48
Summary: See the previous diff for context. Add `IdMapWrite::remove_range` to remove range of entries in an IdMap.
Differential Revision: D33779404
fbshipit-source-id: 24ede5949ad3c1cb0b93c3c64ca692c04b354457
Summary:
By changing the index key it allows us to delete specific parent->child
entries in the index without affecting parent->other_child indexes.
Long story:
This is the first step to implement in-place "strip".
Having a proper way to "strip" unblocks:
- Repalce costly "rebuild_non_master" with more precisely removals without
rebuilding anything.
- Remove problematic commits in the master group to work better with stripped
heads server-side.
- Remove broken commits in the non-master group which lost corrosponding
data (ex. commit message, or trees).
Previously there were a few blockers to "strip":
- IndexedLog is append-only.
- Segments must be continuous.
Now the blockers are "mostly" clear:
- IndexedLog's Index supports removal by key.
- Discontinuous segments supports punching "hole"s.
Once problem about the index removal is the parent index. Previously it
is a single key => multiple entries index. For example, parent 6 might
have children [7, 8, 9]. This makes it harder to just remove child 8
without affecting children 7 or 9. By making the index key contain
child. The index will look like (6, 7) => [7], (6, 8 ) => [8], (6. 9)
=> [9] and it's easier to remove just (6, 8 ) without affecting others.
Note the values in indexedlog is a linked list so it's in theory possible
to make indexedlog support removing just part of the values. But at this
point I'd like to implement it without changing indexedlog. We can always
go back and revisit the indexedlog fancier index removal later.
Differential Revision: D33779403
fbshipit-source-id: 4d73e7bdc66d3a8ec1482fd25f8ed5b9cc301aec
Summary:
This makes use of the new Rust repo initialization added in previous commits into the `init` command in Python by replacing the initialization that was done mostly by the `localrepo` object. The codepaths for `git` and `bundle` remain active.
Another smaller addition was the option of removing `narrowheads` from the list of requirements if `experimental.narrow-heads` was explicitly disabled in the configurations.
Reviewed By: quark-zju
Differential Revision: D33901725
fbshipit-source-id: d9d976a1b844e1dd6a5e065f8ec8bf1d04fc4c03
Summary:
'x~-1' should be equivalent to 'children(X)' when there is one visible
child. Today, ~-1 doesn't take visibility into account, so if there are
invisible descendants it will error out.
This diff makes ~-1 only return visible results, which matches the children
behavior.
Reviewed By: quark-zju
Differential Revision: D33900217
fbshipit-source-id: 0b4bb015c03fa3498746e6a754a522693d0c2edf
Summary:
Prefetch code paths execute the prefetch as one huge batch, and it
turns out the lfs fetcher only fetches one file at a time. Let's increase the
parallelism
Note, checkout is less affected by this, since nativecheckout issues prefetches in smaller batches and in parallel, so we get some parallelism at a higher layer, but I do see a 15% speed up in a large file heavy repository.
Reviewed By: quark-zju
Differential Revision: D34020837
fbshipit-source-id: fb11c1aebf175b49563f48cb20f8b7c527fa3019
Summary: It moved from facebookexperimental to facebook sometime ago
Reviewed By: fanzeyi
Differential Revision: D34009265
fbshipit-source-id: c11ca0e92d9574aa8eccd31d578b9f61a411833c
Summary:
Certain git bundles might contain references like "BUNDLE_HEAD" that would be
ignored by usual paths. Normalize them to visibleheads refs.
Differential Revision: D33968793
fbshipit-source-id: a3d6fc1a7d73328cddf0ebddfe7b7a021d929528
Summary: This diff is to update the rust thrift file. Generated by cargo build.
Reviewed By: fanzeyi
Differential Revision: D33289588
fbshipit-source-id: f26a79ae60eadf2671ca0e06bcdb062fe583de17
Summary: Respect our "can_color()" method to determine if tracing output should be ansified or not.
Reviewed By: DurhamG
Differential Revision: D33985125
fbshipit-source-id: c025c48e40945f9dc0c51d928f663936f582e4d2
Summary: Add public autocargo mapping. Actual change is to eden_scm_opensource.toml and manifests/eden_scm, rest is from autocargo run.
Reviewed By: DurhamG
Differential Revision: D33896971
fbshipit-source-id: 19d75be205d9cb0179c99bd61f1be5500ba61129
Summary: scm/lib/version is needed by scm/lib/configparser. Move some targets so that they are visible to autocargo of scm/lib for the next diff. Moving the target saves needing to autocargo all of scm.
Reviewed By: quark-zju
Differential Revision: D33896972
fbshipit-source-id: f055b714675e0a85aac64defacc4ca54e16fa5ce
Summary: Currently the edenapi client crashes trying to convert a headname to a hex string, when the headname is a string that's not in hex form. Check if the string is in hex form before attempting to look it up as a prefix.
Reviewed By: DurhamG
Differential Revision: D32894078
fbshipit-source-id: 1d2d8145aa3136a27e4bbe674a07e2aa8bca81ef
Summary:
Currently a single LFS 503 during clone/checkout aborts the operation and leaves the user in a situation that is difficult to recover from. Now we treat a 503 as any other 5XX server error and retry.
The 5XX retry count/backoff can be configured via the lfs.backofftimes config knob. It defaults in the code to [1, 4, 8], which is 3 retries with rand(1), rand(4) and rand(8) sleep in between.
503 can be served from proxygen indicating there are no live lfs servers, or from x2pagentd in cases of network failure.
Reviewed By: quark-zju
Differential Revision: D33804601
fbshipit-source-id: cbb3514051843d3517bb676cf7c83dce057e42b9
Summary: Adds a Python binding for the Rust `repo` crate. For now it only exposes the static `Repo::init` method.
Reviewed By: DurhamG
Differential Revision: D33796094
fbshipit-source-id: 9cf49bcdd24bbabead79902e64a49ec8dc6fac55
Summary:
Adds a method that will be used in the future for replacing the repo initialization done in Python.
More specifically, this method creates and populates the files required for a new repo in the same way as we currently do via the constructor of `localrepo` with the extensions and configs we have enabled by default.
Reviewed By: DurhamG
Differential Revision: D33901712
fbshipit-source-id: 0d12732f5c9d36fb115a97e53b356a88fd609b6c
Summary: This command is used by jf to find commits in a bundle.
Reviewed By: DurhamG
Differential Revision: D33948840
fbshipit-source-id: 2b7b8c09cb2b30c192a00e83437d079010be5a41
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