Summary:
Rename "channel" to "fs channel", rename StatPtr to DurationStatPtr,
and generalize DurationStatPtr to every stat category.
Reviewed By: xavierd
Differential Revision: D39631597
fbshipit-source-id: 147f9a9d9fe97a39c0d38ccecf57e73c93af0d8c
Summary:
I've been confused by some of our duration statistics not having
units, so migrate the hg backing store statistics to Duration, and
rename them to have a _us suffix.
Reviewed By: xavierd
Differential Revision: D39593787
fbshipit-source-id: d224a12f5cff436b138e5c3fc283b3b63fdec596
Summary:
I'd like to have a type-level difference between duration stats and
counter stats. As a first step, let's introduce a Duration stat class
without addValue but with addDuration.
Reviewed By: xavierd
Differential Revision: D39591210
fbshipit-source-id: 5b1cc68dc4a7d8255fb04b2076ad05fe53b781d8
Summary:
I was curious how long it takes to fetch metadata from LocalStore. So
add a benchmark.
Reviewed By: xavierd
Differential Revision: D39590670
fbshipit-source-id: a95ba55adb911103a676100fec8dba9954d16307
Summary:
Allow CI/CD builds to build and publish aarch64 builds alongside the existing x86_64 builds.
The published RPMs will have the same version number as the x86_64 RPMs allowing standard slowroll logic to push the packages to the fleet. This allows the aarch64 bringup team to stop special-casing slowroll.
This diff affects only the RPMs that are required for initial bringup. Subsequent activity will add more RPMs.
Context about the aarch64 effort: https://fb.workplace.com/groups/1858357931081326/posts/3709554039295030
Reviewed By: rahulg
Differential Revision: D39770905
fbshipit-source-id: 3074f974ff8a75a2b4f6fffb17224eb452a56edb
Summary: This diff adds logging to the scuba for derived data service. As well as constructs the logger with logged repo_name, which will be used by downstream dependency, like derived data manager.
Reviewed By: mitrandir77
Differential Revision: D39578035
fbshipit-source-id: 136c88a07b6aeb7776bd6a5b6cb580d3485e31ae
Summary:
It does the necessary modifications on the land service server and thrift files to adapt the needed fields to introduce the pushrebase logic. For now, it gets the ctx and authz and prepares the code to new implementations (upcoming diff). For instance, implementations to create a LocalPushrebaseClient, call the pushrebase from it, and convert the output for the LandChansetsResponse.
We also spent some effort creating handling errors that are out of LandChangesetsExn, such as MononokeErrors and BookmarkMovementError
Reviewed By: yancouto
Differential Revision: D39707704
fbshipit-source-id: ada056bf022c38e9398db8c7aad429bfd830754a
Summary:
Fix two warnings like this one:
```
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> eden/mononoke/streaming_clone/src/main.rs:121:41
|
121 | let ctx = build_context(fb, &logger, &repo, &tag);
| ^^^^^^^ help: change this to: `logger`
|
= note: `#[warn(clippy::needless_borrow)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
```
Reviewed By: markbt
Differential Revision: D39767275
fbshipit-source-id: da8226a362a17688ed10022786c8a6eb4063e392
Summary: When computing statistics on historical commits, if a file is redacted, just ignore it.
Differential Revision: D39742659
fbshipit-source-id: 5203e3bd1cfe628bcd09be44879d707b22de8470
Summary: Adds local and remote revset resolution to the `resolve_single` function
Differential Revision: D39582514
fbshipit-source-id: 011dcab99e7661f36b0e68e6ce2316ac42aa8f26
Summary:
When using a pager, we want to inherit the "is tty?" determination from before we fiddle with stdout to point to the pager. Python had some special logic for this we lost when we switched to Rust to answer "should color?". Streampager still worked because Rust handles that pager. "Less" is handled in Python, so Rust only saw that stdout wasn't a tty, so it disabled colors.
Interestingly, the "should color?" determination happens before we enable the pager. However, we re-initialize the "color" extension after starting a non-streampager pager, so that disables colors in this case. Fortunately, we can just remove the re-initialization because the motivating config "color.pagermode" is apparently no longer supported. This works around the issue because now we only ask Rust "should color?" before the pager is activated.
Reviewed By: sggutier
Differential Revision: D39749806
fbshipit-source-id: a5ce205200b555fbfcbadcdf030d5f2b9ab08b38
Summary: In preparation for the split between TreeOverlays and BlobOverlays, this diff makes it explicit that the OverlayType applies to tree storage
Reviewed By: chadaustin
Differential Revision: D38279396
fbshipit-source-id: c56805818e43471f5301329beb0b5a51e0b04a69
Summary: this diff is for introducing regexmatcher, its usage is in D39741975
Reviewed By: quark-zju
Differential Revision: D39731271
fbshipit-source-id: 3367aea7edc0121dba767e96597a8c521c81b7ed
Summary:
The internal fastlog batches are 100 commits each - so that's the right size
for page size here too.
The timeout constant wasn't used anywhere (which made the timeout 10s). I'm
upping it because in very mergy repos the fastlog traversal is unfortunately
0(merges on the path).
Reviewed By: quark-zju
Differential Revision: D39738299
fbshipit-source-id: 2eb2cf450f433302494ea2a523bd6af158fc6998
Summary: In the previous diff (D39580462 (99e4c1c935)) we made the connection between the land service and the mononoke server. However, it was missing the certificates and primary key work properly. This diff makes it works. Next, we will implement the pushrebase logic works on the land service and add the tests.
Reviewed By: yancouto
Differential Revision: D39652929
fbshipit-source-id: 29d4d502c715eeecbea329ed69e8b65ae81064df
Summary: This diff is a preparation for using Rust RegexMatcher.
Reviewed By: quark-zju
Differential Revision: D39706345
fbshipit-source-id: ce4f978aa58f43ca3321e146b4892fd57abc67e5
Summary: It implements the first version of tests related to the land service. For short it works until the part it needs the certificates to perform the pushrebases. Next diff it should be fixed.
Reviewed By: RajivTS
Differential Revision: D39580462
fbshipit-source-id: 0f6b6e974a22dfa91c8aa7572f00cf887e14f8dc
Summary:
It (1) adds the repo in the Land Service, (2) includes Remote Land Service and remote land service with local fallback, (2) get the address from tier or host and calls the client in the unbundle processing
The Static analysis failed in the FBTHRIFTCOMPAT1 because i added a new field in the land_changesets method in the impl LandService (land_service_impl.rs). It does not break anything since we do not have the server in production. I mean, changing the id does not influence on previous versions of the server since there is no land service server in production.
Reviewed By: yancouto
Differential Revision: D39553570
fbshipit-source-id: bb1f09c2ab2c111734b9026109fc39e14c514516
Summary: handle special empty dir for testing "root" dir
Reviewed By: quark-zju
Differential Revision: D39703941
fbshipit-source-id: 59ac5b281fe3eb81af4d12e1a99a18861040559c
Summary:
Previously, we would simply check if --config-dir was supplied. If not, we would use the default config dir path.
This is incorrect, as we're supposed to check whether the cwd is located in an eden mount. If so, we should use the config dir for whatever Eden mount we're currently in.
Reviewed By: fanzeyi
Differential Revision: D39705519
fbshipit-source-id: 233520ff3046bfb4b004b919f917c0569c804e91
Summary: We don't have SqliteOverlay anymore, so this check can be removed and instead we can just `#ifdef` the snippet
Reviewed By: xavierd
Differential Revision: D39673738
fbshipit-source-id: 04a3b755637c10c9c3cfd230aa8629cdb551acf2
Summary: This adds some markup to the output so you can see what style is being applied to what parts of the output.
Reviewed By: quark-zju
Differential Revision: D39621629
fbshipit-source-id: a875bce34452dbed53ff0ab7d019ca57952ab4c0
Summary:
Now users of the formatter can unconditionally use "write_styled()" and the formatter will output regular text if color is disabled.
I will fix "--color debug" output in next diff.
Reviewed By: quark-zju
Differential Revision: D39621626
fbshipit-source-id: 13b01acaf4dfdde728aa4a5153921ca3416b7c1c
Summary:
Replace Python color mode detection with Rust's.
Windows Virtual Terminal mode is enabled in hgmain, so we don't need the Python code anymore.
Reviewed By: quark-zju
Differential Revision: D39621631
fbshipit-source-id: eca87ea4d13b226211c601abe9b7113b9207b5d1
Summary:
This will replace most of edenscm.color._modesetup in the following commit.
This logic should match Python logic closely, except Rust has a subset of the logic implemented on the io::IsTty "can_color()" method. can_color() says whether colors appear to be supported by the io handle and environment. should_color combines that information with the user's configuration to determine whether we should try coloring output.
Reviewed By: quark-zju
Differential Revision: D39621630
fbshipit-source-id: 40cfef1e4682c844c69f2905315b16bfaf4d9a0f
Summary: Going to add some more stuff to this crate.
Reviewed By: quark-zju
Differential Revision: D39621632
fbshipit-source-id: cb78b76f741fd15dde93381c09424ba4f6018bb0
Summary:
configparser is a weird and annoying place for an env var utility to live.
Leave the tests in the configparser create so they continue to benefit from the env locking mechanism.
Reviewed By: quark-zju
Differential Revision: D39621628
fbshipit-source-id: 816f12e2492038d6e8a7af76c94849681ce576fd
Summary:
This check mimics color.py. I'm putting non-config related logic in IO can_color so things like tracing output can color appropriately without access to the config.
I got rid of the separate CanColor trait and merged it into IsTty.
Reviewed By: quark-zju
Differential Revision: D39621627
fbshipit-source-id: a843fa83a5de8f18f64cc1f8b2234fc330d86192
Summary: Don't read the sparse config if the fs type is eden. This prevents sparse profiles from accidentally working even on EdenFS working copies.
Reviewed By: quark-zju
Differential Revision: D39659620
fbshipit-source-id: e29dc563fe87680a3058230e97190a891ea8e5a7
Summary: During a merge we temporarily add files that need merging to the sparse profile to make sure they show up properly. Now we read from the "tempsparse" file in Rust and respect those overrides.
Reviewed By: quark-zju
Differential Revision: D39659619
fbshipit-source-id: 3265900aac8eee621be9feea87f136664a448e61
Summary:
When rendering enough progress bars, the cursor would jump too far back after rendering the bars, which would mess things up (because new output would overwrite old output).
This was caused by our use of termwiz ChangeSequence, which tracks relative cursor x and y so it is easy to jump the cursor back after outputing a bunch of progress bars. ChangeSequence interprets "\n" as y+1, but _not_ x=0, so once the cumulative length of the progress bars became greater than the terminal width, you ended up with an "extra" y+1 since ChangeSequence thought the line wrapped. When jumping the cursor back, it would go back too far.
Anyway, fix by changing our progress output to use \r\n instead of \n.
Reviewed By: sggutier
Differential Revision: D39677310
fbshipit-source-id: 5205af30dd1bac94ce2eae175ad8a05634ed1e85
Summary: I will use this to correctly infer scm_type in Hack's scmquery-proxy client library.
Differential Revision: D39492898
fbshipit-source-id: 4d9aafcb88f75b20260d4212bae70495efca22d5
Summary:
Deprecate support for very old commits.
Very old commits will be stripped off users workspaces, we can also deprecated
this redundant code. This is because the very old commits are in flat manifest
format that is not longer supported by hg client.
Reviewed By: quark-zju
Differential Revision: D39657045
fbshipit-source-id: 32318aff02bed88307737464525474b626dfcaa8
Summary:
The ObjectCache is an extremely hot code path, dominating the glob query times.
When profiling it, hashing ObjectId shows up as a big component of the
ObjectCache runtime. By convention, we know that ObjectId contain a hash
already, and thus we can use that as the ObjectId hash directly.
Reviewed By: chadaustin
Differential Revision: D39399209
fbshipit-source-id: b8113102ac94445efed74dcdd88bb0b1f3c62591
Summary: refactor _buildregexmatch function to make a new function `_buildregex`, this will be reused when using Rust RegexMatcher.
Reviewed By: quark-zju
Differential Revision: D39657735
fbshipit-source-id: d5bac663df6dd0842951392e2cb4ef7c6812b1e1