Commit Graph

8200 Commits

Author SHA1 Message Date
generatedunixname89002005307016
8b7ee4be7c Add annotations to eden/scm/edenscm/ext/snapshot/labels.py
Reviewed By: zzl0

Differential Revision: D44831472

fbshipit-source-id: 4813a43dbbe98e75751f604064d133a726fa20be
2023-04-12 09:36:05 -07:00
generatedunixname89002005307016
6579e0b911 Add annotations to eden/scm/edenscm/hooks.py
Reviewed By: zzl0

Differential Revision: D44814520

fbshipit-source-id: 4e04c45bdca7171d812c5616993932ea7d8237f2
2023-04-12 09:32:23 -07:00
generatedunixname89002005307016
c9c51e6fa4 Add annotations to eden/scm/edenscm/ext/extorder.py
Reviewed By: zzl0

Differential Revision: D44868907

fbshipit-source-id: 909402e3af08b48656550e937a10214ddaeaa031
2023-04-12 09:30:00 -07:00
Martin Conraux
9f5b978bf0 update comfy-table
Summary: Update comfy-table to 6.4.1

Reviewed By: zertosh

Differential Revision: D44744141

fbshipit-source-id: 3206b40a292a6b6ca03bcc7532bff21aa70046b6
2023-04-12 08:55:19 -07:00
Muir Manders
70b82edccc metrics: log the (first) mononoke host we talk to
Summary: Log the first mononoke host we connect to. Under normal circumstances all connections from a particular client should go to a host in the same datacenter, so this will allow us to look at performance trends taking into account cross datacenter factors.

Reviewed By: zzl0

Differential Revision: D44900086

fbshipit-source-id: c9bb38dac419a8faf468c6bb79a44af3c152c502
2023-04-12 08:47:07 -07:00
Muir Manders
15d8a74ff2 rcutil: add warning for duplicate configs
Summary: Warn user about potentially confusing duplicate config entries when we are making automated edits to repo/user config file.

Reviewed By: quark-zju

Differential Revision: D44876243

fbshipit-source-id: 7d50df7f55e68f3655f6086156e803e52a2b4154
2023-04-11 17:51:25 -07:00
Muir Manders
b48f2144af rcutil: handle duplicate keys better
Summary: When there are duplicate config keys present, we now update the final (load bearing) one instead of the first one.

Reviewed By: quark-zju

Differential Revision: D44875407

fbshipit-source-id: fa546482cbbdb432fb7d02a716e4692022388dc5
2023-04-11 17:51:25 -07:00
Muir Manders
9a47a90b52 debugnetwork: test mononoke connectivity via local auth_proxy
Summary: If auth_proxy.unix_socket_path is configured, use that when testing for Mononoke HTTP connectivity.

Reviewed By: johansglock

Differential Revision: D44883873

fbshipit-source-id: 1c30645072842391ad9aa6b2548ee87bd1449896
2023-04-11 17:24:32 -07:00
generatedunixname89002005307016
394036b283 upgrade pyre version in fbcode/eden - batch 1
Differential Revision: D44881818

fbshipit-source-id: ae9f23f8032e877541745a0418bb40174cc78de8
2023-04-11 16:59:03 -07:00
Jun Wu
56d9b52517 rebase: support more descriptive conflict labels
Summary:
Added a config option `experimental.rebase-long-labels`. Once set to true,
produce more descriptive conflict markers "dest (rebasing onto)" and
"source (being rebased)" on conflicts.

Eventually we probably want this to be the default everywhere. For now, not
all users are compatible with this change so it's not yet the default.

Reviewed By: muirdm

Differential Revision: D44847924

fbshipit-source-id: b832f362cc1dd80e25a3fd80e0f334bffc4b12d8
2023-04-11 15:49:08 -07:00
Jun Wu
b7b797a485 clone: migrate revlog to lazytext after clone
Summary: This avoids revlog and its problematic code paths for all `pull` commands.

Reviewed By: sggutier

Differential Revision: D44805076

fbshipit-source-id: a4efacf111f03cda5752fe1b25d26a278c25f242
2023-04-11 15:32:51 -07:00
Evan Krause
4a699c8899 tests: Replace uses of egrep with grep -E for failing centos tests
Summary:
I saw builds/tests were failing for centos due to a warning "egrep: warning: egrep is obsolescent; using grep -E".

We can instead use grep -E as recommended.

Note: this isn't every single test, but somehow only these tests had failures in the Centos CI job.

Reviewed By: muirdm

Differential Revision: D44848131

fbshipit-source-id: ba182e8c866ac6bd649f820b76097e4677295105
2023-04-10 16:59:17 -07:00
Muir Manders
b8bb5dc518 pullcreatemarkers: configure post-pull hook in extension
Summary: Configure post pull "debugmarklanded" hook in the requisite extension to avoid trying to run the hook when the extension is disabled.

Reviewed By: zzl0

Differential Revision: D44646572

fbshipit-source-id: 1ac2dd97d35616683b87223a97ebbe7aecaa0a91
2023-04-10 16:25:13 -07:00
Muir Manders
397386825b manifest: don't crash for submodules
Summary:
Don't crash on the "m" flag used to mark submodules in the manifest.

Also, deprecrate "sl manifest" in favor of "sl files". The "sl manifest --all" flag doesn't work anymore, anyway.

Reviewed By: sggutier

Differential Revision: D44772327

fbshipit-source-id: bad76f0defe95c4a11df9b606e56983583dc5e32
2023-04-10 15:47:28 -07:00
Andres Suarez
f28416d323 Update various deps to remove windows-sys <0.45.0
Reviewed By: diliop

Differential Revision: D44825274

fbshipit-source-id: 91a11c1bdf8bca7a4bee7e839d8f5a36d19a555c
2023-04-10 13:26:13 -07:00
Saul Gutierrez
6f235fd970 fix wacky arc debugnamecomplete bug
Summary: Fixes a wacky bug with one of our internal tools

Reviewed By: pushpakrajgautam

Differential Revision: D44811936

fbshipit-source-id: f3b6f07ff035c8d535792dec5add5146c1314f36
2023-04-10 04:38:28 -07:00
Zhaolong Zhu
e5f3c0df4a copytrace: fix clippy warning
Summary: fix clippy warning by using replacing match with if let

Reviewed By: quark-zju

Differential Revision: D44728168

fbshipit-source-id: 27a944267263595ea9367c08f6716a3d2f6820bb
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
ab300ac951 copytrace: check if the path is in the target commit when no rename commits found
Summary:
we need to check if the path is in the target commit when no rename
commits found, this fixes a bug found in the previous test

Reviewed By: quark-zju

Differential Revision: D44728170

fbshipit-source-id: 7a039b0f9fee80671653e1557b80b218b58f4e99
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
b172283113 copytrace: refactor vertex_to_tree_manifest
Summary:
refactor vertex_to_tree_manifest  to only process one commit, so it can be used in the following
diff to check if a path is in a commit

Reviewed By: quark-zju

Differential Revision: D44728172

fbshipit-source-id: fc9530b38757d836ca8a5a46e463a5ade510839d
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
0ef35460d5 copytrace: add more unit tests
Summary:
this diff adds more unit tests to cover: multiple renames, non-linear
comit graph, deletes.

This diff contain tests catch a bug in the current implementation, which
will be fixed in the following diffs.

Reviewed By: quark-zju

Differential Revision: D44728169

fbshipit-source-id: b0aaeeffa9008a70bbfe3105cceed3afb3d65d45
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
3b694a9f70 copytrace: add more tracing statements
Summary: add more tracing statements for debugging

Reviewed By: quark-zju

Differential Revision: D44728171

fbshipit-source-id: 6727e2445f6be91087feca17ed3e4fced649e7f9
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
10b0369f9c dag: update doc of DagAlgorithm::sort
Summary: Makes it explicitly mention that `sort` method sorts the set in topo descending order, this is different than the `sort` function in revset, which sort the set in ascending order by default.

Reviewed By: quark-zju

Differential Revision: D44728173

fbshipit-source-id: aa95993b237ebacc587147da9caccdf43ff48b80
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
a73dc83fe8 copytrace: add unit test infra and simple test
Summary: Add test utilities for testing copy trace logic, also added a simple test case as an example.

Reviewed By: quark-zju

Differential Revision: D44559585

fbshipit-source-id: b03796fa3869d94edc528d570d511b1d84b15861
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
cdfebae59a dag: add vertex_fn parameter to ImportAscii trait
Summary:
add vertex_fn parameter to ImportAscii trait, so that we can control
how to generate Vertex from a string: for example HgId expects 20-bytes vertex.

Reviewed By: quark-zju

Differential Revision: D44739947

fbshipit-source-id: c82c95ce4d6c45562c32ad4ccc3e5b40fd517770
2023-04-07 05:24:14 -07:00
Muir Manders
74e9bd7ed9 tests: fix test-eager-exchange.t
Summary:
Tweak revlog commit import to maintain a stable order (this broke after recent change to top sort the commits).

Unfortunately the new stable order is inconsistent w/ fullsegments output in test-eager-exchange.t, so separate the tests.

Reviewed By: quark-zju

Differential Revision: D44768930

fbshipit-source-id: 6757450d7d446373d1b8c943d6cbcc6029b07443
2023-04-06 17:45:16 -07:00
Jun Wu
559c6bef26 parents: use pathhistory to implement 'parents FILE'
Summary:
This works better with Git. The old filenode-based logic does not seem correct
since it might not trigger adjustlinkrev.

Reviewed By: zzl0

Differential Revision: D44751613

fbshipit-source-id: e5a2367e544f1d55c6a2c149fd33db13af623e46
2023-04-06 17:28:52 -07:00
Jun Wu
af8ac9b65b debugshell: make globals() match locals() in interactive shell
Summary: This fixes issues like https://github.com/ipython/ipython/issues/62.

Reviewed By: zzl0

Differential Revision: D44759311

fbshipit-source-id: 5ce94040cef09ac67962c147e86711971c545f91
2023-04-06 17:04:18 -07:00
Liubov Dmitrieva
911a35fc62 return usage of commit graph for revlog clones
Summary:
return usage of commit graph for revlog clones

Disabling is no longer needed after D44734552

Reviewed By: quark-zju

Differential Revision: D44760863

fbshipit-source-id: 0ba65f63bf8c980fc0ab9b0dce1ec895f6b5f10d
2023-04-06 14:52:57 -07:00
generatedunixname89002005307016
7870b8259b Add annotations to eden/scm/edenscm/ext/checkserverbookmark.py
Reviewed By: zzl0

Differential Revision: D44612808

fbshipit-source-id: 1f886282a52f47288fdeb105802746dc9c994302
2023-04-06 08:23:27 -07:00
Liubov Dmitrieva
222aea47f2 intro high level transaction for cloud sync
Summary:
intro high level transaction for cloud sync

this is for syncs that are not running with best effort option

the transaction is needed to eliminate repo changed while backing up errors

this is a follow up after https://www.internalfb.com/diff/D41871718 that hasn't resolved the errors fully

Reviewed By: markbt

Differential Revision: D44664729

fbshipit-source-id: da411cd20fb909c22ff8976dd31bd46034a28226
2023-04-06 07:00:57 -07:00
Muir Manders
1d54e0e605 revlog: topo sort commits before adding
Summary:
In certain edge cases, during pull we are using EdenAPI to fetch nodes and feeding them into a revlog changelog (via doublewrite). This was erroring out since the RevlogCommits.add_commits expected nodes to be sorted parent-before-child. Work around by sorting the nodes.
[MSDK] Update icsp_domain_config_type_linter component on ICSP:master
```

Reviewed By: quark-zju

Differential Revision: D44734552

fbshipit-source-id: 7f00a93b93921baa827a55c7c1ec9388b74ac0f7
2023-04-05 20:47:38 -07:00
Barys Skarabahaty
caad6a5862 switch env_logger to 0.10
Summary:
There is a new `Target::Pipe` that could be used to redirect logs to a file. So updating to the latest version which doesn't add any breaking changes.

Also, updating the deprecated call sites:
```
xbgs -sl 'env_logger::from_env' \
| arc linttool debugfilterpaths --take RUSTFMT \
| xargs sed -i 's/env_logger::from_env/env_logger::Builder::from_env/'

arc f
```

Reviewed By: dtolnay

Differential Revision: D44671457

fbshipit-source-id: 6734f2839731b189564d3b7ceffcd95410fe02e8
2023-04-05 14:02:08 -07:00
Saul Gutierrez
2793fd61ef fix debugrebuildchangelog --revlog
Summary: There is a typo in `_clonetotmp` that makes it crash. It should be `ident.configrepofile` instead of `ident.configerpofile`

Reviewed By: muirdm

Differential Revision: D44709074

fbshipit-source-id: 60160d68eea6b5cfafa10c5a053ade44a54724a5
2023-04-05 13:05:17 -07:00
Muir Manders
a0d0db81be blame: remove "--skip" option
Summary:
This experimental option allowed you to automatically "jump" past the specified revisions when annotating a file. The idea is you could skip big codemods/renames etc. that touch a lot of lines without meaningful changes.

However, no one uses it. The idea is good, but to use it you need to know a priori what revs you want to skip. A better integration might let you configure known annoying revisions, or maybe let you filter commits by their commit message.

Plus, any decent blame UX allows you to easily jump passed boring commits.

Reviewed By: zzl0

Differential Revision: D44596603

fbshipit-source-id: 3e5707bb2e14aecaf4f56388afb7eb49951b6d31
2023-04-05 12:05:57 -07:00
Muir Manders
b6e6497203 blame: support fetching blame data from EdenAPI
Summary:
If experimental.edenapi-blame is configured and the repo has an edenapi client, the annotate command will fetch blame data from the new blame endpoint.

Currently this doesn't support any of the whitespace options since the server only provides whitespace sensitive blame data. We can probably emulate the whitespace insensitive behaviors locally with more work.

Reviewed By: mitrandir77

Differential Revision: D44596604

fbshipit-source-id: 73d7462d0ded2d6941b704dfb0294e52f462879a
2023-04-05 12:05:57 -07:00
Muir Manders
42fdfd8b8e blame: add edenapi client support
Summary: Add HTTP client and py bindings methods for performing EdenAPI "blame" operation.

Reviewed By: zzl0

Differential Revision: D44596608

fbshipit-source-id: 1961921b5157772b255cbc89140f8697530ee5fa
2023-04-05 12:05:57 -07:00
Muir Manders
6380c56f3a blame: add edenapi types
Summary:
These mirror the Mononoke BlameV2 derived data.

I tweaked the #[auto_wire] macro to support a new #[no_default] attribute. This made it possible to stick a Result<_, ServerError> into my type without having to hand implement anything else (since Result doesn't implement Default, which otherwise was required for #[auto_wire]).

Reviewed By: quark-zju

Differential Revision: D44596607

fbshipit-source-id: 9f2cc22d9ef43deefd32d4cfff67d350045ea845
2023-04-05 12:05:57 -07:00
Zeyi (Rice) Fan
51bb5d524a Back out "debugnamecomplete: include remotenames"
Summary:
Original commit changeset: e0a130c04c80

Original Phabricator Diff: D44694398

Solving the `arc feature` problem in favor of D44695559

Reviewed By: muirdm

Differential Revision: D44713896

fbshipit-source-id: 4b870d0288e6e81577d8d398b1fb42d4e8b68dc9
2023-04-05 11:47:54 -07:00
Andres Suarez
8c65432abb Update to lru-0.10.0
Summary: https://github.com/jeromefroe/lru-rs/blob/0.10.0/CHANGELOG.md#v0100---2023-03-04

Reviewed By: mroch

Differential Revision: D44709877

fbshipit-source-id: abc8e10e723e25c92f257b6d5d53701a84e6269f
2023-04-05 10:34:45 -07:00
Muir Manders
7eee965002 debugnamecomplete: include remotenames
Summary: Recently D44515578 removed remotenames from the set of names, but internal internal tooling was depending on that.

Reviewed By: fanzeyi

Differential Revision: D44694398

fbshipit-source-id: e0a130c04c803e51a6e7f8a284b572047ffc0ee9
2023-04-05 08:27:16 -07:00
Saul Gutierrez
826713fd85 clean various Rust lint warnings on Windows
Summary: As title says. Compiling on Windows has been kind of annoying lately due to the number of warnings I've seen, which this cleans.

Reviewed By: muirdm

Differential Revision: D44690961

fbshipit-source-id: 37ae8e48e4aa181ac909b3ec90c76a1438b24489
2023-04-04 18:34:22 -07:00
Muir Manders
8018c68305 sampling: only allow one creation of sampling file
Summary:
There is an issue where children sl processes inherit SCM_SAMPLING_FILEPATH and write to the same file as the parent process. This messed up the sampled data since the child's "command_duration", for example, could clobber the parent's.

Fix by only allowing one process to create SCM_SAMPLING_FILEPATH. This way the child (e.g. backgroundfsync hook) will not be able to output metrics.

Reviewed By: zzl0

Differential Revision: D44645799

fbshipit-source-id: 11f41343107802f9fd9ae2dc0fc7a9e1925859d8
2023-04-04 17:57:02 -07:00
Muir Manders
72c1ae759b sampling: use Rust to log samples
Summary: Expose sampling-category-for-key and append-sampling-event methods from Rust to Python to replace relevant logic in ui.py. This consolidates things, and may fix the issue where corrupted keys like "foo{" were getting into the sampled data.

Reviewed By: zzl0

Differential Revision: D44645798

fbshipit-source-id: e158ed7434435e1d29222cda2fc1cf0ee345010a
2023-04-04 17:57:02 -07:00
Muir Manders
eacc4ce300 sampling: switch to global state for sampling config
Summary: This makes it easier to share the sampling config with Python. In particular I want to get down to only having a single place open the SCM_SAMPLING_FILEPATH file to make it easy to fix a couple bugs (see next diff).

Reviewed By: zzl0

Differential Revision: D44645800

fbshipit-source-id: 12a0da6d1356b6c116224a3c3552692bd5aa656a
2023-04-04 17:57:02 -07:00
Muir Manders
7f630ef746 sampling: move sampling config to separate crate
Summary: I want to expose the sampling file to Python, so first let's move it to a non-tracing related crate.

Reviewed By: zzl0

Differential Revision: D44645801

fbshipit-source-id: 14da917acdc3529e17502d81846229e3ae8854e2
2023-04-04 17:57:02 -07:00
Jon Oh
3f6ab04069 Make hg stable commands work on windows
Summary: The hg stable commands fail to work on Windows. This is because the hg code calls a shell script to run the necessary hg commands. This diff adds a port of the shell script into python to let it work on Windows.

Reviewed By: skotchvail

Differential Revision: D44591662

fbshipit-source-id: 5d376702ccc648fe01f541b2d673ae39f954739b
2023-04-04 11:36:01 -07:00
Thomas Orozco
22e700ccf3 (reland) rust/third-party: update to futures 0.3.28
Summary:
Note: this is a re-land of D44623815, which was was reverted because of a land race with D44626072

In particular this fixes `FlattenUnordered` having a nasty deadlock, but also
some other  bugs:

```
# 0.3.28 - 2023-03-30

* Update to syn 2. This raises MSRV of utility crates to 1.56. (#2730, #2733)
* Fix bug in `FlattenUnordered` (#2726, #2728)

# 0.3.27 - 2023-03-11

* Add `TryFlattenUnordered` (#2577, #2590, #2606, #2607)
* Add `AbortHandle::is_aborted` (#2710)
* Add `AbortRegistration::handle` (#2712)
* Make `BiLock` strict-provenance compatible (#2716)

# 0.3.26 - 2023-01-30

* Add `Either::as_pin_mut` and `Either::as_pin_ref` (#2691)
* Add `Shared::ptr_eq` and `Shared::ptr_hash` (#2691)
* Implement `FusedStream` for `Buffered` (#2676)
* Implement `FusedStream` for all streams in `ReadyChunks` (#2693)
* Fix bug in `FuturesOrdered::push_front` (#2664)
* Remove `Fut::Output: Clone` bounds from some `Shared` methods (#2662)
* Remove `T: Debug` bounds from `Debug` implementations of `mpsc` and `oneshot` types (#2666, #2667)

# 0.3.25 - 2022-10-20

* Fix soundness issue in `join!` and `try_join!` macros (#2649)
* Implement `Clone` for `sink::Drain` (#2650)

# 0.3.24 - 2022-08-29

* Fix incorrect termination of `select_with_strategy` streams (#2635)

# 0.3.23 - 2022-08-14

* Work around MSRV increase due to a cargo bug.
```

Reviewed By: zertosh

Differential Revision: D44632588

fbshipit-source-id: bdd87cb02b3aef63a65b1f9b852579225adfedbd
2023-04-04 10:14:43 -07:00
Duncan Hill
3081646bb0 Update eden/scm/edenscm/ext/hgsql.py to resolve 3.10 DeprecationWarning
Summary:
Context
==

When the code being changed is called from a test or program using Python 3.10, deprecation warnings appear.

`DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead`

Python 3.10 is rolling out in fbcode, so it will be nice to have one less DeprecationWarning.

Implementation
==

* sed -i -E 's/(\s+)(.*)\.setDaemon\(True\)/\1\2.daemon = True/'

Reviewed By: muirdm

Differential Revision: D44620221

fbshipit-source-id: b243b5e8947c918f865efa3c46ffdc8c0e530243
2023-04-04 09:37:33 -07:00
Muir Manders
1dcb7966fc tests: turn on eagerepo for a bunch of tests
Summary: These are the tests that passed after adding "$ eagerepo". I attempted to turn on eagerepo for all tests that didn't contain "$ eagerepo" or "configure modern".

Reviewed By: quark-zju

Differential Revision: D44445379

fbshipit-source-id: b283be6d5249f74e11a3205622961e457587e93b
2023-04-04 08:42:03 -07:00
Zhaolong Zhu
fc798609de github: move post-* hook to uisetup
Summary:
based on the doc of writing extensions, post-* hooks should be setup in the `uisetup`

```
10.1. uisetup
* Changes to ui.__class__ . The ui object that will be used to run the command has not yet been created.
...
* Setup of pre-* and post-* hooks

10.2. extsetup
* Changes depending on the status of other extensions. (if extensions.find('mq'))
* Add a global option to all commands
* Extend revset

10.3. reposetup
* All hooks but pre-* and post-*
* Modify configuration variables
* Changes to repo.__class__, repo.dirstate.__class__
```

Reviewed By: sggutier

Differential Revision: D44632035

fbshipit-source-id: f37bb052a2ab225d43cf7f305b0bcccedb4add9c
2023-04-03 14:29:16 -07:00