Thu, 14 Nov 2024 16:45:23 +0100 branching: merge stable into default default tip
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Nov 2024 16:45:23 +0100] rev 52255
branching: merge stable into default
Thu, 14 Nov 2024 16:44:32 +0100 relnotes: fix 6.9rc1 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Nov 2024 16:44:32 +0100] rev 52254
relnotes: fix 6.9rc1 I forgot to remove a bunch of tempate stuff.
Thu, 14 Nov 2024 16:14:53 +0100 Added signature for changeset 31d45a1cbc47 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Nov 2024 16:14:53 +0100] rev 52253
Added signature for changeset 31d45a1cbc47
Thu, 14 Nov 2024 16:14:51 +0100 Added tag 6.9rc1 for changeset 31d45a1cbc47 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Nov 2024 16:14:51 +0100] rev 52252
Added tag 6.9rc1 for changeset 31d45a1cbc47
Thu, 14 Nov 2024 14:55:54 +0100 relnotes: add 6.9rc1 stable 6.9rc1
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Nov 2024 14:55:54 +0100] rev 52251
relnotes: add 6.9rc1
Wed, 13 Nov 2024 17:24:28 +0100 ci: let the Windows runner decide how many job they want to run stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 17:24:28 +0100] rev 52250
ci: let the Windows runner decide how many job they want to run With the extra concurrency at the runner level, this is no longer needed and might actually be counterproductive.
Sat, 09 Nov 2024 02:55:33 +0100 ci: adds a trigger for all pycompat jobs stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2024 02:55:33 +0100] rev 52249
ci: adds a trigger for all pycompat jobs This will help triggering a job of all pycompat job. In addition this will also make the pycompat job block landing of Merge Request when triggered. A quite useful feature.
Sun, 10 Nov 2024 02:11:13 +0100 wheel: build windows wheel for ARM64 too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 02:11:13 +0100] rev 52248
wheel: build windows wheel for ARM64 too
Wed, 13 Nov 2024 21:17:46 +0100 setup: preserve version part after the "+" on Windows stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 21:17:46 +0100] rev 52247
setup: preserve version part after the "+" on Windows Code introduced in early 2010 (fb203201ce30) was dropping that part after "+". The rational is to preserve version on the format w.x.y.z where each part is a number. However we have not been using that format for a while (e.g. the rc suffix) and nobody reported any fire. So I am assuming that this code serve no purpose and I am dropping it. We can reintroduce a newer version of it (that would actually achieve its purpose) in the future if needed.
Wed, 13 Nov 2024 16:13:28 +0100 setup: make sure Rust build its extension for the right python stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 16:13:28 +0100] rev 52246
setup: make sure Rust build its extension for the right python Strictly speaking, only "PYTHON_SYS_EXECUTABLE" seems to be necessary, but I don't want to take a chances, as in testing "PYTHON" also had an effect.
Wed, 13 Nov 2024 13:33:36 +0100 clone: properly exclude rev-branch-cache from post clone cache warming stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 13:33:36 +0100] rev 52245
clone: properly exclude rev-branch-cache from post clone cache warming When adding "CACHE_REV_BRANCH" to "CACHES_ALL" in e51161b12c7e, I did not expected it to impact the clone steps. However the "CACHES_POST_CLONE" set is created rather creatively. (we should fix that, but not on stable) The benchmark caught a quite significant slowdown one hardlink and ssh-stream clones. Such slow down can be reduced to around ~5% by fully warming the cache before the clone. However keeping this expensive step away from the clone operation fully fix the slowdown and preserve the initial intend. Example slowdow for hardlink clone ### benchmark.name = hg.command.clone # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.explicit-rev = none # benchmark.variants.issue6528 = default # benchmark.variants.protocol = local-hardlink # benchmark.variants.pulled-delta-reuse-policy = default # benchmark.variants.resource-usage = default # benchmark.variants.validate = default ## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog 6.8.2: 19.799752 6.9rc0: 29.017493 (+46.55%, +9.22) after: 19.929341 ## data-env-vars.name = mercurial-public-2018-08-01-zstd-sparse-revlog 6.8.2: 0.468020 6.9rc0: 1.701294 (+263.51%, +1.23) after: 0.471934 ## data-env-vars.name = pypy-2024-03-22-zstd-sparse-revlog 6.8.2: 2.397564 6.9rc0: 5.666641 (+137.41%, +3.28) after: 2.428085
Tue, 12 Nov 2024 02:22:40 +0100 wheels: update the Linux wheels make target stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 12 Nov 2024 02:22:40 +0100] rev 52244
wheels: update the Linux wheels make target This reuse the script extracted in the previous changeset and now build the wheels with the same image and code as the CI.
Wed, 13 Nov 2024 04:20:54 +0100 wheels: factor the core of Linux wheel building into a script stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 04:20:54 +0100] rev 52243
wheels: factor the core of Linux wheel building into a script This will make it easy to reuse in the release process while making sure we build the wheel the same way as in the CI.
Sat, 09 Nov 2024 01:31:14 +0100 wheel: add a job uploading nightly build stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2024 01:31:14 +0100] rev 52242
wheel: add a job uploading nightly build There are various questions around when to actually run it, and which jobs to run on the default branch, but having a working job we can decide to run manually (by running the manual dependencies) is a good step to get the wheel story from one end to the other. See inline comment for more details.
Sat, 09 Nov 2024 01:19:17 +0100 wheel: add a platform level to the wheel directories stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2024 01:19:17 +0100] rev 52241
wheel: add a platform level to the wheel directories One day, we will gather all wheel in a single directory and be able to pick the right one programmatically. This days is not today… This will help clarify things if we fetch all artifacts at the same time.
Wed, 13 Nov 2024 14:34:40 +0100 setup: use the same code to compute tag from archive stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 14:34:40 +0100] rev 52240
setup: use the same code to compute tag from archive Let us make sure we use a consistent version across the board.
Wed, 13 Nov 2024 14:28:25 +0100 setup: factor version computation in a function stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 14:28:25 +0100] rev 52239
setup: factor version computation in a function We needs it for archive too.
Wed, 13 Nov 2024 14:13:35 +0100 setup: remote a debug statement that slipped through stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 14:13:35 +0100] rev 52238
setup: remote a debug statement that slipped through While debuging version issue, I forcibly turned "6.9" in "6.9.0". And I forgot to clean it up before 9048a0d782e1 land This is unnecessary and wrong, so lets remove that line.
Sun, 10 Nov 2024 00:48:08 +0100 wheel: enforce that translation being build for windows wheel stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 00:48:08 +0100] rev 52237
wheel: enforce that translation being build for windows wheel
Sun, 10 Nov 2024 02:40:44 +0100 ci: shard the tests on windows too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 02:40:44 +0100] rev 52236
ci: shard the tests on windows too
Wed, 13 Nov 2024 00:52:13 +0100 wheel: test the built wheel in the windows tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 00:52:13 +0100] rev 52235
wheel: test the built wheel in the windows tests Same logic as Linux and Mac, we better test that what we build and ship works.
Sun, 10 Nov 2024 02:10:56 +0100 wheel: explicitly list built architecture stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 02:10:56 +0100] rev 52234
wheel: explicitly list built architecture This will help also build the ARM64 wheel once the dependencies are installed.
Sun, 10 Nov 2024 00:59:43 +0100 wheel: build Windows wheels too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 00:59:43 +0100] rev 52233
wheel: build Windows wheels too Again, cibuildwheels makes it very handy.
Sun, 10 Nov 2024 03:02:15 +0100 wheel: make --hg-wheel works on Windows stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 03:02:15 +0100] rev 52232
wheel: make --hg-wheel works on Windows There was this old outdated conditional that can simply receive our new needs… Incredibly, this is all that seems to be needed.
Sun, 10 Nov 2024 00:59:21 +0100 wheel: assign CIBW_SKIP globally stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 00:59:21 +0100] rev 52231
wheel: assign CIBW_SKIP globally The other cibuildwheels (e.g. windows) will needs it too.
Sun, 10 Nov 2024 22:30:02 +0100 windows: simply rely on the PATH adjustment to find python.exe in tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 22:30:02 +0100] rev 52230
windows: simply rely on the PATH adjustment to find python.exe in tests The shell script under a `.exe` name confused Windows outside MSYS and give us the following error: […]/python.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher. This is necessary to get the wheel variant of the test run to work properly.
Sun, 10 Nov 2024 02:39:27 +0100 ci: adjust port range on windows too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 02:39:27 +0100] rev 52229
ci: adjust port range on windows too This will help having concurrency on the windows runner too.
Mon, 11 Nov 2024 23:44:04 +0100 windows: skip test-clonebundles-autogen.t in the CI stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Nov 2024 23:44:04 +0100] rev 52228
windows: skip test-clonebundles-autogen.t in the CI This test is hanging the CI, so lets ignore it for now.
Wed, 13 Nov 2024 00:53:18 +0100 ci: split the windows runtest invocation into more granular variables stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Nov 2024 00:53:18 +0100] rev 52227
ci: split the windows runtest invocation into more granular variables This helps make things clearer and easier to adjust in sub jobs.
Sat, 09 Nov 2024 23:36:30 +0100 ci: again common element into a `.windows` template stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2024 23:36:30 +0100] rev 52226
ci: again common element into a `.windows` template This factor some code out and will help with introducing a new job about wheels.
Sat, 09 Nov 2024 23:28:36 +0100 ci: use a concurrency safe TMP dir on Windows stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2024 23:28:36 +0100] rev 52225
ci: use a concurrency safe TMP dir on Windows This should have been done in d6ed4da850ea.
Mon, 11 Nov 2024 16:42:20 +0100 windows: adjust PYTHONPATH update in test-status-color.t stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Nov 2024 16:42:20 +0100] rev 52224
windows: adjust PYTHONPATH update in test-status-color.t On Windows the PATH separator is ";", not ":". The Windows wheel wants it set with ";".
Mon, 11 Nov 2024 16:41:16 +0100 windows: work around argument size limitation in test-bookmarks-pushpull.t stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Nov 2024 16:41:16 +0100] rev 52223
windows: work around argument size limitation in test-bookmarks-pushpull.t Apparently, we need to got through MSYS for such a long argument to be accepted.
Mon, 11 Nov 2024 12:52:53 +0100 tests: drop PYTHONPATH manipulation in test-pushvars.t stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Nov 2024 12:52:53 +0100] rev 52222
tests: drop PYTHONPATH manipulation in test-pushvars.t It does not seems to serve any purpose and confuses Windows.
Mon, 11 Nov 2024 05:42:44 +0100 run-tests: cleanup the "output" directory after the related tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Nov 2024 05:42:44 +0100] rev 52221
run-tests: cleanup the "output" directory after the related tests The output confused the test discovery when left around. And it confuse the Linux and the Windows one a bit differently, so we better clean it up as it serve not purpose to keep it around.
Mon, 11 Nov 2024 11:13:34 +0100 run-tests: focus on listing the selected test for the shard tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Nov 2024 11:13:34 +0100] rev 52220
run-tests: focus on listing the selected test for the shard tests We don't care about actually running the test, but we care about what is selected and the stability of it. So we focus on using `--list-tests` to easily compare any changes that might happens.
Sun, 10 Nov 2024 00:46:44 +0100 wheel: enforce that translation being build for macos wheel stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2024 00:46:44 +0100] rev 52219
wheel: enforce that translation being build for macos wheel
Sat, 09 Nov 2024 00:59:59 +0100 dev-version: change the scheme of non tagged version stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2024 00:59:59 +0100] rev 52218
dev-version: change the scheme of non tagged version We update the dev version scheme to make it more suitable for nightly build. See inline documentation for details.
Tue, 12 Nov 2024 12:52:13 +0100 rust-update: handle SIGINT from long-running update threads stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Nov 2024 12:52:13 +0100] rev 52217
rust-update: handle SIGINT from long-running update threads The current code does not respond to ^C until after the Rust bit is finished doing its work. This is expected, since Rust holds the GIL for the duration of the call and does not call `PyErr_CheckSignals`. Freeing the GIL to do our work does not really improve anything since the Rust threads are still going, and the only way of cancelling a thread is by making it cooperate. So we do the following: - remember the SIGINT handler in hg-cpython and reset it after the call into core (see inline comment in `update.rs` about this) - make all update threads watch for a global `AtomicBool` being `true`, and if so stop their work - reset the global bool and exit early (i.e. before writing the dirstate) - raise SIGINT from `hg-cpython` if update returns `InterruptReceived`
Fri, 08 Nov 2024 17:08:11 +0100 ci: shard the test run on mac os X stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 17:08:11 +0100] rev 52216
ci: shard the test run on mac os X This should comes with some benefit: - spread the load across more runner, - reduce the real-time CI run, - reduce the "retry" run when we need them. We start with the Mac jobs, but that would be tremendously useful for Windows too. For linux, we need to reduce the startup overhead for this to be worth it. Building smaller image and speeding up clone should help with that.
Thu, 22 Sep 2022 01:02:06 +0200 run-tests: implement crude sharding support stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Sep 2022 01:02:06 +0200] rev 52215
run-tests: implement crude sharding support It will help to spread the testing load across more CI runners.
Fri, 08 Nov 2024 21:41:02 +0100 ci: have the mac test run if you trigger building the mac wheel stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 21:41:02 +0100] rev 52214
ci: have the mac test run if you trigger building the mac wheel The mac test job now depends on the wheel building. And the wheel building is manual. So if the mac test job is set to "on_success" if will be "skipped" by default, and automatically run if the wheel are build. That is especially handy as we are about to shard that test and that the UI for manual sharded test sucks.
Fri, 08 Nov 2024 21:22:02 +0100 ci: adjust the starting port range to runner concurrency stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 21:22:02 +0100] rev 52213
ci: adjust the starting port range to runner concurrency If multiple job runs on the same runner, they should not use the port range.
Fri, 08 Nov 2024 17:28:33 +0100 ci: move the "tempory work dir" to "concurrency-safe" location stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 17:28:33 +0100] rev 52212
ci: move the "tempory work dir" to "concurrency-safe" location Lets not use a global location and move at the root of the directory dedicated to the job.
Mon, 28 Oct 2024 03:29:29 +0100 ci: abstract the of absolute /tmp/ path stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 28 Oct 2024 03:29:29 +0100] rev 52211
ci: abstract the of absolute /tmp/ path We now have a TMP_WORK_DIR directory that we can update to a more sensible value in the next changesets.
Fri, 08 Nov 2024 14:56:54 +0100 ci: rationalize variable usage stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 14:56:54 +0100] rev 52210
ci: rationalize variable usage The usage of "extends" allow to skip a lot of duplication. We also introduce more fine grained variables to help finer override.
Fri, 08 Nov 2024 14:44:56 +0100 ci: move some variables closer to their usage stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 14:44:56 +0100] rev 52209
ci: move some variables closer to their usage These were defined globaly because we had trouble making them inherited. This is now fixed, so we can get them were they belong.
Fri, 08 Nov 2024 14:35:57 +0100 ci: use extends instead of <<: *x stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 14:35:57 +0100] rev 52208
ci: use extends instead of <<: *x The old form is a yaml construct that make it hard to share variable definition. The "extends:" key is a gitlab specific that preserve the variable definition and just add the new ones. This will help us to reduce duplication. This has the effect of fixing some of variants definition we though we set while we did actually not. Most notably, the "rust" variant for 3.12 and 3.13 seems fully broken in the CI (possibly because some rust-cpython version issue?). This changeset only reveal such breackage and does not introduce them.
Thu, 07 Nov 2024 17:22:05 +0100 ci: use the macos wheel to run tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Nov 2024 17:22:05 +0100] rev 52207
ci: use the macos wheel to run tests
Tue, 15 Oct 2024 05:17:37 +0200 wheel: build mac os wheel through the CI stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Oct 2024 05:17:37 +0200] rev 52206
wheel: build mac os wheel through the CI Let's start building wheel for mac os X too.
Fri, 08 Nov 2024 12:53:40 +0100 pycompat: drop some now useless workaround for makedirs stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 12:53:40 +0100] rev 52205
pycompat: drop some now useless workaround for makedirs This `exists_ok` flag was added in Python 3.2
Thu, 07 Nov 2024 23:13:32 +0100 run-tests: install wheel using --prefix instead of --user stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Nov 2024 23:13:32 +0100] rev 52204
run-tests: install wheel using --prefix instead of --user --user does not work if a venv is enabled when calling run-tests.py
Fri, 08 Nov 2024 02:02:32 +0100 ci: automatically compute the python tag we use to identify tag stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 02:02:32 +0100] rev 52203
ci: automatically compute the python tag we use to identify tag This make the determination more automatic and less error prone. In addition, this will make it possible to run on a runner without a pre-determined Python version, like what we do for the macos and windows workers.
Fri, 08 Nov 2024 02:50:34 +0100 pytype: add relative timestamp to the output if `ts` is available stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2024 02:50:34 +0100] rev 52202
pytype: add relative timestamp to the output if `ts` is available This should help to identify the module that are the slower to analyze.
Wed, 06 Nov 2024 16:40:58 +0100 ci: build (and use) wheel for all supported version stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2024 16:40:58 +0100] rev 52201
ci: build (and use) wheel for all supported version We test wheel building for all supported version and use them where applicable The usage is more verbose than I wish because .gitlab-ci is not that great.
Wed, 06 Nov 2024 16:39:45 +0100 ci: use a pre-setup many-linux image to build wheel stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2024 16:39:45 +0100] rev 52200
ci: use a pre-setup many-linux image to build wheel This produce wheel that are more universal and identical to the one we want to publish.
Wed, 06 Nov 2024 16:38:57 +0100 ci: use smaller VM to build wheel stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2024 16:38:57 +0100] rev 52199
ci: use smaller VM to build wheel There is no need for large machine for this job, Python will be mostly singled threaded anyway.
Wed, 06 Nov 2024 16:32:15 +0100 setup: add a way to force the setup to translate (or fail) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2024 16:32:15 +0100] rev 52198
setup: add a way to force the setup to translate (or fail) we add the `MERCURIAL_SETUP_FORCE_TRANSLATIONS` variable that is intended to make sure we don't stop building the translation silently.
Wed, 06 Nov 2024 16:37:10 +0100 ci: pre-adjust some identation stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2024 16:37:10 +0100] rev 52197
ci: pre-adjust some identation We adjust a couple of job to consistently use double space identation. This will make the next changesets clearer.
Thu, 07 Nov 2024 11:02:35 +0100 test-install: glob instance of "python" in warning stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Nov 2024 11:02:35 +0100] rev 52196
test-install: glob instance of "python" in warning If run with something else (e.g. python3.12) the message says "python3.12" so we just glob that away.
Thu, 07 Nov 2024 01:30:08 +0100 test-install: use the global hg for the install step stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Nov 2024 01:30:08 +0100] rev 52195
test-install: use the global hg for the install step This prevent error in some cases.
Tue, 05 Nov 2024 12:02:38 -0500 tests: bump the wait timeouts in test-racy-mutations.t stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Nov 2024 12:02:38 -0500] rev 52194
tests: bump the wait timeouts in test-racy-mutations.t This was done to try to figure out why there's output differences in the previous two commits- low timeouts have been a cause of a lot of problems on Windows. That doesn't seem to be the case here, but I'm leaving it in anyway to avoid sporadic failures.
Tue, 05 Nov 2024 11:50:29 -0500 tests: add a "missing" tests for manifest content in test-racy-mutations.t stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Nov 2024 11:50:29 -0500] rev 52193
tests: add a "missing" tests for manifest content in test-racy-mutations.t Trying to figure out why the divergence in behavior on Windows. The first test shows everything is the same on all platforms; the second shows that the other #testcase also diverges. The difference might be that `00manifest.i` doesn't get updated (and copied over) after `pre-race` is created, but I've no idea why that would be either.
Tue, 05 Nov 2024 11:48:22 -0500 tests: conditionalize missing output in test-racy-mutations.t on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Nov 2024 11:48:22 -0500] rev 52192
tests: conditionalize missing output in test-racy-mutations.t on Windows No idea why this is only missing on Windows. I verified that the line marked as missing directly above this for the changelog is, in fact, missing on both Windows and Linux. So there's probably work to do in this area on all platforms. It would be nice to figure out what is going on, but this appeases CI in the meantime.
Thu, 07 Nov 2024 10:36:12 -0500 tests: disable a section of `test-paths.t` that may hit a zeroconf bug stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 07 Nov 2024 10:36:12 -0500] rev 52191
tests: disable a section of `test-paths.t` that may hit a zeroconf bug This effectively re-disables the same test as cce9e7d2fb92, but unconditionally because it's not a pyoxidizer-specific problem. 74e16d8ca5f3 disabled the other related test for the same reason- this one was missed because it wasn't failing for the few runs when that was tested.
Tue, 05 Nov 2024 15:21:09 +0100 rust-update: make `update_from_null` respect `worker.numcpu` config option stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 05 Nov 2024 15:21:09 +0100] rev 52190
rust-update: make `update_from_null` respect `worker.numcpu` config option This was overlooked in the original series. This is important for tests (because we run many at once), and for the occasional end user that wants to keep their CPU usage in check. A future series should clean up this `worker` parameter tunelling business by rewriting the config in Rust, but doing so on stable would be a very bad idea.
Tue, 05 Nov 2024 15:18:32 +0100 rust-cpython: add a TODO about repo reuse stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 05 Nov 2024 15:18:32 +0100] rev 52189
rust-cpython: add a TODO about repo reuse This will need to be done soon-ish to prevent any surprises.
Mon, 04 Nov 2024 16:43:05 -0500 streamclone: disable the volatile file open handle optimization on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 04 Nov 2024 16:43:05 -0500] rev 52188
streamclone: disable the volatile file open handle optimization on Windows Leaving files open caused new failures like this, since a47f09da8bd1: diff --git a/tests/test-persistent-nodemap-stream-clone.t b/tests/test-persistent-nodemap-stream-clone.t --- a/tests/test-persistent-nodemap-stream-clone.t +++ b/tests/test-persistent-nodemap-stream-clone.t @@ -115,7 +115,12 @@ Do a mix of clone and commit at the same $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-1 --debug 2>> clone-output | grep -E '00(changelog|manifest)' >> clone-output; touch $HG_TEST_STREAM_WALKED_FILE_3) & $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 $ hg -R test-repo/ commit -m foo - created new head + transaction abort! + failed to recover 00changelog.n ([WinError 32] The process cannot access the file because it is being used by another process: b'$STR_REPR_TESTTMP\\test-repo/.hg/store/00changelog.n' -> b'$STR_REPR_TESTTMP\\test-repo/.hg/store/00changelog.n-f418dcd6') + rollback failed - please run hg recover + (failure reason: [WinError 32] The process cannot access the file because it is being used by another process: b'$STR_REPR_TESTTMP\\test-repo/.hg/store/00changelog.n' -> b'$STR_REPR_TESTTMP\\test-repo/.hg/store/00changelog.n-f418dcd6') + abort: The process cannot access the file because it is being used by another process: '$TESTTMP\test-repo\.hg\store\00changelog.n' + [255] $ touch $HG_TEST_STREAM_WALKED_FILE_2 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 $ cat clone-output Since the `VolatileManager` falls back to the old copy method when the open file threshold is exceeded, this just drops the threshold so that only 1 file is open. The actual value used (2) is unexpected, and explained inline. I'd like to have a config option for this so that we can test both ways (in theory, it could resort to copies on non-Windows systems too), but I don't see a `uimod.ui` handy. Alternately, I tried replacing the 3 `open()` calls in the `VolatileManager` with `util.posixfile()`, but that simply hung the test on Windows for some reason, I think on the same line that's indicated as failing above. (There was a `grep` command hanging around, as well as `hg -R test-repo serve --stdio`.)
Mon, 04 Nov 2024 17:42:30 -0500 tests: treat `select` as a built-in module on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 04 Nov 2024 17:42:30 -0500] rev 52187
tests: treat `select` as a built-in module on Windows This fixes: --- C:/Users/Matt/hg/tests/test-check-module-imports.t +++ C:/Users/Matt/hg/tests/test-check-module-imports.t.err @@ -43,3 +43,15 @@ > -X tests/test-verify-repo-operations.py \ > -X tests/test-extension.t \ > | sed 's-\\-/-g' | "$PYTHON" "$import_checker" - + hgext/zeroconf/Zeroconf.py:86: stdlib import "socket" follows local import: select\r (esc) + hgext/zeroconf/Zeroconf.py:87: stdlib import "struct" follows local import: select\r (esc) + hgext/zeroconf/Zeroconf.py:88: stdlib import "threading" follows local import: select\r (esc) + hgext/zeroconf/Zeroconf.py:89: stdlib import "time" follows local import: select\r (esc) + hgext/zeroconf/Zeroconf.py:90: stdlib import "traceback" follows local import: select\r (esc) + mercurial/posix.py:18: stdlib import "stat" follows local import: select\r (esc) + mercurial/posix.py:19: stdlib import "sys" follows local import: select\r (esc) + mercurial/posix.py:20: stdlib import "tempfile" follows local import: select\r (esc) + mercurial/posix.py:21: stdlib import "typing" follows local import: select\r (esc) + tests/tinyproxy.py:19: stdlib import "socket" follows local import: select\r (esc) + tests/tinyproxy.py:20: stdlib import "sys" follows local import: select\r (esc) + [1] ERROR: test-check-module-imports.t output changed
Mon, 21 Oct 2024 12:58:40 +0200 rust-vfs: add docstrings to all VFS methods on the trait
Raphaël Gomès <rgomes@octobus.net> [Mon, 21 Oct 2024 12:58:40 +0200] rev 52186
rust-vfs: add docstrings to all VFS methods on the trait
Thu, 10 Oct 2024 15:54:45 +0200 rust-vfs: support checkambig
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Oct 2024 15:54:45 +0200] rev 52185
rust-vfs: support checkambig This was missing from the Rust code, which means worse caching. See https://wiki.mercurial-scm.org/ExactCacheValidationPlan. Explanations on what ambiguity means inline.
Tue, 08 Oct 2024 16:10:30 +0200 rust-vfs: add tests to `AtomicFile`
Raphaël Gomès <rgomes@octobus.net> [Tue, 08 Oct 2024 16:10:30 +0200] rev 52184
rust-vfs: add tests to `AtomicFile` This also makes it more usable from Rust by separating `from_file` and `new`.
Tue, 08 Oct 2024 16:09:39 +0200 rust-vfs: delete the temp file and not the target on drop
Raphaël Gomès <rgomes@octobus.net> [Tue, 08 Oct 2024 16:09:39 +0200] rev 52183
rust-vfs: delete the temp file and not the target on drop Oops. This never affected anything since `close()` is correct and no code has dropped an `AtomicFile` without a close first yet. Next patch will add tests.
Thu, 26 Sep 2024 14:26:24 +0200 rust: don't star export from the `revlog` module
Raphaël Gomès <rgomes@octobus.net> [Thu, 26 Sep 2024 14:26:24 +0200] rev 52182
rust: don't star export from the `revlog` module This made a lot of the imports confusing because they didn't make sense at the top level (so, outside of `revlog`), and they hide the more common types when autocompleting.
Thu, 01 Aug 2024 11:27:20 +0200 rust: populate mmaps in a separate thread if possible
Raphaël Gomès <rgomes@octobus.net> [Thu, 01 Aug 2024 11:27:20 +0200] rev 52181
rust: populate mmaps in a separate thread if possible Same rationale as b619ba39d10a.
Wed, 31 Jul 2024 15:41:08 +0200 rust-revlog: build an in-memory nodemap if a given revlog gets queried a lot
Raphaël Gomès <rgomes@octobus.net> [Wed, 31 Jul 2024 15:41:08 +0200] rev 52180
rust-revlog: build an in-memory nodemap if a given revlog gets queried a lot This will help with non-persistent nodemap repos that would benefit from one, and mirrors what the C implementation does.
Wed, 31 Jul 2024 15:11:27 +0200 rust-revlog: generalize an error message
Raphaël Gomès <rgomes@octobus.net> [Wed, 31 Jul 2024 15:11:27 +0200] rev 52179
rust-revlog: generalize an error message This is used for more than the nodemap data.
Wed, 31 Jul 2024 13:35:54 +0200 rust-revlog: don't create an in-memory nodemap for filelogs from Python
Raphaël Gomès <rgomes@octobus.net> [Wed, 31 Jul 2024 13:35:54 +0200] rev 52178
rust-revlog: don't create an in-memory nodemap for filelogs from Python Explanations inline. Benchmarks from this change affect positively the only repo that showed this being a problem: ``` ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip default: 62.848869 ~~~~~ before-this-patch: 58.113051 (-7.54%, -4.74) this-patch: 57.407533 (-8.66%, -5.44) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none default: 3.173532 ~~~~~ before-this-patch: 3.543591 (+11.66%, +0.37) this-patch: 3.297235 (+3.90%, +0.12) ```
Wed, 31 Jul 2024 15:02:55 +0200 rust-revlog: move non-persistent-nodemap rev lookup to the index
Raphaël Gomès <rgomes@octobus.net> [Wed, 31 Jul 2024 15:02:55 +0200] rev 52177
rust-revlog: move non-persistent-nodemap rev lookup to the index It only uses index features and does not need to be on the revlog. A later patch will make use of this function from a different context.
Mon, 29 Jul 2024 20:39:34 +0200 revlog: add glue to use a pure-Rust VFS
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:39:34 +0200] rev 52176
revlog: add glue to use a pure-Rust VFS This will save us a lot of calling back into Python, which is always horribly expensive. We are now faster in all benchmarked cases except for `log --patch` specifically on mozilla-try. Fixing this will happen in a later patch. ``` ### data-env-vars.name = mercurial-devel-2024-03-22-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 1.760765 ~~~~~ 5559d7e63ec3: 1.555513 (-11.66%, -0.21) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 62.848869 ~~~~~ 5559d7e63ec3: 58.113051 (-7.54%, -4.74) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none e679697a6ca4: 3.173532 ~~~~~ 5559d7e63ec3: 3.543591 (+11.66%, +0.37) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = none e679697a6ca4: 1.214698 ~~~~~ 5559d7e63ec3: 1.192478 (-1.83%, -0.02) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 56.205474 ~~~~~ 5559d7e63ec3: 51.520074 (-8.34%, -4.69) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none e679697a6ca4: 2.105419 ~~~~~ 5559d7e63ec3: 2.051849 (-2.54%, -0.05) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = none e679697a6ca4: 0.309960 ~~~~~ 5559d7e63ec3: 0.299035 (-3.52%, -0.01) ### data-env-vars.name = tryton-public-2024-03-22-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 1.849832 ~~~~~ 5559d7e63ec3: 1.805076 (-2.42%, -0.04) ### data-env-vars.name = tryton-public-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none e679697a6ca4: 0.289521 ~~~~~ 5559d7e63ec3: 0.279889 (-3.33%, -0.01) ### data-env-vars.name = tryton-public-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = none e679697a6ca4: 0.332270 ~~~~~ 5559d7e63ec3: 0.323324 (-2.69%, -0.01) ```
Mon, 29 Jul 2024 20:35:44 +0200 fncache: add attribute to check whether we're using dotencode
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:35:44 +0200] rev 52175
fncache: add attribute to check whether we're using dotencode This will make it easy to know if we can use the Rust implementation that doesn't support older forms of encoding.
Mon, 29 Jul 2024 20:34:38 +0200 fncachestore: add typing information
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:34:38 +0200] rev 52174
fncachestore: add typing information This helps with autocomplete.
Mon, 29 Jul 2024 20:34:06 +0200 fncache: refactor load check into a property
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:34:06 +0200] rev 52173
fncache: refactor load check into a property This makes the intent more obvious new callers less prone to error.
Mon, 29 Jul 2024 20:49:07 +0200 hg-core: add FnCacheVFS
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:49:07 +0200] rev 52172
hg-core: add FnCacheVFS This will allow us to only call back into Python to add items to the fncache, which should save us a lot of FFI overhead. This is also of course a stepping stone for more pure Rust work.
Mon, 29 Jul 2024 20:47:43 +0200 hg-core: add a complete VFS
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:47:43 +0200] rev 52171
hg-core: add a complete VFS This will be used from Python in a later change. More changes are needed in hg-core and rhg to properly clean up the APIs of the old VFS implementation but it can be done when the dust settles and we start adding more functionality to the pure Rust VFS.
Mon, 29 Jul 2024 20:28:42 +0200 hg-core: add fncache module
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 20:28:42 +0200] rev 52170
hg-core: add fncache module For now it's only a super simple trait. It will be used for calling back into Python soon, and later will be fleshed out into a full fncache.
Thu, 26 Sep 2024 13:55:26 +0200 rust: populate mmap by default if available
Raphaël Gomès <rgomes@octobus.net> [Thu, 26 Sep 2024 13:55:26 +0200] rev 52169
rust: populate mmap by default if available See 522b4d729e89edc76544fa549ed36de4aea0b7fb for more details. Background population to follow in a later patch.
Wed, 19 Jun 2024 18:20:22 +0200 rust-changelog: switch away from deprecated APIs for datetime use
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 18:20:22 +0200] rev 52168
rust-changelog: switch away from deprecated APIs for datetime use This was caught by clippy, nothing was changed aside from some light API changes.
Wed, 19 Jun 2024 19:10:49 +0200 revlog: add the glue to use the Rust `InnerRevlog` from Python
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 19:10:49 +0200] rev 52167
revlog: add the glue to use the Rust `InnerRevlog` from Python The performance of this has been looked at for quite some time, and some workflows are actually quite a bit faster than with the Python + C code. However, we are still (up to 20%) slower in some crucial places like cloning certain repos, log, cat, which makes this an incomplete rewrite. This is mostly due to the high amount of overhead in Python <-> Rust FFI, especially around the VFS code. A future patch series will rewrite the VFS code in pure Rust, which should hopefully get us up to par with current perfomance, if not better in all important cases. This is a "save state" of sorts, as this is a ton of code, and I don't want to pile up even more things in a single review. Continuing to try to match the current performance will take an extremely long time, if it's not impossible, without the aforementioned VFS work.
Wed, 19 Jun 2024 17:03:13 +0200 changelog: also set the general delta config flag in the data config
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:03:13 +0200] rev 52166
changelog: also set the general delta config flag in the data config This duplication is dubious, but it's a decision to be made at a later date, this is the fix.
Mon, 29 Jul 2024 15:03:52 +0200 rust-index: use `IndexEntry::offset` to compute read segments
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 15:03:52 +0200] rev 52165
rust-index: use `IndexEntry::offset` to compute read segments This only matters for inline revlogs where the impact is debatable, but this is what the C index does.
Thu, 10 Oct 2024 10:34:51 +0200 rust-revlog: add a Rust-only `InnerRevlog`
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Oct 2024 10:34:51 +0200] rev 52164
rust-revlog: add a Rust-only `InnerRevlog` This mirrors the Python `InnerRevlog` and will be used in a future patch to replace said Python implementation. This allows us to start doing more things in pure Rust, in particular reading and writing operations. A lot of changes have to be introduced all at once, it wouldn't be very useful to separate this patch IMO since all of them are either interlocked or only useful with the rest.
Thu, 10 Oct 2024 10:38:35 +0200 rust-index: fix the computation of data start
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Oct 2024 10:38:35 +0200] rev 52163
rust-index: fix the computation of data start This was falling into place instead of being correct, we clean up the logic by differenciating the on-disk offset and the actual start of the data more cleanly.
Thu, 10 Oct 2024 10:38:10 +0200 rust-index: return an error on a bad index header
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Oct 2024 10:38:10 +0200] rev 52162
rust-index: return an error on a bad index header This is more idiomatic and allows us to better handle the problem later.
Thu, 17 Oct 2024 15:22:38 +0200 rust-vfs: add a TODO to remember a decision taken about naming
Raphaël Gomès <rgomes@octobus.net> [Thu, 17 Oct 2024 15:22:38 +0200] rev 52161
rust-vfs: add a TODO to remember a decision taken about naming Explanations inline.
Wed, 25 Sep 2024 18:24:15 +0200 rust-revlog: introduce an `options` module
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Sep 2024 18:24:15 +0200] rev 52160
rust-revlog: introduce an `options` module This helps group all the relevant revlog options code and makes the `mod.rs` more readable.
Wed, 25 Sep 2024 18:10:03 +0200 rust-revlog: add file IO helpers
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Sep 2024 18:10:03 +0200] rev 52159
rust-revlog: add file IO helpers This will be useful for the upcoming `InnerRevlog`.
Wed, 25 Sep 2024 16:42:21 +0200 rust-revlog: add compression helpers
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Sep 2024 16:42:21 +0200] rev 52158
rust-revlog: add compression helpers This will be used in the upcoming `InnerRevlog` when reading/writing data.
Thu, 31 Oct 2024 17:24:18 -0400 hgweb: skip logging ConnectionAbortedError stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 31 Oct 2024 17:24:18 -0400] rev 52157
hgweb: skip logging ConnectionAbortedError Not stacktracing on `ConnectionResetError` was added in 6bbb12cba5a8 (though it was spelled differently for py2 support), but for some reason Windows occasionally triggers a `ConnectionAbortedError` here across various *.t files (notably `test-archive.t` and `test-lfs-serve-access.t`, but there are others). The payload that fails to send seems to be the html that describes the error to the client, so I suspect some code is seeing the error status code and closing the connection before the server gets to write this html. So don't log it, for test stability- nothing we can do anyway. FWIW, the CPython implementation of wsgihander specifically ignores these two errors, plus `BrokenPipeError`, with a comment that "we expect the client to close the connection abruptly from time to time"[1]. The `BrokenPipeError` is swallowed a level up in `do_write()`, and avoids writing the response following this stacktrace. I'm puzzled why a response is being written after these connection errors are detected- the CPython code referenced doesn't, and the connection is now broken at this point. Perhaps these errors should both be handled with the `BrokenPipeError` after the freeze. (The refactoring away from py2 compat may not be desireable in the freeze, but this is much easier to read, and obviously correct given the referenced CPython code.) I suspect this is what 6bceecb28806 was attempting to fix, but it wasn't specific about the sporadic errors it was seeing. [1] https://github.com/python/cpython/blob/b2eaa75b176e07730215d76d8dce4d63fb493391/Lib/wsgiref/handlers.py#L139
Fri, 25 Oct 2024 17:15:53 -0400 ci: add a runner for Windows 10 stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 17:15:53 -0400] rev 52156
ci: add a runner for Windows 10 This is currently only manually invoked, and allows for failure because we only have a single runner that takes over 2h for a full run, and there are a handful of flakey tests, plus 3 known failing tests. The system being used here is running MSYS, Python, Visual Studio, etc, as installed by `install-windows-dependencies.ps1`. This script installs everything to a specific directory instead of using the defaults, so we adjust the MinGW shell path to compensate. Additionally, the script doesn't install the launcher `py.exe`. It is possible to adjust the script to install it, but it's an option to an existing python install (instead of a standalone installer), and I've had the whole python install fail and rollback when requested to install the launcher if it detects a newer one is already installed. In short, it is a point of failure for a feature we don't (yet?) need. Unlike other systems where the intepreter name includes the version, everything here is `python.exe`, so they can't all exist on `PATH` and let the script choose the desired one. (The `py.exe` launcher would accomplish, using the registry instead of `PATH`, but that wouldn't allow for venv installs.) Because of this, switch to the absolute path of the python interpreter to be used (in this case a venv created from the py39 install, which is old, but what both pyoxidizer and TortoiseHg currently use). The `RUNTEST_ARGS` hardcodes `-j8` because this system has 4 cores, and therefore runs 4 parallel tests by default. However on Windows, using more parallel tests than cores results in better performance for whatever reason. I don't have an optimal value yet (ideally the runner itself can make the adjustment on Windows), but this results in saving ~15m on a full run that otherwise takes ~2.5h. I'm also not concerned about how it would affect other Windows machines, because we don't have any at this point, and I have no idea when we can get more. As far as system setup goes, the CI is run by a dedicated user that lacks admin rights. The install script was run by an admin user, and then the standard user was configured to use it. If I set this up again, I'd probably give the dedicated user admin rights to run the install script, and reset to standard user rights when done. The python intepreter failed in weird ways when run by the standard user until it was manually reinstalled by the standard user: Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Additionally, changing the environment through the Windows UI prompts to escalate to an admin user, and then setting the user level environment variables like `TEMP` and `PATH` (to try to avoid exceeding the 260 character path limit) didn't actually change the user's environment. (Likely it changed the admin user's environment, but I didn't confirm that.) I ended up having to use the registry editor for the standard user to make those changes.
Fri, 11 Oct 2024 15:04:13 -0400 tests: disable a section of `test-hgrc.t` that may hit a zeroconf bug stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Oct 2024 15:04:13 -0400] rev 52155
tests: disable a section of `test-hgrc.t` that may hit a zeroconf bug This effectively re-disables the same test as cce9e7d2fb92, but unconditionally because it's not a pyoxidizer-specific problem (see below and 997c9b2069d1). I can run the test locally fine, with the same venv as CI is using, and have had multiple CI runs that don't hit this. But one failed with this: --- /private/tmp/mercurial-ci/tests/test-hgrc.t +++ /private/tmp/mercurial-ci/tests/test-hgrc.t.err @@ -305,5 +305,17 @@ [255] $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf= + Traceback (most recent call last): + File "/private/tmp/hgtests.7idf706t/install/lib/python/hgext/zeroconf/Zeroconf.py", line 966, in run + self.readers[sock].handle_read() + File "/private/tmp/hgtests.7idf706t/install/lib/python/hgext/zeroconf/Zeroconf.py", line 1020, in handle_read + msg = DNSIncoming(data) + File "/private/tmp/hgtests.7idf706t/install/lib/python/hgext/zeroconf/Zeroconf.py", line 537, in __init__ + self.readOthers() + File "/private/tmp/hgtests.7idf706t/install/lib/python/hgext/zeroconf/Zeroconf.py", line 650, in readOthers + self.readCharacterString(), + File "/private/tmp/hgtests.7idf706t/install/lib/python/hgext/zeroconf/Zeroconf.py", line 584, in readCharacterString + length = ord(self.data[self.offset]) + TypeError: ord() expected string of length 1, but int found foo = $TESTTMP/bar The zeroconf extension has bytes vs str problems that are obvious from inspection alone, and nobody has complained, so I'm not going to let this block getting CI for macOS up and running. Given that it's in the packet read code, I suspect that this 1) requires something on the network to speak mDNS, and 2) it is a timing issue if this is seen or not. (The bytes vs str issue itself is real, but only happen if a response is received quickly.)
Fri, 11 Oct 2024 11:03:21 -0400 tests: disable `test-git-interop.t` with a requirements directive stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Oct 2024 11:03:21 -0400] rev 52154
tests: disable `test-git-interop.t` with a requirements directive Note that the failures in this test affect all platforms. I don't like this, but the test has been broken for awhile because of dirstate API changes, and nobody noticed because the required `pygit2` package isn't installed on the CI systems. I did install it on the mac CI system, which triggers this failure. Disabling it is no worse than not running it due to the missing package, but at least this way the CI systems can get the package installed, and the test can be enabled and fixed eventually, without needing to alter the CI systems. The feature here is kind of abused. I thought about adding one specifically to test for CI, but didn't feel like doing it at this point. Maybe if we need to disable things to get the Windows CI off the ground (but that likely requires testing for CI + platform).
Fri, 01 Nov 2024 16:22:40 -0400 tests: stabilize `test-extdiff.t` on macOS stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 01 Nov 2024 16:22:40 -0400] rev 52153
tests: stabilize `test-extdiff.t` on macOS The recent change in the extdiff extension to take into account whether the GUI is accessible in d1b54c152673 started triggering this. I was able to run the test cleanly without this change at the console, but somewhere along the line, I read that the CI runner isn't able to access the GUI when not run as the root user. This is causing CI failures, so we conditionalize these tests out where `DISPLAY` is set to a non empty value to force `procutil.isgui()` to be True, when it in fact doesn't have GUI access.
Tue, 29 Oct 2024 09:38:48 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Oct 2024 09:38:48 +0100] rev 52152
branching: merge stable into default
Sun, 27 Oct 2024 23:34:50 +0100 ci: build a wheel and use it to run c tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 27 Oct 2024 23:34:50 +0100] rev 52151
ci: build a wheel and use it to run c tests First step into building and testing wheel automatically.
Sun, 27 Oct 2024 14:10:45 +0100 ci: split the jobs on more stage stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 27 Oct 2024 14:10:45 +0100] rev 52150
ci: split the jobs on more stage We start to have a lot of job, grouping them help to clarifying the pipeline. We don't actually create dependency between each stage, so everything still run concurrently. However we are about to introduce some wheel-building job that will be reused by some tests. So some dependencies are coming.
Sun, 27 Oct 2024 14:08:57 +0100 ci: unify the way `check-pytype` inherit the common setting stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 27 Oct 2024 14:08:57 +0100] rev 52149
ci: unify the way `check-pytype` inherit the common setting All the other job use this syntax, so lets us it there too.
Sun, 27 Oct 2024 08:54:48 +0100 run-tests: add a --hg-wheel options to test a pre-built wheel stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 27 Oct 2024 08:54:48 +0100] rev 52148
run-tests: add a --hg-wheel options to test a pre-built wheel This will be useful to test the wheel we intend to publish. A future changeset will integrate this in the CI.
Sun, 27 Oct 2024 08:54:43 +0100 run-tests: don't use shell call for subprocess stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 27 Oct 2024 08:54:43 +0100] rev 52147
run-tests: don't use shell call for subprocess This part of the test runner seems to comes for some ages ago.
Mon, 28 Oct 2024 16:31:49 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:31:49 +0100] rev 52146
branching: merge stable into default
Mon, 28 Oct 2024 16:26:04 +0100 Added signature for changeset dc97e8670dec stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:26:04 +0100] rev 52145
Added signature for changeset dc97e8670dec
Mon, 28 Oct 2024 16:26:03 +0100 Added tag 6.9rc0 for changeset dc97e8670dec stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:26:03 +0100] rev 52144
Added tag 6.9rc0 for changeset dc97e8670dec
Mon, 28 Oct 2024 16:25:23 +0100 doc: register the `config-doc` rst directive stable 6.9rc0
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 16:25:23 +0100] rev 52143
doc: register the `config-doc` rst directive This was making the build fail because the directive was unknown.
Mon, 28 Oct 2024 15:50:20 +0100 relnotes: add 6.9rc0 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 15:50:20 +0100] rev 52142
relnotes: add 6.9rc0
Mon, 28 Oct 2024 12:35:22 +0100 branching: merge default into stable stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 12:35:22 +0100] rev 52141
branching: merge default into stable We will be releasing 6.9rc0 soon.
Mon, 28 Oct 2024 11:45:02 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:45:02 +0100] rev 52140
branching: merge stable into default
Mon, 28 Oct 2024 11:40:49 +0100 Added signature for changeset eae3ec345e5e stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:40:49 +0100] rev 52139
Added signature for changeset eae3ec345e5e
Mon, 28 Oct 2024 11:40:25 +0100 Added tag 6.8.2 for changeset eae3ec345e5e stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:40:25 +0100] rev 52138
Added tag 6.8.2 for changeset eae3ec345e5e
Mon, 28 Oct 2024 11:39:03 +0100 relnotes: add 6.8.2 stable 6.8.2
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Oct 2024 11:39:03 +0100] rev 52137
relnotes: add 6.8.2
Fri, 25 Oct 2024 17:33:47 +0200 evolution: stop wrongly flagging unrelated part of a split as divergent stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 17:33:47 +0200] rev 52136
evolution: stop wrongly flagging unrelated part of a split as divergent Before this change, divergence introduced by successors of a split would "spill" to other unrelated successors of the split that were not ambiguous. This small changes fixes it. Thanks goes to Manuel Jacobs for the discussion leading to this realization that a new simple and correct definition could be found.
Sun, 27 Oct 2024 17:29:18 -0400 tests: skip doctests that use `time.tzset()` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 27 Oct 2024 17:29:18 -0400] rev 52135
tests: skip doctests that use `time.tzset()` on Windows There's no way to conditionally skip the tests for a function (see the inline feature request). That leaves us with the choice to either put the whole `mercurial.utils.dateutil` module in the skip list of this script (but then this script prints out the module as unexpectedly not tested, and misses a bunch of tests that can be run), blacklist the test entirely (but that makes it harder to work with on Windows), or use this hack to look for the statement that is broken, and skip the test currently attached to one function. (It appears that an example in the list of examples corresponds to a single `>>>` block, and the `test` itself corresponds to a single function. So prescan the examples, and skip all of them when the statement is found in any, since the setup of setting the timezone has an effect on subsequent examples.)
Mon, 07 Oct 2024 12:08:48 +0100 tests: hopefully fix `test-doctest.py` on Windows and more
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 07 Oct 2024 12:08:48 +0100] rev 52134
tests: hopefully fix `test-doctest.py` on Windows and more 1. Shell syntax understood by `shell=True` depends on the platform. Instead, pass `shell=False` and call `sh` explicitly to interpret the command correctly. 2. Stop setting `HGRCPATH=/dev/null`, so the setting `experimental.evolution=createmarkers` is set correctly. The reason I set HGRCPATH to /dev/null previously is because of misunderstanding where I thought the Python script had no HGRC to edit. As it turns out, there is in fact a valid temporary HGRC pointed to by HGRCPATH in this context so we don't seem to need this. /shrug
Sat, 26 Oct 2024 13:56:46 -0400 hghave: make the description for "clang-format" ascii
Matt Harbison <matt_harbison@yahoo.com> [Sat, 26 Oct 2024 13:56:46 -0400] rev 52133
hghave: make the description for "clang-format" ascii test-fix-clang-format.t suddenly started failing on Windows by wiping the whole file content, and replacing with an error: $TESTTMP.sh: $TESTTMP.sh: cannot execute binary file Odd, because I don't have `clang-format` installed, so the test should be skipped. The problem started with 73cf8b56c2f5, and I noticed that running `hghave` manually resulted in a `SyntaxError` (so I can't see how this isn't broken everywhere, but maybe it's because I'm using py3.9 on Windows): $ py hghave --list Traceback (most recent call last): File "hghave", line 8, in <module> import hghave File "c:\Users\Matt\hg\tests\hghave.py", line 627 SyntaxError: Non-ASCII character '\xe2' in file c:\Users\Matt\hg\tests\hghave.py on line 627, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Sat, 26 Oct 2024 23:33:19 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 23:33:19 +0200] rev 52132
branching: merge stable into default Hopefully this will bring the last changes necessary to make the 3.13 tests green (on Linux).
Fri, 25 Oct 2024 23:46:20 -0400 tests: enable pytype checking on `mercurial/wireprotov1peer.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:46:20 -0400] rev 52131
tests: enable pytype checking on `mercurial/wireprotov1peer.py`
Fri, 25 Oct 2024 23:45:05 -0400 typing: suppress bogus pytype errors in `mercurial/wireprotov1peer.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:45:05 -0400] rev 52130
typing: suppress bogus pytype errors in `mercurial/wireprotov1peer.py` Fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 100, in result: No attribute '_peerexecutor' on unsentfuture [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 278, in close: No attribute 'shutdown' on None [attribute-error] Called from (traceback): line 123, in __exit__ File "/mnt/c/Users/Matt/hg/mercurial/wireprotov1peer.py", line 278, in close: No attribute 'shutdown' on None [attribute-error] In Optional[concurrent.futures.thread.ThreadPoolExecutor] We drop the zope decorator on `peerexecutor`, because otherwise it triggers this error: File "/tmp/mercurial-ci/mercurial/wireprotov1peer.py", line 111, in <module>: Invalid type annotation [invalid-annotation] Must be constant Not sure why, because the decorated classes usually get typed as `Any`, which would also be fine here.
Fri, 25 Oct 2024 23:09:10 -0400 tests: enable pytype checking on `mercurial/wireprotoframing.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:09:10 -0400] rev 52129
tests: enable pytype checking on `mercurial/wireprotoframing.py`
Fri, 25 Oct 2024 23:07:34 -0400 typing: suppress bogus pytype errors in `mercurial/wireprotoframing.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Oct 2024 23:07:34 -0400] rev 52128
typing: suppress bogus pytype errors in `mercurial/wireprotoframing.py` This fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 480, in createalternatelocationresponseframe: unsupported operand type(s) for item assignment: bytes [unsupported-operands] No attribute '__setitem__' on bytes File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 510, in createcommanderrorresponse: unsupported operand type(s) for item assignment: bytes [unsupported-operands] No attribute '__setitem__' on bytes File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 776, in __init__: Can't find module 'mercurial.zstd'. [import-error] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 804, in __init__: Can't find module 'mercurial.zstd'. [import-error] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoframing.py", line 834, in populatestreamencoders: Can't find module 'mercurial.zstd'. [import-error] Using `TypedDict` is tempting here to fix the first two, but requires str keys. The code doing the importing doesn't call the code at the other three locations if the `mercurial.zstd` module fails to import in a place that handles the ImportError.
Thu, 24 Oct 2024 22:47:31 -0400 wireprototypes: make `baseprotocolhandler` methods abstract
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 22:47:31 -0400] rev 52127
wireprototypes: make `baseprotocolhandler` methods abstract The documentation says it's an abstract base class, so let's enforce it. The `typing.Protocol` class is already an ABC, but it only prevents instantiation if there are abstract attrs that are missing. For example, from `hg debugshell`: >>> from mercurial import wireprototypes >>> x = wireprototypes.baseprotocolhandler() Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: Can't instantiate abstract class baseprotocolhandler with abstract method name >>> class fake(wireprototypes.baseprotocolhandler): ... pass ... >>> x = fake() Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: Can't instantiate abstract class fake with abstract method name That's great, but it doesn't protect against calling non-abstract methods at runtime, rather it depends on the protocol type hint being added to method signatures or class attrs, and then running a type checker to notice when an instance is assigned that doesn't conform to the protocol. We don't widely use type hints yet, and do have a lot of class hierarchy in the repository area, which could lead to surprises like this: >>> class fake(wireprototypes.baseprotocolhandler): ... @property ... def name(self) -> bytes: ... return b'name' ... >>> z = fake() >>> z.client() >>> print(z.client()) None Oops. That was supposed to return `bytes`. So not only is a bad/unexpected value returned, but it's one that violates the type hints (since the base client() method will be annotated to return bytes). With this change, we get: >>> from mercurial import wireprototypes >>> class fake(wireprototypes.baseprotocolhandler): ... @property ... def name(self) -> bytes: ... return b'name' ... >>> x = fake() Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: Can't instantiate abstract class fake with abstract methods addcapabilities, checkperm, client, getargs, getpayload, getprotocaps, mayberedirectstdio So this looks like a reasonable safety harness to me, and lets us catch problems by running the standard tests while the type hints are being added, and pytype is improved. We should probably do this for all Protocol class methods that don't supply a method implementation.
Thu, 24 Oct 2024 22:37:45 -0400 wireprototypes: convert `baseprotocolhandler.name` to an abstract property
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 22:37:45 -0400] rev 52126
wireprototypes: convert `baseprotocolhandler.name` to an abstract property PyCharm was flagging the subclasses where this was declared as a `@property` with Type of 'name' is incompatible with 'baseprotocolhandler' But pytype didn't complain. This seems more correct, however. Since `Protocol` is already an `abc.ABCMeta` class, we don't need to mess with the class hierarchy.
Thu, 24 Oct 2024 20:50:47 -0400 wireprotoserver: subclass the new `baseprotocolhandler` Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 20:50:47 -0400] rev 52125
wireprotoserver: subclass the new `baseprotocolhandler` Protocol class
Thu, 24 Oct 2024 20:47:12 -0400 wireprototypes: convert `baseprotocolhandler` to a Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 20:47:12 -0400] rev 52124
wireprototypes: convert `baseprotocolhandler` to a Protocol class The methodology for doing this is now known, and this is limited to two implementing classes, so just make the changes.
Sat, 26 Oct 2024 12:56:02 +0200 test: stabilize `test-audit-path.t` in rust (hopefully)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 12:56:02 +0200] rev 52123
test: stabilize `test-audit-path.t` in rust (hopefully) We have been seeing flakiness on the file reported for a bit.
Sat, 26 Oct 2024 05:09:55 +0200 pycompat: drop test involving assigning "foo" to `sys.hexversion` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 05:09:55 +0200] rev 52122
pycompat: drop test involving assigning "foo" to `sys.hexversion` Starting with python 3.13, `sys.hexversion` refuse to be assigned non-hex value like "foo". I don't think I can blame it. It is time to drop that part of the tests.
Sat, 26 Oct 2024 05:11:58 +0200 pycompat: filter more of the traceback in `test-flagproccessor.t` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 05:11:58 +0200] rev 52121
pycompat: filter more of the traceback in `test-flagproccessor.t` The traceback changes again with 3.13. So we filter it to only keeps the bits we care about. This is actually only reusing the approach from a few line below.
Fri, 25 Oct 2024 00:46:22 +0200 pycompat: ignore the fork + thread warning for now stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 00:46:22 +0200] rev 52120
pycompat: ignore the fork + thread warning for now No known issues has been reported and this is breaking the CI quite hard. So for now we have to delay the issue.
Thu, 24 Oct 2024 22:55:45 -0400 wireprototypes: fix exception handling code with a bad pytype suppression stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Oct 2024 22:55:45 -0400] rev 52119
wireprototypes: fix exception handling code with a bad pytype suppression This goes back to f5fcf7123a92, and I suspect it was a misread of the error message is describes- the LHS of `.sorted()` is always bytes, and bytes didn't have this method in py2 either. The invalid names were already handled like this a few lines above. PyCharm flagged this, and it stood out after converting the zope interfaces to Protocol classes (which hasn't been published yet).
Fri, 18 Oct 2024 14:14:24 -0400 tests: conditionalize undesired output on Windows for rbc the mmap cases
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Oct 2024 14:14:24 -0400] rev 52118
tests: conditionalize undesired output on Windows for rbc the mmap cases I don't want to lose sight of this issue, and it's useful to be able to turn on mmap support to hack on the underlying problem. As noted in the previous commit, I think the current usage of `mmap` and `memoryview` needs to be reworked for correctness on posix anyway.
Fri, 18 Oct 2024 13:21:23 -0400 rev-branch-cache: disable mmapping by default on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Oct 2024 13:21:23 -0400] rev 52117
rev-branch-cache: disable mmapping by default on Windows See the inline comment for why. The commands work, other than leaving extra files laying around. Perhaps there's some way to get this to work like on posix with some `CreateFile` magic (though it already uses `FILE_SHARE_DELETE`, so I'm not sure offhand what else we can do). However big picture- it seems wrong that the old file is left mmapped, a new one moved into place, and the mapping left over the old file instead of retargeted to the new file. That's got to be a bug on posix too, in a long running process like chg, right? If the memory is read again for some reason, it will be stale data.
Fri, 18 Oct 2024 13:45:13 -0400 tests: actually test the non-mmap case in `test-branches.t`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Oct 2024 13:45:13 -0400] rev 52116
tests: actually test the non-mmap case in `test-branches.t` It looks like 40943970b7ae renamed the config, but also flipped it to 'on' by default, and the test file didn't keep up. I noticed because all 4 test cases failed on Windows due to a mmap problem, and there only should have been 2.
Thu, 17 Oct 2024 15:34:45 -0400 tests: dump the http server log after a clone in `test-static-http.t`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 17 Oct 2024 15:34:45 -0400] rev 52115
tests: dump the http server log after a clone in `test-static-http.t` The 404 message lines don't match `$LOGDATE$`, because that tests for a pattern from the first "-" through a "(GET|PUT|POST)", so glob the timestamp away manually.
Thu, 17 Oct 2024 15:21:20 -0400 tests: force `dumbhttp.py` to write its log file with '\n' on Windows
Matt Harbison <matt_harbison@yahoo.com> [Thu, 17 Oct 2024 15:21:20 -0400] rev 52114
tests: force `dumbhttp.py` to write its log file with '\n' on Windows This wasn't causing obvious test failures, but it's the same fix as dbd2d56224d1 for `dummysmtpd.py`, and there's no sense in leaving this problem lying around. (And upon further review, it might have been causing some non-obviously related failures- see the next commit.)
Sat, 26 Oct 2024 04:16:00 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 04:16:00 +0200] rev 52113
branching: merge stable into default
Thu, 11 Jan 2024 20:37:34 +0100 rust: address 'error: unnecessarily eager cloning of iterator items' stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 20:37:34 +0100] rev 52112
rust: address 'error: unnecessarily eager cloning of iterator items' Build failed with a reference to https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned which seems reasonable. There doesn't seem to be any reason to not follow the advice.
Mon, 22 Jul 2024 18:20:03 +0200 utils: fix resourceutil use of deprecated importlib.resources stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 22 Jul 2024 18:20:03 +0200] rev 52111
utils: fix resourceutil use of deprecated importlib.resources Some importlib functionality was deprecated in 3.11 . The documentation on https://docs.python.org/3.12/library/importlib.resources.html recommends using the new .files() API that was introduced in 3.9.
Tue, 27 Jun 2023 13:05:03 +0200 utils: avoid using internal _imp.is_frozen() stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 13:05:03 +0200] rev 52110
utils: avoid using internal _imp.is_frozen() imp has been deprecated for a long time, and were removed in Python 3.12 . As a workaround, we started using the internal _imp. That is ugly and risky. It seems less risky to get the functionality in some other way. Here, we just inspect if 'origin' of the '__main__' module is set and 'frozen'. That seems to work and do the same, and might be better than using the internal _imp directly. This way of inspecting module attributes seems to work in some test cases, but it is a risky change. This level of importlib doesn't have much documentation, a complicated implementation, and we are dealing with some odd use cases.
Thu, 11 Jan 2024 20:32:07 +0100 cext: use sys.executable instead of deprecated Py_GetProgramFullPath stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 20:32:07 +0100] rev 52109
cext: use sys.executable instead of deprecated Py_GetProgramFullPath Fix warning with Python 3.13: mercurial/cext/parsers.c: In function 'check_python_version': mercurial/cext/parsers.c:1243:30: warning: 'Py_GetProgramFullPath' is deprecated [-Wdeprecated-declarations] 1243 | Py_GetProgramFullPath()); | ^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.13/Python.h:119, from mercurial/cext/parsers.c:11: /usr/include/python3.13/pylifecycle.h:43:43: note: declared here 43 | Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void); | ^~~~~~~~~~~~~~~~~~~~~ At this point in time, the PyConfig struct memory has been released and the PyConfig API can't be used. https://docs.python.org/3.13/c-api/init.html#c.Py_GetProgramFullPath recommands using sys.executable instead. Let's assume that will work in all versions. It would perhaps be better to use PySys_GetObject, but I prefer to stay consistent with how the same function is retrieving sys.hexversion.
Thu, 11 Jan 2024 21:58:55 +0100 subrepoutil: pass re.sub 'count' argument by name stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 21:58:55 +0100] rev 52108
subrepoutil: pass re.sub 'count' argument by name Python 3.13 started warning: DeprecationWarning: 'count' is passed as positional argument
Thu, 11 Jan 2024 21:58:55 +0100 tests: pass re.MULTILINE to re.sub as 'flags' - not in 'count' position stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 21:58:55 +0100] rev 52107
tests: pass re.MULTILINE to re.sub as 'flags' - not in 'count' position This bug was caught by the new Python 3.13 warning: DeprecationWarning: 'count' is passed as positional argument
Thu, 29 Jun 2023 20:02:27 +0200 tests: use packaging from setuptools instead of deprecated distutils stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 29 Jun 2023 20:02:27 +0200] rev 52106
tests: use packaging from setuptools instead of deprecated distutils When invoking StrictVersion in 3.12 we got: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. distutils is dead in the standard library, and we have to move towards using `setuptools` as general extern dependency. Instead of also requiring the extern `packaging`, we will just use the packaging that is vendored in setuptools.
Mon, 26 Jun 2023 15:16:51 +0200 tests: drop test-demandimport.py distutils test that failed with warnings stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 15:16:51 +0200] rev 52105
tests: drop test-demandimport.py distutils test that failed with warnings The test would fail because warnings: /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils. warnings.warn( /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") The test for distutils.msvc9compiler comes from 2205d00b6d2b. But since then, distutils is going away, and this test must change somehow. It is unclear exactly how setuptools depended on msvc9compiler, but setuptools also moved forward, and this exact test no longer seems relevant. It thus seems like a fair solution to remove the test while keeping the demandimport blacklist of distutils.msvc9compiler.
Thu, 29 Jun 2023 20:02:27 +0200 utils: test coverage of makedate stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 29 Jun 2023 20:02:27 +0200] rev 52104
utils: test coverage of makedate Explore the scenario from ae04af1ce78d to avoid future regressions. This was intended to give some coverage of the change in faccec1edc2c.
Sat, 26 Oct 2024 02:04:31 +0200 filecache: use bytes wherever possible in the tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 02:04:31 +0200] rev 52103
filecache: use bytes wherever possible in the tests This is closer than the actual usage, so I figured in would not hurt.
Sat, 26 Oct 2024 01:38:20 +0200 cachestat: avoid creating cachestat for http path
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 01:38:20 +0200] rev 52102
cachestat: avoid creating cachestat for http path The statichttprepo repo attemp to create cachestat for content we access through http. We modify the couple of place create cachestat object to detect this situation and avoids it. This is not marvelous, but there is few of them and the freeze is looming. This helps on Windows where calling cachestat on http path might create issues.
Sat, 26 Oct 2024 02:03:54 +0200 filecache: use binary path in the test
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 02:03:54 +0200] rev 52101
filecache: use binary path in the test This was overlooked when converting string. This is needed as we are about to introduce bytes specific code in the filecache code path.
Sat, 26 Oct 2024 00:58:01 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 26 Oct 2024 00:58:01 +0200] rev 52100
branching: merge stable into default
Thu, 24 Oct 2024 15:23:52 +0200 py-3-13: stabilize the docstring output across all supported Python versions
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Oct 2024 15:23:52 +0200] rev 52099
py-3-13: stabilize the docstring output across all supported Python versions Python 3.13 now trims indents from docstrings at compilation time (to save space in .pyc), so all of our helptext is affected. The indentation has never served a user-facing purpose and was more here because nobody cared enough to remove it: we gain some screen space this way. Rather than undo the transformation (which isn't really possible since the transform also deletes leading/trailing whitespace), we align the behavior of older Python versions with that of 3.13. Unfortunately, this means breaking some of the translations. I've only touched the ones that need to work for some tooling tests to pass, but I do not have the time to fix the rest of them across all languages, since they cannot be done in an automated way. i18n updates have been basically abandonned for a good while now, hopefully someone cares enough to bring them back.
Fri, 25 Oct 2024 23:54:24 +0200 docstring: backed out changeset 51057ab0dffa stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 23:54:24 +0200] rev 52098
docstring: backed out changeset 51057ab0dffa In retrospect this is too much of a behavior change for stable. So I grafted the same change as 31076a2301f1 on default, and I am backing out its version on stable.
Tue, 15 Oct 2024 22:30:10 -0400 tests: stabilize `test-clonebundles-autogen.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2024 22:30:10 -0400] rev 52097
tests: stabilize `test-clonebundles-autogen.t` on Windows The problem was that the commands are spun up with `shell=True`, which uses `cmd.exe`, which doesn't understand `$foo` style variables. The HGCB variable expansion has to be delayed, because it's figured out right before launching the command. We could probably add a conditional for Windows, and rewrite the config to use `%foo%` style variables, but it's more maintainable to just wrap the command in a bash shell invocation. The forward style slashes in the path are needed to avoid accruing double backslashes (when switching between shells- the url template seems fine). Also need to strong quote the command so that the double quotes don't get stripped off of `$HGCB_BUNDLE_PATH`, which results in: sh: 1: Syntax error: Unterminated quoted string abort: command returned status 2: sh -c "cp $HGCB_BUNDLE_PATH $TESTTMP/final-upload/"
Tue, 15 Oct 2024 22:19:30 -0400 clonebundles: stop shell quoting `HGCB_BUNDLE_BASENAME` environment variable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2024 22:19:30 -0400] rev 52096
clonebundles: stop shell quoting `HGCB_BUNDLE_BASENAME` environment variable This causes problems in `test-clonebundles-autogen.t` on Windows, because the quoted path ends up being passed to the `cp` command, which fails, because quote characters are not a legal part of a file name. I don't see any quoting in environment variables on either MSYS or WSL, even with weird ones that appear to have escape sequences like `PS1=\[\033]0;$MSYSTEM:\w\007` (in MSYS). The quoting was added back in 5ae30ff79c76, and as shown here, was causing problems even on posix when a quote was slipped into the path. (The other obvious problem is that the command is spun up shell style, which invokes `cmd.exe`, which doesn't know about `$foo` style variables. That will be addressed next, but that change didn't work without this too.)
Mon, 21 Oct 2024 15:24:55 -0400 tests: add coverage to for `HGCB_BUNDLE_BASENAME` with special characters
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Oct 2024 15:24:55 -0400] rev 52095
tests: add coverage to for `HGCB_BUNDLE_BASENAME` with special characters Per request on IRC, to show the behavior of dropping the quoting of `HGCB_BUNDLE_BASENAME` in the next commit. This current failure is basically the same error and output that currently happens on Windows with any path (even without the embedded quote). The only difference is Windows doesn't print the `cp: cannot stat ...` line.
Tue, 15 Oct 2024 18:58:47 -0400 tests: stabilize `test-eol-update.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2024 18:58:47 -0400] rev 52094
tests: stabilize `test-eol-update.t` on Windows Perhaps it's better if this doesn't happen, but there are a bunch of tests that spew this, and we already have a conditional match for this in the block prior to the comment right above this section. So accept it as a possibility, and reduce the noise in the Windows tests.
Tue, 15 Oct 2024 18:35:45 -0400 tests: force `dummysmtpd.py` to write its log file with '\n' on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2024 18:35:45 -0400] rev 52093
tests: force `dummysmtpd.py` to write its log file with '\n' on Windows The log files were being `cat'd` in `test-patchbomb-tls.t`, and causing gratuitous failures. Since `sys.stdout` is being written to with `str` instead of `bytes`, use a `io.TextIOWrapper` to change the EOL, like 2924676d4728.
Mon, 14 Oct 2024 20:11:27 -0400 tests: raise the default value for the various `devel.sync.*-timeout` configs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 14 Oct 2024 20:11:27 -0400] rev 52092
tests: raise the default value for the various `devel.sync.*-timeout` configs These are used in `mercurial.testing.wait_file()` to stall for a file to appear in the filesystem, and raise an error if the file doesn't show up before the timeout expires. The default of 2s was way too low on Windows, especially when running tests in parallel, and resulted in various timeouts in `test-dirstate-read-race.t`, `test-dirstate-status-write-race.t`, and `test-clone-stream-revlog-split.t`. The various `wait-on-file` invocations in the tests are inconsistent, and wait anywhere from 5s - 20s. I'm using 20s here because if everything is working, the timeout won't matter. Also with the default timeout being raised on Windows in f4c038081561, both `HGTEST_TIMEOUT_DEFAULT` and `HGTEST_TIMEOUT` are 1440 in the default case where the timeout is not specified on the command line of the test runner, so the timing factor that is multipled with the value is 1, resulting in no changes. (But if someone specified a lower value on the command line, that would *lower* the timeout period used.)
Tue, 22 Oct 2024 15:59:01 +0200 tests: remove deprecated test-check-py3-compat.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Oct 2024 15:59:01 +0200] rev 52091
tests: remove deprecated test-check-py3-compat.t If our current source files were not compatible with Python 3, we would know by now. This check has not been relevant for a couple of years now and we can safely remove it.
Thu, 24 Oct 2024 18:58:58 +0200 zope-interface: add compatibility with 3.13 compiler attributes stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Oct 2024 18:58:58 +0200] rev 52090
zope-interface: add compatibility with 3.13 compiler attributes We could follow-up with an actual vendoring update from the newest version of zope-interface in the new cycle since we're dropping 3.7 and down. However we are also in the process of replacing zope-interface with Protocol, so hopefully we can simply drop the zope-interface vendoring.
Thu, 24 Oct 2024 15:35:45 +0200 py-3-13: fix traceback matching for the new Python version stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Oct 2024 15:35:45 +0200] rev 52089
py-3-13: fix traceback matching for the new Python version
Thu, 24 Oct 2024 15:23:52 +0200 py-3-13: stabilize the docstring output across all supported Python versions stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Oct 2024 15:23:52 +0200] rev 52088
py-3-13: stabilize the docstring output across all supported Python versions Python 3.13 now trims indents from docstrings at compilation time (to save space in .pyc), so all of our helptext is affected. The indentation has never served a user-facing purpose and was more here because nobody cared enough to remove it: we gain some screen space this way. Rather than undo the transformation (which isn't really possible since the transform also deletes leading/trailing whitespace), we align the behavior of older Python versions with that of 3.13. Unfortunately, this means breaking some of the translations. I've only touched the ones that need to work for some tooling tests to pass, but I do not have the time to fix the rest of them across all languages, since they cannot be done in an automated way. i18n updates have been basically abandonned for a good while now, hopefully someone cares enough to bring them back.
Thu, 24 Oct 2024 18:04:26 +0200 test-lfs-serve-access: vastly simplify the error output check stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Oct 2024 18:04:26 +0200] rev 52087
test-lfs-serve-access: vastly simplify the error output check The traceback differences between all supported Python versions is about to become insane to handle, so let's check what we're actually looking to check.
Sun, 31 Mar 2024 17:57:46 -0300 subrepo: propagate non-default path on outgoing stable
Felipe Resende <felipe@fcresende.dev.br> [Sun, 31 Mar 2024 17:57:46 -0300] rev 52086
subrepo: propagate non-default path on outgoing There was already a fix made in 5dbff89cf107 for pull and push commands. I did the same for the outgoing command. The problem I identified is that when the parent repository has multiple paths, the outgoing command was not respecting the parent path used and was always using the default path for subrepositories.
Fri, 25 Oct 2024 01:14:53 +0200 outgoing: pre-indent some code stable
Felipe Resende <felipe@fcresende.dev.br> [Fri, 25 Oct 2024 01:14:53 +0200] rev 52085
outgoing: pre-indent some code This will make the next changeset clearer.
Fri, 25 Oct 2024 01:23:24 +0200 outgoing: move sorting in the display function stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 25 Oct 2024 01:23:24 +0200] rev 52084
outgoing: move sorting in the display function This make the core code simpler.
Fri, 25 Oct 2024 01:04:38 +0200 outgoing: extract changeset display in its own function stable
Felipe Resende <felipe@fcresende.dev.br> [Fri, 25 Oct 2024 01:04:38 +0200] rev 52083
outgoing: extract changeset display in its own function This will clarify future patches.
Tue, 11 Jun 2024 14:35:52 +0200 subrepo: move code around stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Jun 2024 14:35:52 +0200] rev 52082
subrepo: move code around
Thu, 24 Oct 2024 17:35:53 +0200 merge: add a config to allow conflict-free merge of changes on adjacent lines
Arseniy Alekseyev <aalekseyev@janestreet.com [Thu, 24 Oct 2024 17:35:53 +0200] rev 52081
merge: add a config to allow conflict-free merge of changes on adjacent lines This change adds a config to make it no longer a conflict to merge changes made on adjacent lines. The reason these changes are considered a conflict is that there's no region of text at the relevant position (sync region) that's kept unchanged by both sides of the merge. The problem can be solved by making the sync regions being a bit more powerful: we can keep a 0-length sync region if we find that a block unchanged by one side is ajacent to a block unchanged by the other side. Since these 0-length sync regions are emitted using the ~same algorithm as the normal non-empty sync regions, this change involves no arbitrary decisions and I expect it to work pretty well. 0-length sync regions do create an ambiguity in a special case where two pairs of adjacent regions "meet" at the same point. This corresponds to an insertion made at the same place by the two sides of the merge, and this still results in a conflict.
Wed, 23 Oct 2024 17:08:57 -0400 localrepo: drop the CamelCase name for `localrepo.ilocalrepositorymain`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:08:57 -0400] rev 52080
localrepo: drop the CamelCase name for `localrepo.ilocalrepositorymain` See 61557734c0ae for the reasoning. This one is slightly different, however, because the `localrepository` class already subclasses the interface class in the type checking phase.
Wed, 23 Oct 2024 17:04:59 -0400 localrepo: drop the CamelCase name for `localrepo.revlognarrowfilestorage`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:04:59 -0400] rev 52079
localrepo: drop the CamelCase name for `localrepo.revlognarrowfilestorage` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 17:03:33 -0400 localrepo: drop the CamelCase name for `localrepo.revlogfilestorage`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:03:33 -0400] rev 52078
localrepo: drop the CamelCase name for `localrepo.revlogfilestorage` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 17:01:35 -0400 localrepo: drop the CamelCase name for `localrepo.locallegacypeer`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 17:01:35 -0400] rev 52077
localrepo: drop the CamelCase name for `localrepo.locallegacypeer` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:59:43 -0400 localrepo: drop the CamelCase name for `localrepo.localpeer`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:59:43 -0400] rev 52076
localrepo: drop the CamelCase name for `localrepo.localpeer` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:51:18 -0400 localrepo: drop the CamelCase name for `localrepo.localcommandexecutor`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:51:18 -0400] rev 52075
localrepo: drop the CamelCase name for `localrepo.localcommandexecutor` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:48:46 -0400 manifest: drop the CamelCase name for `manifest.treemanifestctx`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:48:46 -0400] rev 52074
manifest: drop the CamelCase name for `manifest.treemanifestctx` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:45:12 -0400 manifest: drop the CamelCase name for `manifest.memtreemanifestctx`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:45:12 -0400] rev 52073
manifest: drop the CamelCase name for `manifest.memtreemanifestctx` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:43:22 -0400 manifest: drop the CamelCase name for `manifest.manifestctx`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:43:22 -0400] rev 52072
manifest: drop the CamelCase name for `manifest.manifestctx` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:41:02 -0400 manifest: drop the CamelCase name for `manifest.memmanifestctx`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:41:02 -0400] rev 52071
manifest: drop the CamelCase name for `manifest.memmanifestctx` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:39:12 -0400 manifest: drop the CamelCase name for `manifest.manifestlog`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:39:12 -0400] rev 52070
manifest: drop the CamelCase name for `manifest.manifestlog` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:36:50 -0400 manifest: drop the CamelCase name for `manifest.manifestrevlog`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:36:50 -0400] rev 52069
manifest: drop the CamelCase name for `manifest.manifestrevlog` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:32:34 -0400 manifest: drop the CamelCase name for `manifest.treemanifest`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:32:34 -0400] rev 52068
manifest: drop the CamelCase name for `manifest.treemanifest` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:30:23 -0400 manifest: drop the CamelCase name for `manifest.manifestdict`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:30:23 -0400] rev 52067
manifest: drop the CamelCase name for `manifest.manifestdict` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:24:18 -0400 filelog: drop the CamelCase name for `filelog.filelog`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:24:18 -0400] rev 52066
filelog: drop the CamelCase name for `filelog.filelog` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:22:21 -0400 revlog: drop the CamelCase name for `revlog.revlogproblem`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:22:21 -0400] rev 52065
revlog: drop the CamelCase name for `revlog.revlogproblem` See 61557734c0ae for the reasoning.
Wed, 23 Oct 2024 16:19:24 -0400 revlog: drop the CamelCase name for `revlog.revlogrevisiondelta`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Oct 2024 16:19:24 -0400] rev 52064
revlog: drop the CamelCase name for `revlog.revlogrevisiondelta` These CamelCase names popped up this cycle because pytype was getting confused by the zope decorator, and so the decoration was decoupled from the class declaration. We're in the process of switching all of the zope interfaces to `typing.Protocol` classes, but we're up against the code freeze. It would be nice to use CamelCase for protocol classes (or classes in general), but let's reset to a consistent state and buy some more time to think about this. Since we're moving to Protocol classes and I disabled the interface tests back in ef7d85089952, I'm not bothering to re-add the decorator, and re-confuse pytype. But do place the interface next to the class, so that these places can be found with the `grep` when the time comes to subclass.
Wed, 23 Oct 2024 16:14:13 +0200 tests: use pyflakes as a tool, not a python module
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Oct 2024 16:14:13 +0200] rev 52063
tests: use pyflakes as a tool, not a python module The usage of pyflakes as a Python module was introduced in e397c6d74652, to work around issue between Python 2 and Python 3. This issues are long behind us now and we can get beck to using pyflakes as a tool, giving us more flexibility about how we install it. The `hghave` requirements is modified to check that we have a tool available, instead of a python module.
Tue, 22 Oct 2024 15:50:47 +0200 clang-format: do not accept version above 19.x
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Oct 2024 15:50:47 +0200] rev 52062
clang-format: do not accept version above 19.x This gives me different formatting on latest version available in Debian. So disabling for now.
Wed, 16 Oct 2024 17:21:03 +0200 rust-update: add a config item to disable the Rust update fastpath
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 17:21:03 +0200] rev 52061
rust-update: add a config item to disable the Rust update fastpath Explanations inline.
Tue, 01 Oct 2024 13:49:11 +0200 update: add a Rust fast-path when updating from null (and clean)
Raphaël Gomès <rgomes@octobus.net> [Tue, 01 Oct 2024 13:49:11 +0200] rev 52060
update: add a Rust fast-path when updating from null (and clean) This case is easy to detect and we have all we need to generate a valid working copy and dirstate entirely in Rust, which speeds things up considerably: On my machine updating a repo of ~300k files goes from 10.00s down to 4.2s, all while consuming 50% less system time, with all caches hot. Something to note is that further improvements will probably happen with the upcoming `InnerRevlog` series that does smarter mmap hanlding, especially for filelogs. Here are benchmark numbers on a machine with only 4 cores (and no SMT enabled) ``` ### data-env-vars.name = heptapod-public-2024-03-25-ds2-pnm # benchmark.name = hg.command.update # bin-env-vars.hg.py-re2-module = default # bin-env-vars.hg.changeset.node = <this change> # benchmark.variants.atomic-update = no # benchmark.variants.scenario = null-to-tip # benchmark.variants.worker = default default: 5.328762 ~~~~~ rust: 1.308654 (-75.44%, -4.02) ### data-env-vars.name = mercurial-devel-2024-03-22-ds2-pnm # benchmark.name = hg.command.update # bin-env-vars.hg.py-re2-module = default # bin-env-vars.hg.changeset.node = <this change> # benchmark.variants.atomic-update = no # benchmark.variants.scenario = null-to-tip # benchmark.variants.worker = default default: 1.693271 ~~~~~ rust: 1.151053 (-32.02%, -0.54) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.update # bin-env-vars.hg.py-re2-module = default # bin-env-vars.hg.changeset.node = <this change> # benchmark.variants.atomic-update = no # benchmark.variants.scenario = null-to-tip # benchmark.variants.worker = default default: 38.901613 ~~~~~ rust: 11.637880 (-70.08%, -27.26) ### data-env-vars.name = netbsd-xsrc-public-2024-09-19-ds2-pnm # benchmark.name = hg.command.update # bin-env-vars.hg.py-re2-module = default # bin-env-vars.hg.changeset.node = <this change> # benchmark.variants.atomic-update = no # benchmark.variants.scenario = null-to-tip # benchmark.variants.worker = default default: 4.793727 ~~~~~ rust: 1.505905 (-68.59%, -3.29) ```
Wed, 16 Oct 2024 19:14:30 +0200 merge: improve working-copy mtime race handling
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 19:14:30 +0200] rev 52059
merge: improve working-copy mtime race handling Explanations inline. This also makes use of `make_mtime_reliable`, which unifies our mtime raciness logic from the status. On top of this, this fixes the handling of the pure dirstate status to better catch racy status, as we've been doing in Rust for a long time now.
Wed, 16 Oct 2024 18:56:19 +0200 merge: move the filtering of ambiguous files to a dedicated function
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 18:56:19 +0200] rev 52058
merge: move the filtering of ambiguous files to a dedicated function I have multiple reasons: - The body of `_update` is way too long - This adds typing which will help our tooling and brains understand this code more easily - This function will get more nested and complex in the next patch I've taken the liberty of rewrapping and typo-passing the docstring.
Wed, 16 Oct 2024 18:41:49 +0200 timestamp: make the reliable comparison more usable from outside
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 18:41:49 +0200] rev 52057
timestamp: make the reliable comparison more usable from outside This is going to be used with pre-computed times unlike in status.
Wed, 16 Oct 2024 18:40:59 +0200 timestamp: add type information to the module
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 18:40:59 +0200] rev 52056
timestamp: add type information to the module This is easy to do and helps both Pytype and developpers understand what objects they are dealing with.
Wed, 16 Oct 2024 17:19:38 +0200 rust-dirstate: make the reliable timestamp comparison more usable from outside
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2024 17:19:38 +0200] rev 52055
rust-dirstate: make the reliable timestamp comparison more usable from outside This is going to be used with pre-computed times unlike in status.
Thu, 03 Oct 2024 16:35:31 +0200 rust-dirstate-map: use a more precise identity
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Oct 2024 16:35:31 +0200] rev 52054
rust-dirstate-map: use a more precise identity This is closer to the behavior of what Python does. So far, we were checking only the inode, but this might not be good enough for the v1 case.
Mon, 14 Oct 2024 14:14:21 +0200 dirstate-map: add a missing debug wait point when accessing the v2 docket
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Oct 2024 14:14:21 +0200] rev 52053
dirstate-map: add a missing debug wait point when accessing the v2 docket fc8e37c380d3 added synchronization points to the dirstate to allow for race condition testing without actually requiring a time-based race condition to happen. This changes adds the `pre-read-file` wait point before we read the docket, since callers might ask for the parents before anything else is read, leading to the first read being done before the wait point. This removes some differences in test output which were presumed to be speed related, but weren't.
Thu, 03 Oct 2024 00:31:25 +0200 rust-parsers: use the same error message as with the higher-level code
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Oct 2024 00:31:25 +0200] rev 52052
rust-parsers: use the same error message as with the higher-level code This can happen at two places, but it's not really enough time to justify it being refactored. Let's ensure we have the same error message, the newer one being slightly more helpful.
Thu, 03 Oct 2024 01:52:44 +0200 rust-pathauditor: make sure we actually test the nested repo case
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Oct 2024 01:52:44 +0200] rev 52051
rust-pathauditor: make sure we actually test the nested repo case This covers the *on-disk* case, where the path itself does not have a `.hg` component.
Wed, 02 Oct 2024 20:29:48 +0200 rust-pathauditor: match more of Python's behavior and display messages
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 20:29:48 +0200] rev 52050
rust-pathauditor: match more of Python's behavior and display messages We will make use of the path auditor when running our update fast-path, and we want to output of it to be close enough.
Wed, 02 Oct 2024 18:31:32 +0200 rust-dirstate: pass dirstate tracked key from the requirements
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 18:31:32 +0200] rev 52049
rust-dirstate: pass dirstate tracked key from the requirements We will make use of this with the `hg update` fastpath
Wed, 02 Oct 2024 13:39:43 +0200 rust-files: check for empty manifests caused by narrow
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 13:39:43 +0200] rev 52048
rust-files: check for empty manifests caused by narrow Explanations inline
Wed, 02 Oct 2024 13:36:51 +0200 rust-repo: don't use on-disk dirstate parents in v1
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Oct 2024 13:36:51 +0200] rev 52047
rust-repo: don't use on-disk dirstate parents in v1 This mistake was not causing any problems yet since we were never updating parents from Rust code. This is about to change, so let's fix it.
Tue, 01 Oct 2024 13:45:18 +0200 rust-cpython: add a util to get a `Repo` from a python path
Raphaël Gomès <rgomes@octobus.net> [Tue, 01 Oct 2024 13:45:18 +0200] rev 52046
rust-cpython: add a util to get a `Repo` from a python path I suspect this will not be the last time we need to do something like this.
Tue, 01 Oct 2024 13:20:40 +0200 rust: improve `InvalidRevision` error message
Raphaël Gomès <rgomes@octobus.net> [Tue, 01 Oct 2024 13:20:40 +0200] rev 52045
rust: improve `InvalidRevision` error message I encountered this when debugging earlier and felt like we were losing some information along the way, which we were!
Mon, 30 Sep 2024 17:19:35 +0200 rust-dirstate: use a struct as arguments for the high-level `reset_state`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:19:35 +0200] rev 52044
rust-dirstate: use a struct as arguments for the high-level `reset_state` This makes the interface a lot clearer at the call site and prevents silly mistakes, as an API with a bunch of booleans is prone to errors. This refactor adds a `from_empty` parameter for a fast-path when resetting and entry we're sure does not exist. It will be used in the upcoming update Rust fastpath, and was not split to prevent more churn.
Mon, 30 Sep 2024 16:55:11 +0200 rust: implement `From<SparseConfigWarning>` for `HgError`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 16:55:11 +0200] rev 52043
rust: implement `From<SparseConfigWarning>` for `HgError` This will be useful in a future patch to avoid a lot of boilerplate.
Mon, 30 Sep 2024 16:04:51 +0200 rust-hg-cpython: add an `HgProgressBar` util
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 16:04:51 +0200] rev 52042
rust-hg-cpython: add an `HgProgressBar` util This will be the entry point for all progress bars from a Python context in upcoming patches. Like the `Progress` trait, this is subject to change once we have more use cases, but this is good enough for now.
Mon, 30 Sep 2024 16:02:30 +0200 rust: add `Progress` trait for progress bars
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 16:02:30 +0200] rev 52041
rust: add `Progress` trait for progress bars This will be used in the next few changes to introduce a progress bar for the `hg update` fastpath.
Mon, 30 Sep 2024 19:15:19 +0200 rust-files: separate the listing of files from a revset and a revision
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 19:15:19 +0200] rev 52040
rust-files: separate the listing of files from a revset and a revision We won't need to parse a revset all the time, and an upcoming patch will make use of this new util.
Mon, 30 Sep 2024 19:12:42 +0200 rust-files: add a `Sync` bound to the matcher
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 19:12:42 +0200] rev 52039
rust-files: add a `Sync` bound to the matcher This enables us to use this code in multithreaded environements, which we very much want to do.
Mon, 30 Sep 2024 12:10:35 +0200 rust-files: also return filenode and flags when listing a revision's files
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 12:10:35 +0200] rev 52038
rust-files: also return filenode and flags when listing a revision's files This is going to be useful when implementing parts of `update` and makes it so we don't have to fetch the manifest and each entry twice.
Mon, 30 Sep 2024 12:08:49 +0200 rust-manifest: encode flags as `Option<NonZeroU8>`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 12:08:49 +0200] rev 52037
rust-manifest: encode flags as `Option<NonZeroU8>` This makes the compiler use the niche optimization for all flags: since 0 is not a valid representation of any flags, we can use 0 as a replacement for `None`, which reduces memory footprint and could yield a little performance improvement over many iterations.
Mon, 30 Sep 2024 17:46:52 +0200 rust-repo: add a method to set the current parents
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:46:52 +0200] rev 52036
rust-repo: add a method to set the current parents This will be useful when we start writing an `hg update` fastpath.
Mon, 30 Sep 2024 17:46:24 +0200 rust-repo: add a method to get a `Node` from a `Revision` to the `Repo`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:46:24 +0200] rev 52035
rust-repo: add a method to get a `Node` from a `Revision` to the `Repo` This is going to be more and more useful as we start writing higher-level code
Mon, 30 Sep 2024 17:45:10 +0200 rust-utils: move the `filesystem_now` function to a util
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:45:10 +0200] rev 52034
rust-utils: move the `filesystem_now` function to a util This is going to be useful for an upcoming `hg update` fastpath.
Mon, 30 Sep 2024 17:43:51 +0200 rust-dirstate: actually remember the identity
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Sep 2024 17:43:51 +0200] rev 52033
rust-dirstate: actually remember the identity This was an oversight that likely had no influence on anything since we have only been writing the dirstate for status. We will start writing the dirstate for more operations now, so we'll need this fixed.
Wed, 21 Aug 2024 09:48:14 +0200 mergestate: reduce the number of attribute lookups
Raphaël Gomès <rgomes@octobus.net> [Wed, 21 Aug 2024 09:48:14 +0200] rev 52032
mergestate: reduce the number of attribute lookups This code is called a lot during updates, this is a very small but also very easy thing to do.
Wed, 23 Oct 2024 14:02:28 +0200 test-lfs-serve-access: account for output differences in Python 3.12 stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Oct 2024 14:02:28 +0200] rev 52031
test-lfs-serve-access: account for output differences in Python 3.12 This test is quite noisy, but the fix was very easy.
Wed, 23 Oct 2024 13:49:54 +0200 patchbomb: don't test ambiguous address stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Oct 2024 13:49:54 +0200] rev 52030
patchbomb: don't test ambiguous address This is a bug in Python's `email` package and shouldn't be relied on. Python 3.12 has fixed this problem¹ and raises an exception. We keep the multiple `-t` because this is still relevant for testing. [1] https://github.com/python/cpython/issues/102988 [2] https://docs.python.org/3/whatsnew/changelog.html
Mon, 21 Oct 2024 11:48:09 -0400 contrib: install pip 24.2 in the Windows dependency installer script
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Oct 2024 11:48:09 -0400] rev 52029
contrib: install pip 24.2 in the Windows dependency installer script One of the modern pythons was crying about the old version importing `distutils`.
Sat, 19 Oct 2024 01:22:25 -0400 contrib: install the latest py 3.11-3.13 in the Windows dependency script
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 01:22:25 -0400] rev 52028
contrib: install the latest py 3.11-3.13 in the Windows dependency script Note that python 3.11 adds an installer for arm64, which we ignore here because I don't have a Windows system running arm64, and it's likely we will be dropping support for some platforms before I get my hands on one.
Sat, 19 Oct 2024 01:05:50 -0400 contrib: update to the latest py3.9 and 3.10 in the Windows dependency script
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 01:05:50 -0400] rev 52027
contrib: update to the latest py3.9 and 3.10 in the Windows dependency script Python3.8 was already at its last version with an installer, FWIW.
Sat, 19 Oct 2024 00:57:52 -0400 contrib: drop python 3.7 from the Windows dependency installer script
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 00:57:52 -0400] rev 52026
contrib: drop python 3.7 from the Windows dependency installer script I'm tempted to drop 3.8 too, since we use 3.9 on Windows.
Sat, 19 Oct 2024 00:50:49 -0400 contrib: drop python 3.5 requirements file for Linux automation
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Oct 2024 00:50:49 -0400] rev 52025
contrib: drop python 3.5 requirements file for Linux automation The new minimum this cycle is py3.8.
Wed, 16 Oct 2024 18:06:36 -0400 windows: implement `util.cachestat` to fix numerous dirstate problems stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 16 Oct 2024 18:06:36 -0400] rev 52024
windows: implement `util.cachestat` to fix numerous dirstate problems I got here by bisecting the issue1790 related failure on Windows to keep an entry from being marked "unset" in `test-dirstate.t` back to eedbf8256263. There were a handful of other tests failing with an unexpected dirstate entry state like this, as well as numerous "skip updating dirstate: identity mismatch" messages added to various tests, as well as an issue with dirstate wrapping with the largefiles extension[1], all of which appear to be fixed by this. In total, ~25 tests are fully fixed on Windows with this change on default. This is basically a copy/paste of the posix implementation, but we drop the `st_mode` comparison- I think the only reason we care about the mode on posix is to detect +/-x mode changes, but the executable bits on Windows are synthesized based on the name of the file[2]. None of the other parts of the codebase are equipped to handle executable bits in the filesystem on Windows anyway, so it doesn't make sense to worry about them here. Note that `st_uid` and `st_gid` seem to always be 0 on Windows (and I can't find them being initialized), so they can probably be dropped from the comparison. But I doubt they matter any more on posix, since we don't track ownership. The `st_ino`, `st_dev`, and `st_nlink` attributes all seem to have reasonable values for comparing like on posix[3]. Also note that `st_ctime` is apparently deprecated in 3.12+ (for reasons I haven't explored)[4]. [1] https://foss.heptapod.net/mercurial/mercurial-devel/-/merge_requests/884 [2] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Modules/posixmodule.c#L1948 [3] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Python/fileutils.c#L1158 [4] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Modules/posixmodule.c#L2200
Mon, 04 Feb 2019 23:32:20 -0800 extdiff: don't run gui programs when in a cli-only environment
Ludovic Chabant <ludovic@chabant.com> [Mon, 04 Feb 2019 23:32:20 -0800] rev 52023
extdiff: don't run gui programs when in a cli-only environment In order to provide a useful error message to override the behavior, we also need to slightly change the way that tool.gui is found in the config. Before, it had to be where tool.diffargs is located, which might not exist. Now, tool.isgui can exist on its own. A test is added for the new error message. We also need to force procutil.isgui() to return true, so we set $DISPLAY to a non-empty value before running any test expecting to have a gui.
Wed, 28 Dec 2022 21:33:44 -0800 bookflow: fix bullet list indentation in docstring
Ludovic Chabant <ludovic@chabant.com> [Wed, 28 Dec 2022 21:33:44 -0800] rev 52022
bookflow: fix bullet list indentation in docstring
Mon, 09 Oct 2023 22:14:24 -0700 doc: generate separate commands/topics/extension pages
Ludovic Chabant <ludovic@chabant.com> [Mon, 09 Oct 2023 22:14:24 -0700] rev 52021
doc: generate separate commands/topics/extension pages This change modifies gendoc.py and Makefile so that individual pages for commands, help topics, and extensions can be generated. A new index page is also generated with links to all these pages. This makes it easier to look up and search the help text of a given command or topic, instead of having to deal with the giant hg.1 "all-in-one" page. Since the list of individual pages varies based on the source code, we generate a dynamic Makefile that contains this list of files as individual targets. This gives us fine-grained control over output files. However, it greatly increases the time spent generating all help pages. It's recommended to run make with -j to make use of multi-core archs. Individual man pages are produced in doc/man, and HTML ones are in doc/html
Mon, 09 Oct 2023 22:11:21 -0700 doc: refactor gendoc for better reusability
Ludovic Chabant <ludovic@chabant.com> [Mon, 09 Oct 2023 22:11:21 -0700] rev 52020
doc: refactor gendoc for better reusability This change separates the gathering of commands/topics/etc from the logic of printing their documentation out.
Tue, 01 Oct 2024 16:07:51 +0200 stream: prefer keeping an open file handle to volatile file instead of copy
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 16:07:51 +0200] rev 52019
stream: prefer keeping an open file handle to volatile file instead of copy We will still do copy if too many file handle are open. Currently, have less than 10 volatile files in typical usage, so we should be fine. See inline documentation for details.
Tue, 01 Oct 2024 15:55:49 +0200 stream: remove __getitem__ from the VolatileManager
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 15:55:49 +0200] rev 52018
stream: remove __getitem__ from the VolatileManager It is no longer used and that API will get in the way of the new order.
Tue, 01 Oct 2024 15:55:29 +0200 stream: open volatile file through the manager
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 15:55:29 +0200] rev 52017
stream: open volatile file through the manager To do more subtle things, we need more control.
Mon, 14 Oct 2024 15:11:49 +0200 stream: rename TempCopyManager to VolatileManager
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Oct 2024 15:11:49 +0200] rev 52016
stream: rename TempCopyManager to VolatileManager We are going to be more subtle in our management of volatile file, so use a more semantic name.
Mon, 14 Oct 2024 12:12:34 -0400 ci: only use the macOS runner if manually invoked
Matt Harbison <matt_harbison@yahoo.com> [Mon, 14 Oct 2024 12:12:34 -0400] rev 52015
ci: only use the macOS runner if manually invoked Right now, we only have a single machine with a single runner, so don't create a bottleneck by default.
Tue, 08 Oct 2024 18:59:44 -0400 ci: add a runner for macos
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Oct 2024 18:59:44 -0400] rev 52014
ci: add a runner for macos This is running from a venv, created with the packages from the requirements file in the `test-setup-future-work` topic being discussed separately. We can basically reuse the existing `test_c` configuration as-is, but there was one small issue- if the clone from the previous CI run is still present in `/tmp`, the clone for the current run fails. It's not a problem for the current setup because a new container is instantiated, so the easy fix is to simply delete the clone first. (The Windows CI avoids this by not cloning in the first place.) It looks like it takes ~80m to run the whole test suite on the current system.
Tue, 15 Oct 2024 13:52:21 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Oct 2024 13:52:21 +0200] rev 52013
branching: merge stable into default
Mon, 14 Oct 2024 16:46:25 +0200 tests: use shlex.quote instead of pipes.quote stable
Julien Cristau <jcristau@debian.org> [Mon, 14 Oct 2024 16:46:25 +0200] rev 52012
tests: use shlex.quote instead of pipes.quote The pipes module got removed in python 3.13. https://bugs.debian.org/1084553
Tue, 01 Oct 2024 12:29:10 +0200 branchmap-v3: make sure we write the cache after detecting pure-topo mode
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Oct 2024 12:29:10 +0200] rev 52011
branchmap-v3: make sure we write the cache after detecting pure-topo mode We were properly detecting the pure topo-case but in some case the one disk cache file was never updated with that information.
Tue, 15 Oct 2024 04:33:30 +0200 demande-import-test: use `wsgiref` instead of `telnetlib` for testing stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Oct 2024 04:33:30 +0200] rev 52010
demande-import-test: use `wsgiref` instead of `telnetlib` for testing The `telnetlib` module has been dropped in 3.13. The `wsgiref` module fit the same purpose of being obscure and not imported yet.
Mon, 07 Oct 2024 19:53:24 +0200 hgdemandimport: add collections.abc to the ignore list because Python 3.13 rc3 stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 07 Oct 2024 19:53:24 +0200] rev 52009
hgdemandimport: add collections.abc to the ignore list because Python 3.13 rc3 It worked in Python 3.13 rc2, but something changed for rc3. Now, when i18n.py imports typing and it touches collections.abc.Hashable , we get: ValueError: module object for collections.abc substituted in sys.modules during a lazy load This seems to be a general problem, released in the final Python 3.13 . I have not analyzed the problem in details. We *could* work around the problem by disabling demand import of typing. But that would effectively disable demand import of collections.abc too. Instead, just disable demand import for collections.abc .
Fri, 11 Oct 2024 00:56:20 -0400 run-tests: include non-activated venv packages in `PYTHONPATH`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 Oct 2024 00:56:20 -0400] rev 52008
run-tests: include non-activated venv packages in `PYTHONPATH` If a venv is activated since afa9d73780e1, `hghave` would see the packages installed in it, and enable related tests. If the python interpreter was launched directly however, none of them were seen. In addition to getting consistent behavior, it's also easier to manage in CI if the venv doesn't need activation.
Thu, 10 Oct 2024 17:52:26 -0400 tests: allow optional output when `test-lfs-server` is sent SIGTERM
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 Oct 2024 17:52:26 -0400] rev 52007
tests: allow optional output when `test-lfs-server` is sent SIGTERM I guess this has only ever been tested on Windows, but on macOS, the test was failing with changes like: +++ /private/tmp/mercurial-ci/tests/test-lfs-test-server.t#git-server.err @@ -858,6 +858,7 @@ (Restart the server in a different location so it no longer has the content) $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS + $TESTTMP.sh: line 153: 38639 Terminated: 15 lfs-test-server > lfs-server.log 2>&1 #if hg-server $ cat $TESTTMP/access.log $TESTTMP/errors.log
Wed, 09 Oct 2024 20:09:33 -0400 tests: stabilize `test-http-bad-server.t` on macOS
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Oct 2024 20:09:33 -0400] rev 52006
tests: stabilize `test-http-bad-server.t` on macOS I'm not sure what's going on here, because I got one test run where this worked, but two where it gave this error instead. It's connection related as the comment says it should be, so good enough.
Wed, 09 Oct 2024 13:55:04 -0400 upgrade: disable using the parallel workers optimization on macOS
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Oct 2024 13:55:04 -0400] rev 52005
upgrade: disable using the parallel workers optimization on macOS It crashes `test-copies-chain-merge.t` for some reason[1]. It's only experimental, and already hard-disabled on Windows. [1] https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/2591045#L108
Sun, 13 Oct 2024 04:55:48 +0200 format: fix few black issues
paugier <pierre.augier@univ-grenoble-alpes.fr> [Sun, 13 Oct 2024 04:55:48 +0200] rev 52004
format: fix few black issues
Thu, 10 Oct 2024 09:54:55 +0200 install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr> [Thu, 10 Oct 2024 09:54:55 +0200] rev 52003
install: static data moved from setup.py to pyproject.toml
Mon, 14 Oct 2024 00:15:25 +0200 ci: display tool version more selectively
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Oct 2024 00:15:25 +0200] rev 52002
ci: display tool version more selectively The goal here is to avoid showing tool version in all case as this create issue for non linux/docker runner that might not have some of them installed. This is currently relevant for the coming mac runner that does not have clang-format installed and does not needs its. This might also be useful in the future to use narrower docker image more specialized for each jobs.
Sun, 13 Oct 2024 14:46:23 +0200 zeroconf: fix a warning about a signature mismatch in a method override
Matt Harbison <matt_harbison@yahoo.com> [Sun, 13 Oct 2024 14:46:23 +0200] rev 52001
zeroconf: fix a warning about a signature mismatch in a method override Caught by PyCharm. It looks like the `hdr` arg is mostly unused (thus why it was missing in some cases), so pass along an empty string where needed.
Mon, 07 Oct 2024 23:24:28 -0400 zeroconf: use str instead of bytes when indexing `globals()`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 23:24:28 -0400] rev 52000
zeroconf: use str instead of bytes when indexing `globals()` I suppose since we set the key to bytes during init that it won't raise a KeyError, but this was very likely an oversight when mass-byteifying, rather than purposeful.
Mon, 07 Oct 2024 23:20:09 -0400 zeroconf: fix an invalid argument error on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 23:20:09 -0400] rev 51999
zeroconf: fix an invalid argument error on Windows The idea that pyoxidizer was triggering the problem when standing up the previous incarnation of CI for Windows was misleading- it was a Windows problem in general. See the inline bug link. Unfortunately, there's no commit referenced there, and it looks like OP closed the report himself with the suggested workaround. IOW, very modern python may not work, but it's extremely unlikely that there are any users of this extension, especially on Windows.
Sat, 12 Oct 2024 16:55:30 -0400 tests: fix hooks in `test-transaction-rollback-on-revlog-split.t` for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 16:55:30 -0400] rev 51998
tests: fix hooks in `test-transaction-rollback-on-revlog-split.t` for Windows A few problems with external hooks here: 1) `cmd.exe` is blissfully unaware of the meaning of single quotes, and passes them along as part of the revision arg 2) `cmd.exe` doesn't know how to run the python script `f` with the shebang line, so it needs to be invoked with the intepreter explicitly. Then for some reason it was trying to open `$TESTTMP\troffset-computation-hooks\f`, so make it an absolute path. 3) Likewise, the shell script `wait-on-file` cannot be invoked directly by `cmd.exe`. 4) Windows python doesn't understand whatever `$TESTTMP` unrolls to (probably it has the double backslashes), and silently failed to write the lock file. I'm assuming that `pretxnclose.03-abort` is also bad (there's no `false` in `cmd.exe`), but it's not currently causing problems. Also note that the paths in this are very long, and typically exceed the `MAX_PATH` limit in Windows. It can be run with `run-tests.py --tmpdir /c/t`.
Sat, 12 Oct 2024 16:35:03 -0400 tests: use the cross platform `SIGKILL` function
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 16:35:03 -0400] rev 51997
tests: use the cross platform `SIGKILL` function This partially fixes `test-transaction-rollback-on-revlog-split.t` (there are still problems related to waiting on the lock files), and completely fixes `test-fncache.t`.
Sat, 12 Oct 2024 16:06:37 -0400 tests: add a module that can perform the equivalent of `SIGKILL` on any OS
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 16:06:37 -0400] rev 51996
tests: add a module that can perform the equivalent of `SIGKILL` on any OS I started with this being Windows specific, but let's push all of the decision making into this function so that it can just be called by the tests. The tradeoff is that this is very specific to sending `SIGKILL`- since `signal.SIGKILL` doesn't exist on Windows, the desired signal can't be passed from the caller. Maybe there's a way, but let's wait until there's a need. We don't use `killdaemons.py` unconditionally because it starts with a more graceful `SIGTERM` on posix.
Sat, 12 Oct 2024 15:22:03 -0400 tests: teach `killdaemons` on Windows to use an exit code provided by a caller
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 Oct 2024 15:22:03 -0400] rev 51995
tests: teach `killdaemons` on Windows to use an exit code provided by a caller Right now, there are several tests that use `signal.SIGKILL`, which isn't a thing on Windows. The `killdaemons` script approximates this by forcibly terminating the process. There's a minor difference in that `signal.SIGKILL` results in the test capturing an exit code of 137, and the `killdaemons` victim doesn't record a code (as though it exited with 0). Since the exit code line couldn't be conditionalized the last time I checked, let's just allow the caller to simulate the same exit code, and avoid conditionalizing the tests.
Thu, 10 Oct 2024 17:55:50 +0200 ci: also offer tests with Python 3.13
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 10 Oct 2024 17:55:50 +0200] rev 51994
ci: also offer tests with Python 3.13 Python3.13 is du to be released soon. We better make sure we work with it.
Sat, 12 Oct 2024 03:07:52 +0200 run-test: add regular line break and test count in the dot output
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 12 Oct 2024 03:07:52 +0200] rev 51993
run-test: add regular line break and test count in the dot output This will make it simpler to follow the actual progress. The value "75" have been picked as it is smaller or equal to 80 and give a nice round number.
Fri, 11 Oct 2024 14:37:59 +0200 clonebundle-digest: add recursion guards for Python 3.8
Joerg Sonnenberger <joerg@bec.de> [Fri, 11 Oct 2024 14:37:59 +0200] rev 51992
clonebundle-digest: add recursion guards for Python 3.8 For Python 3.8 and 3.9, the read/readinto pair can recurse, so make sure the data is only hashed once.
Tue, 08 Oct 2024 01:06:57 -0400 tests: replace inline `waitlock()` with `wait-on-file` script
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Oct 2024 01:06:57 -0400] rev 51991
tests: replace inline `waitlock()` with `wait-on-file` script The latter scales up the timeout based on the timeout value provided to the test runner, and I was seeing timeouts on Windows when running all of the tests using all CPU cores.
Mon, 07 Oct 2024 21:48:36 -0400 tests: stabilize `test-split-legacy-inline-changelog.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 21:48:36 -0400] rev 51990
tests: stabilize `test-split-legacy-inline-changelog.t` on Windows The `tar` command is unable to process "C:\path\to\foo.tar" style paths, which is how `$TESTDIR` is constructed. It also didn't work with `$TESTDIR_FORWARD_SLASH`- both failed with: tar: Cannot connect to C: resolve failed [128] But `cat` can handle it if the path is quoted, and `tar` can read from stdin.
Mon, 07 Oct 2024 19:11:54 -0400 tests: stabilize `test-largefiles-cache.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 19:11:54 -0400] rev 51989
tests: stabilize `test-largefiles-cache.t` on Windows The `undo.backup.dirstate.bck` was created by `hg commit -m 'add largefile'` at line 18, and deleted in the conditional block by `hg push -q http://localhost:$HGPORT/` at line 138. That's... surprising, but probably not harmful, and can be debugged from Linux if it is a problem. This was showing up in `find src/.hg/largefiles/* | grep -E "(dirstate|$hash)"`.
Mon, 07 Oct 2024 18:33:45 -0400 tests: stabilize `test-journal.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 18:33:45 -0400] rev 51988
tests: stabilize `test-journal.t` on Windows The file in these lines are double quoted, but single quoted on other platforms. Not sure why, other than `cmd.exe` doesn't recognize single quotes. But it's a cosmetic difference, so glob over it and move on.
Mon, 07 Oct 2024 18:26:41 -0400 tests: stabilize `test-clonebundles.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 18:26:41 -0400] rev 51987
tests: stabilize `test-clonebundles.t` on Windows The `remote: {foo,bar}` lines were different because `echo` in MSYS uses `\r\n`. I couldn't make it work with the previous echoing of individual lines, changing the internal `echo` to `printf "foo\n"`, because that output as "foon". This works on Linux and Windows, so I'm not thinking too hard about it.
Mon, 07 Oct 2024 17:26:31 -0400 tests: cleanup some special casing of `seq` emitting '\r\n'
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 17:26:31 -0400] rev 51986
tests: cleanup some special casing of `seq` emitting '\r\n' My guess is these predate the commit referenced in the previous commit.
Mon, 07 Oct 2024 16:20:07 -0400 tests: force `seq` to print with '\n' EOL
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 16:20:07 -0400] rev 51985
tests: force `seq` to print with '\n' EOL It looks like consistent EOL is the reason for 0605726179a0, but now on py3, `print()` uses the platform EOL without regard to binary mode. The tests mostly use this to loop over a sequence of number in the shell, but there are a handful that redirect output to a file. Specifically, this fixes Windows runs of `test-bundle2-multiple-changegroups.t`, but there may be other tests this fixes. Some other `tests/*.py` files also set binary mode on stdout, but they also write bytes directly to `sys.stdout.buffer`. I'm not doing that here because PyCharm flags these write calls for passing bytes instead of str (PyCharm is likely wrong, but possibly confused because the code falls back to `sys.stdout` if there is no `.buffer` attribute), and it's annoying.
Mon, 07 Oct 2024 15:48:06 -0400 tests: stabilize `test-bundle-phase-internal.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 15:48:06 -0400] rev 51984
tests: stabilize `test-bundle-phase-internal.t` on Windows This is a silly difference, and we control the Windows side of things from mercurial/windows.py:195. I'll swap and quote the values to be like `no-windows` at some point, but I suspect this exception output would appear elsewhere, and don't feel like waiting for a 2h+ test run to find all of them.
Mon, 07 Oct 2024 13:19:16 -0400 tests: skip `test-wsgicgi.t` on MSYS
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Oct 2024 13:19:16 -0400] rev 51983
tests: skip `test-wsgicgi.t` on MSYS The test is attempting to set `PATH_INFO="/rev/\xe2\x80\x94"` into the environment, which it does. The problem is that when MSYS sees a leading '/' in an environment variable, it thinks it's a unix filesystem path, so it "helpfully" prepends the Windows path to the MSYS root directory before running a non-MSYS process. hgweb would then split this value on '/', so it would get 'C:' instead of 'rev', and return a 400 since that isn't a valid web command. I tried generating a *.bat file, but had trouble running that via `cmd.exe` inside the test. I also tried generating an equivalent *.py launcher that would set the environment variables itself. But there is no `os.environb` on Windows, and the value was getting mangled when put into the script. So, I give up. If it's encoding stuff on Windows, it's probably broken.
Thu, 27 Jun 2024 03:32:52 +0200 clonebundles: allow manifest to specify sha256 digest of bundles
Joerg Sonnenberger <joerg@bec.de> [Thu, 27 Jun 2024 03:32:52 +0200] rev 51982
clonebundles: allow manifest to specify sha256 digest of bundles
Thu, 03 Oct 2024 14:45:01 +0200 install: add long_description_content_type
paugier <pierre.augier@univ-grenoble-alpes.fr> [Thu, 03 Oct 2024 14:45:01 +0200] rev 51981
install: add long_description_content_type
Wed, 09 Oct 2024 10:56:51 +0200 headrevs: replace a boolean match with a if/else
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Oct 2024 10:56:51 +0200] rev 51980
headrevs: replace a boolean match with a if/else I missed that while doing a previous cleanup.
Fri, 27 Sep 2024 03:55:40 +0200 head-revs: add a native implementation of the `stop_rev` parameter
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 03:55:40 +0200] rev 51979
head-revs: add a native implementation of the `stop_rev` parameter This does not add too much complexity to the native code and help with branchmap v3 performance. Note that the final conversion of the heads from native-code to Python is still too costly, especially in Rust. In addition the current caching around headrevs is too simple and fragile. However these are an unrelated problem. ### benchmark.name = hg.command.unbundle # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.resource-usage = default # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle # benchmark.variants.validate = default # benchmark.variants.verbosity = quiet ## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.233711 ~~~~~ branch-v3 before: 0.239857 (+2.63%, +0.01) branch-v3 after: 0.239558 (+2.50%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.235230 ~~~~~ branch-v3 before: 0.240972 (+2.44%, +0.01) branch-v3 after: 0.239917 (+1.99%, +0.00) ## data-env-vars.name = netbeans-2018-08-01-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.255586 ~~~~~ branch-v3 before: 0.268560 (+5.08%, +0.01) branch-v3 after: 0.262261 (+2.61%, +0.01) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.339010 ~~~~~ branch-v3 before: 0.349389 (+3.06%, +0.01) branch-v3 after: 0.348247 (+2.72%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.346525 ~~~~~ branch-v3 before: 0.355661 (+2.64%, +0.01) branch-v3 after: 0.350906 (+1.26%, +0.00) ## data-env-vars.name = mozilla-central-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.380202 ~~~~~ branch-v3 before: 0.408851 (+7.54%, +0.03) branch-v3 after: 0.406511 (+6.92%, +0.03) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.412165 ~~~~~ branch-v3 before: 0.427782 (+3.79%, +0.02) branch-v3 after: 0.422595 (+2.53%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.412397 ~~~~~ branch-v3 before: 0.422354 (+2.41%, +0.01) branch-v3 after: 0.421079 (+2.11%, +0.01) ## data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.429501 ~~~~~ branch-v3 before: 0.443197 (+3.19%, +0.01) branch-v3 after: 0.449432 (+4.64%, +0.02) ## data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 3.403171 ~~~~~ branch-v3 before: 3.819477 (+12.23%, +0.42) branch-v3 after: 3.658482 (+7.50%, +0.26) # bin-env-vars.hg.flavor = rust branch-v2: 3.454876 ~~~~~ branch-v3 before: 3.590284 (+3.92%, +0.14) branch-v3 after: 3.545843 (+2.63%, +0.09) ## data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 3.465435 ~~~~~ branch-v3 before: 3.633278 (+4.84%, +0.17) branch-v3 after: 3.556074 (+2.62%, +0.09)
Thu, 26 Sep 2024 01:52:09 +0200 head-revs: move hg-core's inner_headrevsfiltered closer to inner_headrevs
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Sep 2024 01:52:09 +0200] rev 51978
head-revs: move hg-core's inner_headrevsfiltered closer to inner_headrevs This is pure code movement, it make a coming changesets significantly clearer.
Tue, 03 Sep 2024 11:11:17 +0200 branchmap-v3: introduce a "stop_rev" argument to `headsrevs`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 03 Sep 2024 11:11:17 +0200] rev 51977
branchmap-v3: introduce a "stop_rev" argument to `headsrevs` The `headsrevs` method of the revlog already have a `revs` argument to compute the headrevs of a limited set of heads. However, it disable the use of the native compiled code to compute the heads, which slows down the branchmap v3 code a lot. The branchmap v3 usage is actually quite constrained as we will always only ignores a part at the top of the graph. So we could be significantly faster. We start by making small change to the python side to improve the situation and introduce the new API. More collaboration with the native code are coming later. This massively speedup operation and close most of the remaining gaps between branchmap-v3 and branchmap-v2. especially on repository with many revs like mozilla-try. A small overhead remains mostly because the `headrevs` logic currently has some inefficiently. We will look into them from there. ### benchmark.name = hg.command.unbundle # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.resource-usage = default # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle # benchmark.variants.validate = default # benchmark.variants.verbosity = quiet ## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.233711 ~~~~~ branch-v3 before: 0.368769 (+57.79%, +0.14) branch-v3 after: 0.239857 (+2.63%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.235230 ~~~~~ branch-v3 before: 0.372460 (+58.34%, +0.14) branch-v3 after: 0.240972 (+2.44%, +0.01) ## data-env-vars.name = netbeans-2018-08-01-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.255586 ~~~~~ branch-v3 before: 0.318907 (+24.78%, +0.06) branch-v3 after: 0.268560 (+5.08%, +0.01) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.339010 ~~~~~ branch-v3 before: 0.349752 (+3.17%, +0.01) branch-v3 after: 0.349389 (+3.06%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.346525 ~~~~~ branch-v3 before: 0.354300 (+2.24%, +0.01) branch-v3 after: 0.355661 (+2.64%, +0.01) ## data-env-vars.name = mozilla-central-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.380202 ~~~~~ branch-v3 before: 0.396293 (+4.23%, +0.02) branch-v3 after: 0.408851 (+7.54%, +0.03) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.412165 ~~~~~ branch-v3 before: 0.424769 (+3.06%, +0.01) branch-v3 after: 0.427782 (+3.79%, +0.02) # bin-env-vars.hg.flavor = rust branch-v2: 0.412397 ~~~~~ branch-v3 before: 0.421796 (+2.28%, +0.01) branch-v3 after: 0.422354 (+2.41%, +0.01) ## data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.429501 ~~~~~ branch-v3 before: 0.443849 (+3.34%, +0.01) branch-v3 after: 0.443197 (+3.19%, +0.01) ## data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 3.403171 ~~~~~ branch-v3 before: 6.234055 (+83.18%, +2.83) branch-v3 after: 3.819477 (+12.23%, +0.42) # bin-env-vars.hg.flavor = rust branch-v2: 3.454876 ~~~~~ branch-v3 before: 6.307813 (+82.58%, +2.85) branch-v3 after: 3.590284 (+3.92%, +0.14) ## data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 3.465435 ~~~~~ branch-v3 before: 5.176076 (+49.36%, +1.71) branch-v3 after: 3.633278 (+4.84%, +0.17)
Tue, 03 Sep 2024 02:13:03 +0200 branchmap-v3: filter topo heads using node for performance reason
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 03 Sep 2024 02:13:03 +0200] rev 51976
branchmap-v3: filter topo heads using node for performance reason The branchmap currently contains heads as nodeid. If we build a set of revnum with the topological heads, we need to turn the nodeid in the branchmap to revnum to be able to check if they are topo-heads. That nodeid → revnum lookup is "expensive" and adds up to something noticeable if you do it hundreds of thousand of time. Instead we turn all the topo-heads revnums into nodes and build a set. So we can directly test membership of the nodeids stored in the branchmap. That is much faster. Ideally we would have revnum in the branchmap and could directly test revnum against a revnum set and that would be even faster. However that's an adventure for another time. Without this change, the branchmap format "v3" was significantly slower than the "v2" format. With this changes, some of that gap is recovered With rust + persistent nodemap, this overhead was smaller because the extra lookup did not had to to build the nodemap from scratch. In addition the mozilla-unified repository is able to use the "pure_top" mode of branchmap v3, so it was not really affected by this. Future changeset will work of the remaining of the performance gap. ### benchmark.name = hg.command.unbundle # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.resource-usage = default # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle # benchmark.variants.validate = default # benchmark.variants.verbosity = quiet ## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.233711 ~~~~~ branch-v3 before: 0.380994 (+63.02%, +0.15) branch-v3 after: 0.368769 (+57.79%, +0.14) # bin-env-vars.hg.flavor = rust branch-v2: 0.235230 ~~~~~ branch-v3 before: 0.385060 (+63.70%, +0.15) branch-v3 after: 0.372460 (+58.34%, +0.14) ## data-env-vars.name = netbeans-2018-08-01-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.255586 ~~~~~ branch-v3 before: 0.317524 (+24.23%, +0.06) branch-v3 after: 0.318907 (+24.78%, +0.06) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.339010 ~~~~~ branch-v3 before: 0.410007 (+20.94%, +0.07) branch-v3 after: 0.349752 (+3.17%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.346525 ~~~~~ branch-v3 before: 0.410428 (+18.44%, +0.06) branch-v3 after: 0.354300 (+2.24%, +0.01) ## data-env-vars.name = mozilla-central-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.380202 ~~~~~ branch-v3 before: 0.393871 (+3.60%, +0.01) branch-v3 after: 0.396293 (+4.23%, +0.02) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.412165 ~~~~~ branch-v3 before: 0.438105 (+6.29%, +0.03) branch-v3 after: 0.424769 (+3.06%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.412397 ~~~~~ branch-v3 before: 0.438405 (+6.31%, +0.03) branch-v3 after: 0.421796 (+2.28%, +0.01) ## data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.429501 ~~~~~ branch-v3 before: 0.452692 (+5.40%, +0.02) branch-v3 after: 0.443849 (+3.34%, +0.01) ## data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 3.403171 ~~~~~ branch-v3 before: 6.562345 (+92.83%, +3.16) branch-v3 after: 6.234055 (+83.18%, +2.83) # bin-env-vars.hg.flavor = rust branch-v2: 3.454876 ~~~~~ branch-v3 before: 6.160248 (+78.31%, +2.71) branch-v3 after: 6.307813 (+82.58%, +2.85) ## data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 3.465435 ~~~~~ branch-v3 before: 5.381648 (+55.30%, +1.92) branch-v3 after: 5.176076 (+49.36%, +1.71)
Fri, 27 Sep 2024 15:19:10 +0200 rev-branch-cache: properly ignores unaligned trailing data
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 15:19:10 +0200] rev 51975
rev-branch-cache: properly ignores unaligned trailing data Previously, trailing data could lead to crash and would be written back to disk, disaligning all new data… This is no longer the cases. This was detected while playing with branchmap-v3 that access the rev-branch-cache much more aggressively.
Fri, 27 Sep 2024 15:01:43 +0200 rev-branch-cache: stop pretending we will overwrite data when we don't
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 15:01:43 +0200] rev 51974
rev-branch-cache: stop pretending we will overwrite data when we don't We were issuing a message about overwriting data even when we were about to write 0 bytes in pratice. This is silly. Instead we point at the extra data remaining in the file (in case someone is using debug to debug something).
Fri, 27 Sep 2024 15:05:26 +0200 rev-branch-cache: fix message about overwritten data
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 15:05:26 +0200] rev 51973
rev-branch-cache: fix message about overwritten data If there is data at the end we ignore, we should not count them as overwritten. This reveal that we something don't overwrite anything, this will be taken car of in the next changeset.
Fri, 27 Sep 2024 02:27:54 +0200 branchmap-v3: detect invalid headerline and raise error
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 02:27:54 +0200] rev 51972
branchmap-v3: detect invalid headerline and raise error Otherwise, broken cache file would be accept as valid, but empty.
Fri, 27 Sep 2024 00:55:54 +0200 head-revs: merge the two inner_headrevs… variants
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 00:55:54 +0200] rev 51971
head-revs: merge the two inner_headrevs… variants Now that there is only one method, it does not make sense to have two different "inner" method. This is especially true as we are about to add another parameter to the method. So we clean up before that.
Thu, 26 Sep 2024 01:50:36 +0200 head-revs: move hg-cpython's inner_headrevsfiltered closer to inner_headrevs
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Sep 2024 01:50:36 +0200] rev 51970
head-revs: move hg-cpython's inner_headrevsfiltered closer to inner_headrevs This is pure code movement, it make a coming changesets significantly clearer.
Wed, 25 Sep 2024 17:18:40 +0200 head-revs: teach the pure indexes about the `headrevs` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Sep 2024 17:18:40 +0200] rev 51969
head-revs: teach the pure indexes about the `headrevs` method Having this computation done at the index level unify the API and remove revlog side complexity. It might also be a front runner of handing more responsability to the index.
Thu, 26 Sep 2024 00:50:21 +0200 head-revs: remove the `headrevsfiltered` method on the index
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Sep 2024 00:50:21 +0200] rev 51968
head-revs: remove the `headrevsfiltered` method on the index This method is no longer called and can be removed.
Wed, 25 Sep 2024 17:11:32 +0200 head-revs: stop calling headrevsfiltered
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Sep 2024 17:11:32 +0200] rev 51967
head-revs: stop calling headrevsfiltered The `headrevs` method have been accepting filter since Mercurial 3.2¹. I guess we can rely on it for now. (except the Rust extension that just gained this capability, but it has it now)
Wed, 25 Sep 2024 21:43:21 +0200 rust-cpython: also accept the `filteredrevs` argument in index.headrevs
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Sep 2024 21:43:21 +0200] rev 51966
rust-cpython: also accept the `filteredrevs` argument in index.headrevs The C version have been accepting this argument since Mercurial 3.2, lets align the Rust index here. This will make it possible to simplify the code in later changesets.
Wed, 25 Sep 2024 16:38:31 +0200 branchmap: use the proper experimental name in cacheutil
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Sep 2024 16:38:31 +0200] rev 51965
branchmap: use the proper experimental name in cacheutil Otherwise they are not properly copied around.
Sat, 05 Oct 2024 18:58:20 -0400 interfaces: introduce and use a protocol class for the `mpatch` module
Matt Harbison <matt_harbison@yahoo.com> [Sat, 05 Oct 2024 18:58:20 -0400] rev 51964
interfaces: introduce and use a protocol class for the `mpatch` module See f2832de2a46c for details when this was done for the `bdiff` module. Two things worth pointing out- 1) The `cffi` module "inherits" the `pure` implementation of `patchedsize()` because of its wildcard import. 2) It's odd that the `mpatchError` lives in both `pure` and `cext` modules. I initially thought to move the exception into the new class, and make the existing class name an alias to the class in the new location, but the exception is created in C code by the `cext` module, so that won't work. I don't think a protocol class is approriate, because there's nothing special about the class to distinguish from any other `Exception`. Fortunately, nobody is catching this exception in core, so we can kick the can down the road.
Tue, 08 Oct 2024 21:46:22 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 21:46:22 +0200] rev 51963
branching: merge stable into default
Tue, 08 Oct 2024 20:50:46 +0200 doctest: use the system hg to find the list of file to tests stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 20:50:46 +0200] rev 51962
doctest: use the system hg to find the list of file to tests Same as what we do for the `.t` tests, but more manually.
Tue, 08 Oct 2024 15:54:59 +0200 relnotes: skip the test if the source repository is not readable stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51961
relnotes: skip the test if the source repository is not readable The test want to run the relnot extension, with the tested mercurial, on the original repository. This is not always possible (e.g. when running with --pure and the repository use zstd for example). So we skip the test in this case.
Tue, 08 Oct 2024 15:54:59 +0200 check-code: document reason and suggest alternative to exit code negation stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51960
check-code: document reason and suggest alternative to exit code negation The check was introduced in f48b075ff088. We trust the explanation from there.
Tue, 08 Oct 2024 15:54:59 +0200 ci: drop the HGMODULEPOLICY overwrite stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51959
ci: drop the HGMODULEPOLICY overwrite The test runner have been setting them properly for a while now. So we don't need to do it manually anymore.
Tue, 08 Oct 2024 15:54:59 +0200 test: preserve the existing module policy config for testrepohg resuse stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51958
test: preserve the existing module policy config for testrepohg resuse The test runner is, righfully, setting HGMODULEPOLICY to match the flavor requests to run the tests. However this mess with the `testrepohg` ability to run properly, as the newly set policy might be incompatible with its installation, or its ability to read the test repo. So we preserve the initial value in a dedicated variable and use it in the `testrepohg` helper.
Tue, 08 Oct 2024 15:54:59 +0200 module-policy: ignore empty module policy stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51957
module-policy: ignore empty module policy This make the variable easier to work with, the empty value is not ambiguous about not wanting to get in the way.
Fri, 04 Oct 2024 13:26:29 -0400 tests: provide an alternate fake lock for filesystems without symlink support
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 13:26:29 -0400] rev 51956
tests: provide an alternate fake lock for filesystems without symlink support
Fri, 04 Oct 2024 12:53:02 -0400 tests: disable `worker.backgroundclose` to stabilize a test on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 12:53:02 -0400] rev 51955
tests: disable `worker.backgroundclose` to stabilize a test on Windows TIL that `worker.enabled=0` doesn't prevent these workers from spinning up. At any rate, there's already a whole lot of conditionalized output following `cat client.log`, the placement of the "starting 4 threads for background file closing" message seems unstable, and we don't care about those worker threads here. Preventing the message is better for test maintenance.
Fri, 04 Oct 2024 11:22:30 -0400 tests: fix lock file path mangling in `test-racy-mutations.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 11:22:30 -0400] rev 51954
tests: fix lock file path mangling in `test-racy-mutations.t` on Windows I guess `$TESTTMP_FORWARD_SLASH` gets translated by MSYS. This was in the `.foo_commit_out` file: sh: C;C:\\MinGW\\msys\\1.0\\Users\\Matt\\AppData\\Local\\Temp\\hgtests.1qc8jmdl\\child2\\test-racy-mutations.t-skip-detection\\waitlock_editor.sh: $ENOENT
Fri, 04 Oct 2024 11:10:45 -0400 tests: stabilize `test-status-eacces.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 11:10:45 -0400] rev 51953
tests: stabilize `test-status-eacces.t` on Windows As noted earlier, `chmod` doesn't complain in MSYS, but also doesn't alter the file permissions such that they are unreadable. I'm guessing the other lines of output in this area that are gated on `rhg` (or not) will also need this, but I don't want to dig too deeply into something that is apparently working well enough.
Fri, 04 Oct 2024 01:40:35 -0400 run-tests: bump the default timeout on Windows to 4x the normal value
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 01:40:35 -0400] rev 51952
run-tests: bump the default timeout on Windows to 4x the normal value There are a ridiculous number of tests that timeout on Windows with the 360 sec default (~60). And because of the bug where timed out tests still run to completion before the results are thrown away[1], the timeout does nothing but waste time, so there's no reason to try to find a lower value that still works. For reference on my system: # Ran 909 tests, 116 skipped, 119 failed. python hash seed: 2052473208 real 151m44.322s user 0m0.077s sys 0m0.046s [1] I thought that I wrote a bug for this, but search isn't finding it.
Fri, 04 Oct 2024 01:29:45 -0400 run-tests: bump the minimum python to 3.8
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 01:29:45 -0400] rev 51951
run-tests: bump the minimum python to 3.8 Presumably this was an oversight when hg was updated to 3.8.
Fri, 04 Oct 2024 01:23:31 -0400 tests: stabilize `test-sparse.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 01:23:31 -0400] rev 51950
tests: stabilize `test-sparse.t` on Windows One of the reserved characters for path values is '*', so it can't be used. Fortunately, missing this seems to not get in the way of any other tests, and it is removed shortly after with `rm -r foo*bar`, and the extant 'foo-bar' matches the pattern.
Thu, 03 Oct 2024 21:08:10 -0400 tests: fix a test hang on Windows when setting a debuglock
Matt Harbison <matt_harbison@yahoo.com> [Thu, 03 Oct 2024 21:08:10 -0400] rev 51949
tests: fix a test hang on Windows when setting a debuglock I have no idea why, but running the `hg -R auto-upgrade debuglock --set-lock` command near the end of `test-upgrade-repo.t` hangs the test. It does background the process and `killdaemons.py` runs without error, but control doesn't return to `run-tests.py` until the process is manually killed. I did notice that `$!` in MSYS is *not* the PID of the process that got backgrounded, even when a simple `sleep 60 &` is run in MSYS without the *.t file. When `killdaemons.py` is run manually with the PID in ProcessExplorer, the backgrounded process terminates immediately, and returns control to `run-tests.py`. This looks like it would be a race, but the test waits 10s for the lock file to appear before attempting to kill the process, so there's time. `hg serve` has a `--pid-file` option to write the pid to the file, but this is only a debug command, so I'm not bothering with cluttering the command line.
Thu, 03 Oct 2024 19:49:05 -0400 tests: conditionalize `chmod` usage in `test-upgrade-repo.t`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 03 Oct 2024 19:49:05 -0400] rev 51948
tests: conditionalize `chmod` usage in `test-upgrade-repo.t` While the command itself doesn't error out on Windows, it also doesn't make the filesystem readonly. Therefore the repo gets altered to drop dirstate-v2, and puts it out of sync with that happens on Linux.
Wed, 02 Oct 2024 18:30:12 -0400 tests: print the actual timeout value used in `wait-on-file`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 02 Oct 2024 18:30:12 -0400] rev 51947
tests: print the actual timeout value used in `wait-on-file` Previously, it was printing the time passed in, prior to it being scaled up to account for a longer timeout.
Wed, 02 Oct 2024 18:19:59 -0400 tests: stabilize `test-transaction-wc-rollback-race.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 02 Oct 2024 18:19:59 -0400] rev 51946
tests: stabilize `test-transaction-wc-rollback-race.t` on Windows MSYS has a tendency to munge C:\Dir\SubDir\File into C:DirSubDirFile unless it is quoted, and that's what was happening here- there were a lot of these failures: file not created after 5 seconds: $TESTTMP/transaction-waiting I suspect quoting is only needed in the hook script that is generated (the catting of the log file pointed me in the right direction here), but I missed a spot and trial and error got me here. The quoting elsewhere doesn't harm anything and it was taking 7+ minutes to run this test when things were timing out, so I don't feel like reducing the quoting to the minimum required.
Wed, 02 Oct 2024 16:34:33 -0400 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 02 Oct 2024 16:34:33 -0400] rev 51945
tests: stabilize `test-merge-partial-tool.t` on Windows The test was previously failing because it was opening the shell scripts being used as an executable in a text editor, and problems cascaded from there.
Wed, 02 Oct 2024 11:43:22 -0400 tests: replace `hg id --debug -i` command substitution with non-debug command
Matt Harbison <matt_harbison@yahoo.com> [Wed, 02 Oct 2024 11:43:22 -0400] rev 51944
tests: replace `hg id --debug -i` command substitution with non-debug command The censor and convert tests were failing on Windows because the `--debug` flag also prints debug messages, and at least some of these were outputting: skip updating dirstate: identity mismatch ${node} Obviously that causes cascading problems. The other tests were OK, but it's better to use a non debug command for stability.
Tue, 01 Oct 2024 21:40:20 -0400 tests: correct Windows output to account for putting repos in `repo` subdir
Matt Harbison <matt_harbison@yahoo.com> [Tue, 01 Oct 2024 21:40:20 -0400] rev 51943
tests: correct Windows output to account for putting repos in `repo` subdir These were missed in 55c6ebd11cb9, due to being conditionalized and not running in CI.
Tue, 01 Oct 2024 21:34:44 -0400 tests: use pattern matching to mask `ECONNREFUSED` messages
Matt Harbison <matt_harbison@yahoo.com> [Tue, 01 Oct 2024 21:34:44 -0400] rev 51942
tests: use pattern matching to mask `ECONNREFUSED` messages The second and third one of these in `test-http-proxy.t` was failing on Windows. The others were found by grep and by failed tests when output was matched and an attempt was made to emit the mask pattern. The first clonebundles failure on Windows emitted: error fetching bundle: [WinError 10061] $ECONNREFUSED$ We should probably stringify that better to get rid of the "[WinError 10061]" part.
Sat, 05 Oct 2024 17:32:26 -0400 typing: add stub functions for `cext/charencoding`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 05 Oct 2024 17:32:26 -0400] rev 51941
typing: add stub functions for `cext/charencoding` I'm not sure if it's better to have a separate file, and currently pytype doesn't really know how to handle these, so it's no help in figuring that out. Technically, these methods are part of the `mercurial.cext.parsers` module, so put them into the existing stub until there's a reason to split it out.
Sat, 05 Oct 2024 15:00:37 -0400 interfaces: introduce and use a protocol class for the `charencoding` module
Matt Harbison <matt_harbison@yahoo.com> [Sat, 05 Oct 2024 15:00:37 -0400] rev 51940
interfaces: introduce and use a protocol class for the `charencoding` module See f2832de2a46c for details when this was done for the `bdiff` module. This lets us dump the hack where the `pure` implementation was imported during the type checking phase to provide signatures for the module methods it provides. Now the protocol classes are starting to shine, because these methods are provided by `pure.charencoding` and `cext.parsers`, and references to `cffi.charencoding` and `cext.charencoding` are forwarded to them as appropriate by the `policy` module. But none of that matters, as long as the module returned provides the listed methods. The interface was copy/pasted from the `pure` module, but `jsonescapeu8fallback` is omitted because it is accessed from the `pure` module directly when the escaping fails in the primary module's `jsonescapeu8()`.
Fri, 04 Oct 2024 23:23:24 -0400 debugantivirusrunning: use bytes when opening a vfs file
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 23:23:24 -0400] rev 51939
debugantivirusrunning: use bytes when opening a vfs file I noticed this when searching for "base85" to see if anything else in the previous commit needed to be annotated. This was added in 87047efbc6a6, after the mass byteification in 687b865b95ad.
Fri, 04 Oct 2024 23:21:41 -0400 interfaces: introduce and use a protocol class for the `base85` module
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 23:21:41 -0400] rev 51938
interfaces: introduce and use a protocol class for the `base85` module See f2832de2a46c for details when this was done for the `bdiff` module. It looks like PEP-688 removed the special casing of `bytes` being a standin for any type of `ByteString`, and defines a `typing.Buffer` class (with a backport in `typing_extensions` for Python prior to 3.12). There's been a lot of churn in this area with pytype, but recent versions of pytype and PyCharm recognize this, and e.g. have `mercurial.node.hex()` defined as: from typing_extensions import Buffer def hex(data: Buffer, sep: str | bytes = ..., bytes_per_sep: int = ...) -> bytes This covers `bytes`, `bytearray`, and `memoryview` by default. Both of the C functions here use `y#` to parse the arguments, which means the arg is a byte-like object[2], so the args would appear to be better typed as `Buffer`. However, pytype has a bug that prevents using this from `typing_extensions`[3], and mypy complained `Unsupported left operand type for + ("memoryview")` in the pure module on line 37 (meaning it's only a subset of `Buffer`). So hold off on changing any of that for now. [1] https://peps.python.org/pep-0688/#no-special-meaning-for-bytes [2] https://docs.python.org/3/glossary.html#term-bytes-like-object [3] https://github.com/google/pytype/issues/1772
Fri, 04 Oct 2024 23:09:56 -0400 base85: avoid a spurious use-before-initialized warning in `pure` module
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Oct 2024 23:09:56 -0400] rev 51937
base85: avoid a spurious use-before-initialized warning in `pure` module The error wasn't possible because the only way for `acc` to not be initialized was if `len(text) == 0`. But then `0 % 5 == 0`, so no attempt at padding was done. It's a simple enough fix to not have PyCharm flag this though. The value needs to be reset on each loop iteration, so it's a line copy, not a line move.
Mon, 30 Sep 2024 19:40:14 -0400 typing: add type annotations to `mercurial/mdiff.py`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Sep 2024 19:40:14 -0400] rev 51936
typing: add type annotations to `mercurial/mdiff.py` We'll leave converting `diffopts` to `attrs` as another project.
Mon, 30 Sep 2024 23:50:40 -0400 mdiff: convert a few block definitions from lists to tuples
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Sep 2024 23:50:40 -0400] rev 51935
mdiff: convert a few block definitions from lists to tuples These were flagged by adding type hints. Some places were using a tuple of 4 ints to define a block, and others were using a list of 4. A tuple is better for typing, because we can define the length and the type of each entry. One of the places had to redefine the tuple, since writing to a tuple at an index isn't supported. This change spills out into the tests, and archeology says it was added to the repo in this state. There was no reason given for the divergence, and I suspect it wasn't intentional. It looks like `splitblock()` is completely unused in the codebase.
Sun, 29 Sep 2024 02:03:20 -0400 interfaces: add the optional `bdiff.xdiffblocks()` method
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Sep 2024 02:03:20 -0400] rev 51934
interfaces: add the optional `bdiff.xdiffblocks()` method PyCharm flagged where this was called on the protocol class in `mdiff.py` in the previous commit, but pytype completely missed it. PyCharm is correct here, but I'm committing this separately to highlight this potential problem- some of the implementations don't implement _all_ of the methods the others do, and there's not a great way to indicate on a protocol class that a method or attribute is optional- that's kinda the opposite of what static typing is about. Making the method an `Optional[Callable]` attribute works here, and keeps both PyCharm and pytype happy, and the generated `mdiff.pyi` and `modules.pyi` look reasonable. We might be getting a little lucky, because the method isn't invoked directly- it is returned from another method that selects which block function to use. Except since it is declared on the protocol class, every module needs this attribute (in theory, but in practice this doesn't seem to be checked), so the check for it on the module has to change from `hasattr()` to `getattr(..., None)`. We defer defining the optional attrs to the type checking phase as an extra precaution- that way it isn't an attr with a `None` value at runtime if someone is still using `hasattr()`. As to why pytype missed this, I have no clue. The generated `mdiff.pyi` even has the global variable typed as `bdiff: intmod.BDiff`, so uses of it really should comply with what is on the class, protocol class or not.
Sat, 28 Sep 2024 19:12:18 -0400 interfaces: introduce and use a protocol class for the `bdiff` module
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Sep 2024 19:12:18 -0400] rev 51933
interfaces: introduce and use a protocol class for the `bdiff` module This is allowed by PEP 544[1], and we basically follow the example there. The class here is copied from `mercurial.pure.bdiff`, and the implementation removed. There are several modules that have a few different implementations, and the implementation chosen is controlled by `HGMODULEPOLICY`. The module is loaded via `mercurial/policy.py`, and has been inferred by pytype as `Any` up to this point. Therefore it and PyCharm were blind to all functions on the module, and their signatures. Also, having multiple instances of the same module allows their signatures to get out of sync. Introducing a protocol class allows the loaded module that is stored in a variable to be given type info, which cascades through the various places it is used. This change alters 11 *.pyi files, for example. In theory, this would also allow us to ensure the various implementations of the same module are kept in alignment- simply import the module in a test module, attempt to pass it to a function that uses the corresponding protocol as an argument, and run pytype on it. In practice, this doesn't work (yet). PyCharm (erroneously) flags imported modules being passed where a protocol class is used[2]. Pytype has problems the other way- it fails to detect when a module that doesn't adhere to the protocol is passed to a protocol argument. The good news is that mypy properly detects this case. The bad news is that mypy spews a bunch of other errors when importing even simple modules, like the various `bdiff` modules. Therefore I'm punting on the tests for now because the type info around a loaded module in PyCharm is a clear win by itself. [1] https://peps.python.org/pep-0544/#modules-as-implementations-of-protocols [2] https://youtrack.jetbrains.com/issue/PY-58679/Support-modules-implementing-protocols
Sat, 28 Sep 2024 19:11:39 -0400 mdiff: tweak calls into `bdiff.fixws` to match its type hints
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Sep 2024 19:11:39 -0400] rev 51932
mdiff: tweak calls into `bdiff.fixws` to match its type hints It turns out that protocol classes can be used for modules too, which is great because all of the dynamically loaded modules (and their attributes) are currently inferred as `Any`. See the next commit for details. A protocol class for the `bdiff` module detected this (trivial) mismatch, so correct it first. The various implementations of this method are typed as taking a `bool`. The `cext` implementation parses its arguments with `PyArg_ParseTuple(args, "Sb:fixws", &s, &allws)`, which wants an `int`. But experimenting in `hg debugshell` under py38, passing `True` or `False` to `cext.fixws()` also works. We can change the implementation to use "p" (which was introduced in py33) instead of "b", but that's beyond the scope of this.
Tue, 01 Oct 2024 15:04:06 -0400 util: minor copy editing of the documentation for `mmapread()`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 01 Oct 2024 15:04:06 -0400] rev 51931
util: minor copy editing of the documentation for `mmapread()`
Tue, 01 Oct 2024 15:00:39 -0400 util: make `mmapread()` work on Windows again
Matt Harbison <matt_harbison@yahoo.com> [Tue, 01 Oct 2024 15:00:39 -0400] rev 51930
util: make `mmapread()` work on Windows again 522b4d729e89 started referencing `mmap.MAP_PRIVATE`, but that's not available on Windows, so `hg version` worked, but `make local` did not. That commit also started calling the constructor with the fine-grained `flags` and `prot` args, but those aren't available on Windows either[1] (though the backing C code doesn't seem conditionalized to disallow usage of them). I assume the change away from from the `access` arg was to provide the same options, plus `MAP_POPULATE`. Looking at the source code[2], they're not quite the same- `ACCESS_READ` is equivalent to `flags = MAP_SHARED` and `prot = PROT_READ`. `MAP_PRIVATE` is only used with `ACCESS_COPY`, which allows read and write. Therefore, we can't quite get the same baseline flags on Windows, but this was the status quo ante and `MAP_POPULATE` is a Linux thing, so presumably it works. I realize that typically the OS differences are abstracted into the platform modules, but I'm leaving it here so that it is obvious what the differences are between the platforms. [1] https://docs.python.org/3/library/mmap.html#mmap.mmap [2] https://github.com/python/cpython/blob/5e0abb47886bc665eefdcc19fde985f803e49d4c/Modules/mmapmodule.c#L1539
Fri, 27 Sep 2024 12:30:37 -0400 typing: add type annotations to the dirstate classes
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Sep 2024 12:30:37 -0400] rev 51929
typing: add type annotations to the dirstate classes The basic procedure here was to use `merge-pyi` to merge the `git/dirstate.pyi` file in (after renaming the interface class to match), cleaning up the import statement mess, and then repeating the procedure for `mercurial/dirstate.pyi`. Surprisingly, git's dirstate had more hints inferred in its *.pyi file. After that, it was a manual examination of each method in the interface, and how they were implemented in the core and git classes to verify what was inferred by pytype, and fill in the missing gaps. Since this involved jumping around between three different files, I applied the same type info to all three at the same time. Complex types I rolled up into type aliases in the interface module, and used that as needed. That way if it changes, there's one place to edit. There are some hints still missing, and some documentation that doesn't match the signatures. They should all be marked with TODOs. There are also a bunch of methods on the core class that aren't on the Protocol class that seem like maybe they should be (like `set_tracked()`). There are even more methods missing from the git class. But that's a project for another time.
Fri, 27 Sep 2024 12:10:25 -0400 interfaces: change a couple of dirstate fields to `@property`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Sep 2024 12:10:25 -0400] rev 51928
interfaces: change a couple of dirstate fields to `@property` As I was adding type hints here and to the concrete classes, PyCharm flagged the property in the core class as not being compatible with the base class's version.
Fri, 27 Sep 2024 12:05:48 -0400 git: make `dirstate.parents()` return a list like the core class
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Sep 2024 12:05:48 -0400] rev 51927
git: make `dirstate.parents()` return a list like the core class The core class returned a list, so that's how I type annotated it, and this got flagged. I suppose we could annotate it as a `Sequence[bytes]`, but it's a trivial difference.
Fri, 27 Sep 2024 11:57:42 -0400 typing: add type hints for the overloads of `matchmod.readpatternfile()`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Sep 2024 11:57:42 -0400] rev 51926
typing: add type hints for the overloads of `matchmod.readpatternfile()` The return type is conditional on an argument passed, and it very much confused both pytype and PyCharm inside `dirstate._ignorefileandline()` after adding type hints for the return value there.
Thu, 26 Sep 2024 18:52:46 -0400 dirstate: subclass the new dirstate Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 18:52:46 -0400] rev 51925
dirstate: subclass the new dirstate Protocol class Behold the chaos that ensues. We'll use the generated *.pyi files to apply type annotations to the interface, and see how much agrees with the documentation. Since the CamelCase name was used to try to work around pytype issues with zope interfaces and is a new innovation this cycle (see c1d7ac70980b), drop the CamelCase name. I think the Protocol classes *should* be CamelCase, but that can be done later in one pass. For now, the CamelCase alias is extra noise in the *.pyi files.
Thu, 26 Sep 2024 18:51:03 -0400 git: correct some signature mismatches between dirstate and the Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 18:51:03 -0400] rev 51924
git: correct some signature mismatches between dirstate and the Protocol class These were flagged by PyCharm when subclassing the Protocol class. Note that both `is_changing_xxx` were only flagged when the Protocol class used a plain field, as mentioned in the previous commit. After converting those attrs in the Protocol class to @property to match the regular dirstate class, it stopped flagging these. But I don't think that makes sense- `@property` should look like an attribute to the outside world, not a callable.
Thu, 26 Sep 2024 18:15:36 -0400 interfaces: convert the zope `Attribute` attrs to regular fields
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 18:15:36 -0400] rev 51923
interfaces: convert the zope `Attribute` attrs to regular fields At this point, we should have a useful protocol class. The file syntax requires the type to be supplied for any fields that are declared, but we'll leave the complex ones partially unspecified for now, for simplicity. (Also, the things documented as `Callable` are really as future type annotating worked showed- roll with it for now, but they're marked as TODO for fixing later.) All of the fields and all of the attrs will need type annotations, or the type rules say they are considered to be `Any`. That can be done in a separate pass, possibly applying the `dirstate.pyi` file generated from the concrete class. The first cut of this turned the `interfaceutil.Attribute` fields into plain fields, and thus the types on them. PyCharm flagged a few things as having incompatible signatures when the concrete dirstate class subclassed this, when the concrete class has them declared as `@property`. So they've been changed to `@property` here in those cases. The remaining fields that are decorated in the concrete class have comments noting the differences. We'll see if they need to be changed going forward, but leave them for now. We'll be in trouble if the `@util.propertycache` is needed, because we can't import that module here at runtime, due to circular imports.
Thu, 26 Sep 2024 18:09:33 -0400 interfaces: add the missing `self` arg to the dirstate Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 18:09:33 -0400] rev 51922
interfaces: add the missing `self` arg to the dirstate Protocol class This clears all of the errors that PyCharm has been flagging in this file, since the zope interface was declared here.
Thu, 26 Sep 2024 18:04:31 -0400 interfaces: convert the dirstate zope interface to a Protocol class
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 18:04:31 -0400] rev 51921
interfaces: convert the dirstate zope interface to a Protocol class This is a small trial run for converting the repository interfaces enmasse, in the same series of steps. I'm not sure that this current code is valid (it has zope attribute fields, and it's missing all of the `self` args on its functions, but that was the previous state of things, and made PyCharm really unhappy). But it will be easier to review the repository interface changes if this change is separate from adding `self` and dropping the zope attributes all over. Having an empty constructor in a protocol is weird. I'm not sure if these args should be converted to fields that all subclasses would have, and comments around existing attributes say some should be going away. Comment it out for now so that it's not in the way, but also not forgotten.
Thu, 26 Sep 2024 17:47:39 -0400 tests: disable `test-check-interfaces.py` while converting to protocols
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 17:47:39 -0400] rev 51920
tests: disable `test-check-interfaces.py` while converting to protocols The goal is to convert everything, so get it all out of the way. The interfaces don't get that much maintenance that this needs to be tested right now.
Wed, 02 Oct 2024 14:51:56 +0100 tests: always access the mercurial repo through `helpers-testrepo.sh`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 02 Oct 2024 14:51:56 +0100] rev 51919
tests: always access the mercurial repo through `helpers-testrepo.sh` In some contexts the mercurial repo needs to be accessed through system hg. That's what `helpers-testrepo.sh` enforces, but some tests incorrectly use the mercurial repo without going through that script. This patch fixes those tests.
Wed, 02 Oct 2024 14:49:07 +0100 tests: in helpers-testrepo.sh switch from shell aliases to functions
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 02 Oct 2024 14:49:07 +0100] rev 51918
tests: in helpers-testrepo.sh switch from shell aliases to functions The reason is that I want this script to work in non-interactive shells too. (will be used in the next commit)
Fri, 27 Sep 2024 17:25:15 +0100 rust: fix the deprecation warning in NaiveDateTime::from_timestamp
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 27 Sep 2024 17:25:15 +0100] rev 51917
rust: fix the deprecation warning in NaiveDateTime::from_timestamp This warning appears between chrono 0.4.34 and 0.4.38, so isn't affecting the current lock file, but it would come when we upgraded the version.
Fri, 27 Sep 2024 15:53:56 +0200 run-tests: ensure that --no-rust do not use rust stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 15:53:56 +0200] rev 51916
run-tests: ensure that --no-rust do not use rust Since having a valid value in HGWITHRUSTEXT is enough to trigger the use of rust, we need to unset it before install to be sure.
Sat, 20 Jul 2024 03:04:48 +0200 revlogutils: teach issue6528 filtering about grandparents
Joerg Sonnenberger <joerg@bec.de> [Sat, 20 Jul 2024 03:04:48 +0200] rev 51915
revlogutils: teach issue6528 filtering about grandparents During dynamic filtering, we should assume that the current repository is correct. Therefore the parents of the delta base can tell us if that parent has metadata without having to build the whole text.
Sat, 20 Jul 2024 00:43:08 +0200 revlogutils: remember known metadata parents for issue6528
Joerg Sonnenberger <joerg@bec.de> [Sat, 20 Jul 2024 00:43:08 +0200] rev 51914
revlogutils: remember known metadata parents for issue6528 In the cases where the parent revs tell us for sure that the parent has metadata, remember this fact to avoid content recomputations later.
Sat, 20 Jul 2024 00:44:59 +0200 revlogutils: for issue6528 fix, pre-cache nullrev as metadata-free
Joerg Sonnenberger <joerg@bec.de> [Sat, 20 Jul 2024 00:44:59 +0200] rev 51913
revlogutils: for issue6528 fix, pre-cache nullrev as metadata-free
Sat, 20 Jul 2024 00:59:50 +0200 revlogutils: for issue6528 fix, cache results for null changes
Joerg Sonnenberger <joerg@bec.de> [Sat, 20 Jul 2024 00:59:50 +0200] rev 51912
revlogutils: for issue6528 fix, cache results for null changes
Sat, 20 Jul 2024 00:41:37 +0200 revlogutils: fix _chunk() reference
Joerg Sonnenberger <joerg@bec.de> [Sat, 20 Jul 2024 00:41:37 +0200] rev 51911
revlogutils: fix _chunk() reference _chunk is only found in the inner revlog object and not directly exposed outside.
Mon, 02 Sep 2024 22:14:38 +0200 rev-branch-cache: reenable memory mapping of the revision data
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 02 Sep 2024 22:14:38 +0200] rev 51910
rev-branch-cache: reenable memory mapping of the revision data Now that we are no longer truncating it, we can mmap it again. This provide a sizeable speedup on repository with a very large amount of revision for example for a mozilla-try clone with 5 793 383 revisions, this provide a speedup of 5ms - 10ms. Since they happens within the "critical" locked path during push. These miliseconds are important. In addition, the v3 branchmap format is use the rev-branch-cache more than the v2 branchmap cache so this will be important. On smaller repository we consistently see an improvement of one or two percents, but the gain in absolute time is usually < 10 ms. #### benchmark.name = hg.command.unbundle # benchmark.variants.issue6528 = disabled # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle # benchmark.variants.verbosity = quiet ### data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog ## bin-env-vars.hg.flavor = default e51161b12c7e: 3.527923 ebdcfe85b070: 3.468178 (-1.69%, -0.06) ## bin-env-vars.hg.flavor = rust e51161b12c7e: 3.580158 ebdcfe85b070: 3.480564 (-2.78%, -0.10) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm ## bin-env-vars.hg.flavor = rust e51161b12c7e: 3.527923 ebdcfe85b070: 3.468178 (-1.69%, -0.06)
Wed, 25 Sep 2024 12:42:47 +0200 rev-branch-cache: have debugupdatecache warm rbc too
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Sep 2024 12:42:47 +0200] rev 51909
rev-branch-cache: have debugupdatecache warm rbc too Since the "v2" format can be more performant than the "v1" format (thanks to mmap), it is useful to be able to make sure it is present
Wed, 25 Sep 2024 12:49:32 +0200 rev-branch-cache: schedule a write of the "v2" format if we read from "v1"
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Sep 2024 12:49:32 +0200] rev 51908
rev-branch-cache: schedule a write of the "v2" format if we read from "v1" The new file can be memorymapped, while the old one cannot. So there is value in having the v2 format around as soon a possible.
Tue, 24 Sep 2024 15:44:10 +0200 rev-branch-cache: fallback on "v1" data if no v2 is found
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Sep 2024 15:44:10 +0200] rev 51907
rev-branch-cache: fallback on "v1" data if no v2 is found This will help smooth the transition to the v2 format for existing large repository.
Tue, 24 Sep 2024 03:16:35 +0200 rev-branch-cache: increment the version to "v2"
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Sep 2024 03:16:35 +0200] rev 51906
rev-branch-cache: increment the version to "v2" We want to ensure no older clients will truncate the file under us. So we need to change their name. We don't change the rest of the format (unfortunaly).
Tue, 24 Sep 2024 00:16:23 +0200 rev-branch-cache: stop truncating cache file
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Sep 2024 00:16:23 +0200] rev 51905
rev-branch-cache: stop truncating cache file Truncating the file prevent the safe use of mmap. So instead of overwrite the existing data. If more than 20% of the file is to be overwritten, we rewrite the whole file instead. Such whole rewrite is done by replacing the old one with a new one, so mmap of the old file would be affected. This prepare a more aggressive use of mmap in later patches.
Tue, 24 Sep 2024 00:16:04 +0200 rev-branch-cache: make sure we close the name file we open
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Sep 2024 00:16:04 +0200] rev 51904
rev-branch-cache: make sure we close the name file we open We were various opening without with or try. Adding a try would not hurt.
Mon, 23 Sep 2024 23:52:45 +0200 rev-branch-cache: add a way to force rewrite of the cache
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 23 Sep 2024 23:52:45 +0200] rev 51903
rev-branch-cache: add a way to force rewrite of the cache This seems useful to be able to do this, for example during strip. This align with the intended expressed in the `test-branches.t` test. This will help use being more confident about future changes in the series.
Tue, 24 Sep 2024 00:01:30 +0200 rev-branch-cache: issue more truthful "truncating" message
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Sep 2024 00:01:30 +0200] rev 51902
rev-branch-cache: issue more truthful "truncating" message First, don't pretend it truncate to 40 when it actually truncate to 0. Second, don't pretend to truncate to 0 when the file is already empty/missing.
Sun, 22 Sep 2024 15:55:46 +0200 rev-branch-cache: move the code in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 22 Sep 2024 15:55:46 +0200] rev 51901
rev-branch-cache: move the code in a dedicated module The branchmap module is getting huge and the rev branch cache is fully independent, lets move it elsewhere.
Wed, 25 Sep 2024 01:16:47 -0400 statichttprepo: stop shadowing the `bytes` builtin
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Sep 2024 01:16:47 -0400] rev 51900
statichttprepo: stop shadowing the `bytes` builtin PyCharm flagged it, but I also misunderstood when looking at the code, because the name implied a byte string, not a number.
Wed, 25 Sep 2024 01:12:39 -0400 statichttprepo: fix `httprangereader.read()` for py3
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Sep 2024 01:12:39 -0400] rev 51899
statichttprepo: fix `httprangereader.read()` for py3 It looks like there were a bunch of problems, not all of them py3 related: 1) The signature of BinaryIO.read() is -1, not None 2) The `end` variable can't be bytes and interpolate into str with "%s" 3) The `end` variable can't be an int and interpolate into str with "%s" 4) The result slicing could be out of bounds if more is requested than returned I guess if somebody would have called `read(-1)` (either directly or because a wrapper defaults to that), it wouldn't have been handled correctly. The fact that it is a valid value meaning to read everything requires some additional changes later in the method around when it slices the byte string that was read, but that seems to have already been broken.
Wed, 25 Sep 2024 00:52:44 -0400 statichttprepo: use a context manager to handle a file descriptor
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Sep 2024 00:52:44 -0400] rev 51898
statichttprepo: use a context manager to handle a file descriptor I'm not sure if this should be reduced to `vfs.exists()`. That would seem to be equivalent code (since the result of the read is ignored, so we can't tell if the file actually has content, which has been the state of things going back to 98b6c3dde237), but this is at least safer file descriptor handling.
Thu, 26 Sep 2024 02:58:50 +0200 profiling: pass bytes to `_()` and `error.Abort()`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Sep 2024 02:58:50 +0200] rev 51897
profiling: pass bytes to `_()` and `error.Abort()` And of course `other_tool_name` is str too, so that needs to be converted. The type hints from PyCharm say `sys.monitoring.get_tool()` can return None, so handle that case explicitly before it trips up pytype.
Mon, 08 Jul 2024 22:46:04 +0200 exchange: improve computation of relevant markers for large repos
Joerg Sonnenberger <joerg@bec.de> [Mon, 08 Jul 2024 22:46:04 +0200] rev 51896
exchange: improve computation of relevant markers for large repos Compute the candidate nodes with relevant markers directly from keys of the predecessors/successors/children dictionaries of obsstore. This is faster than iterating over all nodes directly. This test could be further improved for repositories with relative few markers compared to the repository size, but this is no longer hot already. With the current loop structure, the obshashrange use works as well as before as it passes lists with a single node. Adjust the interface by allowing revision lists as well as node lists. This helps cases that computes ancestors as it reduces the materialisation cost. Use this in _pushdiscoveryobsmarker and _getbundleobsmarkerpart. Improve the latter further by directly using ancestors(). Performance benchmarks show notable and welcome improvement to no-op push and pull (that would also apply to other push/pull). This apply to push and pull done without evolve. ### push/pull Benchmark parameter # bin-env-vars.hg.flavor = default # benchmark.variants.explicit-rev = none # benchmark.variants.protocol = ssh # benchmark.variants.revs = none ## benchmark.name = hg.command.pull # data-env-vars.name = mercurial-devel-2024-03-22-zstd-sparse-revlog before: 5.968537 seconds after: 5.668507 seconds (-5.03%, -0.30) # data-env-vars.name = tryton-devel-2024-03-22-zstd-sparse-revlog before: 1.446232 seconds after: 0.835553 seconds (-42.23%, -0.61) # data-env-vars.name = netbsd-src-draft-2024-09-19-zstd-sparse-revlog before: 5.777412 seconds after: 2.523454 seconds (-56.32%, -3.25) ## benchmark.name = hg.command.push # data-env-vars.name = mercurial-devel-2024-03-22-zstd-sparse-revlog before: 6.155501 seconds after: 5.885072 seconds (-4.39%, -0.27) # data-env-vars.name = tryton-devel-2024-03-22-zstd-sparse-revlog before: 1.491054 seconds after: 0.934882 seconds (-37.30%, -0.56) # data-env-vars.name = netbsd-src-draft-2024-09-19-zstd-sparse-revlog before: 5.902494 seconds after: 2.957644 seconds (-49.89%, -2.94) There is not notable different in these result using the "rust" flavor instead of the "default". The performance impact on the same operation when using evolve were also tested and no impact was noted.
Fri, 20 Sep 2024 21:31:58 -0400 typing: make the localrepo classes known to pytype
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 21:31:58 -0400] rev 51895
typing: make the localrepo classes known to pytype 9d4ad05bc91c and 1b17309cdaab both mentioned making `bundlerepository` and `unionrepository` subclass `localrepository` during the type checking phase, but that didn't apply to pytype in practice. See bcaa5d408657 and friends for how the zope interfaces confuse pytype, and end up converting the classes they decorate into `Any`. This commit is slightly more complex though, because `localrepository` has mixin classes applied to it when it is instantiated. Specifically, `RevlogFileStorage` is added, which adds `def file(f)` (which isn't defined on `localrepository`). Therefore a list of `localrepository` superclasses is provided during type checking to account for the mixins. Without this, the `bundlerepository` class gets flagged when it attempts to call its superclass implementation of `file()`. Note that pytype doesn't understand these mixin superclasses (it marks the superclass of `localrepository` as `Any`, because they are zope interfaces it doesn't understand), but that's enough to get it to not flag `bundlerepository`. PyCharm also stops flagging it as a missing function, though it seems like it is able to handle the zope interfaces.
Mon, 23 Sep 2024 14:58:37 -0400 typing: add a handful more annotations to `mercurial/vfs.py`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 23 Sep 2024 14:58:37 -0400] rev 51894
typing: add a handful more annotations to `mercurial/vfs.py` These came out of refactoring into a protocol class, but they can stand on their own. The `audit` callback is kinda screwy because the internal lambda and the callable for `pathutil.pathauditor` have different args and a different return type. It's conditionalized where it is called, and can be cleaned up later if desired.
Sat, 21 Sep 2024 13:53:05 -0400 typing: make `vfs.isfileorlink_checkdir()` path arg required
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Sep 2024 13:53:05 -0400] rev 51893
typing: make `vfs.isfileorlink_checkdir()` path arg required The only caller to this is `merge._checkunknownfile()`, which supplies a value. That's good, because `util.localpath()` immediately uses the value to call a method on it on Windows. The posix implementation returns the value unaltered, but then `pathutil.finddirs_rev_noroot()` would have exploded.
Fri, 20 Sep 2024 20:16:12 -0400 typing: manually add type annotations to `mercurial/vfs.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 20:16:12 -0400] rev 51892
typing: manually add type annotations to `mercurial/vfs.py` This isn't everything, but hopefully it's close enough to hack on a protocol class.
Fri, 20 Sep 2024 16:36:28 -0400 typing: correct pytype mistakes in `mercurial/vfs.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 16:36:28 -0400] rev 51891
typing: correct pytype mistakes in `mercurial/vfs.py` With the previous changes in this series (prior to merging the *.pyi file), this wasn't too bad- the only definitively wrong things were the `data` argument to `writelines()`, and the return type on `backgroundclosing()` (both of these errors were dropped in the previous commit; for some reason pytype doesn't like `contextlib._GeneratorContextManager`, even though that's what it determined it is): File "/mnt/c/Users/Matt/hg/mercurial/vfs.py", line 411, in abstractvfs: Bad return type 'contextlib._GeneratorContextManager' for generator function abstractvfs.backgroundclosing [bad-yield-annotation] Expected Generator, Iterable or Iterator PyCharm thinks this is `Generator[backgroundfilecloser], Any, None]`, which can be reduced to `Iterator[backgroundfilecloser]`, but pytype flagged the line that calls `yield` without an argument unless it's also `Optional`. PyCharm is happy either way. For some reason, `Iterable` didn't work for pytype: File "/mnt/c/Users/Matt/hg/mercurial/vfs.py", line 390, in abstractvfs: Function contextlib.contextmanager was called with the wrong arguments [wrong-arg-types] Expected: (func: Callable[[Any], Iterator]) Actually passed: (func: Callable[[Any, Any, Any], Iterable[Optional[Any]]]) Attributes of protocol Iterator[_T_co] are not implemented on Iterable[Optional[Any]]: __next__
Fri, 20 Sep 2024 13:38:13 -0400 typing: run `merge-pyi` on `mercurial/vfs.py`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 13:38:13 -0400] rev 51890
typing: run `merge-pyi` on `mercurial/vfs.py` The *.pyi file was generated with pytype 2023.11.21. There were a few things here that were wrong (e.g. `writelines()` takes an `Iterable[bytes]`, not `bytes`, or inexplicable errors like importing several of the vfs classes from this very module), and those changes have been dropped manually here.
Fri, 20 Sep 2024 01:10:17 -0400 typing: add type annotations to `mercurial.util.makelock()`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 01:10:17 -0400] rev 51889
typing: add type annotations to `mercurial.util.makelock()` This bubbles up into the `vfs` classes, so get this out of the way.
Fri, 20 Sep 2024 00:20:24 -0400 util: avoid a leaked file descriptor in `util.makelock()` exceptional case
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 00:20:24 -0400] rev 51888
util: avoid a leaked file descriptor in `util.makelock()` exceptional case
Fri, 20 Sep 2024 00:04:09 -0400 typing: add type annotations to the `mercurial.util.filestat` class
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 00:04:09 -0400] rev 51887
typing: add type annotations to the `mercurial.util.filestat` class It's referenced in the `vfs` classes, so get this out of the way to help there. The `TypeVar` definition and its usage was copied from the existing `util.pyi` file.
Fri, 20 Sep 2024 12:15:08 -0400 vfs: do minor copyediting on comments and doc strings
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 12:15:08 -0400] rev 51886
vfs: do minor copyediting on comments and doc strings These were flagged by PyCharm, so clear them from the gutter.
Fri, 20 Sep 2024 01:16:16 -0400 vfs: simplify the `abstractvfs.rename()` implementation
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 01:16:16 -0400] rev 51885
vfs: simplify the `abstractvfs.rename()` implementation PyCharm was yapping about `util.rename()` not returning anything, because it is typed to return `None`, but the value was captured and returned after calling `_avoidambig()`. Instead, drop all of that, unconditionally rename, and then call `_avoidambig()` if appropriate. While we're here, convert the ersatz ternary operator into a modern one to help pytype. When a variable is initialized the old way, pytype tends to assign the type of the LHS of the `and`. In this case, that's a bool, and it will get confused that bool doesn't have a `stat` attribute once this method gets more type annotations. (Currently it thinks the `checkambig` arg is `Any`, so it doesn't care.)
Fri, 20 Sep 2024 00:07:39 -0400 vfs: use @abstractmethod instead of homebrewing abstract methods
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Sep 2024 00:07:39 -0400] rev 51884
vfs: use @abstractmethod instead of homebrewing abstract methods The latter confuses PyCharm after adding more type annotations when, for example, `abstractvfs.rename()` calls `_auditpath()`- the latter unconditionally raised an error, so PyCharm thought the code that came after is unreachable. It also tricked pytype into marking the return type as `Never`, which isn't available until Python 3.11 (outside of `typing_extensions`). This also avoid PyCharm warnings that the call to the superclass constructor was missed (it couldn't be called because it raised an error to prevent instantiation). The statichttprepo module needed to be given an override for one of the abstract methods, so that it can be instantiated. In `abstractvfs`, this method is only called by `rename()`, so I think we can leave this empty. We raise an error in case somebody accidentally calls it in the future- it would have raised this same error prior to this change. I couldn't wrangle `import-checker.py` into accepting importing `ABC` and `abstractmethod`- for each subsequent import, it reports something like: stdlib import "contextlib" follows local import: abc I suspect the problem is that near the `if fullname != '__future__'` check, if the module doesn't fall into the error case, `seenlocal` gets set to the module name. That causes it to be treated like a local module on the next iteration, even though it is in `stdlib_modules`.
Thu, 19 Sep 2024 21:03:10 -0400 vfs: modernize the detection of the main thread
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Sep 2024 21:03:10 -0400] rev 51883
vfs: modernize the detection of the main thread There weren't a lot of good choices when py27 was supported, but starting with py34, `threading.main_thread()` is available. This gets us away from an undocumented, internal symbol, and drops a pytype suppression statement. It is also apparently no longer reliable after a process fork.[1][2] [1] https://stackoverflow.com/a/23207116 [2] https://github.com/python/cpython/blob/v3.6.3/Lib/threading.py#L1334
Sun, 22 Sep 2024 17:06:31 -0400 store: fix a signature mismatch for a vfs subclass
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Sep 2024 17:06:31 -0400] rev 51882
store: fix a signature mismatch for a vfs subclass This was flagged by PyCharm. I'm not sure why pytype doesn't catch this- it's not excluded from the modules that are currently checked.
Sun, 22 Sep 2024 17:02:42 -0400 lfs: fix various signature mismatches for vfs subclasses
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Sep 2024 17:02:42 -0400] rev 51881
lfs: fix various signature mismatches for vfs subclasses These were flagged by PyCharm. I'm not sure why pytype doesn't catch these- only `hgext/lfs/__init__.py` in the lfs extension is excluded from being checked. I'm not sure if the `*insidef` arg to `join()` was meant as an internal convencience, because I see another class that gets flagged for the same signature problem (to be fixed next). But I don't feel bold enough to make this an internal function, and provide a simplified public `join()` on the `vfs` classes. That can still be done later, if desired. For now, process the additional args and pass them along, even though there don't appear to be any current callers that provide extra args to these classes. We need all of the subclasses to agree on the signature, or they won't be considered to implement the `Vfs` protocol being developed. While we're copy/pasting from the base class, bring the type annotations along for the ride.
Sun, 22 Sep 2024 17:18:05 -0400 util: add a comment to suppress a PyCharm warning about a PEP 8 violation
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Sep 2024 17:18:05 -0400] rev 51880
util: add a comment to suppress a PyCharm warning about a PEP 8 violation Slowly trying to get rid of silly warnings, so that real problems aren't hidden.
Sun, 22 Sep 2024 17:15:20 -0400 keepalive: fix a signature mismatch for a http.client.HTTPResponse subclass
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Sep 2024 17:15:20 -0400] rev 51879
keepalive: fix a signature mismatch for a http.client.HTTPResponse subclass Also flagged by PyCharm. This is checked by pytype too, so I'm not sure why it misses this. I verified in py36 that this argument is documented for the function, so maybe this is py2 legacy.
Sun, 22 Sep 2024 17:11:10 -0400 cbor: drop a duplicate dictionary initialization entry
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Sep 2024 17:11:10 -0400] rev 51878
cbor: drop a duplicate dictionary initialization entry Flagged by PyCharm.
Wed, 04 Sep 2024 17:08:58 +0200 profiling: document the py-spy value for `profiling.type`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 04 Sep 2024 17:08:58 +0200] rev 51877
profiling: document the py-spy value for `profiling.type` The feature was not visible otherwise.
Thu, 19 Sep 2024 18:49:04 -0400 tests: enable pytype checking on `mercurial/unionrepo.py`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Sep 2024 18:49:04 -0400] rev 51876
tests: enable pytype checking on `mercurial/unionrepo.py`
Thu, 19 Sep 2024 18:48:07 -0400 unionrepo: fix mismatches with revlog classes
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Sep 2024 18:48:07 -0400] rev 51875
unionrepo: fix mismatches with revlog classes This is a subset of cfd30df0f8e4, applied to `unionrepository`. There are none of the `write()` method overrides here, like `bundlerepository`. With these changes, pytype flags the `unionrevlog` constructor: File "/mnt/c/Users/Matt/hg/mercurial/unionrepo.py", line 55, in __init__: No attribute '_revlog' on mercurial.changelog.changelog [attribute-error] Called from (traceback): line 207, in __init__ File "/mnt/c/Users/Matt/hg/mercurial/unionrepo.py", line 55, in __init__: No attribute '_revlog' on mercurial.revlog.revlog [attribute-error] Called from (traceback): line 232, in __init__ But it turns out that both `changelog.changelog` and `revlog.revlog` do have a `target` attribute, so they wouldn't trip over this. It seems weird that the second caller to be flagged is passing the private `_revlog`, but maybe that's how it needs to be.
Thu, 19 Sep 2024 16:19:29 -0400 typing: make `unionrepository` subclass `localrepository` while type checking
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Sep 2024 16:19:29 -0400] rev 51874
typing: make `unionrepository` subclass `localrepository` while type checking This is the same change as 9d4ad05bc91c made for `bundlerepository`, for the same reasons. Also, add a comment here to suppress the PyCharm warning that the superclass constructor is not called, that is new now that there's a simulated superclass. That lack of a call is by design- `makeunionrepository()` does magic that PyCharm isn't aware of. But PyCharm has been better at catching problems than pytype in a lot of cases, so I'd like to reduce the bogus things it flags, to make the real issues stand out.
Wed, 18 Sep 2024 21:00:20 -0400 tests: enable pytype checking on `mercurial/bundlerepo.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 18 Sep 2024 21:00:20 -0400] rev 51873
tests: enable pytype checking on `mercurial/bundlerepo.py`
Wed, 18 Sep 2024 17:46:46 -0400 revlog: make `clearcaches()` signature consistent with ManifestRevlog
Matt Harbison <matt_harbison@yahoo.com> [Wed, 18 Sep 2024 17:46:46 -0400] rev 51872
revlog: make `clearcaches()` signature consistent with ManifestRevlog I'm not sure if this a newly added bug, because of using a different version of pytype, or if the recent work around avoiding the zope interface types in the type checking phase (see 5eb98ea78fd7 and friends)... but pytype 2023.11.21 started flagging this series since it was last pushed ~6 weeks ago: File "/mnt/c/Users/Matt/hg/mercurial/bundlerepo.py", line 204, in <module>: Overriding method signature mismatch [signature-mismatch] Base signature: 'def mercurial.manifest.ManifestRevlog.clearcaches(self, clear_persisted_data: Any = ...) -> None'. Subclass signature: 'def mercurial.revlog.revlog.clearcaches(self) -> None'. Not enough positional parameters in overriding method. Maybe the multiple inheritance in `bundlerepo.bundlemanifest` is bad, but it seems like a `ManifestRevlog` is-a `revlog`, even though the class hierarchy isn't coded that way. Additionally, it looks like `revlog.clearcaches()` is dealing with some persistent data, so maybe this is useful to have there anyway. Also sprinkle some trivial type hints on the method, because there are other `clearcaches()` definitions in the codebase with these hints, and I don't feel like waiting for another pytype run to see if it cares that specifically about the signature matching.
Sat, 03 Aug 2024 01:33:13 -0400 bundlerepo: fix mismatches with repository and revlog classes
Matt Harbison <matt_harbison@yahoo.com> [Sat, 03 Aug 2024 01:33:13 -0400] rev 51871
bundlerepo: fix mismatches with repository and revlog classes Both pytype and PyCharm complained that `write()` and `_write()` in the bundlephasecache class aren't proper overrides- indeed they seem to be missing an argument that the base class has. PyCharm and pytype also complained that the `revlog.revlog` class doesn't have a `_chunk()` method. That looks like it was moved from revlog to `_InnerRevlog` back in e8ad6d8de8b8, and wasn't caught because this module wasn't type checked. However, I couldn't figure out a syntax with `revlog.revlog._inner._chunk(self, rev)`, as it complained about passing too many args. `bundlerevlog._rawtext()` uses this `super(...)` style to call the super class, so hopefully that works, even with the wonky dynamic subclassing. The revlog class needed the `_InnerRevlog` field typed because it isn't set in the constructor. Finally, the vfs type hints look broken. This initially failed with: File "/mnt/c/Users/Matt/hg/mercurial/bundlerepo.py", line 65, in __init__: Function readonlyvfs.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, vfs: mercurial.vfs.vfs) Actually passed: (self, vfs: Callable) Called from (traceback): line 232, in dirlog line 214, in __init__ I don't see a raw Callable, but I tried changing some of the vfs args to be typed as `vfsmod.abstractvfs`, but that class doesn't have `options`, so it failed elsewhere. `readonlyvfs` isn't a subclass of `vfs` (it's a subclass of `abstractvfs`), so I'm not sure how to handle that. It would be a shame to have to make a union of vfs subclasses (but not all of them have `options` either).
Wed, 18 Sep 2024 17:50:57 -0400 typing: make `bundlerepository` subclass `localrepository` while type checking
Matt Harbison <matt_harbison@yahoo.com> [Wed, 18 Sep 2024 17:50:57 -0400] rev 51870
typing: make `bundlerepository` subclass `localrepository` while type checking Currently, `mercurial/bundlerepo.py` is excluded from pytype, mostly because it complains that various `ui` and `vfs` fields in `localrepository` are missing. (`bundlerepository` dynamically subclasses `localrepository` when it is instantiated, so it works at runtime.) This makes that class hierarchy known to pytype. Having a protocol for `Repository` is probably the right thing to do, but that will be a lot of work and this still reflects the class at runtime. Subclassing also has the benefit of making sure any method overrides have a matching signature, so maybe this is a situation where we do both of these things. (I'm not sure how clear the diagnostics are if a class *almost* implements a protocol, but is missing a method argument or similar.) The subclassing is not done outside of type checking runs to avoid any side effects on already complex code.
Tue, 17 Sep 2024 16:40:24 +0200 rust: bump rust-cpython version to 0.7.2 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 17 Sep 2024 16:40:24 +0200] rev 51869
rust: bump rust-cpython version to 0.7.2 This version supports Python 3.12 while 0.7.1 did not.
Wed, 19 Jun 2024 14:49:35 +0200 rust: add Vfs trait
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 14:49:35 +0200] rev 51868
rust: add Vfs trait This will allow for the use of multiple vfs like in the Python implementation, as well as hiding the details of the upcoming Python vfs wrapper to hg-core.
Wed, 19 Jun 2024 12:49:26 +0200 rust: use new revlog configs in all revlog opening code
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 12:49:26 +0200] rev 51867
rust: use new revlog configs in all revlog opening code This centralizes the more complex logic needed for the upcoming code and creates stronger APIs with fewer booleans. We also reuse `RevlogType` where needed.
Tue, 17 Sep 2024 10:18:32 +0200 rust-revlog: don't try to open the data file if the index is empty
Raphaël Gomès <rgomes@octobus.net> [Tue, 17 Sep 2024 10:18:32 +0200] rev 51866
rust-revlog: don't try to open the data file if the index is empty This will cover the case where the data file is not present.
Wed, 19 Jun 2024 12:25:12 +0200 rust-revlog: add revlog-specific config objects
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 12:25:12 +0200] rev 51865
rust-revlog: add revlog-specific config objects These will be used by the upcoming Rust `InnerRevlog` to better centralize config information that is relevant to revlogs.
Thu, 12 Sep 2024 16:27:58 -0400 typing: add `from __future__ import annotations` to remaining source files
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 16:27:58 -0400] rev 51864
typing: add `from __future__ import annotations` to remaining source files Most of these look newer than when the original imports referenced in the previous commit were dropped, so these weren't covered by the backout. These were found with: hg files mercurial hgext hgext3rd -I '**.py' -X '**/thirdparty' \ | xargs grep -L 'from __future__ import annotations' All of the `__init__.py` files that finds are empty, so those were ignored and the rest manually edited.
Mon, 16 Sep 2024 15:36:44 +0200 typing: add `from __future__ import annotations` to most files
Matt Harbison <matt_harbison@yahoo.com> [Mon, 16 Sep 2024 15:36:44 +0200] rev 51863
typing: add `from __future__ import annotations` to most files Now that py36 is no longer supported, we can postpone annotation evaluation. This means that the quoting is usually optional (for things imported under the guard of `if typing.TYPE_CHECKING:` to avoid circular imports), and there's less overhead on startup[1]. There may be some missing here. I backed out 6000f5b25c9b (which removed the `from __future__ import ...` that was supporting py2), reverted the changes in `contrib/`, `doc/`, and `tests/`, and then ran: $ hg status -n --change . | \ xargs sed -i -e 's/from __future__ import .*$/from __future__ import annotations/' There were some minor tweaks needed when reviewing (mostly making the spacing around the import consistent, and `mercurial/testing/__init__.py` had a multiline import that wasn't fully rewritten. [1] https://docs.python.org/3/whatsnew/3.7.html#pep-563-postponed-evaluation-of-annotations
Mon, 16 Sep 2024 15:36:38 +0200 format: add many "missing" comma
Matt Harbison <matt_harbison@yahoo.com> [Mon, 16 Sep 2024 15:36:38 +0200] rev 51862
format: add many "missing" comma Black was not adding them until the next changeset introduced a bunch of `from __future__ import annotations` to most file. Since it make the next changeset hard to read we introduce them in advance.
Thu, 12 Sep 2024 12:53:00 -0400 typing: simplify archive.gz writing and drop a few pytype suppressions
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 12:53:00 -0400] rev 51861
typing: simplify archive.gz writing and drop a few pytype suppressions I was waiting until 3.8 to use `Literal` to fix this, but there's also the ":" and "|" characters that are passed along here, meant only for the non-gz archive types. But manipulating what the local caller passes is silly- we know we're writing, so just open it for writing. As an added bonus, PyCharm stops flagging the call too (since it doesn't know about pytype suppression comments).
Thu, 12 Sep 2024 12:38:43 -0400 typing: explicitly set the return type of `_InnerRevLog.raw_text()`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 12:38:43 -0400] rev 51860
typing: explicitly set the return type of `_InnerRevLog.raw_text()` Somewhere between cd72a88c5599 and 2fd44b3dcc33, pytype changed the return type from `Tuple[_T1, Any, bool]` to `Any`. Both are wrong. `mdiff.patches()` is an alias for `mpatch.patches()`, which is selected via module policy (and breaks the ability to infer the types). However, `cext`, `cffi`, and `pure` implementations all agree it returns bytes.
Thu, 12 Sep 2024 12:28:27 -0400 typing: add explicit hints for recent pytype regressions
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 12:28:27 -0400] rev 51859
typing: add explicit hints for recent pytype regressions Somewhere between 454feddab720 and cd72a88c5599, pytype changed how it inferred the return type in `extdiff.py` from Tuple[Any, List[Tuple[bytes, Any, os.stat_result]]] to Tuple[Any, List[nothing]] It also changed the return type in `archival.py` from `Any` to `NoReturn`. Fix those up, and also the obvious parameter types while we're here.
Wed, 19 Jun 2024 18:06:50 +0200 revlog: use the method to check if the revlog is being written to
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 18:06:50 +0200] rev 51858
revlog: use the method to check if the revlog is being written to This was probably fine, but it could become not fine at some point.
Wed, 19 Jun 2024 17:26:06 +0200 revlog: add an early return for getting sidedata
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:26:06 +0200] rev 51857
revlog: add an early return for getting sidedata No point in trying to fetch sidedata if there isn't a sidedata file.
Wed, 19 Jun 2024 17:19:20 +0200 revlog: simplify rawtext return value
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:19:20 +0200] rev 51856
revlog: simplify rawtext return value We're always returning a tuple even though only the raw text is being used, and we're rebuilding another tuple again higher. As a bonus, this will remove one tuple creation and deletion per `raw_text` call, hence fewer gc calls, etc.
Wed, 19 Jun 2024 17:06:05 +0200 revlog: cleanup some outdated docstrings
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:06:05 +0200] rev 51855
revlog: cleanup some outdated docstrings
Thu, 12 Sep 2024 10:09:06 +0200 rust-inner-revlog: always inline `get_entry`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 10:09:06 +0200] rev 51854
rust-inner-revlog: always inline `get_entry` This is a very hot function.
Thu, 12 Sep 2024 10:08:45 +0200 rust-inner-revlog: derive Debug for IndexHeaderFlags
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 10:08:45 +0200] rev 51853
rust-inner-revlog: derive Debug for IndexHeaderFlags
Thu, 12 Sep 2024 10:08:28 +0200 rust-inner-revlog: drop some outdated comment
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 10:08:28 +0200] rev 51852
rust-inner-revlog: drop some outdated comment
Wed, 19 Jun 2024 12:00:55 +0200 rust-config: add more ways of reading the config
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 12:00:55 +0200] rev 51851
rust-config: add more ways of reading the config These will be needed for future patches of this series to interpret more complex/different config values.
Tue, 26 Mar 2024 15:51:31 +0000 util: make buffer readonly
Raphaël Gomès <rgomes@octobus.net> [Tue, 26 Mar 2024 15:51:31 +0000] rev 51850
util: make buffer readonly There is no use of writable buffers anywhere in the code, and this helps us make sure we don't get into unsound territory when sharing memory with Rust. This `toreadonly` method was not available in Python 3.6, but we dropped the support for it earlier that week, so no need for any compatibility code.
Thu, 05 Sep 2024 17:12:52 -0400 setup: avoid the deprecated `distutils.spawn.find_executable`
Matt Harbison <mharbison@atto.com> [Thu, 05 Sep 2024 17:12:52 -0400] rev 51849
setup: avoid the deprecated `distutils.spawn.find_executable` I noticed this was flagged with `DeprecationWarning` in py3.12 with `setuptools` 74.1.2, and it suggested `shutil.which()` instead. The signatures aren't the same, but the additional `mode` argument in the middle of the latter defaults to `os.F_OK | os.X_OK`, which maintains the same semantics.
Thu, 05 Sep 2024 16:59:36 -0400 setup: drop the hack to disable linker warning 4197 on Windows
Matt Harbison <mharbison@atto.com> [Thu, 05 Sep 2024 16:59:36 -0400] rev 51848
setup: drop the hack to disable linker warning 4197 on Windows I don't see this when building on Windows with py3.8 or py3.12, so either the code was fixed, or (more likely) the compiler stopped warning about it some time after VS 2008. If we do have to put this back, it would probably be better to put a `#pragma` in a header file somewhere, and avoid `setuptools` technical debt.
Wed, 11 Sep 2024 00:20:07 +0200 ci: also offer to test 3.12 with rust
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 00:20:07 +0200] rev 51847
ci: also offer to test 3.12 with rust The rust-cpython binding got 3.12 support very recently, it is worse keeping on a tighter watch.
Wed, 28 Aug 2024 16:35:43 +0200 ci: add the option to test more Python versions
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Aug 2024 16:35:43 +0200] rev 51846
ci: add the option to test more Python versions It seems like a good idea to be able to test the lowest version we support. And there have been enougth issue with 3.12 that we need to be able to make sur we do not break it. We should probably get a matrix setup for more version and flavor, but that is a simple and efficient start.
Thu, 05 Sep 2024 12:37:59 +0200 censor: document the censor.policy option (issue6909)
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 05 Sep 2024 12:37:59 +0200] rev 51845
censor: document the censor.policy option (issue6909) Censor is not marked as experimental and should be documented I am not doing this on stable because the help markup change it is using seems more suitable for default.
Thu, 05 Sep 2024 12:28:12 +0200 help: add :config-doc:`section.key` shorthand to insert documentation
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 05 Sep 2024 12:28:12 +0200] rev 51844
help: add :config-doc:`section.key` shorthand to insert documentation The config items defined in the configitems.toml file can already hold their documentation. Having some way to automatically insert it was a long standing low hanging fruit. So I did a first implementation on that. It fairly simple, but it open the door to more. It will be used in the next changeset.
Wed, 11 Sep 2024 20:52:51 +0200 bzr: attempt to stabilize the test
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 20:52:51 +0200] rev 51843
bzr: attempt to stabilize the test The test has flakyness where the order of a few commit swap. This is an attempt at avoiding that.
Thu, 12 Sep 2024 02:24:20 +0200 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 02:24:20 +0200] rev 51842
branching: merge with stable
Wed, 11 Sep 2024 12:03:39 +0200 profiling: use "stat" profiler to profile individual request stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 12:03:39 +0200] rev 51841
profiling: use "stat" profiler to profile individual request The ls profiler no longer works for that. As the lsprof profiler is not default and not great is general, lets side step the issue for now.
Wed, 11 Sep 2024 12:02:38 +0200 profiling: improve 3.12 error message for calling lsprof twice stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 12:02:38 +0200] rev 51840
profiling: improve 3.12 error message for calling lsprof twice Python 3.12 prevent lsprof to be enabled if it is already enabled. This break the use of lsprof in `hg serve` as both the initial `serve` command and the request serving want to profile. The "stat" profiler (the default) does not have this problem, so we focus on improving the error message for now.
Wed, 11 Sep 2024 00:41:37 +0200 test: display server error log in test-profile.t stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 00:41:37 +0200] rev 51839
test: display server error log in test-profile.t This will help us to catch error with Python 3.12
Wed, 15 Nov 2023 22:11:34 +0100 archive: defer opening the output until a file is matched
Joerg Sonnenberger <joerg@bec.de> [Wed, 15 Nov 2023 22:11:34 +0100] rev 51838
archive: defer opening the output until a file is matched Before, if no file is matched, an error is thrown, but the archive is created anyway. When using hgweb, an error 500 is returned as the response body already exists when the error is seen. Afterwards, the archive is created before the first match is emitted. If no match is found, no archive is created. This is more consistent behavior as an empty archive is not a representable in all output formats, e.g. tar archives.
Thu, 05 Sep 2024 13:37:24 +0200 run-tests: add color to the progress output
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 05 Sep 2024 13:37:24 +0200] rev 51837
run-tests: add color to the progress output More color is useful to me.
Tue, 10 Sep 2024 22:26:23 +0200 python-compat: drop support for Python3.6 and 3.7
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Sep 2024 22:26:23 +0200] rev 51836
python-compat: drop support for Python3.6 and 3.7 As discussed on the mailing list¹, these are old version that seems safe to drop. Python 3.8 comes with various improvement especially regarding typing capabilities. [1] https://lists.mercurial-scm.org/pipermail/mercurial-devel/2024-July/297998.html
Tue, 10 Sep 2024 21:19:36 +0200 ci: drop path manipulation that we do not need anymore
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Sep 2024 21:19:36 +0200] rev 51835
ci: drop path manipulation that we do not need anymore The CI image has a squarer setup now.
Fri, 06 Sep 2024 02:12:19 +0200 brancing: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 06 Sep 2024 02:12:19 +0200] rev 51834
brancing: merge stable into default
Thu, 05 Sep 2024 15:37:14 -0400 setup: handle removal of old MSVC compiler from setuptools 65.0 (issue6910) stable
Matt Harbison <mharbison@atto.com> [Thu, 05 Sep 2024 15:37:14 -0400] rev 51833
setup: handle removal of old MSVC compiler from setuptools 65.0 (issue6910) It was removed a few years ago[1]. When trying to reproduce locally using a clean py3.12 as called out in the bug report, `setuptools` wasn't installed at all, and needed a `pip install` to fix a `ModuleNotFoundError` when building locally. Maybe that needs to be in the requirements clause now. It looks like this "private" module was added in setuptools 48.0.[2] I can't find a changelog of what version was included in which version of python, and the changelog for pip has a huge gap between when it called out 67.6.1 in `pip` 23.1 (2023-04-15), and 41.4.0 in `pip` 19.3 (2019-10-14).[3] So, we'll just add to the existing code instead of replacing it, for safety. [1] https://github.com/pypa/setuptools/commit/cc017c77948737d131f683e0c25cd37bc639b8fc [2] https://github.com/pypa/setuptools/commit/d034a5ec7f707499139f90eb846b9e720923124c [3] https://pip.pypa.io/en/stable/news/
Wed, 28 Aug 2024 23:25:26 +0200 utils: accept bytearray arguments for escapestr
Joerg Sonnenberger <joerg@bec.de> [Wed, 28 Aug 2024 23:25:26 +0200] rev 51832
utils: accept bytearray arguments for escapestr
Sun, 30 Jun 2024 16:02:50 +0200 http: simplify
Joerg Sonnenberger <joerg@bec.de> [Sun, 30 Jun 2024 16:02:50 +0200] rev 51831
http: simplify
Sun, 30 Jun 2024 14:16:43 +0200 http: use urllib's cookie handler
Joerg Sonnenberger <joerg@bec.de> [Sun, 30 Jun 2024 14:16:43 +0200] rev 51830
http: use urllib's cookie handler Split the logic for loading the cookies based on the configuration in a helper function and otherwise use the library implementation directly.
Sun, 30 Jun 2024 13:22:23 +0200 http: reuse Python's implementation of read/readline/readinto
Joerg Sonnenberger <joerg@bec.de> [Sun, 30 Jun 2024 13:22:23 +0200] rev 51829
http: reuse Python's implementation of read/readline/readinto Since Python 3 already provides a working implementation of readline, there is no need for our own buffering implementation. Reduce the code to transfer accounting only.
Sun, 30 Jun 2024 02:46:53 +0200 debugwireproto: redo logging to also work for https
Joerg Sonnenberger <joerg@bec.de> [Sun, 30 Jun 2024 02:46:53 +0200] rev 51828
debugwireproto: redo logging to also work for https
Fri, 28 Jun 2024 16:26:06 +0200 urllib2: redo response.readlines addition via class patching
Joerg Sonnenberger <joerg@bec.de> [Fri, 28 Jun 2024 16:26:06 +0200] rev 51827
urllib2: redo response.readlines addition via class patching
Wed, 21 Aug 2024 22:15:05 -0400 typing: lock in new pytype gains from making revlog related classes typeable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 21 Aug 2024 22:15:05 -0400] rev 51826
typing: lock in new pytype gains from making revlog related classes typeable These were pretty clean changes in the pyi files from earlier in this series, so add them to the code to make it more understandable. There's one more trivial hint that can be added to the return of `mercurial.revlogutils.rewrite._filelog_from_filename()`, however it needs to be imported from '..' under the conditional of `typing.TYPE_CHECKING`, and that seems to confuse the import checker- possibly because there's already an import block from that level. (I would have expected a message about multiple import statements in this case, but got one about higher level imports should come first, no matter where I put the import statement.)
Tue, 20 Aug 2024 00:07:05 -0400 typing: add types to `revlog.revlogproblem`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 00:07:05 -0400] rev 51825
typing: add types to `revlog.revlogproblem` These attrs showed as `Any` after the previous commit made the class visible to pytype.
Mon, 19 Aug 2024 22:46:09 -0400 typing: make the revlog classes known to pytype
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Aug 2024 22:46:09 -0400] rev 51824
typing: make the revlog classes known to pytype These are the same changes as c1d7ac70980b and 45270e286bdc made to dirstate, for the same reasons.
Mon, 19 Aug 2024 22:27:43 -0400 typing: make the manifest classes known to pytype
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Aug 2024 22:27:43 -0400] rev 51823
typing: make the manifest classes known to pytype These are the same changes as c1d7ac70980b and 45270e286bdc made to dirstate, for the same reasons. The migration away from decorating the classes with `@interfaceutil.implementer` was started back in 3e9a660b074a, but missed one.
Mon, 19 Aug 2024 22:21:16 -0400 typing: make the filelog class known to pytype
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Aug 2024 22:21:16 -0400] rev 51822
typing: make the filelog class known to pytype These are the same changes as c1d7ac70980b and 45270e286bdc made to dirstate, for the same reasons.
Wed, 21 Aug 2024 17:41:57 -0400 remotefilelog: adapt the `debugindex` command to past API changes
Matt Harbison <matt_harbison@yahoo.com> [Wed, 21 Aug 2024 17:41:57 -0400] rev 51821
remotefilelog: adapt the `debugindex` command to past API changes Pytype was missing these problems because it's currently inferring the classes for `filelog` and `revlog` to be `Any`. When that's fixed, these were flagged, so fix these first. The `filelog` class used to subclass `revlog`, but that was changed back in 1541e1a8e87d (with most or all of the "lost" attributes being forwarded to the embedded `revlog` attribute at that time). These forwarded references were dropped over time, and this command has been broken at least as far back as 68282a7b29a7 when the `version` field was dropped. Most of the fixes were as simple as calling the accessor for the embedded `revlog` member, but the general delta feature detection was a bit more involved- I copied the detection for it from `mercurial.revlogutils.debug.debug_revlog()`.
Wed, 21 Aug 2024 16:13:14 -0400 typing: add type hints to the `opener` attributes and arguments of revlog
Matt Harbison <matt_harbison@yahoo.com> [Wed, 21 Aug 2024 16:13:14 -0400] rev 51820
typing: add type hints to the `opener` attributes and arguments of revlog When making revlog and filelog classes visible to pytype, it got confused quite a bit in `mercurial/revlogutils/rewrite.py`, thinking it had a plain `Callable`, and flagging additional methods on it like `join()` and `rename()`. I couldn't figure out how it reduced to that (and PyCharm flagged `opener` references as `Any`), but this makes it happy. So make this change before making the classes visible. The vfs class hierarchy is a bit wonky (e.g. `filteredvfs` is not a `vfs`), so this may need to be revisited with a Protocol class that covers all of the `vfs` classes. But for now, everything works.
Wed, 21 Aug 2024 16:09:22 -0400 remotefilelog: honor the `--format` arg of the `debugindex` command
Matt Harbison <matt_harbison@yahoo.com> [Wed, 21 Aug 2024 16:09:22 -0400] rev 51819
remotefilelog: honor the `--format` arg of the `debugindex` command Flagged by PyCharm while investigating pytype spew. The other `**opts` above are already accessed as str. I've never used remotefilelog, and don't have a repo to test this on, so I'm trusting the nearby code.
Wed, 07 Aug 2024 22:05:36 +0200 merge: sort filemap only if requested by the caller stable
Manuel Jacob <me@manueljacob.de> [Wed, 07 Aug 2024 22:05:36 +0200] rev 51818
merge: sort filemap only if requested by the caller The name `sorted` refers to a built-in function, which is always true, so the else branch of this if statement was dead code. Because, with this fix, the function can iterate over the dict items while yielding values, the dict should not change size while the generator is running. Because of that, it is required to re-introduce code that makes a caller copy the filemap before modification, which was removed in 3c783ff08d40cbaf36eb27ffe1d296718c0f1d77 (that changeset also introduced the filemap() method including the bug that’s being fixed by this changeset).
Tue, 20 Aug 2024 22:47:11 -0400 shelve: consistently convert exception to bytes via `stringutil.forcebytestr`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 22:47:11 -0400] rev 51817
shelve: consistently convert exception to bytes via `stringutil.forcebytestr` The other two places in this module use this, and past experience shows that this method does a nicer job. I'm not sure why we're converting to bytes here- `KeyError` is built-in and will have str attrs, and `RepoLookupError` is a subclass of the built-in `Exception` class (not `errors.Error`, which is allegedly the baseclass for all Mercurial exceptions).
Tue, 20 Aug 2024 22:34:51 -0400 typing: add type hints to `mercurial.shelve`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 22:34:51 -0400] rev 51816
typing: add type hints to `mercurial.shelve` Pytype wasn't flagging anything here yet, but PyCharm was really unhappy about the usage of `state` objects being passed to various methods that accessed attrs on it, without any obvious attrs on the class because there's no contructor. Filling that out made PyCharm happy, and a few other things needed to be filled in to make that easier, so I made a pass over the whole file and filled in the trivial hints. The other repo, ui, context, matcher, and pats items can be filled in after the context and match modules are typed.
Tue, 20 Aug 2024 18:30:47 -0400 typing: lock in correct changes from pytype 2023.04.11 -> 2023.06.16
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 18:30:47 -0400] rev 51815
typing: lock in correct changes from pytype 2023.04.11 -> 2023.06.16 There were a handful of other changes to the pyi files generated when updating pytype locally (and jumping from python 3.8.0 to python 3.10.11), but they were not as clear (e.g. the embedded type in a list changing from `nothing` to `Any` or similar). These looked obviously correct, and agreed with PyCharm's thoughts on the signatures. Oddly, even though pytype starting inferring `obsutil._getfilteredreason()` as returning bytes, it (correctly) complained about the None path when it was typed that way. Instead, raise a ProgrammingError if an unhandled fate is calculated. (Currently, all possibilities are handled, so this isn't reachable unless another fate is added in the future.)
Tue, 20 Aug 2024 17:46:17 -0400 monotone: replace %s interpolation with appropriate numeric specifiers
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 17:46:17 -0400] rev 51814
monotone: replace %s interpolation with appropriate numeric specifiers The length is an int, and the version is a float. Neither work with bytes on py3. This was noticed when looking at nearby code after updating pytype changed some signatures.
Tue, 20 Aug 2024 16:32:13 -0400 shelve: raise an error when loading a corrupt state file in an impossible case
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 16:32:13 -0400] rev 51813
shelve: raise an error when loading a corrupt state file in an impossible case The old return statement was flagged by pytype 2023.06.16 running under python 3.10.11. No idea why it isn't caught in CI running the same pytype with py3.7. This function is only called by `unshelvecmd()` (which first checks that either `--abort` or `--continue` is specified), and `hgabortunshelve()` and `hgcontinueunshelve()`, which locally apply `--abort` or `--continue` respectively. Therefore, there is no other way to call this, and this error should never be seen, but pytype can't figure that out on its own. Given that the abort case clears the state, it seems reasonable to defensively code this and not make that a blanket `else` case, on the off chance a 3rd way of calling this appears in the future.
Tue, 20 Aug 2024 11:18:10 -0400 contrib: print the version of pytype used to do the type checking
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Aug 2024 11:18:10 -0400] rev 51812
contrib: print the version of pytype used to do the type checking This will help with CI. I don't see a way to print the version of python that's running it. When I tried `head -n 1 $(which pytype)`, the CI run printed: #!/usr/bin/env bash Locally, that gives the path to the python interpreter in the venv, so IDK what's different.
Sat, 17 Aug 2024 18:43:23 -0400 typing: create an @overload of `phasecache` ctor to handle the copy case
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Aug 2024 18:43:23 -0400] rev 51811
typing: create an @overload of `phasecache` ctor to handle the copy case In `phasecache.copy()`, it calls `self.__class__(None, None, _load=False)`, but the constuctor is typed to take a non-None repository. For the `_load=False` case, all args are ignored (and the copy function itself populates the attrs on the new object), so this isn't an error. For the default `_load=True` case, it needs a non-None repository. This is the simplest way to handle that duality. The reason this wasn't being detected is because pytype is confused by the interface decorators on the `localrepository` class, and is inferring the whole class as `Any`. (See 3e9a660b074a or c1d7ac70980b) Therefore, the type hint of `localrepo.localrepository` here was also effectively `Any`, which disabled the type checking entirely. This is the first foray into using `typing_extensions` to unlock future typing features. I think this is safe and reasonable because 1) it is only imported in the type checking phase (so no need to vendor our own copy), and 2) pytype has its own copy of `typing_extensions` bundled with it, so no need to alter the test environment. When run with a version of python that supports the symbol(s) natively, `typing_extensions` simply re-exports from `typing`, so there shouldn't be any future headaches with this.
Sat, 17 Aug 2024 17:38:35 -0400 typing: declare the `_phasesets` member of `phasecache` to be `Optional`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Aug 2024 17:38:35 -0400] rev 51810
typing: declare the `_phasesets` member of `phasecache` to be `Optional` Something in this area got flagged while making the repository class visible to pytype (instead of being typed as `Any`). A None assignment to something not optional is wrong, and when I tried setting it to `{}` to keep it non-Optional, some tests failed. There are checks for the attr being None elsewhere, so this seems to have just been an oversight.
Fri, 16 Aug 2024 18:11:52 -0400 typing: hide the interface version of `dirstate` during type checking
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Aug 2024 18:11:52 -0400] rev 51809
typing: hide the interface version of `dirstate` during type checking As noted in the previous commit, the `dirstate` type is still inferred as `Any` by pytype, including where it is used as a base class for the largefiles dirstate. That effectively disables most type checking. The problems fixed two commits ago were flagged by this change. I'm not at all clear what the benefit of the original type is, but that was what was used at runtime, so I don't want to change the largefiles base class to the raw class. Having both a lowercase and camelcase name for the same thing isn't great, but given that this trivially finds problems without worrying about which symbol clients may be using, and the non-raw type is useless to pytype anyway, I'm not going to worry about it.
Fri, 16 Aug 2024 18:02:32 -0400 dirstate: remove the interface decorator to help pytype
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Aug 2024 18:02:32 -0400] rev 51808
dirstate: remove the interface decorator to help pytype This is the same change that was made for some of the manifest classes in 3e9a660b074a. Note that `dirstate` is still inferred as `Any`, but at least we have `DirState` with all of the expected attributes.
Fri, 16 Aug 2024 17:58:17 -0400 largefiles: sync up `largefilesdirstate` methods with `dirstate` base class
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Aug 2024 17:58:17 -0400] rev 51807
largefiles: sync up `largefilesdirstate` methods with `dirstate` base class As it currently stands, pytype infers the `dirstate` class (and anything else decorated with `@interfaceutil.implementer`) as `Any`. When that is worked around, it suddenly noticed that most of these methods don't exist in the `dirstate` class anymore. Since they only called into the missing methods and there's no test failures, we can assume these are never called, and they can be dropped. In addition, PyCharm flagged `set_tracked()` and `_ignore()` as not overriding a superclass method with the same arguments. The missing default parameter for the former was the obvious issue. I'm guessing that the latter was named wrong because while there is `_ignore()` in the base class, it takes no arguments and returns a matcher. The `_ignorefiles()` superclass method also takes no args, and returns a list of bytes. The `_ignorefileandline()` superclass method DOES take a file, but returns a tuple. Therefore, the closest match is `_dirignore()`, which takes a file AND returns a bool. No idea why this needs to be overridden though.
Fri, 16 Aug 2024 11:12:19 +0100 sparse: reliably avoid writing to store without a lock
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 16 Aug 2024 11:12:19 +0100] rev 51806
sparse: reliably avoid writing to store without a lock With the code as written before this patch we can still end up writing to store in `debugsparse`. Obviously we'll write to it if by accident a store requirement is modified, but more importantly we write to it if another concurrent transaction modifies the requirements file on disk. We can't rule this out since we're not holding the store lock, so it's better to explicitly pass a permission to write instead of inferring it based on file contents.
Thu, 15 Aug 2024 13:52:14 +0100 debugsparse: stop taking the store lock
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 15 Aug 2024 13:52:14 +0100] rev 51805
debugsparse: stop taking the store lock debugsparse is a workspace-only opperation, or it better be workspace-only. Let's make it to stop taking the store lock.
Thu, 15 Aug 2024 14:54:22 +0100 scmutils: read the requires file before writing to avoid unnecessary rewrite
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 15 Aug 2024 14:54:22 +0100] rev 51804
scmutils: read the requires file before writing to avoid unnecessary rewrite This lets us get away without the repo lock in situations where we need to write requirements, but we know we're not changing the store requirements.
Thu, 15 Aug 2024 14:56:50 +0100 localrepo: remove _readrequires function in favor of scmutil.readrequires
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 15 Aug 2024 14:56:50 +0100] rev 51803
localrepo: remove _readrequires function in favor of scmutil.readrequires
Thu, 15 Aug 2024 14:53:17 +0100 scmutil: add `readrequires` next to `writerequires`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 15 Aug 2024 14:53:17 +0100] rev 51802
scmutil: add `readrequires` next to `writerequires` The code is copied from localrepo.py.
Wed, 14 Aug 2024 03:25:16 -0400 typing: correct a type hint in `mercurial.manifest`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 14 Aug 2024 03:25:16 -0400] rev 51801
typing: correct a type hint in `mercurial.manifest` Obvious typo that was flagged by PyCharm.
Sat, 10 Aug 2024 14:22:26 -0400 typing: add hints to `mercurial.util.mktempcopy()`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Aug 2024 14:22:26 -0400] rev 51800
typing: add hints to `mercurial.util.mktempcopy()` Might as well, now that the previous commit indicated what types are required.
Sat, 10 Aug 2024 14:18:44 -0400 typing: fix the hint for the `mode` argument of `platform.copymode()`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Aug 2024 14:18:44 -0400] rev 51799
typing: fix the hint for the `mode` argument of `platform.copymode()` The posix module is doing a bitwise AND with this and an integer, so it can't be bytes. The only caller that provides the argument is `util.mktempcopy()`, and pytype infers the type as Any, which explains why this wasn't caught.
Fri, 09 Aug 2024 22:45:32 +0200 largefiles: fix check that ensures that --all-largefiles is only used locally stable
Manuel Jacob <me@manueljacob.de> [Fri, 09 Aug 2024 22:45:32 +0200] rev 51798
largefiles: fix check that ensures that --all-largefiles is only used locally Previously, the command added in the test failed with “abort: --all-largefiles is incompatible with non-local destination existing_destination”. The reason for the buggy behavior was the use of hg.islocal(), which does “return true if repo (or path pointing to repo) is local” and, for local paths, assumes that the path is actually pointing to an existing repository and returns whether the path is not a regular file (in which case it assumes that it is a bundlerepo, which are considered non-local).
Fri, 05 May 2023 06:08:36 -0600 exchange: trivial simplification
Felipe Contreras <felipe.contreras@gmail.com> [Fri, 05 May 2023 06:08:36 -0600] rev 51797
exchange: trivial simplification Both sides of the condition do essentially the same thing, except one with fastpath=True. No functional changes.
Fri, 09 Aug 2024 14:26:13 +0200 import: fix erroneous comparison of str with bytes stable
Manuel Jacob <me@manueljacob.de> [Fri, 09 Aug 2024 14:26:13 +0200] rev 51796
import: fix erroneous comparison of str with bytes
Thu, 08 Aug 2024 17:28:38 +0400 histedit: create state and acquire locks earlier stable
Anton Shestakov <av6@dwimlabs.net> [Thu, 08 Aug 2024 17:28:38 +0400] rev 51795
histedit: create state and acquire locks earlier This makes chistedit (histedit with curses UI) not write any files inside repo without wlock. It also makes sense to wrap the entire process of preparing commands inside the curses UI inside locks because we don't want anything else to touch wdir or repo during this time.
Tue, 06 Aug 2024 22:51:41 +0200 py3: use str literal instead of bytes literal stable
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 22:51:41 +0200] rev 51794
py3: use str literal instead of bytes literal
Tue, 06 Aug 2024 18:23:59 +0200 typing: fix type annotation stable
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 18:23:59 +0200] rev 51793
typing: fix type annotation
Tue, 06 Aug 2024 17:53:59 +0200 cffi: pass bytes instead of str to ffi.new("char[]", …) stable
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 17:53:59 +0200] rev 51792
cffi: pass bytes instead of str to ffi.new("char[]", …) The type annotations seem to imply that the passed values are always already bytes, but they aren’t necessarily. Before Python 3.11, the documentation stated that bytes can be used to annotate arguments whose type is actually any of bytes, bytearray, or memoryview.
Mon, 05 Aug 2024 21:21:32 +0200 cffi: call bytes() instead of str() on CFFI buffer instances stable
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 21:21:32 +0200] rev 51791
cffi: call bytes() instead of str() on CFFI buffer instances
Mon, 05 Aug 2024 21:08:36 +0200 cffi: pass C type and attribute names as str instead of bytes stable
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 21:08:36 +0200] rev 51790
cffi: pass C type and attribute names as str instead of bytes
Mon, 05 Aug 2024 20:47:17 +0200 py3: fix type of some elements of __all__ lists stable
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 20:47:17 +0200] rev 51789
py3: fix type of some elements of __all__ lists
Mon, 05 Aug 2024 20:08:23 +0200 manifest: deprecated readdelta and readfast
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 20:08:23 +0200] rev 51788
manifest: deprecated readdelta and readfast These method should not have any user left.
Tue, 06 Aug 2024 02:09:33 +0200 manifest: use read_delta_new_entries in verify too
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Aug 2024 02:09:33 +0200] rev 51787
manifest: use read_delta_new_entries in verify too This seems like the proper semantic for the usage.
Tue, 06 Aug 2024 02:13:17 +0200 manifest: use read_delta_new_entries in changegroup validate
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Aug 2024 02:13:17 +0200] rev 51786
manifest: use read_delta_new_entries in changegroup validate This new method have a well defined semantic and can be adjusted by narrow as it needs. This should prevent some unwanted filelog access when running validate on a server using narrow profile to restrict access.
Tue, 06 Aug 2024 02:12:08 +0200 manifest: add a read_delta_new_entries method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Aug 2024 02:12:08 +0200] rev 51785
manifest: add a read_delta_new_entries method This new method have a well defined semantic and can be adjusted by narrow as it needs.
Thu, 01 Aug 2024 13:15:54 +0200 manifest: use `read_delta_parents` when adjusting linkrev
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:15:54 +0200] rev 51784
manifest: use `read_delta_parents` when adjusting linkrev Let's use the more accurate API.
Thu, 01 Aug 2024 13:15:10 +0200 manifest: use the `read_delta_parents` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:15:10 +0200] rev 51783
manifest: use the `read_delta_parents` method Let's use the more accurate API.
Thu, 01 Aug 2024 13:12:49 +0200 manifest: use `read_delta_parents` when adjusting linkrev in remotefile
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:12:49 +0200] rev 51782
manifest: use `read_delta_parents` when adjusting linkrev in remotefile Let's use the more accurate API.
Thu, 01 Aug 2024 13:10:09 +0200 manifest: introduce a `read_delta_parents` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:10:09 +0200] rev 51781
manifest: introduce a `read_delta_parents` method This new method have a clearer semantic and can be used by code that need this semantic. This should avoid bugs, allow for more targeted optimisation, and provide a clearer API. Users will be updated in subsequent changesets. This is also part of the wider effort to clarify and fix this API. one more method coming.
Thu, 01 Aug 2024 12:14:40 +0200 manifest: use `read_any_fast_delta` for tag rev cache computation
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 12:14:40 +0200] rev 51780
manifest: use `read_any_fast_delta` for tag rev cache computation This will have the benefit of using the fast path more often, and being (a bit) less buggy. See inline comment for details.
Thu, 01 Aug 2024 05:37:57 +0200 manifest: use `read_any_fast_delta` during shallow prefetch's
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 05:37:57 +0200] rev 51779
manifest: use `read_any_fast_delta` during shallow prefetch's We now have a better function with a clear semantic. This simplify the usage in the remotefilelog code.
Thu, 01 Aug 2024 05:36:53 +0200 manifest: use `read_any_fast_delta` during remotefilelog's repack
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 05:36:53 +0200] rev 51778
manifest: use `read_any_fast_delta` during remotefilelog's repack We now have a better function with a clear semantic. This simplify the usage in the remotefilelog code.
Thu, 01 Aug 2024 13:42:34 +0200 manifest: use read_any_fast_delta in changectx
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:42:34 +0200] rev 51777
manifest: use read_any_fast_delta in changectx The new API is clearer but also more expressive. It allow to detect case where we did return a full read and populated the associated cache. Saving time!
Thu, 01 Aug 2024 13:40:46 +0200 manifest: allow skipping valid_bases argument to `read_any_fast_delta`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:40:46 +0200] rev 51776
manifest: allow skipping valid_bases argument to `read_any_fast_delta` In some case it make sens to just want a delta. So we update the API to support this.
Thu, 01 Aug 2024 05:35:06 +0200 manifest: introduce a `read_any_fast_delta` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 05:35:06 +0200] rev 51775
manifest: introduce a `read_any_fast_delta` method This method is a clearer semantic than `readbase` and `readfast` and will allow for more accurate optimization and usage. This is part of a wider series introducing such clearer method.
Mon, 05 Aug 2024 10:03:06 +0200 manifest: add many type annotations to the manifest module
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 10:03:06 +0200] rev 51774
manifest: add many type annotations to the manifest module This help to clarify the API a bit, this caught various bug in the process and will help to catch more in the future. This also make large refactoring significantly simpler.
Mon, 05 Aug 2024 10:15:10 +0200 manifest: help pytype to understant `writesubtrees`'s `getnode` type
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 10:15:10 +0200] rev 51773
manifest: help pytype to understant `writesubtrees`'s `getnode` type Since we provide a default, the return of `_lazydirs.get` is cannot be None. We help pytype to understand that.
Mon, 05 Aug 2024 10:13:31 +0200 manifest: use explicit None checking in `_loaddifflazy`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 10:13:31 +0200] rev 51772
manifest: use explicit None checking in `_loaddifflazy` This helps pytype to understand what is going here with `v2` type.
Mon, 05 Aug 2024 10:12:37 +0200 manifest: use explicit None checking in `_loadlazy`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 10:12:37 +0200] rev 51771
manifest: use explicit None checking in `_loadlazy` This help pytype to understand what is going on with `v` type.
Mon, 05 Aug 2024 10:11:51 +0200 manifest: clear `_lazydirs` in place in `_loadalllazy`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 10:11:51 +0200] rev 51770
manifest: clear `_lazydirs` in place in `_loadalllazy` This avoid resetting the type of the dictionary in pytype eyes. This is consistent with the way the dictionary is cleared bits by bits in `_loadalllazy` Having more accurate code will help pytype. We do it in advance to help bisecting and avoid drowning them in the future type annotation noise.
Mon, 05 Aug 2024 10:10:03 +0200 manifest: use tuple for `delta` in `fastdelta`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 10:10:03 +0200] rev 51769
manifest: use tuple for `delta` in `fastdelta` This make the list content consistent and will help type annotation.
Mon, 05 Aug 2024 09:22:18 +0200 manifest: expose a version of the Class without interface decorator
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Aug 2024 09:22:18 +0200] rev 51768
manifest: expose a version of the Class without interface decorator The decorator confuse Pytype. Having the "raw" python class exposed will also helps pytype when it get replaced by a native implementation. At least until we start using `typing.Protocol` in the future.
Sun, 04 Aug 2024 10:50:38 +0200 pytype: stop ignoring manifest.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Aug 2024 10:50:38 +0200] rev 51767
pytype: stop ignoring manifest.py pytype no longer complains about the file contents.
Sun, 04 Aug 2024 10:48:51 +0200 manifest: align some vfs option access on the fact we might not have options
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Aug 2024 10:48:51 +0200] rev 51766
manifest: align some vfs option access on the fact we might not have options This make the usage consistent with the other option. Caught by pytype.
Sun, 04 Aug 2024 10:49:48 +0200 manifest: adds some type things for manifestdict.added
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Aug 2024 10:49:48 +0200] rev 51765
manifest: adds some type things for manifestdict.added This appeases pytype.
Sun, 04 Aug 2024 10:47:29 +0200 manifest: type and fix unhexlify
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Aug 2024 10:47:29 +0200] rev 51764
manifest: type and fix unhexlify Some part of that function seems to date back from Python 2. It raise question about whether this function is useful or not, but let us just fix it for now. This was caught by pytype.
Sun, 04 Aug 2024 10:45:31 +0200 docker-pytype: use version v2.1 of the CI image
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Aug 2024 10:45:31 +0200] rev 51763
docker-pytype: use version v2.1 of the CI image It use a more recent pytype as far as I understand.
Thu, 01 Aug 2024 13:14:05 +0200 context: some gratuitous documentation improvement
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 13:14:05 +0200] rev 51762
context: some gratuitous documentation improvement I wrote it as I was reading the code.
Thu, 01 Aug 2024 13:07:13 +0100 profiling: add a py-spy profiling backend
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 13:07:13 +0100] rev 51761
profiling: add a py-spy profiling backend The recommended way to use this backend is by setting the config `profiling.output` to point to a file because py-spy output is not human-readable.
Thu, 01 Aug 2024 11:14:58 +0100 copytracing: fix a bug in an edge case in metadata.compute_all_files_changes stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 11:14:58 +0100] rev 51760
copytracing: fix a bug in an edge case in metadata.compute_all_files_changes
Thu, 01 Aug 2024 13:04:38 +0100 rhg: ignore readonly FS error when saving dirstate stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 13:04:38 +0100] rev 51759
rhg: ignore readonly FS error when saving dirstate The error is already ignored when the .hg directory is read-only, so this is only fair. (the python hg is silent on readonly fs, too)
Thu, 01 Aug 2024 13:38:31 +0100 commit: set whole manifest entries at once (node with its associated flags)
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 13:38:31 +0100] rev 51758
commit: set whole manifest entries at once (node with its associated flags) Add a new function manifest.set that sets whole manifest entries at once, so the caller doesn't have to do two separate operations: m[p] = n m.set_flags(f) becomes: m.set(p, n, f) This obviously saves an extra lookup by path, and it also lets the underlying manifest implementation to be more efficient as it doesn't have to deal with partially-specified entries. It makes the interaction conceptually simpler, as well, since we don't have to go through an intermediate state of incorrect partially-written entry. (the real motivation for this change is an alternative manifest implementation where we batch pending writes, and dealing with fully defined entries makes the batching logic muchsimpler while avoiding slowdown due to alternating writes and reads)
Thu, 01 Aug 2024 11:43:10 -0400 typing: add type hints around the matcher for subrepo archiving
Matt Harbison <matt_harbison@yahoo.com> [Thu, 01 Aug 2024 11:43:10 -0400] rev 51757
typing: add type hints around the matcher for subrepo archiving Mostly this is meant to try to smoke out any other potential issues around the matcher, since these args were mostly previously treated as `Any`, and therefore checking wasn't done.
Thu, 01 Aug 2024 01:52:11 -0400 subrepo: drop the default value of None for the archive matcher
Matt Harbison <matt_harbison@yahoo.com> [Thu, 01 Aug 2024 01:52:11 -0400] rev 51756
subrepo: drop the default value of None for the archive matcher This was flagged by pytype after adding hints to `match.subdirmatcher` that it takes a non-optional matcher. That matcher argument is used without a guard in the subdirmatcher constructor, so that's the correct restriction. I don't think this fixes a bug in practice because the only way these are invoked is either by a parent `hgsubrepo.archive()`, `archival.archive()`, or the largefiles override of these. The `hgsubrepo.archive()` case (and the largefiles override) uses what the caller provided, so the caller will eventually be `archival.archive()` (or the largfiles override) up the call chain. The `archival.archive()` method also has None for its matcher's default arg. However, the three callers of that (`commands.archive()`, `webcommands.archive()`, and `extdiff.snapshot()`) all provide a matcher argument, so the None case can never occur unless a 3rd party extension swaps it for None. Sadly, we can't make the argument on the `archival.archive()` non-optional because there is a kwarg prior to it. Even though the largefiles override of `archival.archive()` is provided a valid matcher, we duplicate the internal creation of the matcher that the original `archival.archive()` does for consistency. By eliminating an impossible to hit case, we can simplify some of the subrepo code too, by dropping unreachable code.
Thu, 01 Aug 2024 16:42:38 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 16:42:38 +0200] rev 51755
branching: merge stable into default Post 6.8.1 release.
Thu, 01 Aug 2024 16:34:37 +0200 Added signature for changeset 11a9e2fc0caf stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 16:34:37 +0200] rev 51754
Added signature for changeset 11a9e2fc0caf
Thu, 01 Aug 2024 16:34:35 +0200 Added tag 6.8.1 for changeset 11a9e2fc0caf stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 16:34:35 +0200] rev 51753
Added tag 6.8.1 for changeset 11a9e2fc0caf
Thu, 01 Aug 2024 15:38:24 +0200 relnotes: add 6.8.1 stable 6.8.1
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2024 15:38:24 +0200] rev 51752
relnotes: add 6.8.1
Thu, 01 Aug 2024 14:00:07 +0200 rhg: expand user and environment variables in ignore includes stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 01 Aug 2024 14:00:07 +0200] rev 51751
rhg: expand user and environment variables in ignore includes This was reported by a user, and was a TODO long overdue.
Tue, 27 Jun 2023 13:05:03 +0200 utils: avoid using internal _imp.is_frozen()
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 13:05:03 +0200] rev 51750
utils: avoid using internal _imp.is_frozen() imp has been deprecated for a long time, and were removed in Python 3.12 . As a workaround, we started using the internal _imp. That is ugly and risky. It seems less risky to get the functionality in some other way. Here, we just inspect if 'origin' of the '__main__' module is set and 'frozen'. That seems to work and do the same, and might be better than using the internal _imp directly. This way of inspecting module attributes seems to work in some test cases, but it is a risky change. This level of importlib doesn't have much documentation, a complicated implementation, and we are dealing with some odd use cases.
Mon, 22 Jul 2024 18:20:03 +0200 utils: fix resourceutil use of deprecated importlib.resources
Mads Kiilerich <mads@kiilerich.com> [Mon, 22 Jul 2024 18:20:03 +0200] rev 51749
utils: fix resourceutil use of deprecated importlib.resources Some importlib functionality was deprecated in 3.11 . The documentation on https://docs.python.org/3.12/library/importlib.resources.html recommends using the new .files() API that was introduced in 3.9.
Thu, 11 Jan 2024 20:32:07 +0100 cext: use sys.executable instead of deprecated Py_GetProgramFullPath
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 20:32:07 +0100] rev 51748
cext: use sys.executable instead of deprecated Py_GetProgramFullPath Fix warning with Python 3.13: mercurial/cext/parsers.c: In function 'check_python_version': mercurial/cext/parsers.c:1243:30: warning: 'Py_GetProgramFullPath' is deprecated [-Wdeprecated-declarations] 1243 | Py_GetProgramFullPath()); | ^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.13/Python.h:119, from mercurial/cext/parsers.c:11: /usr/include/python3.13/pylifecycle.h:43:43: note: declared here 43 | Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void); | ^~~~~~~~~~~~~~~~~~~~~ At this point in time, the PyConfig struct memory has been released and the PyConfig API can't be used. https://docs.python.org/3.13/c-api/init.html#c.Py_GetProgramFullPath recommands using sys.executable instead. Let's assume that will work in all versions. It would perhaps be better to use PySys_GetObject, but I prefer to stay consistent with how the same function is retrieving sys.hexversion.
Thu, 11 Jan 2024 21:58:55 +0100 subrepoutil: pass re.sub 'count' argument by name
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 21:58:55 +0100] rev 51747
subrepoutil: pass re.sub 'count' argument by name Python 3.13 started warning: DeprecationWarning: 'count' is passed as positional argument
Thu, 11 Jan 2024 21:58:55 +0100 tests: pass re.MULTILINE to re.sub as 'flags' - not in 'count' position
Mads Kiilerich <mads@kiilerich.com> [Thu, 11 Jan 2024 21:58:55 +0100] rev 51746
tests: pass re.MULTILINE to re.sub as 'flags' - not in 'count' position This bug was caught by the new Python 3.13 warning: DeprecationWarning: 'count' is passed as positional argument
Mon, 26 Jun 2023 21:31:41 +0200 tests: use packaging from setuptools instead of deprecated distutils
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 21:31:41 +0200] rev 51745
tests: use packaging from setuptools instead of deprecated distutils When invoking StrictVersion in 3.12 we got: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. distutils is dead in the standard library, and we have to move towards using `setuptools` as general extern dependency. Instead of also requiring the extern `packaging`, we will just use the packaging that is vendored in setuptools.
Mon, 26 Jun 2023 15:16:51 +0200 tests: drop test-demandimport.py distutils test that failed with warnings
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 15:16:51 +0200] rev 51744
tests: drop test-demandimport.py distutils test that failed with warnings The test would fail because warnings: /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils. warnings.warn( /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") The test for distutils.msvc9compiler comes from 2205d00b6d2b. But since then, distutils is going away, and this test must change somehow. It is unclear exactly how setuptools depended on msvc9compiler, but setuptools also moved forward, and this exact test no longer seems relevant. It thus seems like a fair solution to remove the test while keeping the demandimport blacklist of distutils.msvc9compiler.
Thu, 29 Jun 2023 20:02:27 +0200 utils: test coverage of makedate
Mads Kiilerich <mads@kiilerich.com> [Thu, 29 Jun 2023 20:02:27 +0200] rev 51743
utils: test coverage of makedate Explore the scenario from ae04af1ce78d to avoid future regressions. This was intended to give some coverage of the change in faccec1edc2c.
Tue, 09 Jul 2024 20:08:48 +0200 mmap: populate mapping in a background thread
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Jul 2024 20:08:48 +0200] rev 51742
mmap: populate mapping in a background thread When possible, we populate the memory mapping in a second thread. The mmap population does not only read the data from disk to memory. It also actually fill the memory mapping between process memory address and the physical memory used by the file system cache containing the mmap'ed data. Doing so buy back the slowdown from pre-population when it matters. When most data is accessed, only a few page fault will occurs, while the background thread fill the memory controller. When few data is accessed, the non-blocking mmap won't have to wait for all data to be populated. Here is a few example of improvement seen in benchmark around unbundle and push: ### data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog # benchmark.name = hg.command.unbundle # benchmark.variants.issue6528 = disabled # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-100-extra-rev before: 0.758101 after: 0.732129 (-3.43%, -0.03) ## data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog before: 1.519941 after: 1.503473 (-1.08%, -0.02) ### data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog # benchmark.name = hg.command.push # bin-env-vars.hg.flavor = default # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev before: 4.801442 after: 4.695810 (-1.46%, -0.07) # benchmark.variants.revs = any-100-extra-rev before: 4.848596 after: 4.794075 (-1.12%, -0.05) # bin-env-vars.hg.flavor = rust # benchmark.variants.revs = any-1-extra-rev before: 4.818410 after: 4.700053 (-2.46%, -0.12)
Thu, 25 Jul 2024 14:40:38 -0400 pure: stringify builtin exception messages
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Jul 2024 14:40:38 -0400] rev 51741
pure: stringify builtin exception messages Builtin exceptions usually want strings, and display with a wierd b'' prefix if given bytes.
Mon, 29 Jul 2024 12:10:08 -0400 httppeer: avoid another bad reference before assignment warning
Matt Harbison <matt_harbison@yahoo.com> [Mon, 29 Jul 2024 12:10:08 -0400] rev 51740
httppeer: avoid another bad reference before assignment warning This wasn't a problem, because `b''` from the `AttributeError` handler is in `bundle2.bundletypes`, so the following loop and conditional always run at least once. But PyCharm can't figure that out on its own, and it took a little exploring to figure out it wasn't a problem. The usage in `bundle2.writebundle` is to look it up in the map of bundle types, so it will break in a more obvious way in the unlikely event that the empty string is removed from the map in the future.
Fri, 26 Jul 2024 21:59:34 -0400 httppeer: move a variable to avoid a bad reference before assignment warning
Matt Harbison <matt_harbison@yahoo.com> [Fri, 26 Jul 2024 21:59:34 -0400] rev 51739
httppeer: move a variable to avoid a bad reference before assignment warning No actual bug here, because the conditional used to assign is the same as the conditional in the `finally` block that guards the reference.
Fri, 26 Jul 2024 21:54:07 -0400 httppeer: simplify two-way stream cleanup
Matt Harbison <matt_harbison@yahoo.com> [Fri, 26 Jul 2024 21:54:07 -0400] rev 51738
httppeer: simplify two-way stream cleanup No need to conditionalize the cleanup if the filename is assigned outside the exception handler. I suppose `fd` leaks if `os.fdopen()` fails, but that was the case before too (and may trigger another exception in the `finally` block on Windows, when the file is still open).
Mon, 29 Jul 2024 10:07:53 +0200 rustfmt: update expected Rust edition
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 10:07:53 +0200] rev 51737
rustfmt: update expected Rust edition In this case it doesn't change anything, but we've been using 2021 for a while now.
Mon, 29 Jul 2024 10:04:00 +0200 hghave: update expected rustfmt version
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 10:04:00 +0200] rev 51736
hghave: update expected rustfmt version We still use nightly, but have moved to a newer nightly after the last CI image upgrade in 74f1bf147a6d and 3876d4c6c79e.
Mon, 29 Jul 2024 10:06:28 +0200 rustfmt: apply formatting expected by newer nightly version
Raphaël Gomès <rgomes@octobus.net> [Mon, 29 Jul 2024 10:06:28 +0200] rev 51735
rustfmt: apply formatting expected by newer nightly version This was missed in 3876d4c6c79ec5c71e8c51b876cc157e93a5eaac somehow.
Thu, 25 Jul 2024 15:56:04 -0400 tests: stop skipping `mercurial/pure/osutil.py` during pytype runs
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Jul 2024 15:56:04 -0400] rev 51734
tests: stop skipping `mercurial/pure/osutil.py` during pytype runs Not sure when the original issue(s) were fixed, but it works for me now.
Thu, 25 Jul 2024 13:31:13 -0400 largefiles: avoid a potentially undefined variable in exception case
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Jul 2024 13:31:13 -0400] rev 51733
largefiles: avoid a potentially undefined variable in exception case The `wlock` variable is used to release the lock in the `finally` block, so it would be undefined if `repo.wlock()` itself failed. Caught by pytype 2024.04.11 with py3.10.11.
Wed, 24 Jul 2024 22:40:22 -0400 typing: add trivial type hints to `mercurial.scmutil`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Jul 2024 22:40:22 -0400] rev 51732
typing: add trivial type hints to `mercurial.scmutil` There's still a lot to go, but there's a lot here already, so I tried to keep it to obvious/trivial things. I didn't bother with contexts, matchers, and revisions that can be `bytes | int | None`.
Wed, 24 Jul 2024 18:17:00 -0400 typing: narrow the scope of some recent disabled import warnings
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Jul 2024 18:17:00 -0400] rev 51731
typing: narrow the scope of some recent disabled import warnings These comments were added in 39e2b2d062c1, but had the effect of changing the known type to `Any`, which cascaded through a few function signatures. Just ignore the import error instead.
Fri, 26 Jul 2024 10:52:28 +0200 demandimport: don't delay threading import stable
Julien Cristau <jcristau@debian.org> [Fri, 26 Jul 2024 10:52:28 +0200] rev 51730
demandimport: don't delay threading import A recent cpython change breaks demandimport by importing threading locally in importlib.util.LazyLoader.exec_module; add it (plus warnings and _weakrefset, which are imported by threading) to demandimport's ignore list. ``` Traceback (most recent call last): File "/usr/bin/hg", line 57, in <module> from mercurial import dispatch File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "/usr/lib/python3/dist-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module super().exec_module(module) File "<frozen importlib.util>", line 257, in exec_module File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "/usr/lib/python3/dist-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module super().exec_module(module) File "<frozen importlib.util>", line 267, in exec_module AttributeError: partially initialized module 'threading' has no attribute 'RLock' (most likely due to a circular import) ``` Ref: https://github.com/python/cpython/issues/117983 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076449 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076747
Tue, 23 Jul 2024 19:20:22 -0400 typing: induce pytype to use the standard `attr` instead of the vendored copy
Matt Harbison <matt_harbison@yahoo.com> [Tue, 23 Jul 2024 19:20:22 -0400] rev 51729
typing: induce pytype to use the standard `attr` instead of the vendored copy What was previously happening with the vendored copy was that pytype would stub out all(?) classes that were decorated with `@attr.s` as `Any`. After this, we get a ton of classes defined, and numerous fields and methods now have proper types.
Tue, 23 Jul 2024 19:14:16 -0400 typing: disable some pytype errors in `mercurial.store`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 23 Jul 2024 19:14:16 -0400] rev 51728
typing: disable some pytype errors in `mercurial.store` These seem to be legitimate errors, since one of the two callers (`encodedstore.data_entries()`) was previously typed to generate `BaseStoreEntry`. However, that and the other caller only pass `RevlogStoreEntry` objects. I can't tell if this was a WIP or what, but don't want to get side tracked on this. So flag as a TODO for later.
Tue, 23 Jul 2024 19:05:26 -0400 linelog: correct the default value of `annotateresult.lines`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 23 Jul 2024 19:05:26 -0400] rev 51727
linelog: correct the default value of `annotateresult.lines` This was flagged by pytype once it was tricked into using the standard `attr` package instead of the vendored copy.
Tue, 23 Jul 2024 19:01:16 -0400 phabricator: correct the default value of `phabhunk.corpus`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 23 Jul 2024 19:01:16 -0400] rev 51726
phabricator: correct the default value of `phabhunk.corpus` There's only one caller to this constructor (which does provide this argument), and no direct assignments, so there's no runtime bug here. However, when pytype is tricked into using the standard `attr` package instead of the vendored version, it flags this because bytes is passed to the one constructor invocation. Tricking pytype into using the standard package will generate many more type hints, noteably around `@attr.s` decorated things.
Mon, 22 Jul 2024 18:20:29 +0200 rust-changelog: accessing the index
Georges Racinet <georges.racinet@cloudcrane.io> [Mon, 22 Jul 2024 18:20:29 +0200] rev 51725
rust-changelog: accessing the index The `Index` object is currently the one providing all DAG related algorithms, starting with simple ancestors iteration up to more advanced ones (ranges, common ancestors…). From pure Rust code, there was no way to access the changelog index for a given `Repository`, probably because `rhg` does not use any such algorithm yet.
Sat, 20 Jul 2024 17:03:30 -0400 typing: add type hints to `mercurial.policy`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 20 Jul 2024 17:03:30 -0400] rev 51724
typing: add type hints to `mercurial.policy` Mostly trivial, but this seems like the logical module to use to inject the hints from `cext`, `pure`, etc, given that this file has the fallback policy. This is a first step. There doesn't appear to be a predefined type for a module in py3.7, so those are omitted for now.
Sat, 20 Jul 2024 01:55:09 -0400 cext: correct the argument handling of `b85encode()`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 20 Jul 2024 01:55:09 -0400] rev 51723
cext: correct the argument handling of `b85encode()` The type stub indicated that this argument is `Optional`, which implies None is allowed. I don't see in the documentation where that's the case for `i`[1], and trying it in `hg debugshell` resulted in the method failing with a TypeError. I guess it was typed as an `int` argument because the `p` format unit wasn't added until Python 3.3[2]. In any event, 2 clients in core (`pvec` and `obsolete`) call this with no argument supplied, and `mdiff` calls it with True. So I guess we've avoided the None arg case, and when no arg is supplied, it defaults to the 0 initialization of the `pad` variable in C. Since the `p` format unit accepts both `int` and None, as well as `bool`, I'm not bothering to bump the module version- this code is more permissive than it was, in addition to being more correct. Interestingly, when I first imported the `cext` and `pure` methods in the same manner as the previous commit, it dropped the `Optional` part of the argument type when generating `util.pyi`. No idea why. [1] https://docs.python.org/3/c-api/arg.html#numbers [2] https://docs.python.org/3/c-api/arg.html#other-objects
Fri, 19 Jul 2024 20:09:48 -0400 typing: add type hints to the `charencode` module
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Jul 2024 20:09:48 -0400] rev 51722
typing: add type hints to the `charencode` module Since this module is dynamically imported from either `mercurial.pure` or `mercurial.cext`, these hints aren't detected in `mercurial.encoding`, and need to be imported directly there during the type-checking phase. This keeps the runtime selection via the policy config in place, but allows pytype to see these as functions with proper signatures instead of just `Any`. We don't attempt to import the `mercurial.cext` version yet because there's no types stubs for that module, but this will get the ball rolling. I thought this would spill over into other modules from there, but the only two *.pyi files that changed were for `encoding` and `charencode`. Applying this to other dynamically selected modules will clean some things up in other files, so this is a start. I had originally redefined the functions in the type-checking block (like some of the `os.path` aliasing in `mercurial.util`), but this is better because we won't have another duplication of the definitions that may get out of date.
Fri, 19 Jul 2024 16:49:46 -0400 typing: explicitly type some `mercurial.util` eol code to avoid @overload
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Jul 2024 16:49:46 -0400] rev 51721
typing: explicitly type some `mercurial.util` eol code to avoid @overload Unlike the previous commit, this makes a material difference in the generated stub file- the `pycompat.identity()` aliases generated an @overload like this: @overload def fromnativeeol(a: _T0) -> _T0: ... ... which might fail to detect a bad argument, like str. This drops the @overload for the 3 related methods, so there's a single definition for each. The `typelib.BinaryIO_Proxy` is used for subclassing (the same as was done in 8147abc05794), so that it is a `BinaryIO` type during type checking, but still inherits `object` at runtime. That way, we don't need to implement unused abstract methods.
Fri, 19 Jul 2024 16:38:53 -0400 typing: avoid some useless @overload definitions in `mercurial.util`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Jul 2024 16:38:53 -0400] rev 51720
typing: avoid some useless @overload definitions in `mercurial.util` Apparently pytype considered the name as well as the type of each argument, and generates @overload definitions if they don't match. At best this is clutter, and can easily be removed.
Thu, 18 Jul 2024 22:46:36 -0400 dirstate: stringify a few exception messages
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jul 2024 22:46:36 -0400] rev 51719
dirstate: stringify a few exception messages Built in exceptions want str, and ProgrammingError converts bytes to str internally (because it subclasses RuntimeError).
Thu, 18 Jul 2024 20:34:35 -0400 typing: add type hints to `mercurial.verify._normpath()`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jul 2024 20:34:35 -0400] rev 51718
typing: add type hints to `mercurial.verify._normpath()` Since 10db46e128d4, pytype almost figured this out, going from `Any` -> `_T0`, but the intent is obvious.
Thu, 18 Jul 2024 20:16:31 -0400 typing: add type hints to `i18n._msgcache`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jul 2024 20:16:31 -0400] rev 51717
typing: add type hints to `i18n._msgcache` Since 10db46e128d4, pytype stopped inferring that the key is bytes.
Thu, 18 Jul 2024 19:57:42 -0400 typing: add type hints to `mercurial.dirstatemap`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jul 2024 19:57:42 -0400] rev 51716
typing: add type hints to `mercurial.dirstatemap` Somewhere since 10db46e128d4, pytype stopped being able to infer the type of the `identity` field. Fill in some obvious other hints along the way. These hints caused pytype to flag a missing attribute: File "/mnt/c/Users/Matt/hg/mercurial/dirstatemap.py", line 714, in _v1_map: No attribute 'stat' on mercurial.windows.cachestat [attribute-error] In Union[Any, mercurial.posix.cachestat, mercurial.windows.cachestat] File "/mnt/c/Users/Matt/hg/mercurial/dirstatemap.py", line 715, in _v1_map: No attribute 'stat' on mercurial.windows.cachestat [attribute-error] In Union[Any, mercurial.posix.cachestat, mercurial.windows.cachestat] In practice, the `identity` field is NOT replaced with None if it isn't cacheable, so it's probably safer to just add the field and set it to None, since that check is already in place on line 715.
Thu, 18 Jul 2024 19:55:51 -0400 typing: add type hints to `cmdutil.findrepo()`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jul 2024 19:55:51 -0400] rev 51715
typing: add type hints to `cmdutil.findrepo()` Since 10db46e128d4, pytype almost figured this out, going from `Any` -> `_T0`, but the intent is obvious.
Thu, 18 Jul 2024 19:01:55 -0400 typing: add some type hints to fastannotate that have decayed in the last year
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jul 2024 19:01:55 -0400] rev 51714
typing: add some type hints to fastannotate that have decayed in the last year Somewhere since 10db46e128d4, `_knownopts` decayed to `set` for unknown reasons. Also, `annotateopts.default` changed from bytes to str. While that is correct, I noticed that PyCharm was flagging the member fields as undefined in `shortstr()`, so add those to keep it happy. (There are no complaints from pytype because that module is excluded, due to the missing reference to `linelog.copyfrom()` that I'm not sure how to fix.)
Tue, 23 Jul 2024 12:12:22 +0200 heptapod-ci: use new v2.1 image
Raphaël Gomès <rgomes@octobus.net> [Tue, 23 Jul 2024 12:12:22 +0200] rev 51713
heptapod-ci: use new v2.1 image This is finally catching up to ~3 years of tech debt.
Tue, 23 Jul 2024 12:12:03 +0200 heptapod-ci: move version prints closer to the start
Raphaël Gomès <rgomes@octobus.net> [Tue, 23 Jul 2024 12:12:03 +0200] rev 51712
heptapod-ci: move version prints closer to the start This makes debugging a lot easier if anything is to go wrong, and shows output earlier.
Tue, 23 Jul 2024 12:10:31 +0200 pytype: only try the hacky way of finding PYTHON if not provided
Raphaël Gomès <rgomes@octobus.net> [Tue, 23 Jul 2024 12:10:31 +0200] rev 51711
pytype: only try the hacky way of finding PYTHON if not provided This allows us to work in more environments, like when using pyenv. This syntax is compatible with all POSIX shells.
Mon, 22 Jul 2024 14:42:54 +0200 dummysmtpd: fix EOF handling on newer versions of OpenSSL
Raphaël Gomès <rgomes@octobus.net> [Mon, 22 Jul 2024 14:42:54 +0200] rev 51710
dummysmtpd: fix EOF handling on newer versions of OpenSSL Explanations inline.
Mon, 22 Jul 2024 14:19:12 +0200 test-install: add new glob for the upgrade notice in newer versions of pip
Raphaël Gomès <rgomes@octobus.net> [Mon, 22 Jul 2024 14:19:12 +0200] rev 51709
test-install: add new glob for the upgrade notice in newer versions of pip We only globbed for the old warning, newer versions of pip use a cleaner one.
Thu, 18 Jul 2024 13:36:32 +0200 rust: use `.cargo/config.toml` instead of `.cargo/config`
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 13:36:32 +0200] rev 51708
rust: use `.cargo/config.toml` instead of `.cargo/config` This has been deprecated for a while now and we don't support Rust versions that only understand the old path.
Thu, 18 Jul 2024 13:35:39 +0200 rust: apply clippy lints
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 13:35:39 +0200] rev 51707
rust: apply clippy lints They are at most harmless and at best make the codebase more readable and simpler.
Tue, 23 Jul 2024 14:25:23 +0200 rust: change minimum supported version everywhere applicable
Raphaël Gomès <rgomes@octobus.net> [Tue, 23 Jul 2024 14:25:23 +0200] rev 51706
rust: change minimum supported version everywhere applicable This will help users and downstream packaging.
Thu, 18 Jul 2024 12:38:26 +0200 rustfmt: format the codebase with nightly-2024-07-16
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:38:26 +0200] rev 51705
rustfmt: format the codebase with nightly-2024-07-16 The CI has moved to a newer nightly, which slightly changes how it wraps comments (which is the very option we use nightly for).
Thu, 18 Jul 2024 12:37:13 +0200 hghave: update detection of black version to a newer minimum
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:37:13 +0200] rev 51704
hghave: update detection of black version to a newer minimum The CI has moved to version 23.3.0, which is the last one to support 3.7 at runtime.
Thu, 18 Jul 2024 12:36:12 +0200 black: format the codebase with 23.3.0
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:36:12 +0200] rev 51703
black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
Thu, 18 Jul 2024 12:03:29 +0200 pytype: work around wrong ImportError flagging
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:03:29 +0200] rev 51702
pytype: work around wrong ImportError flagging As documented in https://github.com/google/pytype/issues/163, newer versions of Pytype do not understand caught `ImportError`, so we temporarily ignore them where applicable.
Thu, 18 Jul 2024 12:02:01 +0200 zeroconf: fix boolean return value
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:02:01 +0200] rev 51701
zeroconf: fix boolean return value This was (wrongly) flagged by Pytype as being undefined since it doesn't seem to understand `try` blocks. However, the caller is expecting a boolean and the fix to appease Pytype is simple, so we do both.
Tue, 23 Jul 2024 10:02:46 +0200 Backout accidental publication of a large range of revisions
Raphaël Gomès <rgomes@octobus.net> [Tue, 23 Jul 2024 10:02:46 +0200] rev 51700
Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
Mon, 22 Jul 2024 16:49:38 +0200 Latest image and pytype fix
Raphaël Gomès <rgomes@octobus.net> [Mon, 22 Jul 2024 16:49:38 +0200] rev 51699
Latest image and pytype fix
Mon, 22 Jul 2024 14:42:54 +0200 dummysmtpd: fix EOF handling on newer versions of OpenSSL
Raphaël Gomès <rgomes@octobus.net> [Mon, 22 Jul 2024 14:42:54 +0200] rev 51698
dummysmtpd: fix EOF handling on newer versions of OpenSSL Explanations inline.
Mon, 22 Jul 2024 14:19:12 +0200 test-install: add new glob for the upgrade notice in newer versions of pip
Raphaël Gomès <rgomes@octobus.net> [Mon, 22 Jul 2024 14:19:12 +0200] rev 51697
test-install: add new glob for the upgrade notice in newer versions of pip We only globbed for the old warning, newer versions of pip use a cleaner one.
Thu, 18 Jul 2024 15:48:05 +0200 Try the full CI run
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 15:48:05 +0200] rev 51696
Try the full CI run
Thu, 18 Jul 2024 14:57:37 +0200 WIP test new CI image
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 14:57:37 +0200] rev 51695
WIP test new CI image
Thu, 18 Jul 2024 13:36:32 +0200 rust: use `.cargo/config.toml` instead of `.cargo/config`
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 13:36:32 +0200] rev 51694
rust: use `.cargo/config.toml` instead of `.cargo/config` This has been deprecated for a while now and we don't support Rust versions that only understand the old path.
Thu, 18 Jul 2024 13:35:39 +0200 rust: apply clippy lints
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 13:35:39 +0200] rev 51693
rust: apply clippy lints They are at most harmless and at best make the codebase more readable and simpler.
Thu, 18 Jul 2024 12:38:26 +0200 rustfmt: format the codebase with nightly-2024-07-16
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:38:26 +0200] rev 51692
rustfmt: format the codebase with nightly-2024-07-16 The CI has moved to a newer nightly, which slightly changes how it wraps comments (which is the very option we use nightly for).
Thu, 18 Jul 2024 12:37:13 +0200 hghave: update detection of black version to a newer minimum
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:37:13 +0200] rev 51691
hghave: update detection of black version to a newer minimum The CI has moved to version 23.3.0, which is the last one to support 3.7 at runtime.
Thu, 18 Jul 2024 12:36:12 +0200 black: format the codebase with 23.3.0
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:36:12 +0200] rev 51690
black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
Thu, 18 Jul 2024 12:03:29 +0200 pytype: work around wrong ImportError flagging
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:03:29 +0200] rev 51689
pytype: work around wrong ImportError flagging As documented in https://github.com/google/pytype/issues/163, newer versions of Pytype do not understand caught `ImportError`, so we temporarily ignore them where applicable.
Thu, 18 Jul 2024 12:02:01 +0200 zeroconf: fix boolean return value
Raphaël Gomès <rgomes@octobus.net> [Thu, 18 Jul 2024 12:02:01 +0200] rev 51688
zeroconf: fix boolean return value This was (wrongly) flagged by Pytype as being undefined since it doesn't seem to understand `try` blocks. However, the caller is expecting a boolean and the fix to appease Pytype is simple, so we do both.
Thu, 11 Jul 2024 21:54:02 -0400 convert: fix various leaked file descriptors
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Jul 2024 21:54:02 -0400] rev 51687
convert: fix various leaked file descriptors Some of these only leaked if an exception occurred between the open and close, but a lot of these leaked unconditionally. A type hint is added to `parsesplicemap` because otherwise this change caused pytype to change the return type from this to `Dict[nothing, nothing]`.
Thu, 11 Jul 2024 21:16:45 -0400 convert: stringify `shlex` class argument
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Jul 2024 21:16:45 -0400] rev 51686
convert: stringify `shlex` class argument The documentation is handwavy, but typeshed says this should be `str`[1]. I'm not sure if this is the correct encoding (vs `fsencode` or "latin1" like the tokens returned by the proxy class). While we're here, we can add a few more type hints that would have caused pytype to flag the problem. [1] https://github.com/python/typeshed/blob/6a9b53e719a139c2d6b41cf265ed0990cf438192/stdlib/shlex.pyi#L51
Thu, 11 Jul 2024 20:54:06 -0400 typing: add trivial type hints to the convert extension's common modules
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Jul 2024 20:54:06 -0400] rev 51685
typing: add trivial type hints to the convert extension's common modules This started as ensuring that the `encoding` and `orig_encoding` attributes has a type other than `Any`, so pytype can catch problems where it needs to be str for stdlib encoding and decoding. It turns out that adding the hint in `mercurial.encoding` is what was needed, but I picked a bunch of low hanging fruit while here. There's definitely more to do, and I see a problem where `shlex.shlex` is being fed bytes instead of str, but there are not enough type hints yet to make pytype notice.
Thu, 11 Jul 2024 14:46:00 -0400 convert: drop a duplicate implementation of `dateutil.makedate()`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Jul 2024 14:46:00 -0400] rev 51684
convert: drop a duplicate implementation of `dateutil.makedate()` I noticed this because the signature generated by pytype recently changed to be less specific. When the method was introduced back in 337d728e644f, `util.makedate()` didn't take an optional timestamp arg. But now it does, and the methods are the same (except the `dateutil` version validates that the timestamp isn't a negative value). I left the old method in place in case anyone has custom convert code that monkey patches it.
Mon, 08 Jul 2024 15:48:34 +0200 revlog: use mmap by default is pre-population is available
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Jul 2024 15:48:34 +0200] rev 51683
revlog: use mmap by default is pre-population is available Using mmap has a great impact of memory usage on server, and a good impact on performance in multiple case. Now that we pre-populate memory mapping by default, there is case where it using mmap is slower. So we use it by default (if pre-population is available). Further work to reduce the performance impact of the pre-population will be done later. Some benchmark below (using the same setup as 522b4d729e89): As for 522b4d729e89 the impact on small repository like Mercurial or Pypy is tiny, ~1% best. However for large repositories we see some performance improvement without seeing the performance regression that we could have without pre-populate. ##### For netbeans ### data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog ## benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # benchmark.variants.limit-rev = 1 # benchmark.variants.patch = yes no-mmap: 0.171579 mmap: 0.166311 (-3.07%, -0.01) # bin-env-vars.hg.flavor = default no-mmap: 0.170716 mmap: 0.165218 (-3.22%, -0.01) # benchmark.variants.patch = no # benchmark.variants.rev = tip no-mmap: 0.140862 mmap: 0.137566 (-2.34%, -0.00) ## benchmark.name = hg.command.unbundle # bin-env-vars.hg.flavor = rust # benchmark.variants.issue6528 = disabled # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle no-mmap: 0.238038 mmap: 0.239912 no-populate: 0.cbd4c9 (+11.71%, +0.03) #### For Mozilla ### data-env-vars.name = mozilla-try-2019-02-18-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1 # benchmark.variants.patch = yes no-mmap: 0.258440 mmap: 0.237813 (-7.98%, -0.02) # benchmark.variants.limit-rev = 10 no-mmap: 1.235323 mmap: 1.213578 (-1.76%, -0.02) ## benchmark.name = hg.command.push # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.explicit-rev = none # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev no-mmap: 4.790135 mmap: 4.668971 (-2.53%, -0.12) no-populate: 4.841141 (+1.06%, +0.05) ### data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog ## benchmark.name = hg.command.log # bin-env-vars.hg.flavor = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.rev = tip no-mmap: 0.206187 mmap: 0.197348 (-4.29%, -0.01) ## benchmark.name = hg.command.push # bin-env-vars.hg.flavor = default # benchmark.variants.explicit-rev = none # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev no-mmap: 4.768259 mmap: 4.798632 no-populate: 4.953295 (+3.88%, +0.19) # benchmark.variants.revs = any-100-extra-rev no-mmap: 4.785946 mmap: 4.903618 no-populate: 5.014963 (+4.79%, +0.23) ## benchmark.name = hg.command.unbundle # bin-env-vars.hg.flavor = default # benchmark.variants.issue6528 = disabled # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle no-mmap: 1.400121 mmap: 1.423411 no-populate: 1.585365 (+13.23%, +0.19)
Mon, 08 Jul 2024 17:02:27 +0200 revlog: use an explicit config option to enable mmap usage for index
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Jul 2024 17:02:27 +0200] rev 51682
revlog: use an explicit config option to enable mmap usage for index We replace the `experimental.mmapindexthreshold` with two options: The `storage.revlog.mmap.index` is a boolean option to enable or disable the feature. The `storage.revlog.mmap.index:size-threshold` is a bytes option that control when we will be using mmap instead of plain reading.
Thu, 11 Apr 2024 00:02:07 +0200 mmap: populate the mapping by default
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Apr 2024 00:02:07 +0200] rev 51681
mmap: populate the mapping by default Without pre-population, accessing all data through a mmap can result in many pagefault, reducing performance significantly. If the mmap is prepopulated, the performance can no longer get slower than a full read. (See benchmark number below) In some cases were very few data is read, prepopulating can be overkill and slower than populating on access (through page fault). So that behavior can be controlled when the caller can pre-determine the best behavior. (See benchmark number below) In addition, testing with populating in a secondary thread yield great result combining the best of each approach. This might be implemented in later changesets. In all cases, using mmap has a great effect on memory usage when many processes run in parallel on the same machine. ### Benchmarks # What did I run A couple of month back I ran a large benchmark campaign to assess the impact of various approach for using mmap with the revlog (and other files), it highlighted a few benchmarks that capture the impact of the changes well. So to validate this change I checked the following: - log command displaying various revisions (read the changelog index) - log command displaying the patch of listed revisions (read the changelog index, the manifest index and a few files indexes) - unbundling a few revisions (read and write changelog, manifest and few files indexes, and walk the graph to update some cache) - pushing a few revisions (read and write changelog, manifest and few files indexes, walk the graph to update some cache, performs various accesses locally and remotely during discovery) Benchmarks were run using the default module policy (c+py) and the rust one. No significant difference were found between the two implementation, so we will present result using the default policy (unless otherwise specified). I ran them on a few repositories : - mercurial: a "public changeset only" copy of mercurial from 2018-08-01 using zstd compression and sparse-revlog - pypy: a copy of pypy from 2018-08-01 using zstd compression and sparse-revlog - netbeans: a copy of netbeans from 2018-08-01 using zstd compression and sparse-revlog - mozilla-try: a copy of mozilla-try from 2019-02-18 using zstd compression and sparse-revlog - mozilla-try persistent-nodemap: Same as the above but with a persistent nodemap. Used for the log --patch benchmark only # Results For the smaller repositories (mercurial, pypy), the impact of mmap is almost imperceptible, other cost dominating the operation. The impact of prepopulating is undiscernible in the benchmark we ran. For larger repositories the benchmark support explanation given above: On netbeans, the log can be about 1% faster without repopulation (for a difference < 100ms) but unbundle becomes a bit slower, even when small. ### data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog # benchmark.name = hg.command.unbundle # benchmark.variants.issue6528 = disabled # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle # benchmark.variants.verbosity = quiet with-populate: 0.240157 no-populate: 0.265087 (+10.38%, +0.02) # benchmark.variants.revs = any-100-extra-rev with-populate: 1.459518 no-populate: 1.481290 (+1.49%, +0.02) ## benchmark.name = hg.command.push # benchmark.variants.explicit-rev = none # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev with-populate: 0.771919 no-populate: 0.792025 (+2.60%, +0.02) # benchmark.variants.revs = any-100-extra-rev with-populate: 1.459518 no-populate: 1.481290 (+1.49%, +0.02) For mozilla-try, the "slow down" from pre-populate for small `hg log` is more visible, but still small in absolute time. (using rust value for the persistent nodemap value to be relevant). ### data-env-vars.name = mozilla-try-2019-02-18-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # benchmark.variants.patch = yes # benchmark.variants.limit-rev = 1 with-populate: 0.237813 no-populate: 0.229452 (-3.52%, -0.01) # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes with-populate: 1.213578 no-populate: 1.205189 ### data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = tip with-populate: 0.198607 no-populate: 0.195038 (-1.80%, -0.00) However pre-populating provide a significant boost on more complex operations like unbundle or push: ### data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog # benchmark.name = hg.command.push # benchmark.variants.explicit-rev = none # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev with-populate: 4.798632 no-populate: 4.953295 (+3.22%, +0.15) # benchmark.variants.revs = any-100-extra-rev with-populate: 4.903618 no-populate: 5.014963 (+2.27%, +0.11) ## benchmark.name = hg.command.unbundle # benchmark.variants.revs = any-1-extra-rev with-populate: 1.423411 no-populate: 1.585365 (+11.38%, +0.16) # benchmark.variants.revs = any-100-extra-rev with-populate: 1.537909 no-populate: 1.688489 (+9.79%, +0.15)
Thu, 11 Jul 2024 11:10:40 -0400 win32mbcs: use str for encoding value stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Jul 2024 11:10:40 -0400] rev 51680
win32mbcs: use str for encoding value This was reported to the TortoiseHg tracker as: https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5980 It doesn't look like we have any tests for this extension, but the explicit type hints are enough to convince pytype that the module level `_encoding` attr is str. The `encode()` and `decode()` methods are too complex to add type hints for them.
Wed, 10 Jul 2024 18:44:55 -0400 typing: add a trivial type hint to `mercurial/vfs.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 18:44:55 -0400] rev 51679
typing: add a trivial type hint to `mercurial/vfs.py` Since hg 3dbc7b1ecaba, pytype stopped seeing the return value of `rmtree` as `None`, and substituted `Any`.
Wed, 10 Jul 2024 18:34:47 -0400 typing: add a few trivial type hints to `mercurial/templater.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 18:34:47 -0400] rev 51678
typing: add a few trivial type hints to `mercurial/templater.py` Since hg 3dbc7b1ecaba, pytype started inferring that the second value in the tuple is `BinaryIO`, but still hasn't been able to figure out the rest of `open_template()`. We can be more precise.
Wed, 10 Jul 2024 18:19:32 -0400 typing: add a few type hints to `mercurial/revlog.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 18:19:32 -0400] rev 51677
typing: add a few type hints to `mercurial/revlog.py` Somewhere between hg 3dbc7b1ecaba and hg 8e3f6b5bf720, pytype stopped being able to infer the type for `_docket_file` and `compress()`. Lock those types in before they get lost.
Wed, 10 Jul 2024 18:05:40 -0400 typing: add a trivial type hint to `mercurial/posix.py` to avoid an @overload
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 18:05:40 -0400] rev 51676
typing: add a trivial type hint to `mercurial/posix.py` to avoid an @overload Since hg 3dbc7b1ecaba, pytype added an `@overload` for this function, without a type on the parameter. That's wrong, and undermines the hints on the non-trivial functions.
Wed, 10 Jul 2024 17:55:14 -0400 typing: add some trivial type hints to `mercurial/match.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 17:55:14 -0400] rev 51675
typing: add some trivial type hints to `mercurial/match.py` These were new methods since hg 3dbc7b1ecaba, but surprisingly pytype couldn't figure them out.
Wed, 10 Jul 2024 17:44:49 -0400 typing: add a type hint to `mercurial/hg.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 17:44:49 -0400] rev 51674
typing: add a type hint to `mercurial/hg.py` Somewhere between hg 3dbc7b1ecaba and hg 8e3f6b5bf720, the first value of the tuple changed from bytes to str. Let's lock this in, so that pytype flags it if someone mistakenly adds a tuple with bytes somewhere.
Wed, 10 Jul 2024 17:37:35 -0400 typing: restore `encoding.encoding` and `encoding.encodingmode` to bytes
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 17:37:35 -0400] rev 51673
typing: restore `encoding.encoding` and `encoding.encodingmode` to bytes Somewhere between hg 3dbc7b1ecaba and hg 8e3f6b5bf720, pytype determined the signature of these fields changed from `bytes` to `Any`. Not sure why- the type of `environ` then and now is: `Union[WindowsEnviron, Dict[bytes, bytes], os._Environ[bytes]]` That said, PyCharm wasn't able to figure out the type of `environ`, and the `WindowsEnviron` class extends `MutableMapping` without specifying bytes for the key and value types in py3.9. But that's not changed in my setup, so I can't explain it.
Wed, 10 Jul 2024 17:16:19 -0400 typing: add some trivial type hints to `mercurial/bundlecaches.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 17:16:19 -0400] rev 51672
typing: add some trivial type hints to `mercurial/bundlecaches.py` The function is meant for extensions, but it wasn't obvious what was expected without looking through the code. Also, pytype couldn't figure it out either.
Wed, 10 Jul 2024 17:09:34 -0400 typing: add some type hints for bundle2 capabilities
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 17:09:34 -0400] rev 51671
typing: add some type hints for bundle2 capabilities Somewhere between hg 3dbc7b1ecaba and hg 8e3f6b5bf720, pytype determined the signature of `bundle20.capabilities` changed from `Dict[bytes, Tuple[bytes]]` to `Dict[bytes, Union[List[bytes], Tuple[bytes]]]`. First, I did try to simply be explicit about the previously inferred type, but it does seem to mix and match list/tuple now (e.g. in `writenewbundle()`). I tried changing the new list usage to tuple, but a couple of things complained, (and I think lists of one item are a little more clear to read anyway). So then I typed the dict value as `Sequence[bytes]`, which worked fine. But there's also a module level `capabilities` field, and when that's typed, pytype complains about `Sequence[bytes]` lacking `__add__`[1]. So I gave up, and just assigned it the type it wanted, with an alias. If somebody feels motivated to make the type consistent, it's simple enough to change the alias. The mutable default value to the constructor was removed to appease PyCharm's type checking on the field. (I didn't bother running the code through pytype prior to changing it, because we've previously made an effort to remove this pattern anyway.) I'm not sure why `getrepocaps()` has a default value for `role` that apparently raises an exception. It's just flagged for now so this series can land without risking additional problems. [1] https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/2466903
Wed, 10 Jul 2024 16:04:53 -0400 typing: add a few type hints to `mercurial/utils/urlutil.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 16:04:53 -0400] rev 51670
typing: add a few type hints to `mercurial/utils/urlutil.py` Somewhere between hg 3dbc7b1ecaba and hg 8e3f6b5bf720, `_pathsuboptions` changed from `Dict[bytes, Tuple[bytes, Any]]` to `Dict[bytes, Tuple[str, Any]]`, and it caught my attention from diffing the local *.pyi files. The change is correct based on the assertion, so let's get pytype to check for this instead of relying on the assertion alone.
Wed, 10 Jul 2024 15:49:16 -0400 typing: add type hints to `mercurial/utils/resourceutil.py`
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Jul 2024 15:49:16 -0400] rev 51669
typing: add type hints to `mercurial/utils/resourceutil.py` The `except` path requires byte args (because of the byte based manipulation in `_package_path()`), while the `else` case tolerates `AnyStr`. Pytype was unable to figure this out, and we should make sure the interface is the same for all environments.
Fri, 12 Jul 2024 15:29:35 +0400 copyright: update to 2024 stable
Anton Shestakov <av6@dwimlabs.net> [Fri, 12 Jul 2024 15:29:35 +0400] rev 51668
copyright: update to 2024
Mon, 08 Jul 2024 17:56:54 +0200 branching: merge stable into default for 6.9 cycle
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:56:54 +0200] rev 51666
branching: merge stable into default for 6.9 cycle
Mon, 08 Jul 2024 17:52:08 +0200 Added signature for changeset 11f41248595b stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:52:08 +0200] rev 51665
Added signature for changeset 11f41248595b
Mon, 08 Jul 2024 17:51:56 +0200 Added tag 6.8 for changeset 11f41248595b stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:51:56 +0200] rev 51664
Added tag 6.8 for changeset 11f41248595b
Mon, 08 Jul 2024 17:51:04 +0200 relnotes: add 6.8 stable 6.8
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 17:51:04 +0200] rev 51663
relnotes: add 6.8
Mon, 08 Jul 2024 16:44:07 +0200 test-check: don't report distutils as a local import stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Jul 2024 16:44:07 +0200] rev 51662
test-check: don't report distutils as a local import On python 3.12 this is wrongly reported as a local import. So we adjust the checker to avoid it.
Mon, 08 Jul 2024 16:20:04 +0200 Backed out changeset f28c52a9f7b4 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 16:20:04 +0200] rev 51661
Backed out changeset f28c52a9f7b4 This backout and the previous are due to a large performance regression detected in repositories with a lot of obsmarkers when performing a clone. A better fix will come along at the start of the next cycle.
Mon, 08 Jul 2024 16:19:33 +0200 Backed out changeset ff523675cd69 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 16:19:33 +0200] rev 51660
Backed out changeset ff523675cd69
Mon, 08 Jul 2024 16:02:54 +0200 rust: use `cpython` 0.7.2 crate to add support for Python 3.12 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2024 16:02:54 +0200] rev 51659
rust: use `cpython` 0.7.2 crate to add support for Python 3.12 This will give us more headroom until we can migrate to PyO3 some day.
Mon, 08 Jul 2024 15:52:01 +0200 revbranchcache: disable mmap access by default stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Jul 2024 15:52:01 +0200] rev 51658
revbranchcache: disable mmap access by default The revbranchcache can be truncated (if some part of it is detected as invalid). Using mmap on file we truncate is not an option at access to truncated part would result in a SIGBUS signal. So we disable the mmap by default until we fix this issue.
Mon, 24 Jun 2024 18:54:59 +0200 portability: fix build on Solaris-derived systemd stable
Joerg Sonnenberger <joerg@bec.de> [Mon, 24 Jun 2024 18:54:59 +0200] rev 51657
portability: fix build on Solaris-derived systemd Current Illumos and older Solaris require _XOPEN_SOURCE for msg_control. O_DIRECTORY doesn't exist on older systems either, so fallback to O_RDONLY. It's good enough as a repository will require both R and X permission anyway.
Wed, 03 Jul 2024 12:32:57 +0200 mmap: only use mmap to read revlog persistent nodemap if it is safe stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Jul 2024 12:32:57 +0200] rev 51656
mmap: only use mmap to read revlog persistent nodemap if it is safe Cf `is_mmap_safe` docstring.
Wed, 03 Jul 2024 12:47:08 +0200 mmap: fix another instance of reverse mmap logic in persistent nodemap stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Jul 2024 12:47:08 +0200] rev 51655
mmap: fix another instance of reverse mmap logic in persistent nodemap This fix the same kind of issue as 85d96517e650
Wed, 03 Jul 2024 12:31:21 +0200 mmap: only use mmap to read rev-branch-cache data if it is safe stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Jul 2024 12:31:21 +0200] rev 51654
mmap: only use mmap to read rev-branch-cache data if it is safe Cf `is_mmap_safe` docstring.
Wed, 03 Jul 2024 12:26:57 +0200 mmap: only use mmap to read revlog index if it is safe stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Jul 2024 12:26:57 +0200] rev 51653
mmap: only use mmap to read revlog index if it is safe Cf `is_mmap_safe` docstring.
Wed, 03 Jul 2024 12:22:48 +0200 mmap: add a `is_mmap_safe` method to vfs stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Jul 2024 12:22:48 +0200] rev 51652
mmap: add a `is_mmap_safe` method to vfs This will be useful to safeguard mmap usage to void SIGBUS when repositories lives on a NFS drive.
Mon, 24 Jun 2024 13:15:46 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 24 Jun 2024 13:15:46 +0200] rev 51651
branching: merge stable into default
Mon, 24 Jun 2024 13:14:05 +0200 Added signature for changeset 6454c117c6a4 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 24 Jun 2024 13:14:05 +0200] rev 51650
Added signature for changeset 6454c117c6a4
Mon, 24 Jun 2024 13:14:04 +0200 Added tag 6.8rc0 for changeset 6454c117c6a4 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 24 Jun 2024 13:14:04 +0200] rev 51649
Added tag 6.8rc0 for changeset 6454c117c6a4
Mon, 24 Jun 2024 12:05:31 +0200 branching: merge default into stable for 6.8rc0 stable 6.8rc0
Raphaël Gomès <rgomes@octobus.net> [Mon, 24 Jun 2024 12:05:31 +0200] rev 51648
branching: merge default into stable for 6.8rc0
Mon, 24 Jun 2024 12:04:14 +0200 relnotes: add 6.8rc0
Raphaël Gomès <rgomes@octobus.net> [Mon, 24 Jun 2024 12:04:14 +0200] rev 51647
relnotes: add 6.8rc0
Mon, 24 Jun 2024 10:52:46 +0200 branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net> [Mon, 24 Jun 2024 10:52:46 +0200] rev 51646
branch3: use an explicitely experimental name for files Since this format is still experimental, we don't want to have to side-step the `branch3` name in case people do start using it before it's stable.
Mon, 24 Jun 2024 03:16:52 +0200 obsolete: simplify relevantmarker
Joerg Sonnenberger <joerg@bec.de> [Mon, 24 Jun 2024 03:16:52 +0200] rev 51645
obsolete: simplify relevantmarker Drop duplicate assignment from a merge failure. Save one loop iteration by exploiting that pendingnodes will be seennodes after the first round anyway, so just pre-initialize the set accordingly. From Anton Shestakov's review on !867. Performance difference for my test case is in the noise.
Tue, 11 Jun 2024 18:47:50 +0200 exchange: improve computation of relevant markers for large repos
Joerg Sonnenberger <joerg@bec.de> [Tue, 11 Jun 2024 18:47:50 +0200] rev 51644
exchange: improve computation of relevant markers for large repos Find the candidates for nodes with relevant markers by going over all markers instead of iterating over all nodes. Most nodes will not have markers anyway. Further optimize the code by allowing revsets as well, which reduces the materialization cost.
Thu, 13 Jun 2024 09:52:39 +0200 test: better glob some timing related line to avoid flakiness stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 13 Jun 2024 09:52:39 +0200] rev 51643
test: better glob some timing related line to avoid flakiness If we go over 10 seconds, the number of white space changes.
Wed, 12 Jun 2024 11:29:11 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Jun 2024 11:29:11 +0200] rev 51642
branching: merge stable into default
Wed, 12 Jun 2024 11:27:01 +0200 Added signature for changeset a1a011d4b148 stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Jun 2024 11:27:01 +0200] rev 51641
Added signature for changeset a1a011d4b148
Wed, 12 Jun 2024 11:26:57 +0200 Added tag 6.7.4 for changeset a1a011d4b148 stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Jun 2024 11:26:57 +0200] rev 51640
Added tag 6.7.4 for changeset a1a011d4b148
Wed, 12 Jun 2024 11:25:49 +0200 relnotes: add 6.7.4 and warn about 6.7.{1,2,3} stable 6.7.4
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Jun 2024 11:25:49 +0200] rev 51639
relnotes: add 6.7.4 and warn about 6.7.{1,2,3}
Wed, 12 Jun 2024 02:16:14 +0200 inline-changelog: fix pending transaction visibility when splitting stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jun 2024 02:16:14 +0200] rev 51638
inline-changelog: fix pending transaction visibility when splitting We move the name back to the expected name of `changelog.i.a`.
Wed, 12 Jun 2024 02:15:20 +0200 inline-changelog: fix a critical bug in write_pending that delete data stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jun 2024 02:15:20 +0200] rev 51637
inline-changelog: fix a critical bug in write_pending that delete data Since a93e52f0b6ff we no longer use inline-revlog for the changelog. The goal there was to solve the lack of testing for the two variants (inline vs split) and reduce the complexity of the interaction with "diverted-write" on the changelog level. However many existing repository still have inline-changelog and we automatically move them to normal revlog as soon as we have the chances. Unfortunately This conversion is buggy and can result in the destruction of the changelog.i if hook triggers the "write pending" mechanism. The bugs comes from the "revlog splitting" logic and the "write_pending" logic stepping over each other. Ironically the change in a93e52f0b6ff aims at no longer having this kind of problem. This changesets fix this issue and add associated tests. Fixing this reveal that the transaction hooks end up not seeing the pending transaction content, because the name is not right ("changelog.i.s.a" instead of "changelog.i.s") we fix this in the next changeset.
Tue, 11 Jun 2024 03:05:20 +0200 bookmark: fix remote bookmark deletion when the push is raced stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Jun 2024 03:05:20 +0200] rev 51636
bookmark: fix remote bookmark deletion when the push is raced Before this patch, running `hg push -B book` to push the `book` bookmark sideway at the same time as a commit making it moving forward might result in the removal of the bookmark remotely. After this changeset, the push can still be raced, but to remove deletion happens. This is progress.
Tue, 11 Jun 2024 03:03:47 +0200 hooks: add a prewlock and a prelock hooks stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Jun 2024 03:03:47 +0200] rev 51635
hooks: add a prewlock and a prelock hooks This is useful for testing.
Tue, 11 Jun 2024 11:14:13 +0200 exchange: fix locking to actually be scoped stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Jun 2024 11:14:13 +0200] rev 51634
exchange: fix locking to actually be scoped The previous code was taking locks before entering with statements, so exception before the with statement would not release the lock (except for garbage collection). We need to move to a try except here because the logic is more complicated.
Tue, 11 Jun 2024 11:13:36 +0200 exchange: fix locking to actually be scoped stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Jun 2024 11:13:36 +0200] rev 51633
exchange: fix locking to actually be scoped The previous code was taking locks before entering with statements, so exception before the with statement would not release the lock (except for garbage collection).
Wed, 06 Sep 2023 18:23:32 +0200 narrow: add a test for linkrev computation done during widen
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Sep 2023 18:23:32 +0200] rev 51632
narrow: add a test for linkrev computation done during widen This new tests show that the linkrev computed and sent by the server might end up being wrong during a widen operation.
Mon, 10 Jun 2024 13:45:57 +0200 obsolete: quote the feature name
Joerg Sonnenberger <joerg@bec.de> [Mon, 10 Jun 2024 13:45:57 +0200] rev 51631
obsolete: quote the feature name This makes it at least somewhat clearer that hg is talking about some specific feature and not just outdated code.
Mon, 10 Jun 2024 12:12:56 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jun 2024 12:12:56 +0200] rev 51630
branching: merge stable into default
Mon, 10 Jun 2024 10:59:44 +0200 rust-status: sort the failed matches when printing them stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 10 Jun 2024 10:59:44 +0200] rev 51629
rust-status: sort the failed matches when printing them This was making the tests flaky after the recent patch¹ that opened up more of the code to the Rust-augmented status. [1] 865efc020c3355dca1cbaa35db80600009c01dd5
Thu, 23 May 2024 11:05:11 +0200 clonebundles: add missing newline to legacy response
Julien Cristau <jcristau@mozilla.com> [Thu, 23 May 2024 11:05:11 +0200] rev 51628
clonebundles: add missing newline to legacy response This seems to have been removed in 6.5 (likely by 60f9602b413e).
Tue, 07 May 2024 15:15:41 +0400 chistedit: change action for the correct item stable
Anton Shestakov <av6@dwimlabs.net> [Tue, 07 May 2024 15:15:41 +0400] rev 51627
chistedit: change action for the correct item We have an experimental config histedit.later-commits-first from c820866c52f9, and when it's true, the order of commits in histedit UI is reversed, both in text mode and in curses mode. But before this patch key presses in curses mode would change histedit actions in the same old order, i.e. trying to edit the latest commit (which would be first now) would put "edit" action on the last commit in the list. This wasn't a cosmetic issue, histedit would actually proceed to edit the first commit in the list. Let's map rules to display items (hopefully now correctly).
Fri, 26 Apr 2024 19:10:35 +0100 dirstate: remove the python-side whitelist of allowed matchers
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 26 Apr 2024 19:10:35 +0100] rev 51626
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
Fri, 26 Apr 2024 18:53:02 +0100 match: make `was_tampered_with` work recursively
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 26 Apr 2024 18:53:02 +0100] rev 51625
match: make `was_tampered_with` work recursively This is useful if we are to use it outside of Rust, when deciding whether or not to do some fast-path operation with a given matcher.
Fri, 26 Apr 2024 19:43:42 +0100 largefiles: mark more matchers as having been tampered with
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 26 Apr 2024 19:43:42 +0100] rev 51624
largefiles: mark more matchers as having been tampered with These happened to slip through the cracks earlier because they weren't caught by tests. Now that we're enabling rust fast path more widely these start breaking.
Mon, 06 May 2024 18:50:21 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 18:50:21 +0200] rev 51623
branching: merge stable into default
Mon, 06 May 2024 18:48:37 +0200 Added signature for changeset 028dc3f92dbd stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 18:48:37 +0200] rev 51622
Added signature for changeset 028dc3f92dbd
Mon, 06 May 2024 18:48:34 +0200 Added tag 6.7.3 for changeset 028dc3f92dbd stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 18:48:34 +0200] rev 51621
Added tag 6.7.3 for changeset 028dc3f92dbd
Mon, 06 May 2024 17:51:21 +0200 relnotes: add 6.7.3 stable 6.7.3
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 17:51:21 +0200] rev 51620
relnotes: add 6.7.3
Mon, 22 Apr 2024 19:47:08 +0200 rust: blanket implementation of Graph for Graph references stable
Georges Racinet <georges.racinet@octobus.net> [Mon, 22 Apr 2024 19:47:08 +0200] rev 51619
rust: blanket implementation of Graph for Graph references The need comes from the fact that `AncestorsIterator` and many Graph-related algorithms take ownership of the `Graph` they work with. This, in turn is due to them needing to accept the `Index` instances that are provided by the Python layers (that neither rhg nor `RHGitaly` use, of course): the fact that nowadays the Python layer holds an object that is itself implemented in Rust does not change the core problem that they cannot be tracked by the borrow checker. Even though it looks like cloning `Changelog` would be cheap, it seems hard to guarantee that on the long run. The object is already too rich for us to be comfortable with it, when using references is the most natural and guaranteed way of proceeding. The added test seems a bit superfleous, but it will act as a reminder that this feature is really useful until something in the Mercurial code base actually uses it.
Mon, 06 May 2024 15:30:21 +0200 rust-cpython: don't swallow the dirstate error message stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 15:30:21 +0200] rev 51618
rust-cpython: don't swallow the dirstate error message In case we do get a dirstate error, we want to get the full error message and not just an opaque `Dirstate error`.
Mon, 06 May 2024 13:07:02 +0200 dirstate-v2: check that root nodes are at the root before writing stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 13:07:02 +0200] rev 51617
dirstate-v2: check that root nodes are at the root before writing More explanations in the previous changeset.
Mon, 06 May 2024 13:02:52 +0200 dirstate-v2: add check of parent/child nodes being related when writing stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 13:02:52 +0200] rev 51616
dirstate-v2: add check of parent/child nodes being related when writing This stems from a corruption seen in a private repository. We're not sure of the source of the corruption, and it's very possible that we're seeing compounded effects of multiple writes on a corrupted dirstate. Adding this check is not expensive in itself and large writes of the dirstate are not common. This change does not catch this problem at the root node, the next one will.
Mon, 06 May 2024 16:29:00 +0200 admin-verify: expect a number of errors to be returned stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 16:29:00 +0200] rev 51615
admin-verify: expect a number of errors to be returned It's the responsibility of the check to handle errors, we only care about the total count to sum up the check's work. We use `admin::verify -c dirstate` to test this path at least somewhat.
Mon, 06 May 2024 16:16:15 +0200 admin-verify: fix error message handling stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 16:16:15 +0200] rev 51614
admin-verify: fix error message handling `dirstate.verify` used to return tuples but does not anymore, it returns the pre-formatted error message, which is a nicer interface anyway.
Mon, 06 May 2024 12:31:29 +0200 admin-verify: pass p1 down to the dirstate function stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 12:31:29 +0200] rev 51613
admin-verify: pass p1 down to the dirstate function This was forgotten and can break with certain kinds of corruption.
Mon, 06 May 2024 11:27:29 +0200 Backed out changeset 3e0f86f09f26 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 11:27:29 +0200] rev 51612
Backed out changeset 3e0f86f09f26
Mon, 06 May 2024 11:26:52 +0200 Backed out changeset fc317bd5b637 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 May 2024 11:26:52 +0200] rev 51611
Backed out changeset fc317bd5b637
Thu, 02 May 2024 02:20:42 +0200 re2: make errors quiet stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 May 2024 02:20:42 +0200] rev 51610
re2: make errors quiet By default, the re2 library will output error on its own instead of keeping the error in an exception. This make re2 printing spurious error before fallback to the stdlib remodule that may accept the pattern or also fails to parse it and raise a proper error that will be handled by Mercurial. So we also pass an Option object that changes this default.
Thu, 02 May 2024 08:46:58 +0200 fold-or-prune-me: update proposal stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 May 2024 08:46:58 +0200] rev 51609
fold-or-prune-me: update proposal This does the same things but with a narrower wrapping.
Sun, 31 Mar 2024 17:57:46 -0300 subrepo: propagate non-default path on outgoing stable
Felipe Resende <felipe@fcresende.dev.br> [Sun, 31 Mar 2024 17:57:46 -0300] rev 51608
subrepo: propagate non-default path on outgoing There was already a fix made in 5dbff89cf107 for pull and push commands. I did the same for the outgoing command. The problem I identified is that when the parent repository has multiple paths, the outgoing command was not respecting the parent path used and was always using the default path for subrepositories.
Tue, 26 Mar 2024 01:27:27 -0400 hgrc: search XDG_CONFIG_HOME on mac
Hraban Luyat <hraban@0brg.net> [Tue, 26 Mar 2024 01:27:27 -0400] rev 51607
hgrc: search XDG_CONFIG_HOME on mac Searching for hgrc was special cased not to look through ~/.config/hg on Mac, but that’s unnecessary: Macs support it as do other unix based systems. There are plenty tools that use it there, e.g. git, and people expect it to work, e.g. "https://stackoverflow.com/questions/72499837/mercurial-on-macos-doesnt-read-config-hg-hgrc". Initial code introduced in 354020079723.
Tue, 16 Apr 2024 09:51:11 +0200 base-revsets: use an author that actually exercises a lot of changesets
Raphaël Gomès <rgomes@octobus.net> [Tue, 16 Apr 2024 09:51:11 +0200] rev 51606
base-revsets: use an author that actually exercises a lot of changesets This was caught in my big find-and-replace: d4ba4d51f85f. The point of `base-revsets` is to give revsets that will give a good coverage of the repository. Using Pierre-Yves as the second largest committer (in terms of number of changesets) seems like a good idea.
Tue, 16 Apr 2024 17:21:37 +0100 match: simplify the rust-side file pattern kind parsing
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 16 Apr 2024 17:21:37 +0100] rev 51605
match: simplify the rust-side file pattern kind parsing There's no need to add the ':' characters if we're simply pattern matching against constants next.
Tue, 16 Apr 2024 13:51:45 +0100 match: share code between includematcher and patternmatcher
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 16 Apr 2024 13:51:45 +0100] rev 51604
match: share code between includematcher and patternmatcher No need to have this duplication.
Fri, 05 Apr 2024 17:57:26 +0100 matchers: support patternmatcher in rust
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 05 Apr 2024 17:57:26 +0100] rev 51603
matchers: support patternmatcher in rust
Tue, 09 Apr 2024 11:12:24 +0100 match: avoid rust fast path if the matcher was tampered with
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 09 Apr 2024 11:12:24 +0100] rev 51602
match: avoid rust fast path if the matcher was tampered with Otherwise the fast path does not respect the modifications made by the extension (concretely largefiles, but other extensions can start using that too)
Tue, 09 Apr 2024 11:00:52 +0100 largefiles: track if a matcher was tampered with
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 09 Apr 2024 11:00:52 +0100] rev 51601
largefiles: track if a matcher was tampered with This is used to make sure rust fast path is not taken for the modified matchers.
Wed, 17 Apr 2024 12:28:48 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 17 Apr 2024 12:28:48 +0200] rev 51600
branching: merge stable into default
Wed, 13 Mar 2024 12:02:06 +0100 tags-cache: directly perform a monimal walk for hgtagsfnodescache warming
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Mar 2024 12:02:06 +0100] rev 51599
tags-cache: directly perform a monimal walk for hgtagsfnodescache warming We do something narrower than the path retrieving data. So lets use dedicated code instead. This provides further useful speedup: ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.debug.debug-update-cache # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.pre-state = warm before-this-series: 19.947581 skip-fnode-filter: 18.916804 (-5.17%, -1.03) use-rev-num: 17.493725 (-12.30%, -2.45) this-changesets: 15.919466 (-20.19%, -4.03)
Wed, 13 Mar 2024 11:51:11 +0100 tags-cache: directly operate on rev-num warming hgtagsfnodescache
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Mar 2024 11:51:11 +0100] rev 51598
tags-cache: directly operate on rev-num warming hgtagsfnodescache Not having to goes through nodeid speed up things notably. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.debug.debug-update-cache # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.pre-state = warm before-this-series: 19.947581 before-this-changes: 18.916804 (-5.17%, -1.03) this-changesets: 17.493725 (-12.30%, -2.45)
Wed, 13 Mar 2024 11:38:28 +0100 tags-cache: skip the filternode step if we are not going to use it
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Mar 2024 11:38:28 +0100] rev 51597
tags-cache: skip the filternode step if we are not going to use it When warming the hgtagsfnodescache, we don't need the actual result, so we can simply skip the part that "filter" fnode we read from the cache. So provide a quite visible speed up to the top level `hg debugupdatecache` function. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.debug.debug-update-cache # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.pre-state = warm before: 19.947581 after: 18.916804 (-5.17%, -1.03)
Wed, 13 Mar 2024 11:34:21 +0100 tags-cache: add a dedicated warm cache function to hgtagsfnodescache
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Mar 2024 11:34:21 +0100] rev 51596
tags-cache: add a dedicated warm cache function to hgtagsfnodescache Having a dedicated API point will help to optimize that specific usage. Right doing a full phases weam takes a long time, even when the cache is already filled.
Tue, 09 Apr 2024 22:37:15 +0200 outgoing: add a simple fastpath when there is no common
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 22:37:15 +0200] rev 51595
outgoing: add a simple fastpath when there is no common This further speed up case like `hg bundle --all` for larger repository. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.command.bundle # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.revs = all # benchmark.variants.type = none-streamv2 before: 316.749699 after: 311.165461 (-1.76%, -5.58) There is further work to be done in this area like not doing any outgoing computation in the stream case for example. however the recent changes already gives use a large win for a small amount of local work. ### benchmark.name = hg.command.bundle # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.revs = all # benchmark.variants.type = none-streamv2 ## data-env-vars.name = mercurial-public-2024-03-22-zstd-sparse-revlog pre-%ln-change: 1.263859 the-%ln-change: 0.700229 (-44.60%, -0.56) prev-changeset: 0.496050 (-60.75%, -0.77) this-changeset: 0.495243 (-60.81%, -0.77) ## data-env-vars.name = tryton-public-2024-03-22-zstd-sparse-revlog pre-%ln-change: 2.975765 the-%ln-change: 1.870798 (-37.13%, -1.10) prev-changeset: 1.461583 (-50.88%, -1.51) this-changeset: 1.469185 (-50.63%, -1.51) ## data-env-vars.name = pypy-2024-03-22-zstd-sparse-revlog pre-%ln-change: 4.540080 the-%ln-change: 3.401700 (-25.07%, -1.14) prev-changeset: 2.915810 (-35.78%, -1.62) this-changeset: 2.911643 (-35.87%, -1.63) ## data-env-vars.name = heptapod-public-2024-03-25-zstd-sparse-revlog pre-%ln-change: 10.138396 the-%ln-change: 7.750458 (-23.55%, -2.39) prev-changeset: 6.665565 (-34.25%, -3.47) this-changeset: 6.672078 (-34.19%, -3.47) ## data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog pre-%ln-change: 399.484481 the-%ln-change: 346.508952 (-13.26%, -52.98) prev-changeset: 316.749699 (-20.71%, -82.73) this-changeset: 311.165461 (-22.11%, -88.32)
Tue, 09 Apr 2024 22:36:35 +0200 outgoing: rework the handling of the `missingroots` case to be faster
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 22:36:35 +0200] rev 51594
outgoing: rework the handling of the `missingroots` case to be faster The previous implementation was slow, to the point it was taking a significant amount of `hg bundle --type none-streamv2` call. We rework the code to compute the same value much faster, making the operation disappear from the `hg bundle --type none-streamv2` profile. Someone would remark that producing a streamclone does not requires an `outgoing` object. However that is a matter for another day. There is other user of `missingroots` (non stream `hg bundle` call for example), and they will also benefit from this rework. We implement an old TODO in the process, directly computing the missing and common attribute as we have most element at hand already. ### benchmark.name = hg.command.bundle # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.revs = all # benchmark.variants.type = none-streamv2 ## data-env-vars.name = heptapod-public-2024-03-25-zstd-sparse-revlog before: 7.750458 after: 6.665565 (-14.00%, -1.08) ## data-env-vars.name = mercurial-public-2024-03-22-zstd-sparse-revlog before: 0.700229 after: 0.496050 (-29.16%, -0.20) ## data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog before: 346.508952 after: 316.749699 (-8.59%, -29.76) ## data-env-vars.name = pypy-2024-03-22-zstd-sparse-revlog before: 3.401700 after: 2.915810 (-14.28%, -0.49) ## data-env-vars.name = tryton-public-2024-03-22-zstd-sparse-revlog before: 1.870798 after: 1.461583 (-21.87%, -0.41) note: this whole `missingroots` of outgoing has a limited number of callers and could likely be replace by something simpler (like taking an explicit "missing_revs" set for example). However this is a wider change and we focus on a small impact, quick rework that does not change the API for now.
Sun, 14 Apr 2024 02:27:10 +0200 proxy-vfs: also proxy the `audit` attribute
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 14 Apr 2024 02:27:10 +0200] rev 51593
proxy-vfs: also proxy the `audit` attribute In the previous changeset, we had to do a little dance to access the useful `audit` attribute. We now provide a proper accessors to it. We don't update the code in `perf.py` because it has to remain compatible with older version of Mercurial. This will just be nicer in the future.
Sat, 13 Apr 2024 23:40:28 +0200 perf: clear vfs audit_cache before each run
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 13 Apr 2024 23:40:28 +0200] rev 51592
perf: clear vfs audit_cache before each run When generating a stream clone, we spend a large amount of time auditing path. Before this changes, the first run was warming the vfs cache for the other runs, leading to a large runtime difference and a "faulty" reported timing for the operation. We now clear this important cache between run to get a more realistic timing. Below are some example of median time change when clearing these cases. The maximum time for a run did not changed significantly. ### data-env-vars.name = mozilla-central-2018-08-01-zstd-sparse-revlog # benchmark.name = hg.perf.exchange.stream.generate # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.version = latest no-clearing: 17.289905 cache-clearing: 21.587965 (+24.86%, +4.30) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog no-clearing: 32.670748 cache-clearing: 40.467095 (+23.86%, +7.80) ## data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog no-clearing: 37.838858 cache-clearing: 46.072749 (+21.76%, +8.23) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog no-clearing: 32.969395 cache-clearing: 39.646209 (+20.25%, +6.68) In addition, this significantly reduce the timing difference between the performance command, from the perf extensions and a `real `hg bundle` call producing a stream bundle. Some significant differences remain especially on the "mozilla-try" repositories, but they are now smaller. Note that some of that difference will actually not be attributable to the stream generation (like maybe phases or branch map computation). Below are some benchmarks done on a currently draft changeset fixing some unrelated slowness in `hg bundle` (34a78972af409d1ff37c29e60f6ca811ad1a457d) ### data-env-vars.name = mozilla-central-2018-08-01-zstd-sparse-revlog # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default hg.perf.exchange.stream.generate: 21.587965 hg.command.bundle: 24.301799 (+12.57%, +2.71) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog hg.perf.exchange.stream.generate: 40.467095 hg.command.bundle: 44.831317 (+10.78%, +4.36) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog hg.perf.exchange.stream.generate: 39.646209 hg.command.bundle: 45.395258 (+14.50%, +5.75) ## data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog hg.perf.exchange.stream.generate: 46.072749 hg.command.bundle: 55.882608 (+21.29%, +9.81) ## data-env-vars.name = mozilla-try-2023-03-22-zlib-general-delta hg.perf.exchange.stream.generate: 334.716708 hg.command.bundle: 377.856767 (+12.89%, +43.14) ## data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog hg.perf.exchange.stream.generate: 302.972301 hg.command.bundle: 326.098755 (+7.63%, +23.13)
Sun, 14 Apr 2024 02:41:36 +0200 perf: start recording total time after warming
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 14 Apr 2024 02:41:36 +0200] rev 51591
perf: start recording total time after warming The warming might be costly and this should not affect the "time profile" of the actual collection.
Sun, 14 Apr 2024 02:40:15 +0200 perf: run the gc before each run
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 14 Apr 2024 02:40:15 +0200] rev 51590
perf: run the gc before each run The python garbage collector is a large source of performance troubles, we run it right before the timed section to reduce the change for the gc to add noise to the benchmark.
Sun, 14 Apr 2024 02:38:41 +0200 perf: allow profiling of more than one run
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 14 Apr 2024 02:38:41 +0200] rev 51589
perf: allow profiling of more than one run By default, we still profile the first run only. However profiling more run help to understand side effect from one run to the other. So we add an option to be able to do so.
Sun, 14 Apr 2024 02:36:55 +0200 profiler: flush after writing the profiler output
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 14 Apr 2024 02:36:55 +0200] rev 51588
profiler: flush after writing the profiler output Otherwise, the profiler output might only partially appears until the next flush of the buffer. Since profiling often happens for long operation, the next flush can be a long time away.
Sun, 14 Apr 2024 02:33:36 +0200 stream-clone: disable gc for the entry listing section for the v2 format
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 14 Apr 2024 02:33:36 +0200] rev 51587
stream-clone: disable gc for the entry listing section for the v2 format This is similar to the change we did for the v3 format in 6e4c8366c5ce. The benchmark bellow show this gives us a notable gains, especially on larger repositories. ### benchmark.name = hg.perf.stream-locked-section # benchmark.name = hg.perf.stream-locked-section # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.version = v2 ## data-env-vars.name = pypy-2018-08-01-zstd-sparse-revlog 5e931bf8707c: 0.503820 ~~~~~ 1106d1bf695e: 0.470078 (-6.70%, -0.03) ## data-env-vars.name = pypy-2024-03-22-zstd-sparse-revlog 5e931bf8707c: 0.535756 ~~~~~ 1106d1bf695e: 0.490249 (-8.49%, -0.05) ## data-env-vars.name = heptapod-public-2024-03-25-zstd-sparse-revlog 5e931bf8707c: 1.327041 ~~~~~ 1106d1bf695e: 1.174636 (-11.48%, -0.15) ## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog 5e931bf8707c: 2.439158 ~~~~~ 1106d1bf695e: 2.220515 (-8.96%, -0.22) ## data-env-vars.name = netbeans-2019-11-07-zstd-sparse-revlog 5e931bf8707c: 2.630794 ~~~~~ 1106d1bf695e: 2.261473 (-14.04%, -0.37) ## data-env-vars.name = mozilla-central-2018-08-01-zstd-sparse-revlog 5e931bf8707c: 5.769002 ~~~~~ 1106d1bf695e: 5.062000 (-12.26%, -0.71) ## data-env-vars.name = mozilla-try-2019-02-18-zstd-sparse-revlog 5e931bf8707c: 13.351750 ~~~~~ 1106d1bf695e: 12.346655 (-7.53%, -1.01) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog 5e931bf8707c: 10.772939 ~~~~~ 1106d1bf695e: 9.495407 (-11.86%, -1.28) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog 5e931bf8707c: 10.864297 ~~~~~ 1106d1bf695e: 9.475597 (-12.78%, -1.39) ## data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog 5e931bf8707c: 17.448335 ~~~~~ 1106d1bf695e: 16.027474 (-8.14%, -1.42)
Tue, 09 Apr 2024 02:54:19 +0200 phases: rework the logic of _pushdiscoveryphase to bound complexity
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 02:54:19 +0200] rev 51586
phases: rework the logic of _pushdiscoveryphase to bound complexity This rework the various graph traversal in _pushdiscoveryphase to keep the complexity in check. This is done though a couple of things: - first, limiting the space we have to explore, for example, if we are not in publishing push, we don't need to consider remote draft roots that are also draft locally, as there is nothing to be moved there. - avoid unbounded descendant computation, and use the faster "rev between" computation. This provide a massive boost to performance when exchanging with repository with a massive amount of draft, like mozilla-try: ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.command.push # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.explicit-rev = all-out-heads # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = default ## benchmark.variants.revs = any-1-extra-rev before: 20.346590 seconds after: 11.232059 seconds (-38.15%, -7.48 seconds) ## benchmark.variants.revs = any-100-extra-rev before: 24.752051 seconds after: 15.367412 seconds (-37.91%, -9.38 seconds) After this changes, the push operation is still quite too slow. Some of this can be attributed to general phases slowness (reading all the roots from disk for example) and other know slowness (not using persistent-nodemap, branchmap, tags, etc. We are also working on them, but with this series, phase discovery during push no longer showing up in profile and this is a pretty nice and bit low-hanging fruit out of the way. ### (same case as the above) # benchmark.variants.revs = any-1-extra-rev pre-%ln-change: 44.235070 this-changeset: 11.232059 seconds (-74.61%, -33.00 seconds) # benchmark.variants.revs = any-100-extra-rev pre-%ln-change: 49.234697 this-changeset: 15.367412 seconds (-68.79%, -33.87 seconds) Note that with this change, the `hg push` performance is now much closer to the `hg pull` performance, even it still lagging behind a bit. (and the overall performance are still too slow). ### data-env-vars.name = mozilla-try-2023-03-22-ds2-pnm # benchmark.variants.explicit-rev = all-out-heads # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.pulled-delta-reuse-policy = default # bin-env-vars.hg.flavor = rust ## benchmark.variants.revs = any-1-extra-rev hg.command.pull: 6.517450 hg.command.push: 11.219888 ## benchmark.variants.revs = any-100-extra-rev hg.command.pull: 10.160991 hg.command.push: 14.251107 ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # bin-env-vars.hg.py-re2-module = default # benchmark.variants.explicit-rev = all-out-heads # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.pulled-delta-reuse-policy = default ## bin-env-vars.hg.flavor = default ## benchmark.variants.revs = any-1-extra-rev hg.command.pull: 8.577772 hg.command.push: 11.232059 ## bin-env-vars.hg.flavor = default ## benchmark.variants.revs = any-100-extra-rev hg.command.pull: 13.152976 hg.command.push: 15.367412 ## bin-env-vars.hg.flavor = rust ## benchmark.variants.revs = any-1-extra-rev hg.command.pull: 8.731982 hg.command.push: 11.178751 ## bin-env-vars.hg.flavor = rust ## benchmark.variants.revs = any-100-extra-rev hg.command.pull: 13.184236 hg.command.push: 15.620843
Fri, 05 Apr 2024 22:47:44 +0200 phases: introduce a performant efficient way to access revision in a set
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 22:47:44 +0200] rev 51585
phases: introduce a performant efficient way to access revision in a set This will be useful in the next changesets.
Fri, 05 Apr 2024 14:13:47 +0200 phases: use revision number in `_pushdiscoveryphase`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 14:13:47 +0200] rev 51584
phases: use revision number in `_pushdiscoveryphase` We now reach our target checkpoint in terms of rev-num conversion. The `_pushdiscoveryphase` function is now performing graph computation based on revision number only. Avoiding repeated conversion from node-id to rev-num. See previous changeset updated `new_heads` for rationnal. Again, time saved in the 100 milliseconds order of magnitude for the mozilla-try benchmark I have been using. However, wow that the logic is done using revision number, we can look into having better logic in the next changesets, which will provide a much bigger speedup.
Fri, 05 Apr 2024 14:11:02 +0200 phases: move RemotePhasesSummary to revision number
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 14:11:02 +0200] rev 51583
phases: move RemotePhasesSummary to revision number This continue our quest to align more logic on revision number instead of node-ids. The motivation is similar to the change to `new_heads` and `analyze_remote_phases` a few changeset earlier. Again, we take this as an opportunity to rename the class, and the attribute to the new naming scheme. This will highlight the need for code update for any code using it an expecting node-ids. Many of the rev-num → node-id conversion we had to introduce in the previous changesets can now be removed. More will be removed in the future as we continue to align code toward rev-num usage. time saved in the 100 milliseconds order of magnitude for the mozilla-try benchmark I have been using.
Fri, 05 Apr 2024 12:24:47 +0200 phases: stop using `repo.set` in `remotephasessummary`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 12:24:47 +0200] rev 51582
phases: stop using `repo.set` in `remotephasessummary` The `repository.set` create changectx on the fly, an expensive operation. Using `repo.revs` and a direct rev-num → node-id translation will be significantly faster. This is especially true as we prepare ourself to no longer do the rev-num → node-id transalation there. The speedup is a bit lost in the overall noisyness of the slow phase discovery algorithm, but it save a small amount of time in my benchmark.
Fri, 05 Apr 2024 12:02:43 +0200 phases: use revision number in analyze_remote_phases
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 12:02:43 +0200] rev 51581
phases: use revision number in analyze_remote_phases Same logic as the previous change to `new_heads`, see rationnal there. This avoids a small number of `nodes -> revs` conversion speeding thing up in the 100 milliseconds order of magnitude for the worses cases. However, the rest of the logic is noisy enough that it hardly matters for now.
Fri, 05 Apr 2024 11:33:47 +0200 phases: use revision number in new_heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 11:33:47 +0200] rev 51580
phases: use revision number in new_heads All graph operations will be done using revision numbers, so passing nodes only means they will eventually get converted to revision numbers internally. As part of an effort to align the code on using revision number we make the `phases.newheads` function operated on revision number, taking them as input and using them in returns, instead of the node-id it used to consume and produce. This is part of multiple changesets effort to translate more part of the logic, but is done step by step to facilitate the identification of issue that might arise in mercurial core and extensions. To make the change simpler to handle for third party extensions, we also rename the function, using a more modern form. This will help detecting the different between the node-id version and the rev-num version. I also take this as an opportunity to add some comment about possible performance improvement for the future. They don't matter too much now, but they are worse exploring in a while.
Mon, 08 Apr 2024 15:11:49 +0200 phases: convert remote phase root to node while reading them
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Apr 2024 15:11:49 +0200] rev 51579
phases: convert remote phase root to node while reading them This is currently a bit silly as we will convert them back to node right after, but that is an intermediate step before doing more disruptive changes.
Fri, 05 Apr 2024 11:17:25 +0200 phases: more compact error handling in analyzeremotephases
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 11:17:25 +0200] rev 51578
phases: more compact error handling in analyzeremotephases using an intermediate variable result in more readable code, so let us use it.
Tue, 09 Apr 2024 02:54:12 +0200 push: rework the computation of fallbackheads to be correct
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 02:54:12 +0200] rev 51577
push: rework the computation of fallbackheads to be correct The previous computation tried to be smart but ended up being wrong. This was caught by phase movement test while reworking the phase discovery logic to be faster. The previous logic was failing to catch case where the pushed set was not based on a common heads (i.e. when the discovery seemed to have "over discovered" content, outside the pushed set) In the following graph, `e` is a common head and we `hg push -r f`. We need to detect `c` as a fallback heads and we previous failed to do so:: e | d f |/ c | b | a The performance impact of the change seems minimal. On the most impacted repository at hand (mozilla-try), the slowdown seems mostly mixed in the overall noise `hg push` but seems to be in the hundred of milliseconds order of magnitude. When using rust, we seems to be a bit faster, probably because we leverage more accelaratd internals. I added a couple of performance related common for further investigation later on.
Fri, 05 Apr 2024 11:05:54 +0200 revset: stop serializing node when using "%ln"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 11:05:54 +0200] rev 51576
revset: stop serializing node when using "%ln" Turning hundred of thousand of node from node to hex and back can be slow… what about we stop doing it? In many case were we are using node id we should be using revision id. However this is not a good reason to have a stupidly slow implementation of "%ln". This caught my attention again because the phase discovery during push make an extensive use of "%ln" or huge set. In absolute, that phase discovery probably should use "%ld" and need to improves its algorithmic complexity, but improving "%ln" seems simple and long overdue. This greatly speeds up `hg push` on repository with many drafts. Here are some relevant poulpe benchmarks: ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.command.push # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.explicit-rev = all-out-heads # benchmark.variants.issue6528 = disabled # benchmark.variants.protocol = ssh # benchmark.variants.reuse-external-delta-parent = default ## benchmark.variants.revs = any-1-extra-rev before: 44.235070 after: 20.416329 (-53.85%, -23.82) ## benchmark.variants.revs = any-100-extra-rev before: 49.234697 after: 26.519829 (-46.14%, -22.71) ### benchmark.name = hg.command.bundle # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.revs = all # benchmark.variants.type = none-streamv2 ## data-env-vars.name = heptapod-public-2024-03-25-zstd-sparse-revlog before: 10.138396 after: 7.750458 (-23.55%, -2.39) ## data-env-vars.name = mercurial-public-2024-03-22-zstd-sparse-revlog before: 1.263859 after: 0.700229 (-44.60%, -0.56) ## data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog before: 399.484481 after: 346.5089 (-13.26%, -52.98) ## data-env-vars.name = pypy-2024-03-22-zstd-sparse-revlog before: 4.540080 after: 3.401700 (-25.07%, -1.14) ## data-env-vars.name = tryton-public-2024-03-22-zstd-sparse-revlog before: 2.975765 after: 1.870798 (-37.13%, -1.10)
Tue, 09 Apr 2024 14:41:48 +0200 bundlespec: drop unused _bundlespecvariants dictionary
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 14:41:48 +0200] rev 51575
bundlespec: drop unused _bundlespecvariants dictionary Why do we have a `_bundlespecvariants`?
Tue, 09 Apr 2024 14:37:24 +0200 bundlespec: type the _bundlespeccontentopts dictionary
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 14:37:24 +0200] rev 51574
bundlespec: type the _bundlespeccontentopts dictionary If only we had a tool to detect the kind of stupid error we just fixed… ho wait.
Tue, 09 Apr 2024 14:36:01 +0200 bundlespec: fix the "streamv2" and "streamv3-exp" variant
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 09 Apr 2024 14:36:01 +0200] rev 51573
bundlespec: fix the "streamv2" and "streamv3-exp" variant In c4aab3661f25, we broken this feature by adding unicode instead of bytes to the dictionary. On the other hand, this feature was never tested, so augment the tests to tests this.
Thu, 04 Apr 2024 14:15:32 +0100 wireprotoserver: ensure that output stream gets flushed on exception stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 04 Apr 2024 14:15:32 +0100] rev 51572
wireprotoserver: ensure that output stream gets flushed on exception Previously flush was happening due to Python finalizer being run on `BufferedWriter`. With upgrade to Python 3.11 this started randomly failing. My guess is that the finalizer on the raw `FileIO` object may be running before the finalizer of `BufferedWriter` has a chance to run. At any rate, since we're not relying on finalizers in the happy case we should also not rely on them in case of exception.
Mon, 15 Apr 2024 16:33:37 +0100 match: strengthen visit_children_set invariant, Recursive means "all files" stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 15 Apr 2024 16:33:37 +0100] rev 51571
match: strengthen visit_children_set invariant, Recursive means "all files" My previous interpretation of "Recursive" was too relaxed: I thought it instructed the caller to do something like this: > you can stop calling `visit_children_set` because you'll need to descend into > every directory recursively, but you should still check every file if it > matches or not Whereas the real instruction seems to be: > I guarantee that everything in this subtree matches, you can stop > querying the matcher for all files and dirs altogether. The evidence to support this: - the test actually passes with the stronger invariant, revealing no exceptions from this rule - the implementation of `visit_children_set` for `DifferenceMatcher` clearly relies on this requirement, so it must hold for that not to lead to bugs.
Fri, 12 Apr 2024 16:09:45 +0100 match: fix the rust-side bug in visit_children_set for rootfilesin matchers stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 12 Apr 2024 16:09:45 +0100] rev 51570
match: fix the rust-side bug in visit_children_set for rootfilesin matchers The fix is checked by `test_pattern_matcher_visit_children_set` test, which is what caught the bug in the first place, but also by an end-to-end test that I made for this purpose. Accept the new results of Cargo tests Many of these were already annotated with "FIXME", which is a good sign.
Fri, 12 Apr 2024 15:39:21 +0100 match: fix the "visitdir" method on "rootfilesin" matchers stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 12 Apr 2024 15:39:21 +0100] rev 51569
match: fix the "visitdir" method on "rootfilesin" matchers This fixes just the Python side, the fix for the rust side will follow shortly.
Fri, 12 Apr 2024 14:21:14 +0100 match: rename RootFiles to RootFilesIn for more consistency stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 12 Apr 2024 14:21:14 +0100] rev 51568
match: rename RootFiles to RootFilesIn for more consistency
Fri, 12 Apr 2024 14:17:10 +0100 match: small tweak to PatternMatcher.visit_children_set stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 12 Apr 2024 14:17:10 +0100] rev 51567
match: small tweak to PatternMatcher.visit_children_set This makes it a bit more efficient (avoid a computation in case of early return), and in my opinion clearer.
Fri, 12 Apr 2024 14:09:55 +0100 matchers: fix the bug in rust PatternMatcher that made it cut off early stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 12 Apr 2024 14:09:55 +0100] rev 51566
matchers: fix the bug in rust PatternMatcher that made it cut off early This brings the rust output in line with the Python output.
Fri, 12 Apr 2024 13:48:38 +0100 tests: add an end-to-end test to show a bug in `visit_children_set` stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 12 Apr 2024 13:48:38 +0100] rev 51565
tests: add an end-to-end test to show a bug in `visit_children_set` Concretely, `rootfilesin` is completely broken with respect to `visit_children_set` optimization.
Thu, 11 Apr 2024 19:57:36 +0100 tests: add tests and document expectations from visit_children_set in rust stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 11 Apr 2024 19:57:36 +0100] rev 51564
tests: add tests and document expectations from visit_children_set in rust The tests this patch are adding have the form of formal spec in invariants::visit_children_set::holds, and then a series of checks that all examples must satisfy this formal spec. I tried to make the spec consistent with how this function is used and how it was originally conceived. This is in conflict with how it's documented in Rust. Some of the implementations also fail to implement this spec, which leads to bugs, in particular when complicated patterns are used with `hg status`.
Thu, 11 Apr 2024 15:53:23 +0100 tests: add a test that demonstrates a bug in rhg status pattern handling stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 11 Apr 2024 15:53:23 +0100] rev 51563
tests: add a test that demonstrates a bug in rhg status pattern handling The bug is in [visit_children_set], will be elaborated on in follow-up changes.
Fri, 05 Apr 2024 01:07:46 +0200 bundle-spec: properly parse boolean configuration as boolean stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 05 Apr 2024 01:07:46 +0200] rev 51562
bundle-spec: properly parse boolean configuration as boolean Before this changesets "v2;revbranchcache=no" would actually request the addition for a revbranchcache part as the non-empty string `"0"` is `True`
Thu, 04 Apr 2024 16:41:43 +0200 bundle-spec: properly identify changegroup-less bundle stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Apr 2024 16:41:43 +0200] rev 51561
bundle-spec: properly identify changegroup-less bundle It is possible to produce a bundle without changegroup. For example if we want to only send phases or obsolescence information. However that lead to crash for command that identifies bundle content. So we fix that. The test will come in the next changesets, when we fix another bug preventing to generate such bundle by hand.
Wed, 03 Apr 2024 15:33:25 +0200 perf: create the temporary target next to the source in stream-consume
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Apr 2024 15:33:25 +0200] rev 51560
perf: create the temporary target next to the source in stream-consume See inline comment for rational.
Wed, 03 Apr 2024 16:00:37 +0200 setup: display return code information about failed `hg` call stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 Apr 2024 16:00:37 +0200] rev 51559
setup: display return code information about failed `hg` call This help to understand what is going wrong when things goes wrong.
Tue, 02 Apr 2024 21:53:17 +0200 bundlespec: rationalize the way we specify stream bundle version
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 02 Apr 2024 21:53:17 +0200] rev 51558
bundlespec: rationalize the way we specify stream bundle version Instead of having weird dedicated option for each version (v2, v3, etc) we reuse the same "stream" parameters. This is consistent with the ability to request a stream clone using "none-v2;stream=v2". This changeset introduce no user visible change, this is pure internal cleaning.
Tue, 02 Apr 2024 17:02:39 +0200 bundle: do no check the changegroup version if no changegroup is included
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 02 Apr 2024 17:02:39 +0200] rev 51557
bundle: do no check the changegroup version if no changegroup is included We don't need to check the compatibility of something we will not use. In practice this was getting in the was of `streamv2` bundles on a narrow repository as the 'cg.version=02' value was rejected by this checks.
Wed, 27 Mar 2024 18:51:33 +0000 perf-stream-consume: use the source repository config when applying
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Mar 2024 18:51:33 +0000] rev 51556
perf-stream-consume: use the source repository config when applying This might contains critical configuration for the benchmark, like enabling of extensions like narrow.
Wed, 27 Mar 2024 17:46:23 +0000 unbundle: move most of the logic on cmdutil to help debug::unbundle reuse
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Mar 2024 17:46:23 +0000] rev 51555
unbundle: move most of the logic on cmdutil to help debug::unbundle reuse This make sure `hg debug::unbundle` focus on the core logic.
Wed, 27 Mar 2024 17:29:48 +0000 postincoming: move to cmdutil
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Mar 2024 17:29:48 +0000] rev 51554
postincoming: move to cmdutil This looks like a good place for it to live.
Wed, 27 Mar 2024 17:21:46 +0000 postincoming: avoid computing branchhead if no report will be posted
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Mar 2024 17:21:46 +0000] rev 51553
postincoming: avoid computing branchhead if no report will be posted This otherwise defeat some of the branch v3 optimization.
Tue, 26 Mar 2024 13:46:44 +0000 streamclone: stop listing files for entries that have no volatile files
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 13:46:44 +0000] rev 51552
streamclone: stop listing files for entries that have no volatile files This will save a lot of python related time. This significantly boost performance. The following number comes from a large private repository using perf::stream-locked-section: base-line: 35.04 seconds prev-change: 24.51 seconds (-30%) prev-change: 20.88 seconds (-40%) prev-change: 14.22 seconds (-60%) this-change: 11.58 seconds (-67% from baseline; -18% from prev)
Tue, 26 Mar 2024 13:34:05 +0000 stream-clone: disable gc for the initial section for the v3 format
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 13:34:05 +0000] rev 51551
stream-clone: disable gc for the initial section for the v3 format The number of small container created turn Python in a gc-frenzy that seriously impact performance. This significantly boost performance. The following number comes from a large private repository using perf::stream-locked-section: base-line: 35.04 seconds prev-change: 24.51 seconds (-30%) prev-change: 20.88 seconds (-40%) this-change: 14.22 seconds (-60% from baseline; -31% from prev)
Tue, 26 Mar 2024 13:32:46 +0000 stream-clone: disable gc for `_entries_walk` duration
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 13:32:46 +0000] rev 51550
stream-clone: disable gc for `_entries_walk` duration The number of small container created turn Python in a gc-frenzy that seriously impact performance. This significantly boost performance. The following number comes from a large private repository using perf::stream-locked-section: base-line: 35.04 seconds prev-change: 24.51 seconds (-30%) this-change: 20.88 seconds (-40% from baseline; -15% from previous changes)
Tue, 26 Mar 2024 13:28:52 +0000 nocg: make the utility work are both a decorator and context manager
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 13:28:52 +0000] rev 51549
nocg: make the utility work are both a decorator and context manager In some case, the context manager version will be simpler.
Tue, 26 Mar 2024 11:24:20 +0000 stream-clone: stop getting the file size of all file in v3
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 11:24:20 +0000] rev 51548
stream-clone: stop getting the file size of all file in v3 The point of v3 is to do less work in the locked section. It was currently not the case. This significantly boost performance. The following number comes from a large private repository using perf::stream-locked-section: base-line: 35.03 seconds this-change: 24.50 seconds (-30%)
Tue, 26 Mar 2024 18:55:40 +0000 stream: in v3, skip the "size" fast path if the entries as some unknown size
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 18:55:40 +0000] rev 51547
stream: in v3, skip the "size" fast path if the entries as some unknown size We are about to prefetch size during the lock less in the v3 case. So we need to avoid trying to use that prefetched size when it is not available. See next changeset for the motivation.
Tue, 26 Mar 2024 08:43:20 +0000 perf-stream-locked-section: advertise the right version key in the help
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 08:43:20 +0000] rev 51546
perf-stream-locked-section: advertise the right version key in the help As the v3 format is still experimental, its key is "v3-exp". The help text was not pointing that out. (we also fix `perf::stream-generate` in the process)
Tue, 26 Mar 2024 08:39:08 +0000 perf-stream-locked-section: fix the call to the v3 generator
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 08:39:08 +0000] rev 51545
perf-stream-locked-section: fix the call to the v3 generator That generator simply return chunks so we should not assign the return to a tuple.
Tue, 26 Mar 2024 08:36:47 +0000 perf-stream-locked-section: actually use v1 generation when requested
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Mar 2024 08:36:47 +0000] rev 51544
perf-stream-locked-section: actually use v1 generation when requested We were fetching a v1 generator but actually using the v2 function…
Fri, 29 Mar 2024 21:39:00 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Mar 2024 21:39:00 +0100] rev 51543
branching: merge stable into default
Fri, 29 Mar 2024 21:37:09 +0100 Added signature for changeset 803e61387e86 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Mar 2024 21:37:09 +0100] rev 51542
Added signature for changeset 803e61387e86
Fri, 29 Mar 2024 21:37:06 +0100 Added tag 6.7.2 for changeset 803e61387e86 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Mar 2024 21:37:06 +0100] rev 51541
Added tag 6.7.2 for changeset 803e61387e86
Thu, 28 Mar 2024 14:47:20 +0000 relnotes: add 6.7.2 stable 6.7.2
Raphaël Gomès <rgomes@octobus.net> [Thu, 28 Mar 2024 14:47:20 +0000] rev 51540
relnotes: add 6.7.2
Thu, 28 Mar 2024 07:12:09 +0000 bundle2: make the "hgtagsfnodes" part advisory stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 28 Mar 2024 07:12:09 +0000] rev 51539
bundle2: make the "hgtagsfnodes" part advisory This bundle2 part is about helping the client to warms its cache. There is no reason for it to be mandatory. So we mark it advisory.
Mon, 25 Mar 2024 16:27:48 +0000 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Mar 2024 16:27:48 +0000] rev 51538
branching: merge stable into default
Thu, 07 Mar 2024 10:57:16 +0100 branchcache: allow to detect "pure topological case" for branchmap
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Mar 2024 10:57:16 +0100] rev 51537
branchcache: allow to detect "pure topological case" for branchmap We don't rum this detection every time we run the branchcache, that would be costly. However we now do it when running `hg debugupdatecache`. This will help existing repository to benefit from the fastpath when possible.
Thu, 07 Mar 2024 04:15:23 +0100 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Mar 2024 04:15:23 +0100] rev 51536
branchcache: add a "pure topological head" fast path In a narrow but actually quick common case, all topological heads are all on the same branch and all open. In this case, computing the branch map is very simple. We can quickly detect situation where this situation will not change. So we update the V3 format to be able to express this situation and upgrade the update code to detect we remains in that mode. The branch cache is populated with the actual value when the branch map is accessed, but the update_disk method can do the update without needing to populate it.
Wed, 06 Mar 2024 16:18:03 +0100 branchcache: move the processing of the new data in a dedicated method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 16:18:03 +0100] rev 51535
branchcache: move the processing of the new data in a dedicated method In a future changeset, this will allow the V3 of the branch cache to use a fast path when possible.
Wed, 06 Mar 2024 16:10:44 +0100 branchcache: gather newly closed head in a dedicated set
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 16:10:44 +0100] rev 51534
branchcache: gather newly closed head in a dedicated set This is part of a series to more clearly split the update in two step. This will allow us to introduce a fast path during update in a future changeset.
Wed, 06 Mar 2024 16:09:42 +0100 branchcache: gather new obsolete revision in a set
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 16:09:42 +0100] rev 51533
branchcache: gather new obsolete revision in a set This is part of a series to more clearly split the update in two step. This will allow us to introduce a fast path during update in a future changeset.
Wed, 06 Mar 2024 15:54:22 +0100 branchcache: filter obsolete revisions sooner
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 15:54:22 +0100] rev 51532
branchcache: filter obsolete revisions sooner Since we won't do anything with the obsolete revisions, we can just ignore them sooner.
Thu, 07 Mar 2024 10:55:22 +0100 branchcache: skip entries that are topological heads in the on disk file
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Mar 2024 10:55:22 +0100] rev 51531
branchcache: skip entries that are topological heads in the on disk file In the majority of cases, topological heads are also branch heads. We have efficient way to get the topological heads and efficient way to retrieve their branch information. So there is little value in putting them in the branch cache file explicitly. On the contrary, writing them explicitly tend to create very large cache file that are inefficient to read and update. So the branch cache v3 format is no longer including them. This changeset focus on the format aspect and have no focus on the performance aspect. We will cover that later.
Thu, 07 Mar 2024 01:35:43 +0100 branchcache: simplify the branch rev cache test
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Mar 2024 01:35:43 +0100] rev 51530
branchcache: simplify the branch rev cache test We don't need that many content dump and this gets in the way in change in access pattern (e.g. accessing revision in a different order change the order of branches in the "names" file). So we simplify this test in advance.
Wed, 06 Mar 2024 11:39:44 +0100 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 11:39:44 +0100] rev 51529
branchcache: store filtered hash and obsolete hash independently for V3 This will avoid the bug covered in tests/test-branches-obsolete.t when we stop storing all heads explicitly in V3.
Wed, 06 Mar 2024 12:07:31 +0100 branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 12:07:31 +0100] rev 51528
branchcache: show the cache file content in test-branches-obsoletes.t This help to track the changes in format between v2 and v3.
Wed, 06 Mar 2024 02:20:53 +0100 branchcache: rework the `filteredhash` logic to be more generic
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 02:20:53 +0100] rev 51527
branchcache: rework the `filteredhash` logic to be more generic We now have a more flexible `key_hashes` tuple. We duplicated various logic in the V2 and V3 version of the cache as the goal is to start changing the logic for V3 in the next few changesets.
Wed, 06 Mar 2024 01:53:52 +0100 filteredhash: rename the filteredhash function
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 01:53:52 +0100] rev 51526
filteredhash: rename the filteredhash function The new name is less ambiguous, as we are about to introduce an alternative function it seems like a good idea to have clearer name to distinct the two.
Wed, 06 Mar 2024 01:43:51 +0100 filteredhash: split the computation of revision sets
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Mar 2024 01:43:51 +0100] rev 51525
filteredhash: split the computation of revision sets The branch2's filteredhash combines the filtered revisions and the obsolete ones, this will creates issue for implicit reference to heads we want to introduce for the v3 of the branch cache format. So we isolate this logic for alternative use.
Tue, 05 Mar 2024 15:21:18 +0100 filteredhash: move the hashing in its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Mar 2024 15:21:18 +0100] rev 51524
filteredhash: move the hashing in its own function This will help us to reuse this logic in variants of the hashes used for branch cache validation.
Sun, 25 Feb 2024 23:31:50 +0100 branchcache: cleanup the final key generation after update
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 25 Feb 2024 23:31:50 +0100] rev 51523
branchcache: cleanup the final key generation after update A lot of duplicated work seemed to be done, as we already update the tiprev and tipnode when needed right before. So we simplify that part to focus on the filtered hash. See inline comment for details.
Wed, 28 Feb 2024 12:56:08 +0100 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 12:56:08 +0100] rev 51522
branchcache: add more test for the logic around obsolescence and branch heads While working on branch-cache-v3, we noticed some ambiguity in the filtered+obsolete hash. However this was only caught by a rebase test by chance. It seems important to explicitly tests these cases.
Mon, 26 Feb 2024 15:44:44 +0100 branchcache-v3: use more explicit header line
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:44:44 +0100] rev 51521
branchcache-v3: use more explicit header line The key-value approach is clearer and gives more rooms to have the format evolve in a clear way. It also provides extension (like topic) simpler way to extend the validation scheme. This is just a small evolution, the V3 format is still a work in progress.
Mon, 26 Feb 2024 14:20:36 +0100 branchcache-v3: introduce a v3 format
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 14:20:36 +0100] rev 51520
branchcache-v3: introduce a v3 format For now the format is the very same, however we will start changing it in future changesets.
Tue, 27 Feb 2024 14:04:29 +0100 branchcache: use an explicit class for the v2 version
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Feb 2024 14:04:29 +0100] rev 51519
branchcache: use an explicit class for the v2 version This prepare the introduction of an experimental v3 format version. In the process, we move the description of the format in that new class.
Tue, 27 Feb 2024 15:33:21 +0100 branchcache: add some blank line in a test
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Feb 2024 15:33:21 +0100] rev 51518
branchcache: add some blank line in a test This helps each section to stand out.
Mon, 25 Mar 2024 02:09:15 +0100 phases: update the phase set as we go during retract boundary stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Mar 2024 02:09:15 +0100] rev 51517
phases: update the phase set as we go during retract boundary Apparently iterating over the `changed_revs` dictionary is very expensive. On mozilla-try-2019-02-18, a perf::unbundle call with a 10 000 changesets bundle gives give use the following timing. e57d4b868a3e: 4.6 seconds ac1c75188440: 102.5 seconds prev-changeset: 30.0 seconds this-changeset: 4.6 seconds So, the performance regression is gone. Once again: thanks to marvelous Python!
Mon, 25 Mar 2024 01:50:31 +0100 phases: avoid a potentially costly dictionary interation in some case stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Mar 2024 01:50:31 +0100] rev 51516
phases: avoid a potentially costly dictionary interation in some case If we retract for the draft phase, there is not non-public item to be retracted and we can skip this part. This part is was apparently super costly thanks to Python. On mozilla-try-2019-02-18, a perf::unbundle call with a 10 000 changesets bundle gives give use the following timing. e57d4b868a3e: 4.6 seconds ac1c75188440: 102.5 seconds this-changeset: 30.0 seconds So we recovered about ⅔ of the regression, the next changeset will give us the rest back.
Thu, 21 Mar 2024 12:26:46 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Mar 2024 12:26:46 +0100] rev 51515
branching: merge stable into default
Thu, 21 Mar 2024 12:24:42 +0100 Added signature for changeset 2e6fde2ed01e stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Mar 2024 12:24:42 +0100] rev 51514
Added signature for changeset 2e6fde2ed01e
Thu, 21 Mar 2024 12:24:36 +0100 Added tag 6.7.1 for changeset 2e6fde2ed01e stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Mar 2024 12:24:36 +0100] rev 51513
Added tag 6.7.1 for changeset 2e6fde2ed01e
Thu, 21 Mar 2024 12:23:25 +0100 relnotes: add 6.7.1 stable 6.7.1
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Mar 2024 12:23:25 +0100] rev 51512
relnotes: add 6.7.1
Sat, 16 Mar 2024 21:02:19 -0300 subrepo: fix normalizing paths with scheme stable
Felipe Resende <felipe@fcresende.dev.br> [Sat, 16 Mar 2024 21:02:19 -0300] rev 51511
subrepo: fix normalizing paths with scheme After revision 0afe96e374a7, subrepo paths were normalized using posixpath.normpath and that resulted in ssh paths being wrongly converted from ssh://host/path to ssh:/host/path This fix applies the same logic used in urlutil.url to split the path scheme from the rest and only use posixpath.normpath to the string after scheme://
Sat, 16 Mar 2024 18:37:07 -0300 sshpeer: fix path when handling invalid url exception stable
Felipe Resende <felipe@fcresende.dev.br> [Sat, 16 Mar 2024 18:37:07 -0300] rev 51510
sshpeer: fix path when handling invalid url exception In 73ed1d13c0bf the code was refactored but the error handling seems to have been missed (or maybe the object shoud have implemented __bytes__)
Mon, 18 Mar 2024 11:25:21 +0100 delta-search: fix crash caused by unbound variable stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Mar 2024 11:25:21 +0100] rev 51509
delta-search: fix crash caused by unbound variable This code path was apparently not tested. This fixes a crash when cloning the Tryton repo.
Fri, 15 Mar 2024 10:52:51 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 15 Mar 2024 10:52:51 +0100] rev 51508
branching: merge stable into default
Fri, 15 Mar 2024 10:49:44 +0100 Added signature for changeset c9ceb4f60256 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 15 Mar 2024 10:49:44 +0100] rev 51507
Added signature for changeset c9ceb4f60256
Fri, 15 Mar 2024 10:49:40 +0100 Added tag 6.7 for changeset c9ceb4f60256 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 15 Mar 2024 10:49:40 +0100] rev 51506
Added tag 6.7 for changeset c9ceb4f60256
Fri, 15 Mar 2024 01:31:57 +0100 phases: avoid N² behavior in `advanceboundary` stable 6.7
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Mar 2024 01:31:57 +0100] rev 51505
phases: avoid N² behavior in `advanceboundary` We allowed duplicated entries in the deque, which each entry could potentially insert all its ancestors. So advancing boundary for the full repository would mean each revision would walk all its ancestors, resulting in O(N²) iteration. For repository of any decent size, N² is quickly insane. We introduce a simple set to avoid this and get back to reasonable performance.
Thu, 14 Mar 2024 16:25:46 +0100 relnotes: add 6.7 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Mar 2024 16:25:46 +0100] rev 51504
relnotes: add 6.7
Thu, 14 Mar 2024 11:24:52 +0100 admin-commands: move the chainsaw extension to the admin commands module stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Mar 2024 11:24:52 +0100] rev 51503
admin-commands: move the chainsaw extension to the admin commands module Activating an extension is always a little bit of a chore and the long name, options and "chainsaw" bits are deterrent enough. This also allows us to help the discoverability for people looking for repo "administration" tools, with the widest semantic of "administration".
Wed, 13 Mar 2024 16:22:13 -0300 obsutil: sort metadata before comparing in geteffectflag() stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 13 Mar 2024 16:22:13 -0300] rev 51502
obsutil: sort metadata before comparing in geteffectflag() This is probably less important now that we dropped Python 2. We do still support Python 3.6 though, and the dictionaries aren't ordered there either (that was a big change that came with 3.7). Still, maybe it's a good idea to sort metadata explicitly.
Mon, 11 Mar 2024 11:11:34 +0100 tests: disable revlog compression in test-generaldelta.t (issue6867) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Mar 2024 11:11:34 +0100] rev 51501
tests: disable revlog compression in test-generaldelta.t (issue6867) The revlog compression makes a lot of numbers unstable. Since checking revlog compression is not the goal of this test, we disable the compression to get stable numbers. This should avoid wasting more time on this kind of changes in the future.
Mon, 11 Mar 2024 11:09:29 +0100 test-general-delta: actually test optimize-delta-parent-choice=no stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Mar 2024 11:09:29 +0100] rev 51500
test-general-delta: actually test optimize-delta-parent-choice=no Since the configuration was not explicit, the case stopped testing what it intended to test when the default value changed.
Mon, 11 Mar 2024 13:09:01 +0100 test-chg: stabilize the log checking stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Mar 2024 13:09:01 +0100] rev 51499
test-chg: stabilize the log checking The "worker process exited" line have been making the CI flaky for a long time. Lets sort this out.
Mon, 11 Mar 2024 12:03:40 +0100 tests: fix test-patchbomb-tls.t instability stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Mar 2024 12:03:40 +0100] rev 51498
tests: fix test-patchbomb-tls.t instability The flakiness on chg is caused by a client that exit faster than the server output log. So actively wait for the server to issue the expected output (with a small timeout)
Mon, 11 Mar 2024 16:05:28 +0100 test-lock: use synchronisation file instead of sleep stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Mar 2024 16:05:28 +0100] rev 51497
test-lock: use synchronisation file instead of sleep This will prevent the test to be flaky on load.
Sun, 10 Mar 2024 03:29:12 +0100 branchcache: use update_disk to refresh 'served' and 'served.hidden'
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Mar 2024 03:29:12 +0100] rev 51496
branchcache: use update_disk to refresh 'served' and 'served.hidden' The `update_disk` method is dedicated to this kind of usecase. Now that the writting patterns are more consistent, we can use it to warm these two important cache. I am dropping the first comment about "refreshing all the others" because it is false. If a branchmap already exist for "served", none of the subset will be updated.
Sun, 10 Mar 2024 03:25:04 +0100 branchcache: explictly update disk state only if no transaction exist
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Mar 2024 03:25:04 +0100] rev 51495
branchcache: explictly update disk state only if no transaction exist If a transaction exist the `write_dirty` call will eventually be done and the state will be synched on disk. It is better to no interfer with that.
Sun, 10 Mar 2024 03:32:50 +0100 branchcache: do not use `__getitem__` in updatecache
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Mar 2024 03:32:50 +0100] rev 51494
branchcache: do not use `__getitem__` in updatecache The `update_disk` method uses `updatecache` and the point of `update_disk` is to be able to do alternative processing to the one we do in `__getitem__`. So we calling `__getitem__` in `updatecache` defeat this purpose. Instead we do the equivalent explicitly to preserve the spirit of `update_disk` (that we will actually put to use soon, I promise)
Sun, 10 Mar 2024 05:10:00 +0100 branchcache: explicitly track inheritence "state"
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Mar 2024 05:10:00 +0100] rev 51493
branchcache: explicitly track inheritence "state" We move from a binary "dirty" flag to a three value "state": "clean", "inherited", "dirty". The "inherited" means that the branch cache is not only "clean", but it is a duplicate of its parent filter. If a branch cache is "inherited", we can non only skip writing its value on disk, but it is a good idea to delete any stale value on disk, as those will just waste time (and possibly induce bug) in the future. We only do this in the update related to transaction or explicit cache update (e.g `hg debugupdatecache`). Deleting the file when we simply detected a stall cache during a read only operation seems more dangerous. We rename `copy` to `inherit_for` to clarify we associate a stronger semantic to the operation.
Sun, 10 Mar 2024 04:53:17 +0100 branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Mar 2024 04:53:17 +0100] rev 51492
branchcache: stop writing more branchcache file on disk than needed Before this change, we were unconditionally writing a branchmap file for the filter level passed to `update_disk`. This is actually counter productive if no update were needed for this filter level. In many case, the branch cache for a filter level is identical to its parent "subset" and it is better to simply keep the subset update and reuse it every time instead of having to do identical work for similar subset. So we change the `update_disk` method to only write a file when that filter level differ from its parent. This removes many cases where identical files were written, requiring multiple boring update in the test suite. The only notable changes is the change to `test-strip-branch-cache.t`, this case was checking a scenario that no longer reproduce the bug as writing less branchmap file result in less stalled cache on disk. Strictly speaking, we could create a more convoluted scenario that create a similar issue. However the next changeset would also cover that scenario so we directly updated that test case to a "no longer buggy" state.
Fri, 08 Mar 2024 16:49:06 +0100 branchcache: do not copy the `_dirty` flag
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 16:49:06 +0100] rev 51491
branchcache: do not copy the `_dirty` flag If the inherited branch cache is dirty, it will be written on disk, and the super-set did not need to modify it, the on disk value for the subset will be re-useable as is. So the super set does not needs to write the very same content itself.
Fri, 08 Mar 2024 16:52:08 +0100 branchcache: explicitly assert that copy is always about inheritance
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 16:52:08 +0100] rev 51490
branchcache: explicitly assert that copy is always about inheritance This would catch cases where copy is used for something else if any existed.
Sat, 09 Mar 2024 02:07:15 +0100 branchcache: stop using `copy(…)` in `replace(…)`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Mar 2024 02:07:15 +0100] rev 51489
branchcache: stop using `copy(…)` in `replace(…)` The `copy` method is mostly used for a filter level to inherit the branchmap from a subset. So we stop using (abusing) it in "replace" to ensure `copy` is used only for inheritance purposes. Since `replace` is a method of the BranchMapCache, it seems fine to do lower level operation there.
Fri, 08 Mar 2024 16:47:32 +0100 branchcache: change the _delayed flag to an explicit `_dirty` flag
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 16:47:32 +0100] rev 51488
branchcache: change the _delayed flag to an explicit `_dirty` flag This is more consistent with the logic we use for other object and it open the way to a clearer management of the cache state. Now, cache are created clean, cache update mark them dirty, writing them on disk mark them clean again.
Fri, 08 Mar 2024 15:50:15 +0100 branchcache: write branchmap in subset inheritance order
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 15:50:15 +0100] rev 51487
branchcache: write branchmap in subset inheritance order This way, we can guarantee a valid subset has been written before touching the branchmap of another filter. This is especially useful as we are bout to start deleting outdated branchmap file.
Fri, 08 Mar 2024 15:06:54 +0100 branchcache: do not accept "empty update"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 15:06:54 +0100] rev 51486
branchcache: do not accept "empty update" This currently does not happens and it will be simpler that is remains that way. If all update do something, we will be able to simply declare, in a later changesets, that all update to result in a dirty branchcache.
Thu, 07 Mar 2024 11:04:34 +0100 branchcache: avoid created a `None` filter repoview when writing
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Mar 2024 11:04:34 +0100] rev 51485
branchcache: avoid created a `None` filter repoview when writing The repoview class is not intended to be used for unfiltered repository.
Wed, 28 Feb 2024 22:49:55 +0100 stream-clone-tests: stop filtering non existent warning
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:49:55 +0100] rev 51484
stream-clone-tests: stop filtering non existent warning This filtering was introduced in 74c004a515bc, however there is already no warning in that changeset. So I guess the warnings existed when we the patch was created but the problem was solved in another changeset that 74c004a515bc, rebased on.
Wed, 28 Feb 2024 22:46:12 +0100 stream-clone-test: simplify case testing obsolescence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:46:12 +0100] rev 51483
stream-clone-test: simplify case testing obsolescence There is only two important things in this test: - the number of file we send, to show we picked the obsstore. - the resulting state, to show we did alter things in the process. The rest are of the number are very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
Wed, 28 Feb 2024 22:43:07 +0100 stream-clone-test: simplify the case testing phases
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:43:07 +0100] rev 51482
stream-clone-test: simplify the case testing phases There is only two important things in this test: - the number of file we send, to show we picked the phase roots. - the resulting phases, to show we did not modified them. The rest are of the number are very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
Wed, 28 Feb 2024 22:39:10 +0100 stream-clone-test: simplify bookmark clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:39:10 +0100] rev 51481
stream-clone-test: simplify bookmark clone The important things to test here is the number of file included (to catch that the bookmark file was sent). So we keep that part non glob'ed but glob the rest. The glob'ed numbers are very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
Wed, 28 Feb 2024 22:31:42 +0100 stream-clone-test: add a verify call to the "clone while changing" case
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:31:42 +0100] rev 51480
stream-clone-test: add a verify call to the "clone while changing" case It seems useful to very that the clone did not result in a corrupted copy.
Fri, 08 Mar 2024 10:59:51 +0100 stream-clone-test: add title to various test cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 10:59:51 +0100] rev 51479
stream-clone-test: add title to various test cases These case are fine as is, but as we are adding title to all the other as we simplify them, lets add title for all cases.
Wed, 28 Feb 2024 22:28:07 +0100 stream-clone-test: simplify testing of secret cloning restriction
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:28:07 +0100] rev 51478
stream-clone-test: simplify testing of secret cloning restriction Here, we just want to check if the streaming clone is allowed and used or not. We do not care about the details of the clone itself.
Wed, 28 Feb 2024 22:26:27 +0100 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:26:27 +0100] rev 51477
stream-clone-test: simplify the background file closing test Here we just care about the fact the background file closing logic actually ran. We don't need to check the details of the cloning. The details of the output is very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol. So we filter it out.
Fri, 08 Mar 2024 10:51:01 +0100 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 10:51:01 +0100] rev 51476
stream-clone-test: simplify the --uncompressed alias check To check that --uncompressed is an alias we just need to check it trigger a stream clone, we don't need to check anything else.
Fri, 08 Mar 2024 10:50:42 +0100 stream-clone-test: drop an automatic pattern replacement
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Mar 2024 10:50:42 +0100] rev 51475
stream-clone-test: drop an automatic pattern replacement That pattern is nice, but it prevent us to glob the number of bytes when we don't care about them. We don't care about them more often that what we currently checks so dropping this pattern will help use to simplify various tests.
Wed, 28 Feb 2024 22:15:33 +0100 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:15:33 +0100] rev 51474
stream-clone-test: simplify the test for getbundle with stream=1 The core of this tests is about checking we receive a stream bundle with such request. We don't need to look at too much of the details of the stream itself. Since the content of the stream if shifting overtime, Such check is very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol. So we reduce the size of what we check to focus on "is this a stream clone" question.
Wed, 28 Feb 2024 22:05:28 +0100 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:05:28 +0100] rev 51473
stream-clone-test: factor some piece of basic clone test out Multiple parts of this case (listing cache, checking error) are common to all cases and don't need to be in the conditionnal block. This simplify the test update.
Wed, 28 Feb 2024 22:01:09 +0100 stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Feb 2024 22:01:09 +0100] rev 51472
stream-clone-test: simplify the case where server disabled it We have an option to disable it, we don't need to test it with all protocol variants. In addition there is little value in looking at the bytes to bytes details of the reply. Such check is very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
Mon, 11 Mar 2024 13:36:25 +0100 rust-matchers: raw regular expression builder stable
Georges Racinet <georges.racinet@octobus.net> [Mon, 11 Mar 2024 13:36:25 +0100] rev 51471
rust-matchers: raw regular expression builder Extracting this `re_builder()` from `re_matcher()` makes it reusable in more general cases than matching `HgPath` instances and would help reducing code duplication in RHGitaly.
Mon, 11 Mar 2024 13:23:18 +0100 rust-filepatterns: export glob_to_re function stable
Georges Racinet <georges.racinet@octobus.net> [Mon, 11 Mar 2024 13:23:18 +0100] rev 51470
rust-filepatterns: export glob_to_re function Making this function public should not risk freezing the internal API, and it can be useful for all downstream code that needs to perform glob matching against byte strings, such as RHGitaly where it will be useful to match on branches and tags.
Mon, 11 Mar 2024 01:20:12 +0100 repoview: prevent `None` to be passed as the filtername
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Mar 2024 01:20:12 +0100] rev 51469
repoview: prevent `None` to be passed as the filtername We let such instantiation slip in a previous commit, so we add an explicit check to prevent it to happen in the future.
Thu, 07 Mar 2024 11:04:34 +0100 branchcache: avoid created a `None` filter repoview when writing
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Mar 2024 11:04:34 +0100] rev 51468
branchcache: avoid created a `None` filter repoview when writing The repoview class is not intended to be used for unfiltered repository.
Tue, 05 Mar 2024 15:07:47 +0100 rust-index: don't use mutable borrow to computed filtered heads stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Mar 2024 15:07:47 +0100] rev 51467
rust-index: don't use mutable borrow to computed filtered heads This does not need to mutate the index. This is the prime suspect for some RuntimeError raised during some pushes.
Tue, 05 Mar 2024 15:07:04 +0100 rust-index: don't use mutable borrow for head-diff computation stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Mar 2024 15:07:04 +0100] rev 51466
rust-index: don't use mutable borrow for head-diff computation It does not needs to mutate the index. This is one of the two suspects of RuntimeError being thrown during push.
Mon, 26 Feb 2024 15:26:08 +0100 branchcache: move head writing in a `_write_headers` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:26:08 +0100] rev 51465
branchcache: move head writing in a `_write_headers` method Same rational: this will help having format variants.
Mon, 26 Feb 2024 15:25:41 +0100 branchcache: move head writing in a `_write_heads` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:25:41 +0100] rev 51464
branchcache: move head writing in a `_write_heads` method Same rational: this will help having format variants.
Mon, 26 Feb 2024 15:23:45 +0100 branchcache: move the header loading in a `_load_header` class method
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:23:45 +0100] rev 51463
branchcache: move the header loading in a `_load_header` class method This will help changing header parsing in format variants.
Mon, 26 Feb 2024 15:15:10 +0100 branchcache: simplify a long line
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:15:10 +0100] rev 51462
branchcache: simplify a long line Gratuitous change to help code readability.
Mon, 26 Feb 2024 15:12:20 +0100 branchcache: rename `load` to `_load_heads`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:12:20 +0100] rev 51461
branchcache: rename `load` to `_load_heads` We are about to have more similar function, we rename the existing one to a more meaningful name and mark it private in the process.
Sun, 25 Feb 2024 20:40:37 +0100 branchcache: move the filename to a class attribute
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 25 Feb 2024 20:40:37 +0100] rev 51460
branchcache: move the filename to a class attribute This prepare the introduction of more variant of cache.
Tue, 27 Feb 2024 22:52:00 +0100 test-clonebundles: simplify matching to be less flavor depends
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Feb 2024 22:52:00 +0100] rev 51459
test-clonebundles: simplify matching to be less flavor depends We keep the files and bytes output for the first call, but then we mostly check that we are being served a stream-clone bundle, not the actual content and size of the bundle. That aspect being tested by the stream clone test themselves.
Sun, 25 Feb 2024 23:05:33 +0100 repoview: fix changelog.__contains__ method
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 25 Feb 2024 23:05:33 +0100] rev 51458
repoview: fix changelog.__contains__ method This have been around for ten years, so we can safely that this method have few callers. However I am about to add one.
Mon, 08 Jan 2024 15:11:34 +0100 branchcache: unconditionally write delayed branchmap
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 08 Jan 2024 15:11:34 +0100] rev 51457
branchcache: unconditionally write delayed branchmap
Sun, 25 Feb 2024 16:14:15 +0100 branchcache: drop the unused `_verifyclosed`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 25 Feb 2024 16:14:15 +0100] rev 51456
branchcache: drop the unused `_verifyclosed` This code appears dead since its introduction about 5 years ago in this three consecutive commits: - 6578654916ae → introduce the method with two calls - 7c9d4cf23adf → remove first call - be5eeaf5c24a → remove second call o changeset: be5eeaf5c24a | user: Pulkit Goyal <pulkit@yandex-team.ru> | date: Fri Apr 05 15:57:09 2019 +0300 | summary: branchcache: don't verify closed nodes in _branchtip() | o changeset: 7c9d4cf23adf | user: Pulkit Goyal <pulkit@yandex-team.ru> | date: Fri Apr 05 15:56:33 2019 +0300 | summary: branchcache: don't verify closed nodes in iteropen() | o changeset: 6578654916ae | user: Pulkit Goyal <pulkit@yandex-team.ru> ~ date: Mon Apr 01 13:56:47 2019 +0300 summary: branchcache: lazily validate nodes from the branchmap
Mon, 26 Feb 2024 15:46:24 +0100 branchcache: dispatch the code into the dedicated subclass
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 15:46:24 +0100] rev 51455
branchcache: dispatch the code into the dedicated subclass The code useful only to the local brancache have now been moved into the dedicated subclass. This will help improving the branchcache code without subtle breaking the remote variants.
Sun, 25 Feb 2024 14:09:36 +0100 branchcache: introduce a base class for branchmap
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 25 Feb 2024 14:09:36 +0100] rev 51454
branchcache: introduce a base class for branchmap This will help define a clear boundary between the two.
Mon, 19 Feb 2024 12:09:06 +0100 branchcache: fix the copy code
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Feb 2024 12:09:06 +0100] rev 51453
branchcache: fix the copy code We copy some internal attribute along too. This should prevent inconsistency in the resulting branchmap.
Mon, 19 Feb 2024 13:11:42 +0100 branchcache: pass a "verify_node" attribut to __init__ instead of hasnode
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Feb 2024 13:11:42 +0100] rev 51452
branchcache: pass a "verify_node" attribut to __init__ instead of hasnode The hasnode callback cannot be inherited and is dropped on copy, which seems like a bad idea. Instead we pass the actual semantic as a parameter and let the internal logic deal with it.
Mon, 19 Feb 2024 11:59:56 +0100 branchcache: stop storing a repository instance on the cache altogether
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Feb 2024 11:59:56 +0100] rev 51451
branchcache: stop storing a repository instance on the cache altogether We did not really needed it and we do not needs it anymore at all. So lets make things simpler for consistency and garbage collecting and stop storing it altogether.
Mon, 19 Feb 2024 11:43:19 +0100 branchcache: pass the target repository when copying
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Feb 2024 11:43:19 +0100] rev 51450
branchcache: pass the target repository when copying Branchmap are usually copied to be used on a different repoview using a different filter level. Passing the repository around means the repository in `branchcache._repo` will drift from the actual branchmap filter. This is currently "fine" because the repo is only used to retrieve the `nullid` value. However, this is a fairly big trap for any extension or future code using the `_repo` attribute. The replace logic is now using a copy to ensure the right repository view is used to initialized the cached value. We add a couple of assert for make sure this inconsistency does not sneak back.
Fri, 19 Jan 2024 11:30:10 +0100 branchcache: have an explicit method to update the on disk cache
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Jan 2024 11:30:10 +0100] rev 51449
branchcache: have an explicit method to update the on disk cache Explicit is better and will give use more flexibility for future evolution of the storage.
Thu, 29 Feb 2024 14:13:21 -0800 crecord: drop calls to `curses.endwin()` stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Feb 2024 14:13:21 -0800] rev 51448
crecord: drop calls to `curses.endwin()` We got a bug report where `curses.endwin()` failed with `_curses.error: endwin() returned ERR`. Looking at e306d552dfb12, it seems like we should be able to just remove these calls.
Mon, 04 Mar 2024 04:16:15 +0100 config: move the option to mmap rev branch cache in the storage section stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Mar 2024 04:16:15 +0100] rev 51447
config: move the option to mmap rev branch cache in the storage section See previous commit for rational.
Mon, 04 Mar 2024 04:13:33 +0100 config: document the storage and format sections stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Mar 2024 04:13:33 +0100] rev 51446
config: document the storage and format sections This should help people to put configuration in the right section.
Mon, 26 Feb 2024 12:59:57 +0100 rust-index: drop offset_override
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 12:59:57 +0100] rev 51445
rust-index: drop offset_override The inline `offsets` value diverge from the one on disk for added value, so the offset_override tricks is not going to work well once we start having the full revlog logic in Rust. We remove it beforehand and align the Rust logic to the Python one (adjusting the segment offset at read time for inline revlog).
Mon, 26 Feb 2024 13:41:02 +0100 rust-index: stop calling `with_offset` in the tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 26 Feb 2024 13:41:02 +0100] rev 51444
rust-index: stop calling `with_offset` in the tests We are not adding any data, so why are we setting any offset?
Fri, 23 Feb 2024 15:57:50 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:57:50 +0100] rev 51443
branching: merge stable into default
Fri, 23 Feb 2024 15:55:53 +0100 Added signature for changeset d1d48d18db37 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:55:53 +0100] rev 51442
Added signature for changeset d1d48d18db37
Fri, 23 Feb 2024 15:55:49 +0100 Added tag 6.7rc0 for changeset d1d48d18db37 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:55:49 +0100] rev 51441
Added tag 6.7rc0 for changeset d1d48d18db37
Fri, 23 Feb 2024 15:18:29 +0100 relnotes: add 6.7rc0 stable 6.7rc0
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:18:29 +0100] rev 51440
relnotes: add 6.7rc0
Fri, 23 Feb 2024 15:18:17 +0100 relnotes: remove outdated message from `next` stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:18:17 +0100] rev 51439
relnotes: remove outdated message from `next`
Fri, 23 Feb 2024 15:10:44 +0100 branching: merge default into stable for 6.7rc0 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:10:44 +0100] rev 51438
branching: merge default into stable for 6.7rc0
Fri, 23 Feb 2024 15:09:18 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 23 Feb 2024 15:09:18 +0100] rev 51437
branching: merge stable into default
Fri, 23 Feb 2024 14:07:33 +0100 perf: add a --as-push option to perf::unbundle
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 14:07:33 +0100] rev 51436
perf: add a --as-push option to perf::unbundle This turned out to make a quite significant difference.
Fri, 23 Feb 2024 06:25:09 +0100 chainsaw-update: exit early if one of the intermediate command fails
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 06:25:09 +0100] rev 51435
chainsaw-update: exit early if one of the intermediate command fails That will prevent the user to be presented with a start that pretend to be consistent with the request, but is not.
Fri, 23 Feb 2024 03:32:35 +0100 chainsaw-update: lock the repository for the duration of the operation
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 03:32:35 +0100] rev 51434
chainsaw-update: lock the repository for the duration of the operation This should prevent and catch some misusage where something else try to touch the repository.
Fri, 23 Feb 2024 11:41:55 +0100 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net> [Fri, 23 Feb 2024 11:41:55 +0100] rev 51433
chainsaw-update: taking care of initial cloning Perhaps we should go just a bit lower level than this `instance()`, since the main added value in our use-case is full path resolution, that we need to do anyway for the rmtree cleanup.
Fri, 23 Feb 2024 11:30:58 +0100 chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 11:30:58 +0100] rev 51432
chainsaw-update: use a graph with branching in graph This will be relevant for the next improvement of `chainsaw-update`.
Wed, 17 Jan 2024 14:39:06 +0100 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net> [Wed, 17 Jan 2024 14:39:06 +0100] rev 51431
chainsaw-update: log actual locks breaking Previously, the command would simply state that it was about to break locks, not if there was actually some to break. This version is race-free. It would be also possible to display the content of the lock before hand (not race-free but informative in almost all cases).
Wed, 17 Jan 2024 14:26:58 +0100 vfs: have tryunlink tell what it did
Georges Racinet <georges.racinet@octobus.net> [Wed, 17 Jan 2024 14:26:58 +0100] rev 51430
vfs: have tryunlink tell what it did It is useful in certain circumstances to know whether vfs.tryunlink() actually removed something or not, be it for logging purposes.
Sat, 26 Nov 2022 12:23:56 +0100 chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net> [Sat, 26 Nov 2022 12:23:56 +0100] rev 51429
chainsaw: new extension for dangerous operations The first provided command is `chainsaw-update`, whose one and single job is to make sure that it will pull, update and purge the target repository, no matter what may be in the way (locks, notably), see docstring for rationale.
Fri, 23 Feb 2024 03:45:07 +0100 rust: disable the RustIndex without persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 03:45:07 +0100] rev 51428
rust: disable the RustIndex without persistent nodemap See rational inline.
Fri, 23 Feb 2024 03:44:56 +0100 rust: stop claiming the C index is compatible with the rust code
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 03:44:56 +0100] rev 51427
rust: stop claiming the C index is compatible with the rust code This is no longer the case since the introduction of the pure Rust Index, and was probably not the case since the MixedIndex itself. So we fix the dedicated attribute value.
Thu, 22 Feb 2024 15:11:26 +0100 rust-index: remove one collect when converting back
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Feb 2024 15:11:26 +0100] rev 51426
rust-index: remove one collect when converting back Turns out this is slightly faster. Sending the results back to Python is still the most costly (like 75% of the time) of the whole method, but it's about as fast as it can be now. hg perf::phases on mozilla-try-2023-03-22 before: 0.267114 after: 0.247101
Thu, 22 Feb 2024 15:06:16 +0100 rust-index: improve phase computation speed
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Feb 2024 15:06:16 +0100] rev 51425
rust-index: improve phase computation speed While less memory efficient, using an array is *much* faster than using a HashMap, especially with the default hasher. It even makes the code simpler, so I'm not really sure what I was thinking in the first place, maybe it's more obvious now. This fix a significant performance regression when using the rust version of the code. (however, the C code still outperform rust on this operation) hg perf::phases on mozilla-try-2023-03-22 - 6.6.3: 0.451239 seconds - before: 0.982495 seconds - after: 0.265347 seconds - C code: 0.183241 second
Fri, 23 Feb 2024 06:37:25 +0100 phases: directly update the phase sets in advanceboundary
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 06:37:25 +0100] rev 51424
phases: directly update the phase sets in advanceboundary This is similar to what we do in retractboundary. There is no need to invalidate the cache if we have everything at hand to update it.
Fri, 23 Feb 2024 05:25:35 +0100 phases: large rework of advance boundary
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 05:25:35 +0100] rev 51423
phases: large rework of advance boundary In a similar spirit as the rework of retractboundary, the new algorithm is doing an amount of work in the order of magnitude of the amount of changeset that changes phases. (except to find new roots in impacted higher phases if any may exists). This result in a very significant speedup for repository with many old draft like mozilla try. runtime of perf:unbundle for a bundle constaining a single changeset (C code): before 6.7 phase work: 14.497 seconds before this change: 6.311 seconds (-55%) with this change: 2.240 seconds (-85%) Combined with the other patches that fixes the phases computation in the Rust index, the rust code with a persistent nodemap get back to quite interresting performances with 2.026 seconds for the same operation, about 10% faster than the C code.
Thu, 22 Feb 2024 19:21:14 +0100 phases: apply similar early filtering to advanceboundary
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Feb 2024 19:21:14 +0100] rev 51422
phases: apply similar early filtering to advanceboundary advanceboundary is called the push's unbundle (but not the other unbundle) so advanceboundary did not show up the profile I looked at so far. We start with simple pre-filtering to avoid doing any work if we don't needs too.
Wed, 21 Feb 2024 11:09:25 +0100 phases: filter revision that are already in the right phase
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 11:09:25 +0100] rev 51421
phases: filter revision that are already in the right phase No need to compute new roots if everything is already in order.
Wed, 21 Feb 2024 13:05:29 +0100 phases: invalidate the phases set less often on retract boundary
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 13:05:29 +0100] rev 51420
phases: invalidate the phases set less often on retract boundary We already have the information to update the phase set, so we do so directly instead of invalidating the cache. This show a sizeable speedup in our `perf::unbundle` benchmark on the many-draft mozilla-try repository. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.perf.perf-unbundle # bin-env-vars.hg.flavor = no-rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.revs = last-10 before: 2.055259 seconds after: 1.887064 seconds (-8.18%) # benchmark.variants.revs = last-100 before: 2.409239 seconds after: 2.222429 seconds (-7.75%) # benchmark.variants.revs = last-1000 before: 3.945648 seconds after: 3.762480 seconds (-4.64%)
Wed, 21 Feb 2024 13:05:23 +0100 phases: incrementally update the phase sets when reasonable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 13:05:23 +0100] rev 51419
phases: incrementally update the phase sets when reasonable When the amount of manual walking is small, we update the phases set manually instead of computing them from scratch. This should help small update. The next changesets will make this used more often by reducing the amount of full invalidation we do on roots upgrade. The criteria for using an incremental upgrade are arbitrary, however, it "should never hurt".
Fri, 23 Feb 2024 00:01:33 +0100 phasees: properly shallow caopy the phase sets dictionary
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 00:01:33 +0100] rev 51418
phasees: properly shallow caopy the phase sets dictionary We are about to increments the set more incrementally in some case, so we need to make a proper shallow copy of it.
Wed, 21 Feb 2024 14:42:13 +0100 phases: pass an unfiltered repository to _ensure_phase_sets
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 14:42:13 +0100] rev 51417
phases: pass an unfiltered repository to _ensure_phase_sets It seems better for such a low level function to be able to assume it operate on a real repository.
Wed, 21 Feb 2024 13:01:25 +0100 phases: drop set building in `hasnonpublicphases`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 13:01:25 +0100] rev 51416
phases: drop set building in `hasnonpublicphases` We don't actually use the set, so why do we ensure they are built? (we should also clean up the use of repository argument but that's a quest for later).
Wed, 21 Feb 2024 11:59:28 +0100 phases: gather the logic for phasesets update in a single method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 11:59:28 +0100] rev 51415
phases: gather the logic for phasesets update in a single method This logic is duplicated around for no good reason, we gather it in a single place. The conditional is the new function are a bit weird as we about going to extend it soon.
Thu, 22 Feb 2024 10:58:54 +0100 phases: change the way we warm the phasecache in repocache
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Feb 2024 10:58:54 +0100] rev 51414
phases: change the way we warm the phasecache in repocache Same logic as for the previous chngeset. We are about to rename and change the method used here.
Thu, 22 Feb 2024 10:56:05 +0100 phases: use a more generic way to trigger a phases computation for perf
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Feb 2024 10:56:05 +0100] rev 51413
phases: use a more generic way to trigger a phases computation for perf Querying the tip most revision will require the cache to warm the same as calling the dedicated method. This avoid using a method that is mostly meant for internal use and will be renamed in a coming changesets.
Wed, 21 Feb 2024 12:01:09 +0100 phases: fix an overzealous invalidation of the phase sets
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 12:01:09 +0100] rev 51412
phases: fix an overzealous invalidation of the phase sets If `len(cl) == self._loadedrevslen` the cache is up to date.
Wed, 21 Feb 2024 11:04:56 +0100 phases: type annotation for `_phasesets`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 11:04:56 +0100] rev 51411
phases: type annotation for `_phasesets` Does not hurt.
Tue, 20 Feb 2024 23:46:21 +0100 phases: leverage the collected information to record phase update
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 23:46:21 +0100] rev 51410
phases: leverage the collected information to record phase update Since the lower level function already gather this information, we can directly use it. This comes with a small change to the test that are actually fixing them. The previous version over-reported some phase change that did not exists. In both case, we are force revision `1` to be secret and `0` remains draft`, the previous code wrongly reported `0` as moving to secret while it properly remained draft in the repository.
Wed, 21 Feb 2024 10:41:09 +0100 phases: large rewrite on retract boundary
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 10:41:09 +0100] rev 51409
phases: large rewrite on retract boundary The new code is still pure Python, so we still have room to going significantly faster. However its complexity of the complex part is `O(|[min_new_draft, tip]|)` instead of `O(|[min_draft, tip]|` which should help tremendously one repository with old draft (like mercurial-devel or mozilla-try). This is especially useful as the most common "retract boundary" operation happens when we commit/rewrite new drafts or when we push new draft to a non-publishing server. In this case, the smallest new_revs is very close to the tip and there is very few work to do. A few smaller optimisation could be done for these cases and will be introduced in later changesets. We still have iterate over large sets of roots, but this is already a great improvement for a very small amount of work. We gather information on the affected changeset as we go as we can put it to use in the next changesets. This extra data collection might slowdown the `register_new` case a bit, however for register_new, it should not really matters. The set of new nodes is either small, so the impact is negligible, or the set of new nodes is large, and the amount of work to do to had them will dominate the overhead the collecting information in `changed_revs`. As this new code compute the changes on the fly, it unlock other interesting improvement to be done in later changeset.
Thu, 22 Feb 2024 15:49:21 +0100 phases: fast path public phase advance when everything is public
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Feb 2024 15:49:21 +0100] rev 51408
phases: fast path public phase advance when everything is public Everything is already public, so we have nothing to do here.
Wed, 21 Feb 2024 15:24:22 +0100 phases: fast path retract of public phase
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 15:24:22 +0100] rev 51407
phases: fast path retract of public phase There are no boundary to retract, so lets do nothing.
Tue, 20 Feb 2024 21:40:13 +0100 phases: keep internal state as rev-num instead of node-id
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 21:40:13 +0100] rev 51406
phases: keep internal state as rev-num instead of node-id Node-id are expensive to work with, dealing with revision is much simple and faster. The fact we still used node-id here shows how few effort have been put into making the phase logic fast. We tend to no longer use node-id internally for about ten years. This has a large impact of repository with many draft roots. For example this Mozilla-try copy have ½ Million draft roots and `perf::unbundle` see a significant improvement. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.perf.perf-unbundle # bin-env-vars.hg.flavor = no-rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.revs = last-1 before:: 1.746791 seconds after:: 1.278379 seconds (-26.82%) # benchmark.variants.revs = last-10 before:: 3.145774 seconds after:: 2.103735 seconds (-33.13%) # benchmark.variants.revs = last-100 before:: 3.487635 seconds after:: 2.446749 seconds (-29.85%) # benchmark.variants.revs = last-1000 before:: 5.007568 seconds after:: 3.989923 seconds (-20.32%)
Tue, 20 Feb 2024 21:40:08 +0100 phases: do filtering at read time
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 21:40:08 +0100] rev 51405
phases: do filtering at read time This remove the need for the `filterunknown` method at all.
Tue, 20 Feb 2024 21:38:01 +0100 phases: always write with a repo
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 21:38:01 +0100] rev 51404
phases: always write with a repo In the future change that move the internal representation of phase-roots from node-id to rev-num, we will use a repository to translate revision numbers back to node at write time. Since that future change is quite complicated already, we do this small API change beforehand.
Tue, 20 Feb 2024 17:18:15 +0100 phases: mark `phasecache.phaseroots` private
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 17:18:15 +0100] rev 51403
phases: mark `phasecache.phaseroots` private We are about to change its content from nodeid to revnum. So anyone directly using the content might be in unexpected troubles. We start by making it private to explicitly break any such user (and discourage them to do so).
Tue, 20 Feb 2024 17:17:54 +0100 phases: check secret presence the right way during discovery
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 17:17:54 +0100] rev 51402
phases: check secret presence the right way during discovery There is an official function for this, lets use it. This will prevent the code to break in the future while we refactor the phase code.
Tue, 20 Feb 2024 14:21:18 +0100 phases: explicitly filter stripped revision at strip time
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Feb 2024 14:21:18 +0100] rev 51401
phases: explicitly filter stripped revision at strip time Explicit is better than implicit. The current logic is bit subtle and fragile. It also get in the way of using something else than node-id as internal storage. We replace it with a more explicit filtering while striping.
Fri, 23 Feb 2024 04:26:03 +0100 debug: add a debug::unbundle command that simulate the unbundle from a push
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Feb 2024 04:26:03 +0100] rev 51400
debug: add a debug::unbundle command that simulate the unbundle from a push The code have different behavior when the unbundle comes from a push, so we introduce a command that can simulate such unbundle. For our copy of mozilla-try-2023-03-22, this make the unbundle jump from 2.5 seconds (with `hg unbundle`) to 15 seconds (with `hg debug::unbundle`). That 15 seconds timings is consistent with the issue seen in production.
Thu, 22 Feb 2024 18:28:01 +0100 perf: support --template on perf::phases stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Feb 2024 18:28:01 +0100] rev 51399
perf: support --template on perf::phases
Wed, 14 Feb 2024 08:14:46 +0100 annotate: limit output to range of lines
Zeger Van de Vannet <zeger@vandevan.net> [Wed, 14 Feb 2024 08:14:46 +0100] rev 51398
annotate: limit output to range of lines
Mon, 12 Feb 2024 20:01:27 +0000 revlog: add a Rust implementation of `headrevsdiff`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 12 Feb 2024 20:01:27 +0000] rev 51397
revlog: add a Rust implementation of `headrevsdiff` Python implementation of `headrevsdiff` can be very slow in the worst case compared with the `heads` computation it replaces, since the latter is done in Rust. Even the average case of this Python implementation is still noticeable in the profiles. This patch makes the computation much much faster by doing it in Rust.
Thu, 21 Dec 2023 20:30:03 +0000 revlog: add a C implementation of `headrevsdiff`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 21 Dec 2023 20:30:03 +0000] rev 51396
revlog: add a C implementation of `headrevsdiff` Python implementation of `headrevsdiff` can be very slow in the worst case compared with the `heads` computation it replaces, since the latter is done in C. Even the average case of this Python implementation is still noticeable in the profiles. This patch makes the computation much much faster by doing it in C.
Thu, 21 Dec 2023 17:38:04 +0000 unbundle: faster computation of changed heads
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 21 Dec 2023 17:38:04 +0000] rev 51395
unbundle: faster computation of changed heads To compute the set of changed heads it's sufficient to look at the recent commits, instead of looking at all heads currently in existence.
Wed, 21 Feb 2024 11:53:30 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 21 Feb 2024 11:53:30 +0100] rev 51394
branching: merge stable into default
Tue, 20 Feb 2024 10:47:47 -0500 hg-core: separate timestamp and extra methods
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Tue, 20 Feb 2024 10:47:47 -0500] rev 51393
hg-core: separate timestamp and extra methods
Wed, 21 Feb 2024 02:12:58 +0100 debugformat: fix formatting for compression level stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Feb 2024 02:12:58 +0100] rev 51392
debugformat: fix formatting for compression level `bytes(<int>)` gives a very different result as `str(<int>)` and the display of `hg debugformat` have been broken for a while as a result.
Thu, 15 Feb 2024 11:39:18 -0500 hg-core: implement timestamp line parsing
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Thu, 15 Feb 2024 11:39:18 -0500] rev 51391
hg-core: implement timestamp line parsing
Wed, 14 Feb 2024 15:21:44 -0500 doc: document that labels must have a dot in them to have an effect
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 15:21:44 -0500] rev 51390
doc: document that labels must have a dot in them to have an effect I noticed that the `hg topics` template has a bare `topic` label with no dot, and that makes it useless, as such a label will never receive any effect by the colour extension. This dot has been required for a long time, at least since 2011, but we never formally documented it!
Thu, 15 Feb 2024 18:10:41 +0000 tests: tweak chg test to make it fail less often stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 15 Feb 2024 18:10:41 +0000] rev 51389
tests: tweak chg test to make it fail less often the test apparently sometimes prints the word "start" as a part of profile, so let's no longer match "start": CHGHG=/*/install/bin/hg (glob) + \x1b[90m | 50.0% 0.01s profiling.py: __enter__ line 196: self.start()\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s profiling.py: start line 261: self._profiler.__enter__()\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s profiling.py: statprofile line 125: statprof.start(mechanism=b'...\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s statprof.py: start line 356: state.thread.start()\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s threading.py: start line 852: self._started.wait()\x1b[0m (esc)
Thu, 15 Feb 2024 15:21:43 +0000 cext: fix potential memory leaks of list items appended with PyList_Append stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 15 Feb 2024 15:21:43 +0000] rev 51388
cext: fix potential memory leaks of list items appended with PyList_Append Also reduce the duplication in the tricky code that uses PyList_Append by extracting it into a function `pylist_append_owned`.
Wed, 14 Feb 2024 22:55:11 -0500 crecord: enable search hotkeys (issue6834)
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:55:11 -0500] rev 51387
crecord: enable search hotkeys (issue6834) The keys I chose here should be similar to less/vim keybindings, which should fit the overall keybinding theme of crecord.
Wed, 14 Feb 2024 22:54:21 -0500 crecord: add handle(next|prev)search functions
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:54:21 -0500] rev 51386
crecord: add handle(next|prev)search functions These are now just simple wrappers around `searchdirection`
Wed, 14 Feb 2024 22:53:58 -0500 crecord: add a searchdirection function
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:53:58 -0500] rev 51385
crecord: add a searchdirection function If a regex has already been previously set, this function handles the UI elements of searching again forward or backward.
Wed, 14 Feb 2024 22:50:00 -0500 crecord: add a handlesearch function
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:50:00 -0500] rev 51384
crecord: add a handlesearch function This function sets up some of the UI, such as getting the search string from the user and displaying results or their absence.
Wed, 14 Feb 2024 22:48:09 -0500 crecord: add a showsearch function
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:48:09 -0500] rev 51383
crecord: add a showsearch function This function takes a regex and searches either forward or backward, moving the current item to the found item, if any, and unfolding the relevant context.
Wed, 14 Feb 2024 22:46:41 -0500 crecord: add a default regex to curseschunkselector
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:46:41 -0500] rev 51382
crecord: add a default regex to curseschunkselector Whether there is a regex to search or not will affect if we can find the next or the previous search hit.
Wed, 14 Feb 2024 22:43:51 -0500 crecord: add `content` properties to all nodes
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:43:51 -0500] rev 51381
crecord: add `content` properties to all nodes In order to have a unified API of what can be searched, let's provide a `content` property to each node type. This way we can search filenames, context headers (e.g. containing function names, if deducible from patch context) or changed lines themselves.
Wed, 14 Feb 2024 22:42:08 -0500 crecord: update uiheader docstring
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:42:08 -0500] rev 51380
crecord: update uiheader docstring There's no need to move anything to patch.py. The uiheader class only has methods relevant to crecord and overrides __getattr__ in order to use `patch.header` objects as a sort of mixin.
Wed, 14 Feb 2024 22:40:47 -0500 crecord: add skipfolded param to previtem
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:40:47 -0500] rev 51379
crecord: add skipfolded param to previtem This just simplifies the API a bit so it matches `nextitem` and I can handle both nextitem and previtem symmetrically.
Wed, 14 Feb 2024 15:23:59 -0500 dispatch: don't attempt to import debugger as bytestring
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 15:23:59 -0500] rev 51378
dispatch: don't attempt to import debugger as bytestring The __import__ thingie needs a string, not a bytestring. Guess I'm the only one who uses this once in a while and noticed it was broken.
Wed, 14 Feb 2024 11:53:04 -0500 debugsetparents: fix Marmoutian docstring
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 11:53:04 -0500] rev 51377
debugsetparents: fix Marmoutian docstring Just some light proofreading.
Tue, 13 Feb 2024 11:49:55 -0800 docs: fix broken `make` in `docs/`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 13 Feb 2024 11:49:55 -0800] rev 51376
docs: fix broken `make` in `docs/` We had some wrapped lines without blank lines between, which made the runrst script think the list was not a list and it got confused about the indentation. I added blank lines, and also some other minor styling for consistency with the rest of the file.
Wed, 10 Jan 2024 18:58:42 +0000 branchmap: use mmap for faster revbranchcache loading
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 10 Jan 2024 18:58:42 +0000] rev 51375
branchmap: use mmap for faster revbranchcache loading A typical revbranchmap usage is: - load the entire revbranchmap file into memory - maybe do a few lookups - add a few bytes to it - write the addition to disk There's no reason to load the entire revbranchmap into memory. We can split it into a large immutable prefix and a mutable suffix, and then memorymap the prefix, thus saving all the useless loading. Benchmarking on some real-world pushes suggests that out of ~100s server-side push handling revbranchcache handling is responsible for: * ~7s with no change * ~1.3s with the change, without mmap * 0.04s with the change, with mmap
Fri, 02 Feb 2024 04:46:54 +0100 hghave: add py312 and py313
Manuel Jacob <me@manueljacob.de> [Fri, 02 Feb 2024 04:46:54 +0100] rev 51374
hghave: add py312 and py313 While not required in the core test suite in the moment, these could be useful in the future or for extensions. For example, Python 3.12 removed distutils and it might make sense to differentiate based on that.
Fri, 02 Feb 2024 04:23:07 +0100 hghave: use strings instead of floats for version numbers passed to checkvers
Manuel Jacob <me@manueljacob.de> [Fri, 02 Feb 2024 04:23:07 +0100] rev 51373
hghave: use strings instead of floats for version numbers passed to checkvers I think it’s a really bad idea to use floats for version numbers. One problem is that 3.10 is the same as 3.1.
Sat, 03 Feb 2024 23:45:08 +0100 py3: fully port doctest to py3
Manuel Jacob <me@manueljacob.de> [Sat, 03 Feb 2024 23:45:08 +0100] rev 51372
py3: fully port doctest to py3
Fri, 02 Feb 2024 04:03:15 +0100 import-checker: make stdlib path detection work in virtual environments
Manuel Jacob <me@manueljacob.de> [Fri, 02 Feb 2024 04:03:15 +0100] rev 51371
import-checker: make stdlib path detection work in virtual environments The previous logic tried to find the directory containing BaseHTTPServer, which didn’t work as indended because it was only present on Python 2. Instead, the argparse module is used now.
Fri, 02 Feb 2024 03:39:37 +0100 cleanup: remove unnecessary list constructor calls around list comprehensions
Manuel Jacob <me@manueljacob.de> [Fri, 02 Feb 2024 03:39:37 +0100] rev 51370
cleanup: remove unnecessary list constructor calls around list comprehensions
Mon, 12 Feb 2024 16:22:47 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:22:47 +0100] rev 51369
branching: merge stable into default
Mon, 12 Feb 2024 16:17:08 +0100 Added signature for changeset 3fd1efb3ad12 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:17:08 +0100] rev 51368
Added signature for changeset 3fd1efb3ad12
Mon, 12 Feb 2024 16:16:10 +0100 Added tag 6.6.3 for changeset 3fd1efb3ad12 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:16:10 +0100] rev 51367
Added tag 6.6.3 for changeset 3fd1efb3ad12
Mon, 12 Feb 2024 16:14:18 +0100 relnotes: add 6.6.3 stable 6.6.3
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:14:18 +0100] rev 51366
relnotes: add 6.6.3
Mon, 08 Jan 2024 15:25:33 +0000 tests: fix nondeterministic test failure in test-contrib-perf.t stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 08 Jan 2024 15:25:33 +0000] rev 51365
tests: fix nondeterministic test failure in test-contrib-perf.t It turns out (not too shockingly!) the kernel sometimes has some work to do, perhaps at the very least context-switching, so asserting the system time is 0.000000 doesn't work.
Thu, 01 Feb 2024 19:35:35 -0500 grep: restore usage of --include/--exclude options stable
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 01 Feb 2024 19:35:35 -0500] rev 51364
grep: restore usage of --include/--exclude options The refactor in 4a73df6eb67d accidentally forgot to transform the opts argument for walkopts into a byteskwargs. This resulted in its options being ignored. In particular, the -X/-I pair of options was missing. A simple fix restores its usage. Tests included, of course.
Tue, 30 Jan 2024 22:14:02 +0000 rust-changelog: don't panic on empty file lists stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Tue, 30 Jan 2024 22:14:02 +0000] rev 51363
rust-changelog: don't panic on empty file lists
Wed, 24 Jan 2024 13:49:29 -0300 tests: use sha256line.py instead of /dev/random in test-censor.t (issue6858) stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 24 Jan 2024 13:49:29 -0300] rev 51362
tests: use sha256line.py instead of /dev/random in test-censor.t (issue6858) Sometimes the systems that run our test suite don't have enough entropy and they cannot produce target file of the expected size using /dev/random, which results in test failures. Switching to /dev/urandom would give us way more available data at the cost of it being less "random", but we don't really need to use entropy for this task at all, since we only care if the file size after compression is big enough to not be stored inline in the revlog. So let's use something that we already have used to generate this kind of data in other tests.
Wed, 24 Jan 2024 13:35:30 -0300 tests: make sha256line.py available for all tests stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 24 Jan 2024 13:35:30 -0300] rev 51361
tests: make sha256line.py available for all tests This was previously only used in test-revlog-delta-find.t, but it will be useful (and used) in other tests that might need to generate poorly-compressible files.
Thu, 23 Nov 2023 22:51:01 +0100 delta-find: pass the full deltainfo to the _DeltaSearch class
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 22:51:01 +0100] rev 51360
delta-find: pass the full deltainfo to the _DeltaSearch class Having more information is better, so we pass it directly.
Sun, 07 Jan 2024 05:20:00 +0100 delta-find: move sparse-revlog pre-filtering in the associated class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 05:20:00 +0100] rev 51359
delta-find: move sparse-revlog pre-filtering in the associated class Lets move the specialized code in the specialized class.
Sun, 07 Jan 2024 05:16:08 +0100 delta-find: move sparse-revlog delta checks in the associated class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 05:16:08 +0100] rev 51358
delta-find: move sparse-revlog delta checks in the associated class Lets move the specialized code in the specialized class.
Sun, 07 Jan 2024 04:39:18 +0100 delta-find: split the _DeltaSearch class in two
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 04:39:18 +0100] rev 51357
delta-find: split the _DeltaSearch class in two We now have things sliced small enough to have two class that use different `_iter_groups` implementation to encode their different logic. The filtering code remains to be moved, but I would rather keep this changeset simple and move them in the next.
Thu, 23 Nov 2023 22:40:11 +0100 delta-find: finish reworking the snapshot logic and drop more layer
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 22:40:11 +0100] rev 51356
delta-find: finish reworking the snapshot logic and drop more layer The refining logic only applies to the snapshot logic, and this is now all contained in a dedicated method. Along the way, we drop the refined_groups // raw_groups layer as they no longer make sense. The result is a more explicit `iter_groups` method. This conclude the splitting and simplification of the groups generation. We are now ready to dispatch this in more diverse classes.
Thu, 23 Nov 2023 22:29:02 +0100 delta-find: move the base of the delta search in its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 22:29:02 +0100] rev 51355
delta-find: move the base of the delta search in its own function That logic is complicated enough that is is worth puting in its own function. Another method will be introduced in the next changeset to deal with the actual refining.
Thu, 23 Nov 2023 21:44:51 +0100 delta-find: move the emotion of prev in a dedicated method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 21:44:51 +0100] rev 51354
delta-find: move the emotion of prev in a dedicated method After splitting the filtering, and with the `_candidate_groups` layer removed, we can start splitting the group generation too. This helps to organize this code and make it easier to modifying the future.
Thu, 23 Nov 2023 21:51:43 +0100 delta-find: move the emotion of parents in a dedicated method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 21:51:43 +0100] rev 51353
delta-find: move the emotion of parents in a dedicated method After splitting the filtering, and with the `_candidate_groups` layer removed, we can start splitting the group generation too. This helps to organize this code and make it easier to modifying the future.
Sun, 07 Jan 2024 03:08:46 +0100 delta-find: explicitly deal with usage of the cached revision
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:08:46 +0100] rev 51352
delta-find: explicitly deal with usage of the cached revision We can remove this from the general logic path and directly deal with this corner case early. This result in a small change in test-generaldelta.t as it turns out that: - at commit time we (sometimes) precompute a delta against p1 and pass it as the cached delta. - since cached delta where going through the same filtering as everything, we could "optimize" the base if it applied to an empty delta, resulting in not using the pre-computed delta. The simpler logic fix the second item, making the cached delta base always actually tested when requested. Note that the computation of a fast delta against p1 only is questionable, but looking into that is out of scope for this series.
Sun, 07 Jan 2024 03:02:30 +0100 delta-find: remove the "candidate groups" layer
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:02:30 +0100] rev 51351
delta-find: remove the "candidate groups" layer We have enough pieces to remove this generator and directly bear it load using the underlying object.
Sun, 07 Jan 2024 03:13:36 +0100 delta-find: stop using heuristic to determine if we are creating a snapshot
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:13:36 +0100] rev 51350
delta-find: stop using heuristic to determine if we are creating a snapshot This avoid assuming a changeset is a snapshot when it is actually something simpler.
Sun, 07 Jan 2024 02:38:38 +0100 delta-find: explicitly track stage of the search
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 02:38:38 +0100] rev 51349
delta-find: explicitly track stage of the search Being more explicit about what we are doing is going to be useful. We actually start making use of it in later changesets.
Thu, 23 Nov 2023 20:09:34 +0100 delta-find: drop some dead debug code
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 20:09:34 +0100] rev 51348
delta-find: drop some dead debug code Seems like it was never put to use, so lets simply remove it for now.
Sun, 07 Jan 2024 03:34:27 +0100 delta-find: introduce and use specialized _DeltaSearch class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:34:27 +0100] rev 51347
delta-find: introduce and use specialized _DeltaSearch class For now, we introduce some very simple variant, but they are still useful to display how having the class can helps keeping the simple case simple and their special case out of more advanced logic.
Sun, 07 Jan 2024 01:05:10 +0100 delta-find: introduce a base class for _DeltaSearch
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 01:05:10 +0100] rev 51346
delta-find: introduce a base class for _DeltaSearch This prepare the introduction of specialized the class in the next changesets.
Sun, 07 Jan 2024 03:23:24 +0100 delta-find: simplify the delta checking function for snapshot
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:23:24 +0100] rev 51345
delta-find: simplify the delta checking function for snapshot Since the function is all about snapshot, we can safely use an early return and make the result simpler.
Sun, 07 Jan 2024 00:56:15 +0100 delta-find: move good delta code earlier in the class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 00:56:15 +0100] rev 51344
delta-find: move good delta code earlier in the class Nothing change except the code location. This greatly helps readability of the next future diff,
Thu, 04 Jan 2024 17:20:30 +0100 delta-find: split is_good_delta_info into more thematic function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 17:20:30 +0100] rev 51343
delta-find: split is_good_delta_info into more thematic function Same logic as for candidate filtering, we group code into related sub method. This will help clarifying later patches as some logic is pre-splitted
Thu, 04 Jan 2024 15:35:57 +0100 delta-find: clarify some comment and code in is_good_delta_info
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 15:35:57 +0100] rev 51342
delta-find: clarify some comment and code in is_good_delta_info We move the comment closer to the code it describ and we compute an intermediate value without using the `textlen` variable, as it will stop being defined in a future patch. This will clarify future patches.
Thu, 04 Jan 2024 15:35:36 +0100 delta-find: move delta size check earlier in is_good_delta_info
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 15:35:36 +0100] rev 51341
delta-find: move delta size check earlier in is_good_delta_info This will clarify future patches by regrouping related logic before larger movement.
Thu, 04 Jan 2024 15:04:10 +0100 delta-find: split the delta-chain part of `_pre_filter_rev` in a method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 15:04:10 +0100] rev 51340
delta-find: split the delta-chain part of `_pre_filter_rev` in a method Since `_pre_filter_rev` contains logic from various sources of constraint, we start splitting is in subfunction to clarify and document the grouping.
Thu, 04 Jan 2024 14:51:48 +0100 delta-find: split the "sparse" part of `_pre_filter_rev` in a method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 14:51:48 +0100] rev 51339
delta-find: split the "sparse" part of `_pre_filter_rev` in a method Since `_pre_filter_rev` contains logic from various sources of constraint, we start splitting is in subfunction to clarify and document the grouping.
Thu, 23 Nov 2023 18:56:31 +0100 delta-find: split the generic part of `_pre_filter_rev` in a method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 18:56:31 +0100] rev 51338
delta-find: split the generic part of `_pre_filter_rev` in a method Since `_pre_filter_rev` contains logic from various sources of constraint, we start splitting is in subfunction to clarify and document the grouping.
Thu, 04 Jan 2024 14:39:10 +0100 delta-find: drop the temporary indent
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 14:39:10 +0100] rev 51337
delta-find: drop the temporary indent Now that the complicated change is made, we can do the noisy one.
Thu, 23 Nov 2023 18:40:47 +0100 delta-find: move pre-filtering of individual revision in its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 18:40:47 +0100] rev 51336
delta-find: move pre-filtering of individual revision in its own function This goes one step further than the previous change by making the pre-filtering of individual candicates revision in its own function. This will allow subclass to easily configure this filtering with their own constrains. The `if True:` part help the readability of this diff a lot and will be drop in to the next changesets.
Thu, 23 Nov 2023 04:21:07 +0100 delta-find: move pre-filtering of candidates in its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 04:21:07 +0100] rev 51335
delta-find: move pre-filtering of candidates in its own function This organise the code further and open the way to specialization via sub-classing. Something important for the coming changes.
Fri, 29 Dec 2023 13:35:08 +0100 delta-find: move away from the generator API for _DeltaSearch
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Dec 2023 13:35:08 +0100] rev 51334
delta-find: move away from the generator API for _DeltaSearch We use more explicit function call. This make operations more explicit and will make future refactoring simpler.
Thu, 23 Nov 2023 21:13:14 +0100 delta-find: use "-1" as depth snapshot-dept for non snapshot in debug
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 21:13:14 +0100] rev 51333
delta-find: use "-1" as depth snapshot-dept for non snapshot in debug This will help do distinct full snapshot (level 0) and normal delta (not a snapshot, no snapshot level)
Thu, 23 Nov 2023 21:45:45 +0100 delta-find: fix the computation of the `prev` value
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 21:45:45 +0100] rev 51332
delta-find: fix the computation of the `prev` value The previous computation was "wrong" it always used the tiprev, even when computing a delta in a non-append case (mostly benchmark). This never produced wrong delta on disk, but would misled debug or performance command. Since it does not have any actual user impact, I did not put this on stable. With the code fixed we can now use revisions in some search and it makes the test display more interesting behavior since the algorithm has more to work with.
Fri, 22 Dec 2023 01:33:40 +0100 delta-find: move is_good_delta_info on the _DeltaSearch class
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 22 Dec 2023 01:33:40 +0100] rev 51331
delta-find: move is_good_delta_info on the _DeltaSearch class There is a lot of format specific code in `is_good_delta_info`, moving it on _DeltaSearch will allow to split this into subclass soon.
Fri, 22 Dec 2023 01:33:33 +0100 delta-find: feed revinfo to _DeltaSearch
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 22 Dec 2023 01:33:33 +0100] rev 51330
delta-find: feed revinfo to _DeltaSearch The revinfo has more information and will allow for even more function to be turned into method.
Thu, 23 Nov 2023 03:23:11 +0100 delta-find: clarify that revisioninfo.p1/p2 constains nodeid
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 03:23:11 +0100] rev 51329
delta-find: clarify that revisioninfo.p1/p2 constains nodeid This clarify the content of these attributes.
Thu, 23 Nov 2023 03:23:41 +0100 delta-find: move filing of some debug data in `_one_dbg_data`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 03:23:41 +0100] rev 51328
delta-find: move filing of some debug data in `_one_dbg_data` Since the `_one_dbg_data` method is meant to create a valid debug dictionnary. We can as well prefill the relevant value to reduce the amount of debug code in the main code.
Thu, 23 Nov 2023 01:28:30 +0100 delta-find: add more explanation to the the deltas_limit < length check
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 01:28:30 +0100] rev 51327
delta-find: add more explanation to the the deltas_limit < length check More explanations is always good.
Thu, 23 Nov 2023 01:13:40 +0100 delta-find: move tested in the _DeltaSearch.__init__
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 01:13:40 +0100] rev 51326
delta-find: move tested in the _DeltaSearch.__init__ Now that we have an object we can initialize that attribute at initialization time. This will make it available for more method in the future, allowing to split the code.
Mon, 20 Nov 2023 05:05:29 +0100 delta-find: check DELTA_BASE_REUSE_FORCE in the _DeltaSearch.__init__
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Nov 2023 05:05:29 +0100] rev 51325
delta-find: check DELTA_BASE_REUSE_FORCE in the _DeltaSearch.__init__ Now that we have an object we can check that DELTA_BASE_REUSE_FORCE cases does not reach this code at in a more suitable location.
Mon, 20 Nov 2023 05:04:23 +0100 delta-find: move target_rev in the _DeltaSearch.__init__
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Nov 2023 05:04:23 +0100] rev 51324
delta-find: move target_rev in the _DeltaSearch.__init__ Now that we have an object we can initialize that attribute at initialization time.
Mon, 20 Nov 2023 05:03:21 +0100 delta-find: move snapshot_cache in the _DeltaSearch.__init__
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Nov 2023 05:03:21 +0100] rev 51323
delta-find: move snapshot_cache in the _DeltaSearch.__init__ Now that we have an object we can initialize that attribute at initialization time.
Mon, 20 Nov 2023 04:59:25 +0100 delta-find: move `_rawgroups` on the `_DeltaSearch` object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Nov 2023 04:59:25 +0100] rev 51322
delta-find: move `_rawgroups` on the `_DeltaSearch` object Moving more code before doing more logic changes.
Mon, 20 Nov 2023 04:53:11 +0100 delta-find: move `_refinedgroups` on the `_DeltaSearch` object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Nov 2023 04:53:11 +0100] rev 51321
delta-find: move `_refinedgroups` on the `_DeltaSearch` object Moving more code before doing more logic changes.
Mon, 20 Nov 2023 04:44:40 +0100 delta-find: introduce a _DeltaSearch object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Nov 2023 04:44:40 +0100] rev 51320
delta-find: introduce a _DeltaSearch object That object represent the search of a good delta for one revision. It will replace the interleaved generator currently in use. It will make the logic more explicit and easier to split into different subclass for the algorithm variant. We will move content gradually before doing deeper rework. For now, we only move the `_candidategroups` function here. More will follow in the same series.
Fri, 22 Dec 2023 12:58:54 +0100 delta-find: add a small docstring to deltacomputer
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 22 Dec 2023 12:58:54 +0100] rev 51319
delta-find: add a small docstring to deltacomputer As we are about to introduce another object related to finding delta. So lets have a minimal docstring to the existing one.
Thu, 11 Jan 2024 16:41:54 +0100 revlog: stop using `atomictmp` for the split revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Jan 2024 16:41:54 +0100] rev 51318
revlog: stop using `atomictmp` for the split revlog Since we already manually deal with writing on the side and delaying visibily, we no longer need this.
Thu, 11 Jan 2024 16:39:31 +0100 changelog: drop the side_write argument to revlog splitting
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Jan 2024 16:39:31 +0100] rev 51317
changelog: drop the side_write argument to revlog splitting The only user is now gone.
Thu, 11 Jan 2024 16:35:52 +0100 changelog: stop useless enforcing split at the end of transaction
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Jan 2024 16:35:52 +0100] rev 51316
changelog: stop useless enforcing split at the end of transaction Changelogs are no longer created inline, and existing changelogs are automatically split. Since we now enforce splitting at the start of any write, we don't need to enforce splitting at the end of the transaction. This has the nice side effect of killing the only user of "side_write".
Sun, 14 Jan 2024 16:03:08 -0300 tests: don't use "status" operand of dd in test-censor.t (issue6858) stable
Anton Shestakov <av6@dwimlabs.net> [Sun, 14 Jan 2024 16:03:08 -0300] rev 51315
tests: don't use "status" operand of dd in test-censor.t (issue6858) Some implementations don't have this operand, let's just direct stderr into /dev/null, that's pretty cross-platform. Also specify bs=512 (the default for me), because the default might be different on different systems. Other uses of dd in the tests do specify it, so this is more consistent.
Thu, 11 Jan 2024 17:52:13 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 11 Jan 2024 17:52:13 +0100] rev 51314
branching: merge stable into default
Thu, 11 Jan 2024 17:49:51 +0100 Added signature for changeset 136902b3a95d stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 11 Jan 2024 17:49:51 +0100] rev 51313
Added signature for changeset 136902b3a95d
Thu, 11 Jan 2024 17:49:37 +0100 Added tag 6.6.2 for changeset 136902b3a95d stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 11 Jan 2024 17:49:37 +0100] rev 51312
Added tag 6.6.2 for changeset 136902b3a95d
Thu, 11 Jan 2024 17:49:04 +0100 relnotes: add 6.6.2 stable 6.6.2
Raphaël Gomès <rgomes@octobus.net> [Thu, 11 Jan 2024 17:49:04 +0100] rev 51311
relnotes: add 6.6.2
Wed, 03 Jan 2024 18:33:39 +0100 pycompat: fix bytestr(bytes) in Python 3.11 stable
Georges Racinet <georges.racinet@octobus.net> [Wed, 03 Jan 2024 18:33:39 +0100] rev 51310
pycompat: fix bytestr(bytes) in Python 3.11 In Python 3.10, the `bytes` type itself does not have a `__bytes__` attribute, but it does in 3.11. Yet `bytes(bytes)` does not give the wished output, so we have to add an exceptional case. The added case in the doctest reproduces the problem with Python 3.11. Impact: error treatment in expressions such as `repo[b'invalid']` gets broken.
Thu, 04 Jan 2024 14:45:31 -0500 narrow: prevent removal of ACL-defined excludes stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Thu, 04 Jan 2024 14:45:31 -0500] rev 51309
narrow: prevent removal of ACL-defined excludes
Thu, 04 Jan 2024 14:41:18 -0500 narrow: add test demonstrating bug in acl exclusion enforcement stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Thu, 04 Jan 2024 14:41:18 -0500] rev 51308
narrow: add test demonstrating bug in acl exclusion enforcement
Mon, 08 Jan 2024 13:35:02 +0100 contrib: add a set of scripts to run pytype in Docker
Anton Shestakov <av6@dwimlabs.net> [Mon, 08 Jan 2024 13:35:02 +0100] rev 51307
contrib: add a set of scripts to run pytype in Docker Having a simple way to run pytype for developers can massively shorten development cycle. Using the same Docker image and scripts that we use on our CI guarantees that the result achieved locally will be very similar to (if not the same as) the output of our CI runners. Things to note: the Dockerfile needs to do a little dance around user permissions inside /home/ci-runner/ because: - on one hand, creating new files on the host (e.g. .pyi files inside .pytype/) should use host user's uid and gid - on the other hand, when we run the image as uid:gid of host user, it needs to be able to read/execute files inside the image that are owned by ci-runner Since local user's uid might be different from ci-runner's uid, we execute this very broad chmod command inside /home/ci-runner/, but then run the image as the host user's uid:gid. There might be a better way to do this.
Mon, 18 Dec 2023 15:52:17 -0300 pytype: use "$(hg root)" instead of `hg root` to make shellcheck happier
Anton Shestakov <av6@dwimlabs.net> [Mon, 18 Dec 2023 15:52:17 -0300] rev 51306
pytype: use "$(hg root)" instead of `hg root` to make shellcheck happier
Mon, 18 Dec 2023 15:40:48 -0300 pytype: update check-pytype.sh to select target automatically
Anton Shestakov <av6@dwimlabs.net> [Mon, 18 Dec 2023 15:40:48 -0300] rev 51305
pytype: update check-pytype.sh to select target automatically We have python3.11 on CI, so we can run pytype targeting that version. On the other hand, we don't have python3.7 on CI anymore, so we can't run pytype for 3.7 anymore (interpreter not found). I think it's fine to make pytype select the appropriate target depending on the version of the interpreter it's running under.
Tue, 19 Dec 2023 22:54:52 +0100 git-hgext: adjust to the lack of `changelog.heads` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 22:54:52 +0100] rev 51304
git-hgext: adjust to the lack of `changelog.heads` method We don't have a `heads` method returning nodeid, but this is very easy to get the same result. This was flagged by pytype. We can note that the fact this code did not break is probably a good sign that it is dead code. However this is a question outside of the scop of this series.
Tue, 19 Dec 2023 22:21:31 +0100 remotefilelog: drop dead code
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 22:21:31 +0100] rev 51303
remotefilelog: drop dead code As pytype flagged bug in this method it highlighted that this methode being never called anywhere.
Tue, 19 Dec 2023 22:07:59 +0100 pytype: use the right signature for the `__delitem__`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 22:07:59 +0100] rev 51302
pytype: use the right signature for the `__delitem__` It is not because it is NotImplemented that it should use a bad signature. Fix it to please pytype.
Tue, 19 Dec 2023 22:07:21 +0100 pytype: use the right signature for the `__setitem__`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 22:07:21 +0100] rev 51301
pytype: use the right signature for the `__setitem__` It is not because it is NotImplemented that it should use a bad signature. Fix it to please pytype.
Tue, 19 Dec 2023 22:03:34 +0100 sparse: use with statement for wlock
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 22:03:34 +0100] rev 51300
sparse: use with statement for wlock This will avoid pytype complaining about the try/except range.
Tue, 19 Dec 2023 22:00:47 +0100 remotefilelog: adjust the signature of basepack.createindex
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 22:00:47 +0100] rev 51299
remotefilelog: adjust the signature of basepack.createindex pytype point that the subclass signature have been updated.
Thu, 21 Dec 2023 00:19:19 +0100 pytype: add the couple annotations for pytype to understands the lrunode
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 21 Dec 2023 00:19:19 +0100] rev 51298
pytype: add the couple annotations for pytype to understands the lrunode After loosing 2d6 SAN, I eventually understood that pytype was confused by method return type. Pytype is now happy.
Tue, 19 Dec 2023 21:40:06 +0100 pytype: ignore some signature mismatch in registrar
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:40:06 +0100] rev 51297
pytype: ignore some signature mismatch in registrar pytype is grumpy about a sub method having a different signature than the one we use here. pytype error: internalmerge: Overriding method signature mismatch [signature-mismatch] Base signature: 'def _funcregistrarbase._extrasetup(self, name, func) -> Any'. Subclass signature: 'def internalmerge._extrasetup(self, name, func, mergetype, onfailure = None, precheck = None, binary = False, symlink = False) -> Any'. Parameter 'mergetype' must have a default value.
Tue, 19 Dec 2023 21:38:46 +0100 hgweb: update _runwsgi try/except range to be valid
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:38:46 +0100] rev 51296
hgweb: update _runwsgi try/except range to be valid The `tmpl` variable is used in the `except` and `finally`, so we need it created before the `try` is open.
Tue, 19 Dec 2023 21:36:52 +0100 pytype: add type information for `annotateresult.lines`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:36:52 +0100] rev 51295
pytype: add type information for `annotateresult.lines` This seems to appease a confused pytype.
Tue, 19 Dec 2023 21:34:47 +0100 pytype: ignore attribute error for time.clock
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:34:47 +0100] rev 51294
pytype: ignore attribute error for time.clock This seems to be a Windows only attribute.
Tue, 19 Dec 2023 21:27:49 +0100 pytype: ignore certifi import error
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:27:49 +0100] rev 51293
pytype: ignore certifi import error This is an optional import so we should not complains about it.
Tue, 19 Dec 2023 21:26:30 +0100 pytype: ignore some signature mismatch in configitems
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:26:30 +0100] rev 51292
pytype: ignore some signature mismatch in configitems pytype is grumpy about the dict.update having a more complex signature than the one we use here. pytype error: itemregister: Overriding method signature mismatch [signature-mismatch] Base signature: 'def builtins.dict.update(self) -> None'. Subclass signature: 'def itemregister.update(self, other) -> Any'. Parameter 'other' must have a default value.
Wed, 20 Dec 2023 16:30:32 +0100 pytype: only output the "pytype crashed" message on error
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Dec 2023 16:30:32 +0100] rev 51291
pytype: only output the "pytype crashed" message on error If pytype did not crash while generating stub, that message is kind of confusing. It seems simple enough to avoid it in this case.
Wed, 20 Dec 2023 22:17:03 +0100 pytype: drop the now useless assert
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Dec 2023 22:17:03 +0100] rev 51290
pytype: drop the now useless assert As the imported types are now used by type annotation, these ugly assert are no longer needed.
Wed, 20 Dec 2023 16:39:03 +0100 pytype: drop the last inline type comment
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Dec 2023 16:39:03 +0100] rev 51289
pytype: drop the last inline type comment We can't assign type to the "for" variant on the fly, so we type the variable and method used instead.
Wed, 20 Dec 2023 11:23:09 +0100 pytype: convert type comment for inline variable too
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Dec 2023 11:23:09 +0100] rev 51288
pytype: convert type comment for inline variable too Same logic as for the previous changeset, but for "type comment" annotating variables, not function/method. As for the previous changeset, we had to adjust for of the types to actually match what was happening.
Tue, 19 Dec 2023 21:29:34 +0100 pytype: move some type comment to proper annotation
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Dec 2023 21:29:34 +0100] rev 51287
pytype: move some type comment to proper annotation We support direct type annotations now, while pytype is starting to complains about them.
Wed, 20 Dec 2023 20:13:22 +0100 lock: properly convert error to bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Dec 2023 20:13:22 +0100] rev 51286
lock: properly convert error to bytes Flagged by pytype when a later changeset is applied moving typing comment to annotation. We fix this ahead of the annotation change to make sure pytype remains happy after the change. We have to do fairly crazy dance for pytype to be happy. This probably comes from the fact IOError.filename probably claims to be `str` while it is actually `bytes` if the filename raising that `IOError` is bytes. At the same time, `IOError.strerror` is consistently `str` and should be passed as `str` everywhere.
Wed, 20 Dec 2023 12:51:20 +0100 pytype: import typing directly
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Dec 2023 12:51:20 +0100] rev 51285
pytype: import typing directly First we no longer needs the pycompat layer, second having the types imported in all case will allow to use them more directly in type annotation, something important to upgrade the old "type comment" to proper type annotation. A lot a stupid assert are needed to keep pyflakes happy. We should be able to remove most of them once the type comment have been upgraded.
Wed, 08 Nov 2023 01:58:16 +0100 usage: configure uncompressed chunk cache through resource configuration
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 01:58:16 +0100] rev 51284
usage: configure uncompressed chunk cache through resource configuration Let's use this new concept for what it is meant for. This provides a sizable speed up for reading multiple revision for some complexe repositories. ### data-env-vars.name = pypy-2018-08-01-zstd-sparse-revlog # benchmark.name = hg.perf.read-revisions # benchmark.variants.order = reverse memory-medium: 1.892400 memory-high: 1.722934 (-8.61%) # benchmark.variants.order = default memory-medium: 1.751542 memory-high: 1.589340 (-9.49%)
Mon, 09 Oct 2023 15:12:16 +0200 usage: add configuration option to adjust resources usage
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 09 Oct 2023 15:12:16 +0200] rev 51283
usage: add configuration option to adjust resources usage They currently do nothing, but this open the way to actually use them.
Mon, 09 Oct 2023 15:06:21 +0200 usage: add a `usage.repository-role` config
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 09 Oct 2023 15:06:21 +0200] rev 51282
usage: add a `usage.repository-role` config This config will be used for behavior and performance adjustment depending of the repository role.
Wed, 13 Dec 2023 13:46:28 +0100 common-pattern: cover "elapsed time" line
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 13 Dec 2023 13:46:28 +0100] rev 51281
common-pattern: cover "elapsed time" line These are perfect targets for the common-pattern matching.
Wed, 27 Dec 2023 18:02:26 +0100 bundle: do not detect --base argument that match nothing as lack of argument stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Dec 2023 18:02:26 +0100] rev 51280
bundle: do not detect --base argument that match nothing as lack of argument With the previous version of the code, if --base did not match anything, it will be handled as if no --base was provided and will fallback to using discovery with the default path. This has two issues : - The resulting bundle won't match what the user requested, - if not default path is configured, it will crash. We now properly distinct between the two cases and if the --base query does not find any changeset, we will assume that everything under --rev needs to be sent.
Wed, 27 Dec 2023 18:42:13 +0100 bundle: highlight misbehavior when --base does not match any revision stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Dec 2023 18:42:13 +0100] rev 51279
bundle: highlight misbehavior when --base does not match any revision See next changeset for fix and details.
Sun, 24 Dec 2023 02:43:53 +0100 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 24 Dec 2023 02:43:53 +0100] rev 51278
branching: merge with stable I need the fix to `generate-churning-bundle.py`.
Sat, 18 Nov 2023 00:16:15 +0100 generate-churning-bundle: fix script for python3 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 18 Nov 2023 00:16:15 +0100] rev 51277
generate-churning-bundle: fix script for python3 This script has apparently not run for a long time.
Sat, 16 Dec 2023 10:48:20 -0800 narrow: strip trailing `/` from manifest dir before matching it
Martin von Zweigbergk <martinvonz@google.com> [Sat, 16 Dec 2023 10:48:20 -0800] rev 51276
narrow: strip trailing `/` from manifest dir before matching it Commit 17a822d7943e broke some of our internal tests at Google because the `dir` variable contains a trailing slash since that commit. Let's restore the old behavior by stripping that trailing slash.
Mon, 18 Dec 2023 10:13:41 -0800 tests: demonstrate error when narrowing with `rootfilesin:` pattern
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Dec 2023 10:13:41 -0800] rev 51275
tests: demonstrate error when narrowing with `rootfilesin:` pattern This demonstrates a bug introduced in 17a822d7943e.
Mon, 18 Dec 2023 14:51:20 -0800 matchers: use correct method for finding index in vector
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Dec 2023 14:51:20 -0800] rev 51274
matchers: use correct method for finding index in vector The path matcher has an optimization for when all paths are `rootfilesin:`. This optimization exists in both Python and Rust. However, the Rust implementation currently has a bug that makes it fail in most cases. The bug is that it `rfind()` where it was clearly intended to use `rposition()`. This patch fixes that and adds a test.
Tue, 12 Dec 2023 17:08:45 +0100 dirstate: make the `transaction` argument of `setbranch` mandatory
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 12 Dec 2023 17:08:45 +0100] rev 51273
dirstate: make the `transaction` argument of `setbranch` mandatory This is deprecated since 6.4. We should drop it now.
Wed, 20 Dec 2023 14:59:31 +0100 rust-clippy: apply some more trivial fixes
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Dec 2023 14:59:31 +0100] rev 51272
rust-clippy: apply some more trivial fixes All of these were hinted at by clippy and make the code simpler.
Wed, 20 Dec 2023 14:58:36 +0100 rust-clippy: simplify `match` to `if let`
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Dec 2023 14:58:36 +0100] rev 51271
rust-clippy: simplify `match` to `if let` This was hinted at by clippy, and makes it more obvious that nothing is happening in the `None` case.
Fri, 01 Dec 2023 22:56:08 +0100 censor: accept multiple revision in a single call
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Dec 2023 22:56:08 +0100] rev 51270
censor: accept multiple revision in a single call This is useful when dealing with corruption, as all the corrupted revision can be dealt with in one go.
Fri, 01 Dec 2023 22:46:46 +0100 censor: be more verbose about the other steps too
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Dec 2023 22:46:46 +0100] rev 51269
censor: be more verbose about the other steps too If we informs the user about head checking, we should tell him when the other operation happens too. Otherwise the user can imagine to still be in the head checking part.
Fri, 01 Dec 2023 22:44:33 +0100 censor: add a command flag to skip the head checks
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Dec 2023 22:44:33 +0100] rev 51268
censor: add a command flag to skip the head checks In some case we spend hours of time checking the heads to censors a simple file is not a good behavior. Especially when censors is used to removed corrupted content.
Fri, 01 Dec 2023 22:33:35 +0100 censor: inform the user that we are spending time checking heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Dec 2023 22:33:35 +0100] rev 51267
censor: inform the user that we are spending time checking heads The time this can consume can be a surprise to the user, lets be explicit about it.
Fri, 01 Dec 2023 22:25:52 +0100 censor: mention that we check the heads in the help
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Dec 2023 22:25:52 +0100] rev 51266
censor: mention that we check the heads in the help And add a message to will explain the possibly long time spent doing this.
Thu, 21 Dec 2023 01:45:43 +0100 persistent-nodemap: respect the mmap setting when refreshing data stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 21 Dec 2023 01:45:43 +0100] rev 51265
persistent-nodemap: respect the mmap setting when refreshing data After writing updated data, we reload the in-memory data. However, that logic was… wrong. We were doing file read when mmap was requested and when the configuration was requesting to not use mmap… we were using it. This should now be fine.
Thu, 14 Dec 2023 09:57:25 +0100 rust-index: only access offsets if revlog is inline
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Dec 2023 09:57:25 +0100] rev 51264
rust-index: only access offsets if revlog is inline Accessing the `RwLock` ended up showing up in profiles even with no contention. Offsets only exist for inline revlogs, so gate everything behind an inline check.
Wed, 06 Dec 2023 11:04:18 +0100 rust-index: cache the head nodeids python list
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Dec 2023 11:04:18 +0100] rev 51263
rust-index: cache the head nodeids python list Same optimization as before, but for the nodeids this time.
Tue, 05 Dec 2023 14:50:05 +0100 rust-index: add fast-path for getting a list of all heads as nodes
Raphaël Gomès <rgomes@octobus.net> [Tue, 05 Dec 2023 14:50:05 +0100] rev 51262
rust-index: add fast-path for getting a list of all heads as nodes This avoids a lot of back-and-forth between Python and Rust. We forgo adding a fast-path in the `filteredchangelog` case yet. If it shows up in profiling, we might add the variant with a filter.
Wed, 29 Nov 2023 23:22:51 -0500 rust-index-cpython: cache the heads' PyList representation
Raphaël Gomès <rgomes@octobus.net> [Wed, 29 Nov 2023 23:22:51 -0500] rev 51261
rust-index-cpython: cache the heads' PyList representation This is the same optimization that the C index does, we just have more separation of the Python and native sides.
Wed, 29 Nov 2023 15:58:24 -0500 rust-index: use a `BitVec` instead of plain `Vec` for heads computation
Raphaël Gomès <rgomes@octobus.net> [Wed, 29 Nov 2023 15:58:24 -0500] rev 51260
rust-index: use a `BitVec` instead of plain `Vec` for heads computation The `Vec` method uses one byte per revision, this uses 1 per 8 revisions, which improves our memory footprint. For large graphs (10+ millions), this can make a measurable difference server-side. I have seen no measurable impact on execution speed.
Wed, 29 Nov 2023 10:04:41 -0500 rust-index: implement faster retain heads using a vec instead of a hashset
Raphaël Gomès <rgomes@octobus.net> [Wed, 29 Nov 2023 10:04:41 -0500] rev 51259
rust-index: implement faster retain heads using a vec instead of a hashset This is the same optimization that the C index does, we're only catching up now because this showed up as slow in benchmarking.
Thu, 14 Dec 2023 11:52:05 +0100 rust-index: allow inlining VCSGraph parents across crates
Raphaël Gomès <rgomes@octobus.net> [Thu, 14 Dec 2023 11:52:05 +0100] rev 51258
rust-index: allow inlining VCSGraph parents across crates
Thu, 23 Nov 2023 18:48:07 +0100 rust-index: allow inlining `parents` across crates
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Nov 2023 18:48:07 +0100] rev 51257
rust-index: allow inlining `parents` across crates
Thu, 23 Nov 2023 18:47:42 +0100 rust-index: allow inlining `check_revision` across crates
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Nov 2023 18:47:42 +0100] rev 51256
rust-index: allow inlining `check_revision` across crates
Thu, 23 Nov 2023 03:41:58 +0100 rust-index: document safety invariants being upheld for every `unsafe` block
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Nov 2023 03:41:58 +0100] rev 51255
rust-index: document safety invariants being upheld for every `unsafe` block We've added a lot of `unsafe` code that shares Rust structs with Python. While this is unfortunate, it is also unavoidable, so let's at least systematically explain why each call to `unsafe` is sound. If any of the unsafe code ends up being wrong (because everyone screws up at some point), this change at least continues the unspoken rule of always explaining the need for `unsafe`, so we at least get a chance to think.
Sun, 29 Oct 2023 12:18:03 +0100 rust-index: renamed `MixedIndex` as `Index`
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Sun, 29 Oct 2023 12:18:03 +0100] rev 51254
rust-index: renamed `MixedIndex` as `Index` It is simply not mixed any more, hence the name had become a future source of confusion.
Sun, 29 Oct 2023 23:54:05 +0100 rust-index: stop instantiating a C Index
Georges Racinet <georges.racinet@octobus.net> [Sun, 29 Oct 2023 23:54:05 +0100] rev 51253
rust-index: stop instantiating a C Index The only missing piece was the `cache` to be returned from `revlog.parse_index_v1_mixed`, and it really seems that it is essentially repetition of the input, if `inline` is `True`. Not worth a Rust implementation (C implementation is probably there for historical reasons).
Mon, 30 Oct 2023 21:28:30 +0100 rust-revlog: using the ad-hoc `NodeTree` in scmutil
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 21:28:30 +0100] rev 51252
rust-revlog: using the ad-hoc `NodeTree` in scmutil Now that we have an independent `NodeTree` class able to work natively on the pure Rust index, we use it in `mercurial.scmutil`, with automatic invalidation after mutation of the index. This code path is tested by `test-revisions.t` and `test-template-functions.t`
Mon, 30 Oct 2023 22:36:30 +0100 rust-revlog: add invalidation detection to `NodeTree` class
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 22:36:30 +0100] rev 51251
rust-revlog: add invalidation detection to `NodeTree` class This will be useful for callers, such as `scmutil` who reuse a `NodeTree` instance as a cache. They would otherwise get hard errors if any mutation of the index occurred since instantiation. This is something the C index does not provide.
Thu, 02 Nov 2023 15:50:13 +0100 rust-index: add support for `del index[r]`
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 15:50:13 +0100] rev 51250
rust-index: add support for `del index[r]` Only the `del index[r:]` syntax was supported, but the comment said otherwise. It's not actually used in core code, but the C index supports it.
Mon, 30 Oct 2023 21:26:17 +0100 rust-revlog: bare minimal NodeTree exposition
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 21:26:17 +0100] rev 51249
rust-revlog: bare minimal NodeTree exposition The independent `NodeTree` instances needs to be associated to an index (for forward-checks of candidates) but do not need to encompass all revisions from that index. This is exactly how it is used in `scmutil.shortesthenodeidprefix` and we restrict the implementation to the bare minimum needed there and to write convincing tests. It would of course be fairly trivial to add more.
Mon, 30 Oct 2023 21:25:28 +0100 rust-index: a property to identify the Rust index as such
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 21:25:28 +0100] rev 51248
rust-index: a property to identify the Rust index as such Will be useful soon in `mercurial.scmutil` and potentially elsewhere
Mon, 30 Oct 2023 15:32:33 +0100 rust-cpython-revlog: renamed NodeTree import as CoreNodeTree
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 15:32:33 +0100] rev 51247
rust-cpython-revlog: renamed NodeTree import as CoreNodeTree We're about to introduce a `NodeTree` Python class (hence also a Rust struct) and it would be a collision with the import
Fri, 20 Oct 2023 09:48:53 +0200 rust-index: stop using C index
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Oct 2023 09:48:53 +0200] rev 51246
rust-index: stop using C index We still keep its wrapper implementation in `hg-cpython::cindex`, because we might want to recreate ancestors handling objects using it for the case of REVLOGV2. Also, we still instantiate it (from Python code) and store it as attribute, for the likes of `get_cindex` and the caller that relies on it, but that is soon to be removed, too.
Sun, 29 Oct 2023 12:07:05 +0100 rust-index: using `hg::index::Index` in discovery
Georges Racinet <georges.racinet@octobus.net> [Sun, 29 Oct 2023 12:07:05 +0100] rev 51245
rust-index: using `hg::index::Index` in discovery At this point the C index is not used any more: we had to remove `pyindex_to_graph()` to avoid the dead code warning.
Sun, 29 Oct 2023 12:01:57 +0100 rust-python-testing: separated base test classes
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Sun, 29 Oct 2023 12:01:57 +0100] rev 51244
rust-python-testing: separated base test classes This will allow, e.g., to change `test-rust-discovery.py` simply by adding the appropriate base class.
Sun, 29 Oct 2023 11:21:18 +0100 rust-discovery: encapsulated conversions to vec for instance methods
Georges Racinet <georges.racinet@octobus.net> [Sun, 29 Oct 2023 11:21:18 +0100] rev 51243
rust-discovery: encapsulated conversions to vec for instance methods This new `pyiter_to_vec` is pretty trivial, and only mildly reduces code duplication. The main advantage is that it encapsulates access to the `index` attribute, which will be changed when we replace the C index by the Rust index, given as `PySharedRef`.
Sun, 29 Oct 2023 11:10:09 +0100 rust-discovery: moving most of hg-cpython methods to regular code blocks
Georges Racinet <georges.racinet@octobus.net> [Sun, 29 Oct 2023 11:10:09 +0100] rev 51242
rust-discovery: moving most of hg-cpython methods to regular code blocks The chosen methods are those with conversion of an incoming Python iterable, as they will be changed the most when we will remove the C index, and `takefullsample` for consistency with `takequicksample`.
Sun, 29 Oct 2023 10:47:54 +0100 rust-index: using `hg::index::Index` in `hg-cpython::dagops`
Georges Racinet <georges.racinet@octobus.net> [Sun, 29 Oct 2023 10:47:54 +0100] rev 51241
rust-index: using `hg::index::Index` in `hg-cpython::dagops` Hooking `headrevs` to the Rust index is straightforward as long as we go the `PySharedRef` way. Direct attempts of obtaining a reference to the inner `hg::index::Index` fail for lifetime reasons: the reference is bound to the GIL, yet the `as_set` local variable is considered to be static (the borrow checker clearly does not realize or care that this set only stores `Revision` values). In `rank()`, the chosen solution is the simplest as far as `hg-cpython` is concerned, but it has the defect of removing an implementation that would be easily adaptable if the core index did implement `RankedGraph` (returning the same error as long as only `REVLOGV1` is supported), but that would introduce a direct dependency of `hg-core` on the ``vcsgraph` crate.
Sat, 28 Oct 2023 22:50:10 +0200 rust-index: using `hg::index::Index` in MissingAncestors
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Sat, 28 Oct 2023 22:50:10 +0200] rev 51240
rust-index: using `hg::index::Index` in MissingAncestors With this, the whole `hg-cpython::ancestors` module can now work without the C index.
Fri, 27 Oct 2023 22:11:05 +0200 rust-index: using the `hg::index::Index` in ancestors iterator and lazy set
Georges Racinet <georges.racinet@octobus.net> [Fri, 27 Oct 2023 22:11:05 +0200] rev 51239
rust-index: using the `hg::index::Index` in ancestors iterator and lazy set Since there is no Rust implementation for REVLOGV2/CHANGELOGv2, we declare them to be incompatible with Rust, hence indexes in these formats will use the implementations from Python `mercurial.ancestor`. If this is an unacceptable performance hit for current users of these formats, we can later on add Rust implementations based on the C index for them or implement these formats for the Rust indexes. Among the challenges that we had to meet, we wanted to avoid taking the GIL each time the inner (vcsgraph) iterator has to call the parents function. This would probably still be acceptable in terms of performance with `AncestorsIterator`, but not with `LazyAncestors` nor for the upcoming change in `MissingAncestors`. Hence we enclose the reference to the index in a `PySharedRef`, leading to more rigourous checking of mutations, which does pass now that there no logically immutable methods of `hg::index::Index` that take a mutable reference as input.
Fri, 27 Oct 2023 23:29:29 +0200 revlog: always use a Rust index for REVLOGv1 if rustext is present
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Fri, 27 Oct 2023 23:29:29 +0200] rev 51238
revlog: always use a Rust index for REVLOGv1 if rustext is present We are about to change classes such as `rustext.AncestorsIterator` to take a Rust index, hence we cannot have the option not to use the Rust index. Note: this can be refined depending on whether we want to keep this option or not. We will have to make two versions of `AncestorsIterator` and its sibling to support REVLOGV2 and CHANGELOGv2 anyway. Meanwhile, this is the simplest change to make the tests pass.
Sun, 29 Oct 2023 18:35:32 +0100 rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Sun, 29 Oct 2023 18:35:32 +0100] rev 51237
rust-index: disabling flagprocessor tests The list of flags supported by the Rust index is not dynamic, hence flagprocessor has no chance to work.
Tue, 31 Oct 2023 17:58:56 +0100 rust-index: support `unionrepo`'s compressed length hack
Raphaël Gomès <rgomes@octobus.net> [Tue, 31 Oct 2023 17:58:56 +0100] rev 51236
rust-index: support `unionrepo`'s compressed length hack Explanations inline.
Fri, 27 Oct 2023 23:21:50 +0200 rust-index: honour incoming using_general_delta in `deltachain`
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Fri, 27 Oct 2023 23:21:50 +0200] rev 51235
rust-index: honour incoming using_general_delta in `deltachain` It looks to be a leftover from some past, but the C index considers only the value passed from Python whereas up to now the Rust index was using the value of its attribute. As a middle ground, we make this argument of `deltachain` optional from the Python side, with the Rust implementation only defaulting to its attribute. This way, we reduce false leads when a difference in results is spotted.
Fri, 27 Oct 2023 21:48:45 +0200 rust-index: use interior mutability in head revs and caches
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Fri, 27 Oct 2023 21:48:45 +0200] rev 51234
rust-index: use interior mutability in head revs and caches For upcoming changes in `hg-cpython` switching to the `hg-core` index in ancestors iterators, we will need to avoid excessive mutability, restricting the use of mutable references on `hg::index::Index` to methods that actually logically mutate it, whereas the maintenance of caches such as `head_revs` clearly does not. We illustrate that immediately by switching to immutable borrows in the corresponding methods of `hg-cpython::MixedIndex`
Thu, 26 Oct 2023 15:26:19 +0200 rust-index: add Sync bound to all relevant mmap-derived values
Raphaël Gomès <rgomes@octobus.net> [Thu, 26 Oct 2023 15:26:19 +0200] rev 51233
rust-index: add Sync bound to all relevant mmap-derived values All readonly mmaps are Sync as far as Rust is concerned. Integrity of the mmap'ed file is a concern separate to Rust's memory model, since it requires out-of-program handling via locks, etc. This will help when we start sharing the Rust Index with Python.
Tue, 31 Oct 2023 18:09:43 +0100 debugindexstats: handle the lack of Rust support better
Raphaël Gomès <rgomes@octobus.net> [Tue, 31 Oct 2023 18:09:43 +0100] rev 51232
debugindexstats: handle the lack of Rust support better We don't have any stats in the Rust index. Currently it is not known which stats would be interesting to get, so if they end up being important, we can add them later.
Tue, 31 Oct 2023 17:36:59 +0100 rust-python-index: don't panic on a corrupted index when calling from Python
Raphaël Gomès <rgomes@octobus.net> [Tue, 31 Oct 2023 17:36:59 +0100] rev 51231
rust-python-index: don't panic on a corrupted index when calling from Python This makes `test-verify.t` pass again. In an ideal world, we would find the exact commit where this test breaks and amend part of this change there, but this is a long enough series.
Tue, 31 Oct 2023 17:34:31 +0100 tests: ignore test-storage when using Rust
Raphaël Gomès <rgomes@octobus.net> [Tue, 31 Oct 2023 17:34:31 +0100] rev 51230
tests: ignore test-storage when using Rust This is only relevant for Python code and the SQLite backend, which is in a half-abandoned state.
Fri, 20 Oct 2023 09:12:22 +0200 rust-index: optimize find_gca_candidates() on less than 8 revisions
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Oct 2023 09:12:22 +0200] rev 51229
rust-index: optimize find_gca_candidates() on less than 8 revisions This is expected to be by far the most common case, given that, e.g., merging involves using it on two revisions. Using a `u8` as support for the bitset obviously divides the amount of RAM needed by 8. To state the obvious, on a repository with 10 million changesets, this spares 70MB. It is also possible that it'd be slightly faster, because it is easier to allocate and provides better cache locality. It is possible that some exhaustive listing of the traits implemented by `u8` and `u64` would avoid the added duplication, but that can be done later and would need a replacement for the `MAX` consts.
Fri, 20 Oct 2023 08:54:49 +0200 rust-index: simplification in find_gca_candidates()
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Oct 2023 08:54:49 +0200] rev 51228
rust-index: simplification in find_gca_candidates() `parent_seen` can be made a mutable ref, making this part more obvious, not needing to be commented so much. The micro-optimization of avoiding the union if `parent_seen` and `current_seen` agree is pushed down in the `union()` method of the fast, `u64` based bit set implementation (in case it matters).
Fri, 20 Oct 2023 08:43:00 +0200 rust-index: avoid double negation in find_gca_candidates()
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Oct 2023 08:43:00 +0200] rev 51227
rust-index: avoid double negation in find_gca_candidates()
Fri, 20 Oct 2023 08:17:00 +0200 rust-index: avoid some cloning in find_gca_candidates()
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Oct 2023 08:17:00 +0200] rev 51226
rust-index: avoid some cloning in find_gca_candidates() Instead of keeping the information whether the current revision is poisoned on `current_seen`, we extract it as a boolean. This also allows us to simplify the explanation of `seen[r].is_poisoned()`, as the exceptional case where it is poisoned right after `r` has been determined to be a solution does no longer exist.
Wed, 18 Oct 2023 15:35:38 +0200 rust-index: implement common_ancestors_heads() and ancestors()
Georges Racinet <georges.racinet@octobus.net> [Wed, 18 Oct 2023 15:35:38 +0200] rev 51225
rust-index: implement common_ancestors_heads() and ancestors() The only differences betwwen `common_ancestors_heads()` and `find_gca_candidates()` seems to be that: - the former accepts "overlapping" input revisions (meaning with duplicates). - limitation to 24 inputs (in the C code), that we translate to using the arbitrary size bit sets in the Rust code because we cannot bail to Python. Given that the input is expected to be small in most cases, we take the heavy handed approach of going through a HashSet and wait for perfomance assessment In case this is used via `hg-cpython`, we can anyway absorb the overhead by having `commonancestorheads` build a vector of unique values directly, and introduce a thin wrapper over `find_gca_candidates`, to take care of bit set type dispatching only. As far as `ancestors` is concerneed, this is just chaining `common_ancestors_heads()` with `find_deepest_revs`.
Tue, 17 Oct 2023 22:42:40 +0200 rust-index: find_gca_candidates bit sets genericization
Georges Racinet on incendie.racinet.fr <georges@racinet.fr> [Tue, 17 Oct 2023 22:42:40 +0200] rev 51224
rust-index: find_gca_candidates bit sets genericization This allows to use arbitratry size of inputs in `find_gca_candidates()`. We're genericizing so that the common case of up to 63 inputs can be treated with the efficient implementation backed by `u64`. Some complications with the borrow checker came, because arbitrary sized bit sets will not be `Copy`, hence mutating them keeps a mut ref on the `seen` vector. This is solved by some cloning, most of which can be avoided, preferably in a follow-up after proof that this works (hence after exposition to Python layer). As far as performance is concerned, calling `clone()` on a `Copy` object (good case when number of revs is less than 64) should end up just doing a copy, according to this excerpt of the `Clone` trait documentation: Types that are Copy should have a trivial implementation of Clone. More formally: if T: Copy, x: T, and y: &T, then let x = y.clone(); is equivalent to let x = *y;. Manual implementations should be careful to uphold this invariant; however, unsafe code must not rely on it to ensure memory safety. We kept the general structure, hence why there are some double negations. This also could be made nicer in a follow-up. The `NonStaticPoisonableBitSet` is included to ensure that the `PoisonableBitSet` trait is general enough (had to correct `vec_of_empty()` for instance). Moving the genericization one level to encompass the `seen` vector and not its elements would be better for performance, if worth it.
Thu, 02 Nov 2023 11:45:20 +0100 rust-index: core impl for find_gca_candidates and find_deepest
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 11:45:20 +0100] rev 51223
rust-index: core impl for find_gca_candidates and find_deepest This still follows closely the C original and not able to treat more than 63 input revisions (bitset backed by `u64` and one bit reserved for poisoning).
Mon, 30 Oct 2023 11:57:36 +0100 rust-index: add support for `reachableroots2`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Oct 2023 11:57:36 +0100] rev 51222
rust-index: add support for `reachableroots2` Exposition in `hg-cpython` done in regular impl block, again for rustfmt support etc.
Thu, 02 Nov 2023 12:17:06 +0100 hg-cpython: rev_pyiter_collect_or_else
Georges Racinet <georges.racinet@octobus.net> [Thu, 02 Nov 2023 12:17:06 +0100] rev 51221
hg-cpython: rev_pyiter_collect_or_else It will be useful to give callers the control on the generated errors
Mon, 30 Oct 2023 11:54:42 +0100 rust-index: add support for `computephasesmapsets`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Oct 2023 11:54:42 +0100] rev 51220
rust-index: add support for `computephasesmapsets` Exposition in `hg-cpython` done in the regular `impl` block to enjoy rustfmt and clearer compilartion errors.
Sat, 30 Sep 2023 15:59:03 +0200 rust-index: slicechunktodensity returns Rust result
Georges Racinet <georges.racinet@octobus.net> [Sat, 30 Sep 2023 15:59:03 +0200] rev 51219
rust-index: slicechunktodensity returns Rust result Ready for removal of the scaffolding. This time, we allow ourselves a minor optimization: we avoid allocating for each chunk. Instead, we reuse the same vector, and perform at most one allocation per chunk. The `PyList` constructor will copy the buffer anyway.
Thu, 02 Nov 2023 11:40:23 +0100 rust-index: add support for `_slicechunktodensity`
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 11:40:23 +0100] rev 51218
rust-index: add support for `_slicechunktodensity`
Fri, 29 Sep 2023 20:51:49 +0200 rust-index: headrevsfiltered() returning Rust result
Georges Racinet <georges.racinet@octobus.net> [Fri, 29 Sep 2023 20:51:49 +0200] rev 51217
rust-index: headrevsfiltered() returning Rust result
Mon, 30 Oct 2023 11:14:25 +0100 rust-index: add support for `headrevsfiltered`
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Oct 2023 11:14:25 +0100] rev 51216
rust-index: add support for `headrevsfiltered` The implementation is merged with that of `headrevs` also to make sure that caches are up to date.
Tue, 19 Sep 2023 15:21:43 +0200 rust-index: implement headrevs
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Sep 2023 15:21:43 +0200] rev 51215
rust-index: implement headrevs
Sat, 30 Sep 2023 16:52:40 +0200 rust-index: variant of assert_py_eq with normalizer expression
Georges Racinet <georges.racinet@octobus.net> [Sat, 30 Sep 2023 16:52:40 +0200] rev 51214
rust-index: variant of assert_py_eq with normalizer expression The example given in doc-comment is the main use case: some methods may require ordering insensitive comparison. This is about to be used for `reachableroots2`
Thu, 03 Aug 2023 15:50:14 +0200 rust-index: add support for delta-chain computation
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 15:50:14 +0200] rev 51213
rust-index: add support for delta-chain computation
Thu, 03 Aug 2023 15:01:34 +0200 rust-index: add support for `find_snapshots`
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 15:01:34 +0200] rev 51212
rust-index: add support for `find_snapshots`
Thu, 03 Aug 2023 12:05:32 +0200 rust-index: add `is_snapshot` method
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 12:05:32 +0200] rev 51211
rust-index: add `is_snapshot` method
Wed, 02 Aug 2023 16:49:33 +0200 rust-index: use the Rust index in `partialmatch`
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Aug 2023 16:49:33 +0200] rev 51210
rust-index: use the Rust index in `partialmatch`
Thu, 03 Aug 2023 14:50:17 +0200 rust-index: add missing special case for null rev
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 14:50:17 +0200] rev 51209
rust-index: add missing special case for null rev This was an oversight, it was never a problem because we didn't use the index much for user-facing things in the past, which is the only real way of getting to this edge case.
Wed, 02 Aug 2023 16:49:17 +0200 rust-index: use the rust index in `shortest`
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Aug 2023 16:49:17 +0200] rev 51208
rust-index: use the rust index in `shortest`
Wed, 02 Aug 2023 14:34:21 +0200 rust-index: add checks that `__contains__` is synchronized
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Aug 2023 14:34:21 +0200] rev 51207
rust-index: add checks that `__contains__` is synchronized
Mon, 30 Oct 2023 11:03:57 +0100 rust-index: using the Rust index in nodemap updating methods
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 11:03:57 +0100] rev 51206
rust-index: using the Rust index in nodemap updating methods
Thu, 02 Nov 2023 11:19:54 +0100 rust-index: implementation of __getitem__
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 11:19:54 +0100] rev 51205
rust-index: implementation of __getitem__ Although the removed panic tends to prove if the full test suite did pass that the case when the input is a node id does not happen, it is best not to remove it right now. Raising IndexError is crucial for iteration on the index to stop, given the default CPython sequence iterator, see for instance https://github.com/zpoint/CPython-Internals/blobs/master/BasicObject/iter/iter.md This was spotted by `test-rust-ancestors.py`, which does simple interations on indexes (as preflight checks). In `revlog.c`, `index_getitem` defaults to `index_get` when called on revision numbers, which does raise `IndexError` with the same message as the one we are introducing here.
Wed, 27 Sep 2023 11:34:52 +0200 rust-index: optim note for post-scaffolding removal
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Sep 2023 11:34:52 +0200] rev 51204
rust-index: optim note for post-scaffolding removal
Thu, 02 Nov 2023 11:16:13 +0100 rust-index: check that the entry bytes are the same in both indexes
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 11:16:13 +0100] rev 51203
rust-index: check that the entry bytes are the same in both indexes This is a temporary measure to show that both the Rust and C indexes are kept in sync. Comes with some related documentation precisions. For comparison of error cases, see `index_entry_binary()` in `revlog.c`.
Sat, 30 Sep 2023 16:15:56 +0200 rust-index: return variables systematic naming convention
Georges Racinet <georges.racinet@octobus.net> [Sat, 30 Sep 2023 16:15:56 +0200] rev 51202
rust-index: return variables systematic naming convention To help knowing at a glance when a method is ready, making us more comofortable when we are close to the final removal of scaffolding, we introduce the systematic variable names `rust_res` and `c_res`. The goal of this series is to always return the formet. We take again the case of `pack_header` as example. Our personal opinion is to usually avoid such poor semantics as `res`, but usually accept it when it close to the actual return, which will be the case in most methods of this series. Also, the name can simply be dropped when we remove the scaffolding. To follow on the example, the body of `pack_header()` should become this in the final version: ``` let index = self.index(py).borrow(); let packed = index.pack_header(args.get_item(py, 0).extract(py)?); Ok(PyBytes::new(py, &packed).into_object()); ``` in these cases it is close to the actual return and will be removed at the end entirely.
Fri, 29 Sep 2023 15:51:49 +0200 rust-index: results comparison helper with details
Georges Racinet <georges.racinet@octobus.net> [Fri, 29 Sep 2023 15:51:49 +0200] rev 51201
rust-index: results comparison helper with details This is a bit simpler to call and has the advantage of systematically log the encountered deviation. To avoid committing dead code, we apply it to the `pack_header` method, that was already returning the Rust result.
Wed, 27 Sep 2023 10:59:04 +0200 rust-index: helper for revision not in index not involving nodemap
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Sep 2023 10:59:04 +0200] rev 51200
rust-index: helper for revision not in index not involving nodemap This is a good match for exceptions raised from the C implementation, when it is not about a nodemap inconsistency.
Wed, 18 Oct 2023 19:54:18 +0200 rust-index: renamed nodemap error function for rev not in index
Georges Racinet <georges.racinet@octobus.net> [Wed, 18 Oct 2023 19:54:18 +0200] rev 51199
rust-index: renamed nodemap error function for rev not in index The function name was misleading, as the error wording mentions the nodemap, hence would not be appropriate for missing revisions not related to a nodemap lookup.
Thu, 03 Aug 2023 10:28:10 +0200 rust-index: add `pack_header` support
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 10:28:10 +0200] rev 51198
rust-index: add `pack_header` support
Mon, 30 Oct 2023 10:34:48 +0100 rust-index: support cache clearing
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Oct 2023 10:34:48 +0100] rev 51197
rust-index: support cache clearing I'm not 100% sure how useful it is outside of perf, but it's still worth implementing.
Thu, 29 Jun 2023 11:37:19 +0200 rust-index: check rindex and cindex return the same get_rev
Raphaël Gomès <rgomes@octobus.net> [Thu, 29 Jun 2023 11:37:19 +0200] rev 51196
rust-index: check rindex and cindex return the same get_rev This is a temporary safeguard while we synchronize both indexes.
Wed, 28 Jun 2023 16:43:39 +0200 rust-index: synchronize remove to Rust index
Raphaël Gomès <rgomes@octobus.net> [Wed, 28 Jun 2023 16:43:39 +0200] rev 51195
rust-index: synchronize remove to Rust index Future steps will bring the two indexes further together until we can rip the C index entirely when running Rust code.
Wed, 28 Jun 2023 11:59:43 +0200 rust-index: remove `__setitem__` method from the mixed index
Raphaël Gomès <rgomes@octobus.net> [Wed, 28 Jun 2023 11:59:43 +0200] rev 51194
rust-index: remove `__setitem__` method from the mixed index This is not defined on the Python or C one, and isn't used anywhere.
Wed, 28 Jun 2023 11:36:22 +0200 rust-index: check equality between rust and cindex for `__len__`
Raphaël Gomès <rgomes@octobus.net> [Wed, 28 Jun 2023 11:36:22 +0200] rev 51193
rust-index: check equality between rust and cindex for `__len__`
Tue, 27 Jun 2023 18:24:54 +0200 rust-index: synchronize append method
Raphaël Gomès <rgomes@octobus.net> [Tue, 27 Jun 2023 18:24:54 +0200] rev 51192
rust-index: synchronize append method We now append to the Rust index just as we do to the C index. Future steps will bring the two indexes further together until we can rip the C index entirely when running Rust code.
Mon, 18 Sep 2023 17:11:11 +0200 rust-revlog: teach the revlog opening code to read the repo options
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Sep 2023 17:11:11 +0200] rev 51191
rust-revlog: teach the revlog opening code to read the repo options This will become necessary as we start writing revlog data from Rust.
Tue, 27 Jun 2023 17:34:51 +0200 rust-index: pass data down to the Rust index
Raphaël Gomès <rgomes@octobus.net> [Tue, 27 Jun 2023 17:34:51 +0200] rev 51190
rust-index: pass data down to the Rust index This will allow us to start keeping the Rust index synchronized with the cindex as we gradually implement more and more methods in Rust. This will eventually be removed.
Tue, 27 Jun 2023 16:32:09 +0200 rust-index: add append method
Raphaël Gomès <rgomes@octobus.net> [Tue, 27 Jun 2023 16:32:09 +0200] rev 51189
rust-index: add append method This is the first time the Rust index has any notion of mutability. This will be used in a future patch from Python, to start synchronizing the Rust index and the C index.
Mon, 26 Jun 2023 19:16:07 +0200 rust-index: add an abstraction to support bytes added at runtimes
Raphaël Gomès <rgomes@octobus.net> [Mon, 26 Jun 2023 19:16:07 +0200] rev 51188
rust-index: add an abstraction to support bytes added at runtimes In order to support appending data to the Rust index, we need to abstract data access away from the immutable (on-disk) bytes, to seemlessly fetch either from the preexisting data or from the newly added data.
Thu, 29 Jun 2023 16:09:57 +0200 rust-mixed-index: move the mmap keepalive into a function
Raphaël Gomès <rgomes@octobus.net> [Thu, 29 Jun 2023 16:09:57 +0200] rev 51187
rust-mixed-index: move the mmap keepalive into a function The same code will be used for keeping the new index mmap around.
Thu, 29 Jun 2023 15:00:46 +0200 rust-mixed-index: rename variable to make the next change clearer
Raphaël Gomès <rgomes@octobus.net> [Thu, 29 Jun 2023 15:00:46 +0200] rev 51186
rust-mixed-index: rename variable to make the next change clearer We're going to add another mmap reference holder, so let's rename this one first.
Wed, 27 Sep 2023 10:08:32 +0200 rust: fix cargo doc for hg-cpython
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Sep 2023 10:08:32 +0200] rev 51185
rust: fix cargo doc for hg-cpython
Fri, 15 Dec 2023 11:10:24 +0100 branching: merge with default
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Dec 2023 11:10:24 +0100] rev 51184
branching: merge with default We merge with the current children of the bad merge (37b52b938579)
Fri, 15 Dec 2023 11:08:41 +0100 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Dec 2023 11:08:41 +0100] rev 51183
branching: merge with stable This recreates `37b52b938579` right as a `hg branch --rev 5b186ba40001` screwed up the content.
Thu, 07 Dec 2023 02:07:16 +0100 changelog: disallow delayed write on inline changesets
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Dec 2023 02:07:16 +0100] rev 51182
changelog: disallow delayed write on inline changesets Since this will never happens, we can make the situation invalid and to stop to handling the associated the case. This simplify the random access file reading too.
Mon, 11 Dec 2023 22:27:59 +0100 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Dec 2023 22:27:59 +0100] rev 51181
changelog: never inline changelog The test suite mostly use small repositories, that implies that most changelog in the tests are inlined. As a result, non-inlined changelog are quite poorly tested. Since non-inline changelog are most common case for serious repositories, this lack of testing is a significant problem that results in high profile issue like the one recently fixed by 66417f55ea33 and 849745d7da89. Inlining the changelog does not bring much to the table, the number of total file saved is negligible, and the changelog will be read by most operation anyway. So this changeset is make it so we never inline the changelog, and de-inline the one that are still inlined whenever we touch them. By doing that, we remove the "dual code path" situation for writing new entry to the changelog and move to a "single code path" situation. Having a single code path simplify the code and make sure it is covered by test (if test cover that situation obviously) This impact all tests that care about the number of file and the exchange size, but there is nothing too complicated in them just a lot of churn. The churn is made "worse" by the fact rust will use the persistent nodemap on any changelog now. Which is overall a win as it means testing the persistent nodemap more and having less special cases. In short, having inline changelog is mostly useless and an endless source of pain. We get rid of it.
Mon, 11 Dec 2023 11:50:55 +0100 test-transaction-safety: glog out irrelevant flag
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Dec 2023 11:50:55 +0100] rev 51180
test-transaction-safety: glog out irrelevant flag The test is focussing on the inline flag, so we glob out the other to highlight that fact and prevent noise in the future.
Mon, 11 Dec 2023 11:43:32 +0100 test-transaction-safety: perform the test on a filelog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Dec 2023 11:43:32 +0100] rev 51179
test-transaction-safety: perform the test on a filelog This test previously checked the transaction safety of splitting the changelog. The changelog is a special case, with delayed/diverted writes and we will stop inlining it soon. So we keep testing that transaction is safe around inline on another revlog type : a filelog. Minor comestic adjustement will be done in the next changesets.
Thu, 07 Dec 2023 03:40:37 +0100 test: clarify test-parseindex offsets
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Dec 2023 03:40:37 +0100] rev 51178
test: clarify test-parseindex offsets We will make this revlog non-inline, so we clarify the code to make sure it is simple to adjust the test later.
Thu, 07 Dec 2023 06:05:18 +0100 test: use more globing for perf timing
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Dec 2023 06:05:18 +0100] rev 51177
test: use more globing for perf timing Not sure why we kept the number here.
Tue, 12 Dec 2023 12:29:12 +0100 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 12 Dec 2023 12:29:12 +0100] rev 51176
branching: merge with stable
Thu, 07 Dec 2023 03:49:48 +0100 persistent-nodemap: avoid writing nodemap for empty revlog stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Dec 2023 03:49:48 +0100] rev 51175
persistent-nodemap: avoid writing nodemap for empty revlog The format cannot encode the lack of tip_rev. There is currently nothing known to write such empty nodemap right now, but the change we are preparing on default reveal this issue. So I had rather fix it on stable.
Tue, 12 Dec 2023 11:47:48 +0100 histedit: remove superfluous echo() and endwin() calls (issue6859) stable
Julien Cristau <jcristau@mozilla.com> [Tue, 12 Dec 2023 11:47:48 +0100] rev 51174
histedit: remove superfluous echo() and endwin() calls (issue6859) ncurses patchlevel 20231111 started returning an error from endwin() if called twice without a intervening screen update. Per Sven Joachim in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058041#17: "AFAICS, invoking curses.echo() and curses.endwin() is superfluous because curses.wrapper already does that for you, and calling curses.endwin() twice throws an error with the newer ncurses. Removing those two lines should fix the problem."
Thu, 07 Dec 2023 09:31:07 -0800 statprof: handle `lineno == None` in more cases
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Dec 2023 09:31:07 -0800] rev 51173
statprof: handle `lineno == None` in more cases This continues the work from 972f3e5c94b8. We saw a crash on line 956 but I updated lots of other places as well.
Thu, 07 Dec 2023 14:28:31 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Dec 2023 14:28:31 +0100] rev 51172
branching: merge stable into default
Thu, 07 Dec 2023 14:22:55 +0100 Added signature for changeset 71bd09bebbe3 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Dec 2023 14:22:55 +0100] rev 51171
Added signature for changeset 71bd09bebbe3
Thu, 07 Dec 2023 14:22:46 +0100 Added tag 6.6.1 for changeset 71bd09bebbe3 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Dec 2023 14:22:46 +0100] rev 51170
Added tag 6.6.1 for changeset 71bd09bebbe3
Thu, 07 Dec 2023 14:19:02 +0100 relnotes: add 6.6.1 stable 6.6.1
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Dec 2023 14:19:02 +0100] rev 51169
relnotes: add 6.6.1
Sat, 02 Dec 2023 15:10:28 -0300 procutil: move stdin assignment outside of try-finally block stable
Anton Shestakov <av6@dwimlabs.net> [Sat, 02 Dec 2023 15:10:28 -0300] rev 51168
procutil: move stdin assignment outside of try-finally block There is an stdin variable in the global scope of this module. And in the `finally` block of this try-finally statement we're checking `if stdin is not None`. Let's make sure we don't confuse code check tools into thinking we want to use global stdin by moving this line of code outside of `try`. This was caught by pytype 2023.11.21 on Python 3.11.2.
Sat, 02 Dec 2023 15:02:03 -0300 zeroconf: give inet_aton() str instead of bytes stable
Anton Shestakov <av6@dwimlabs.net> [Sat, 02 Dec 2023 15:02:03 -0300] rev 51167
zeroconf: give inet_aton() str instead of bytes All other uses of this function in this extension are already fixed (i.e. use strings instead of bytes). This was caught by pytype 2023.11.21 on Python 3.11.2.
Wed, 06 Dec 2023 16:29:43 +0100 revlog: avoid wrongly updating the data file location on "divert" stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Dec 2023 16:29:43 +0100] rev 51166
revlog: avoid wrongly updating the data file location on "divert" If we are in the inline case, we need to align the location of the "data" file with the temporary location of the file (i.e. "00changelog.i.a"). However we should not do that for non-inline case… and before this changeset we had been doing it. In addition `index_file` is already a property taking care of updating the "segment file" filename when needed. So we can simply remove all that code. As a result, code trying to read the diverted data before they were committed ended deeply confused as the "00changelog.i.a" file is nothing like the "00changelog.d" file. However nothing corrupted data as all writing where properly handled outside of the "segment file". In "best" cases this small in-memory corruption of the filename when unnoticed until the transaction was committed or rolled back and in the worse case, some data reading was failing during the transaction and resulted in the transaction to be rolled back. However wrong data never reached the disk, so this bug should be have corrupted any repository. This is not catch by tests because most test use a small repository and therefor an inline revlog. In addition the bug only triggers when a changelog read is done in the following "rare" situation: - after some delayed write - after that data have been written in a "divert" file (i.e. `00.changelog.i.a`) - before transaction commit - outside of a "writing" context The issue was introduced in d83d788590a8
Thu, 07 Dec 2023 00:34:08 +0100 revlog: avoid exposing delayed index entry too widely in non-inline revlog stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Dec 2023 00:34:08 +0100] rev 51165
revlog: avoid exposing delayed index entry too widely in non-inline revlog Before this change, the index entry would be seen as "appended" to the data file. It did not hurt too much as there are never accessed for reading, but this was odd. So lets stop doing so.
Wed, 06 Dec 2023 15:38:15 +0100 revlog: add one more assert about state of thing when splitting stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Dec 2023 15:38:15 +0100] rev 51164
revlog: add one more assert about state of thing when splitting This assert is currently happy, but it does not hurt to adds it to clarify expected state and catch potential error in the future.
Wed, 29 Nov 2023 08:32:24 -0800 add: don't attempt to add back removed files unless explicitly listed
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Nov 2023 08:32:24 -0800] rev 51163
add: don't attempt to add back removed files unless explicitly listed This fixes the bug demonstrated by the previous patch.
Tue, 28 Nov 2023 22:44:04 -0800 tests: show failure to `hg add -I` a dir->symlink transition
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Nov 2023 22:44:04 -0800] rev 51162
tests: show failure to `hg add -I` a dir->symlink transition
Tue, 11 Apr 2023 21:56:16 +0200 setup: try a non-pure version of the local Mercurial if the pure fails
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 11 Apr 2023 21:56:16 +0200] rev 51161
setup: try a non-pure version of the local Mercurial if the pure fails Things like `zstd` can make the pure version fails.
Fri, 01 Dec 2023 22:13:37 +0100 setup: make debug simpler by adding a `__repr__` to `hgcommand`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Dec 2023 22:13:37 +0100] rev 51160
setup: make debug simpler by adding a `__repr__` to `hgcommand` This help when trying to debug this logic.
Sat, 02 Dec 2023 02:13:23 +0100 censor: fix things around inlining stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Dec 2023 02:13:23 +0100] rev 51159
censor: fix things around inlining The temporary revlog cannot go through the inline → split process as this would break at transaction commit. (that might be fixable, but lets keep things simple for now). We introduce a cleaner way to enforce this as the previous one was broken in 6.6 On the way we remove multiple weird, fragile and broken overwrite of revlog attributes and we focus on passing the configuration across. We also had to update the test to actually create a non-inline revlog.
Sat, 02 Dec 2023 02:12:21 +0100 revlog: add a `may_inline` argument to revlog stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Dec 2023 02:12:21 +0100] rev 51158
revlog: add a `may_inline` argument to revlog This allow for a clean skipping of the inline feature when needed, for example by censor.
Sat, 02 Dec 2023 02:11:20 +0100 revlog: allow explicit passing of config to revlog stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Dec 2023 02:11:20 +0100] rev 51157
revlog: allow explicit passing of config to revlog This will be useful to fix censor in a later changeset.
Sat, 02 Dec 2023 01:06:35 +0100 censor: show that the `not-inline` → `inline` test is broken stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Dec 2023 01:06:35 +0100] rev 51156
censor: show that the `not-inline` → `inline` test is broken The source revlog should not be inlined and it is…
Wed, 15 Nov 2023 18:43:03 +0000 rhg: support rhg status --rev --rev
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 15 Nov 2023 18:43:03 +0000] rev 51155
rhg: support rhg status --rev --rev
Wed, 15 Nov 2023 18:41:33 +0000 rust: add a utility function to merge ordered fallible iterators
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 15 Nov 2023 18:41:33 +0000] rev 51154
rust: add a utility function to merge ordered fallible iterators Adding a function merge_join_results_by, a version of itertools::merge_join_by that works on "fallible" iterators (iterators that can produce errors)
Mon, 16 Oct 2023 18:56:40 +0100 rhg: refactor hg status, make the display code usable for non-dirstate status
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 16 Oct 2023 18:56:40 +0100] rev 51153
rhg: refactor hg status, make the display code usable for non-dirstate status
Sun, 03 Dec 2023 04:49:49 +0100 perf-tags: fix clear_cache_fnodes to actually clear that cache stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Dec 2023 04:49:49 +0100] rev 51152
perf-tags: fix clear_cache_fnodes to actually clear that cache The function was not doing it what it advertise for a long time. So we fix it and we add a way for the perf extensions to detect broken version.
Sun, 03 Dec 2023 04:43:08 +0100 perf-tags: fix the --clear-fnode-cache-rev code stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Dec 2023 04:43:08 +0100] rev 51151
perf-tags: fix the --clear-fnode-cache-rev code It seems like this code never run?
Mon, 04 Dec 2023 17:20:31 +0000 tests: do not fail tests in a state with uncommitted .py file removal stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 04 Dec 2023 17:20:31 +0000] rev 51150
tests: do not fail tests in a state with uncommitted .py file removal The problem is that [hg locate] lists removed files too. We use [hg files] instead because that does not list removed files.
Sat, 02 Dec 2023 00:52:37 -0500 tests: fill in the Windows pattern for `$EADDRNOTAVAIL$` matching stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 02 Dec 2023 00:52:37 -0500] rev 51149
tests: fill in the Windows pattern for `$EADDRNOTAVAIL$` matching This fixes test-https.t on Windows. It looks like the real error translation is "Cannot assign requested address.", and the message here is the start of a longer description, so I'm not sure why this part is emitted. But it's not worth digging into, as it's evidently the same failure.
Sat, 02 Dec 2023 00:34:44 -0500 tests: avoid a cascading failure on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 02 Dec 2023 00:34:44 -0500] rev 51148
tests: avoid a cascading failure on Windows The `identify --debug` command here on Windows emits skip updating dirstate: identity mismatch because of the debug switch, which got captured and added to `.hgtags`, and then hijinx ensued. The point of `--debug` seemed to be to get the long hash, so just do that with templating. I have not idea if the message is indicating a problem- there seems to be many more of them in other tests that are not present on Linux.
Fri, 01 Dec 2023 23:58:12 -0500 phabricator: stringify the argument to `getattr()` stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 01 Dec 2023 23:58:12 -0500] rev 51147
phabricator: stringify the argument to `getattr()` This fixes a "TypeError: getattr(): attribute name must be string" crash and subsequent test spew. This likely broke in 18c8c18993f0 and was missed in CI because `pytest-vcr` is missing.
Mon, 13 Nov 2023 09:19:11 -0800 py3: pass unicode strings to hasattr() throughout stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Nov 2023 09:19:11 -0800] rev 51146
py3: pass unicode strings to hasattr() throughout I guess we missed these instances because they're not covered by tests. This is a graft of 1625fe807c04a490f9516bc8e14140e570c06146 that landed on default.
Mon, 27 Nov 2023 15:22:05 -0500 debugformat: speedup the "plain-cl-delta" check
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 27 Nov 2023 15:22:05 -0500] rev 51145
debugformat: speedup the "plain-cl-delta" check Checking every single revision is too slow, let's use a sampling approach.
Tue, 14 Nov 2023 22:47:17 +0100 templatekw: fix inconsistency of diffstat with diff.merge
pacien <pacien.trangirard@pacien.net> [Tue, 14 Nov 2023 22:47:17 +0100] rev 51144
templatekw: fix inconsistency of diffstat with diff.merge Previously, `-T'{diffstat}'` was giving stats from the diff against p1, regardless of whether `--config diff.merge=yes` is set. This was inconsistent with `log --patch` which is aware of that option.
Wed, 15 Nov 2023 02:39:53 +0100 util: move diff_parent from logcmdutil to diffutil
pacien <pacien.trangirard@pacien.net> [Wed, 15 Nov 2023 02:39:53 +0100] rev 51143
util: move diff_parent from logcmdutil to diffutil This function will be used outside of the log command (in templatekw, used by hgweb, for which logcmdutil is not available). Let's move this function together with the rest of the diff-related utils instead.
Thu, 07 Sep 2023 08:39:21 +0200 logcmdutil: return structured diffstat data for json
zegervdv <zeger@vandevan.net> [Thu, 07 Sep 2023 08:39:21 +0200] rev 51142
logcmdutil: return structured diffstat data for json
Wed, 08 Nov 2023 22:27:32 +0100 cleanup: drop the `bytes` compatibility for attribute related function
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:27:32 +0100] rev 51141
cleanup: drop the `bytes` compatibility for attribute related function We can rely on the builtins directly now.
Wed, 08 Nov 2023 22:20:58 +0100 cleanup: turn `wrapfunction` deprecation warning into an error
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:20:58 +0100] rev 51140
cleanup: turn `wrapfunction` deprecation warning into an error We could simply drop the check, but lets raise explicit error instead of suffering strange error in case of misuse.
Wed, 08 Nov 2023 22:19:20 +0100 cleanup: turn `wrappedfunction` deprecation warning into an error
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:19:20 +0100] rev 51139
cleanup: turn `wrappedfunction` deprecation warning into an error We could simply drop the check, but lets raise explicit error instead of suffering strange error in case of misuse.
Wed, 08 Nov 2023 22:17:41 +0100 cleanup: turn `pathsuboption` deprecation warning into an error
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:17:41 +0100] rev 51138
cleanup: turn `pathsuboption` deprecation warning into an error We could simply drop the check, but lets raise explicit error instead of suffering strange error in case of misuse.
Wed, 08 Nov 2023 22:13:14 +0100 cleanup: drop deprecated config attribute on the revlog class
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:13:14 +0100] rev 51137
cleanup: drop deprecated config attribute on the revlog class This code was marked for deletion in the next cycle. We are now in the next cycle.
Wed, 08 Nov 2023 22:11:00 +0100 cleanup: drop `path.pushloc` deprecated since 6.5
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:11:00 +0100] rev 51136
cleanup: drop `path.pushloc` deprecated since 6.5 This was scheduled for removal, let us remove it.
Wed, 08 Nov 2023 22:10:26 +0100 cleanup: drop `dirstate.is_changing_parent` deprecated since 6.5
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:10:26 +0100] rev 51135
cleanup: drop `dirstate.is_changing_parent` deprecated since 6.5 This was scheduled for removal, let us remove it.
Wed, 08 Nov 2023 22:08:05 +0100 cleanup: remove some code scheduled to be removed after 5.9
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Nov 2023 22:08:05 +0100] rev 51134
cleanup: remove some code scheduled to be removed after 5.9 looks like we missed this when cleaning up previous code.
Tue, 21 Nov 2023 16:22:47 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 21 Nov 2023 16:22:47 +0100] rev 51133
branching: merge stable into default
Tue, 21 Nov 2023 16:20:58 +0100 relnotes: add 6.6 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 21 Nov 2023 16:20:58 +0100] rev 51132
relnotes: add 6.6 There are no differences between the rc and the actual release.
Tue, 21 Nov 2023 16:18:25 +0100 Added signature for changeset 26c57e7a0890 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 21 Nov 2023 16:18:25 +0100] rev 51131
Added signature for changeset 26c57e7a0890
Tue, 21 Nov 2023 16:18:23 +0100 Added tag 6.6 for changeset 26c57e7a0890 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 21 Nov 2023 16:18:23 +0100] rev 51130
Added tag 6.6 for changeset 26c57e7a0890
Mon, 13 Nov 2023 09:19:11 -0800 py3: pass unicode strings to hasattr() throughout
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Nov 2023 09:19:11 -0800] rev 51129
py3: pass unicode strings to hasattr() throughout I guess we missed these instances because they're not covered by tests.
Tue, 07 Nov 2023 16:59:37 +0100 Added signature for changeset 27055614b685 stable 6.6
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Nov 2023 16:59:37 +0100] rev 51128
Added signature for changeset 27055614b685
Tue, 07 Nov 2023 16:59:36 +0100 Added tag 6.6rc0 for changeset 27055614b685 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Nov 2023 16:59:36 +0100] rev 51127
Added tag 6.6rc0 for changeset 27055614b685
Tue, 07 Nov 2023 16:07:53 +0100 relnotes: add 6.6rc0 stable 6.6rc0
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Nov 2023 16:07:53 +0100] rev 51126
relnotes: add 6.6rc0
Tue, 07 Nov 2023 15:21:11 +0100 branching: merge default into stable for 6.6rc0 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Nov 2023 15:21:11 +0100] rev 51125
branching: merge default into stable for 6.6rc0
Mon, 06 Nov 2023 23:17:10 +0100 unstable: do not consider internal phases when computing unstable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Nov 2023 23:17:10 +0100] rev 51124
unstable: do not consider internal phases when computing unstable The revisions that are not part of the "working" set by other means should not be considered for the evolution related computation. This impact the test introduced in 5f9af8422b31 as this is actually a more semantic fix of the issue.
Mon, 06 Nov 2023 23:15:58 +0100 unstable: use the `_mutablerevs` function when computing content divergent
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Nov 2023 23:15:58 +0100] rev 51123
unstable: use the `_mutablerevs` function when computing content divergent This is a useful function to get the revision relevant to these computation, lets make sure all code use it, so that we can improve that `_mutablerevs` function in a later changeset.
Mon, 06 Nov 2023 23:15:17 +0100 unstable: use the `_mutablerevs` function when computing phase divergent
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Nov 2023 23:15:17 +0100] rev 51122
unstable: use the `_mutablerevs` function when computing phase divergent This is a useful function to get the revision relevant to these computation, lets make sure all code use it, so that we can improve that `_mutablerevs` function in a later changeset.
Mon, 06 Nov 2023 11:07:54 +0100 rust: add explicit resolver field to top-level cargo manifest file
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 11:07:54 +0100] rev 51121
rust: add explicit resolver field to top-level cargo manifest file Since Rust 1.51.0, Cargo has support for a better dependency resolver. Workspace packages (like ours) need to explicitely set the field, so let's. https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html
Mon, 06 Nov 2023 11:06:08 +0100 rust: run a clippy pass with the latest stable version
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 11:06:08 +0100] rev 51120
rust: run a clippy pass with the latest stable version Our current version of clippy is older than the latest stable. The newest version has new lints that are moslty good advice, so let's apply them ahead of time. This has the added benefit of reducing the noise for developpers like myself that use clippy as an IDE helper, as well as being more prepared for a future clippy upgrade.
Mon, 06 Nov 2023 11:02:18 +0100 rust-clippy: ignore clippy's recommendation for "useless" cast
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 11:02:18 +0100] rev 51119
rust-clippy: ignore clippy's recommendation for "useless" cast See explanation inline.
Mon, 06 Nov 2023 17:12:04 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 17:12:04 +0100] rev 51118
branching: merge stable into default
Mon, 06 Nov 2023 15:38:27 +0100 Added signature for changeset c083d9776cb2 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 15:38:27 +0100] rev 51117
Added signature for changeset c083d9776cb2
Mon, 06 Nov 2023 15:38:15 +0100 Added tag 6.5.3 for changeset c083d9776cb2 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 15:38:15 +0100] rev 51116
Added tag 6.5.3 for changeset c083d9776cb2
Mon, 06 Nov 2023 15:32:30 +0100 relnotes: add 6.5.3 stable 6.5.3
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Nov 2023 15:32:30 +0100] rev 51115
relnotes: add 6.5.3
Sat, 14 Oct 2023 03:24:13 +0200 revlog: avoid opening and closing the file for each cloned revision stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 14 Oct 2023 03:24:13 +0200] rev 51114
revlog: avoid opening and closing the file for each cloned revision The previous code was flushing files after each new revision, slowing things down. For exemple, with this change, the evolve repository can run `hg debugupgraderepo --run --optimize re-delta-parent` in about 3.4s instead of 4.5 seconds.
Fri, 13 Oct 2023 23:21:46 +0200 censor: accept censored revision during upgrade stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Oct 2023 23:21:46 +0200] rev 51113
censor: accept censored revision during upgrade They can simply be passed by as censored.
Fri, 13 Oct 2023 22:40:10 +0200 censor: show that censored revision prevent repository upgrade stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Oct 2023 22:40:10 +0200] rev 51112
censor: show that censored revision prevent repository upgrade This is not great.
Tue, 31 Oct 2023 22:42:46 -0700 smartset: don't ignore hidden revs when intersecting
Martin von Zweigbergk <martinvonz@google.com> [Tue, 31 Oct 2023 22:42:46 -0700] rev 51111
smartset: don't ignore hidden revs when intersecting This fixes the bug I demonstrated in the previous commit, but I'm not sure at all if it's the right way of doing it.
Tue, 31 Oct 2023 22:33:45 -0700 tests: demonstrate crash in `unstable()` with internal-phase orphans
Martin von Zweigbergk <martinvonz@google.com> [Tue, 31 Oct 2023 22:33:45 -0700] rev 51110
tests: demonstrate crash in `unstable()` with internal-phase orphans
Wed, 18 Oct 2023 14:50:14 +0200 rust-matchers: fix quadratic complexity in `FileMatcher`
Raphaël Gomès <rgomes@octobus.net> [Wed, 18 Oct 2023 14:50:14 +0200] rev 51109
rust-matchers: fix quadratic complexity in `FileMatcher` Concretely, this command: ``` $ echo hg up -r <nodeid>; time hg revert dir1 dir2 -r <othernode> --debug hg up -r <nodeid> real 0m14.690s user 0m14.766s sys 0m5.430s ``` was much slower despite using 16 cores before this change. The approach taken here is the same one used in match.py, in exactmatcher. This changeset was originally written by Valentin Gatien-Baron in a private repository. I have redacted the commit message and did a minor clean up of the code.
Fri, 27 Oct 2023 08:54:41 +0200 revlog: add a small cache of unfiltered chunk
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Oct 2023 08:54:41 +0200] rev 51108
revlog: add a small cache of unfiltered chunk This can provides a massive boost to the reading of multiple revision and the computation of a valid delta chain. This greatly help operation like `hg log --patch`, delta computation (helping pull/unbundle), linkrev adjustment (helping copy tracing). A first round of benchmark for `hg log --patch --limit 1000` shows improvement in the 10-20% range on "small" repository like pypy or mercurial and large improvements (about 33%) for more complex ones like netbeans and mozilla's. These speeds up are consistent with the improvement to `hg pull` (from a server sending poor deltas) I saw benchmarking this last year. Further benchmark will be run during the freeze. I added some configuration in the experimental space to be able to further test the effect of various tuning for now. This feature should fit well in the "usage/resource profile" configuration that we should land next cycle. When it does not provides a benefit the overhead of the cache seem to be around 2%, a small price for the big improvement. In addition I believe we could shave most of this overhead with a more efficent lru implementation.
Fri, 27 Oct 2023 02:57:09 +0200 revlog: minor refactor in the chunk gather process
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Oct 2023 02:57:09 +0200] rev 51107
revlog: minor refactor in the chunk gather process We will introduce some caching in this method in the next changeset, we make some of the most "disruptive" change first as touching this could break (and maybe did during the development process).
Tue, 24 Oct 2023 11:08:49 +0200 changelog-delay: move the delay/divert logic inside the (inner) revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Oct 2023 11:08:49 +0200] rev 51106
changelog-delay: move the delay/divert logic inside the (inner) revlog Instead of hacking throught the vfs/opener, we implement the delay/divert logic inside the `_InnerRevlog` and `randomaccessfile` object. This will allow to an alternative implementation of the `_InnerRevlog` that does not need to use Python details. As a result, the new implementation can use the transaction less agressively and avoid some extra output since no data had been written yet. That seems like a good side effect.
Thu, 26 Oct 2023 05:37:37 +0200 revlog: add a `canonical_index_file` attribute on inner revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Oct 2023 05:37:37 +0200] rev 51105
revlog: add a `canonical_index_file` attribute on inner revlog This is currently the same and the index_file but it will become more complex when we start doing delayed write.
Thu, 26 Oct 2023 03:41:58 +0200 changelog-delay: move "delayed" check to a more official API
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Oct 2023 03:41:58 +0200] rev 51104
changelog-delay: move "delayed" check to a more official API To avoid reaching inside the inner object in the future, we needs some official API. We put one of such API early to reduce the size of the final diff.
Thu, 26 Oct 2023 03:29:46 +0200 changelog-delay: move the appender class next to randomaccessfile
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Oct 2023 03:29:46 +0200] rev 51103
changelog-delay: move the appender class next to randomaccessfile We want to move the delay/divert logic at the revlog level (to have all IO related logic in the _InnerRevlog) we start with small piece that are easy to move on their own.
Fri, 20 Oct 2023 12:13:33 +0200 changelog-delay: adds some check around delaying and diverting write
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 20 Oct 2023 12:13:33 +0200] rev 51102
changelog-delay: adds some check around delaying and diverting write Theses assert shows we never call delay or divert if the revlog hold file handle on the revlog's file.
Wed, 25 Oct 2023 23:14:20 +0200 revlog: consolidate cache invalidation within the inner objet
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Oct 2023 23:14:20 +0200] rev 51101
revlog: consolidate cache invalidation within the inner objet The invalidation of data that belong to the inner object can and should be delegated to the inner object.
Tue, 24 Oct 2023 11:06:04 +0200 shelve: drop some weird manually stripping before transaction abort
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Oct 2023 11:06:04 +0200] rev 51100
shelve: drop some weird manually stripping before transaction abort I cannot find a case where this is actually useful, so lets triggering strip in the middle of uncommitted transaction.
Thu, 19 Oct 2023 05:19:55 +0200 revlog: move entry writing in the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 05:19:55 +0200] rev 51099
revlog: move entry writing in the inner object This is the second big piece of API we want to live on the inner object. With this the inner object have freedom it needs to implement things internally. (except for the delayed write feature of the changelog, that will be migrated in coming changesets)
Thu, 19 Oct 2023 04:11:39 +0200 revlog: move `sidedata` in the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 04:11:39 +0200] rev 51098
revlog: move `sidedata` in the inner object Same object as rawtext, but for sidedata.
Thu, 19 Oct 2023 03:52:31 +0200 revlog: move the `rawtext` method on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 03:52:31 +0200] rev 51097
revlog: move the `rawtext` method on the inner object This is one of the current core goal of the inner object: having a "simple" API for some of the core revlog action, like getting a raw text, with the inner object able to do that part internally, on its own.
Thu, 19 Oct 2023 03:33:59 +0200 revlog: move the_revisioncache on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 03:33:59 +0200] rev 51096
revlog: move the_revisioncache on the inner object The goal for this inner object is to compute that things we cache, it make more sense to have the inner object handle it directly.
Thu, 19 Oct 2023 03:07:39 +0200 revlog: move the `deltachain` method on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 03:07:39 +0200] rev 51095
revlog: move the `deltachain` method on the inner object This is a necessary step before being able to move more logic around restoring a revision content there. For now, we do a simple patch for the perf extension logic, when the implementation of the inner object changes, we will likely need some evolution of the API. However this is true of many things in the perf extension. So we will see this later.
Thu, 19 Oct 2023 03:00:58 +0200 revlog: move the `_chunks` method on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 03:00:58 +0200] rev 51094
revlog: move the `_chunks` method on the inner object This is a necessary step before being able to move more logic around restoring a revision content there. For now, we do a simple patch for the perf extension logic, when the implementation of the inner object changes, we will likely need some evolution of the API. However this is true of many things in the perf extension. So we will see this later.
Wed, 25 Oct 2023 04:40:40 +0200 revlog: add a couple more of useful method on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Oct 2023 04:40:40 +0200] rev 51093
revlog: add a couple more of useful method on the inner object This will be needed for the next changeset.
Thu, 19 Oct 2023 02:57:05 +0200 revlog: move the `_chunk` method on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 02:57:05 +0200] rev 51092
revlog: move the `_chunk` method on the inner object This is a necessary step before being able to move more logic around restoring a revision content there. For now, we do a simple patch for the perf extension logic, when the implementation of the inner object changes, we will likely need some evolution of the API. However this is true of many things in the perf extension. So we will see this later.
Wed, 25 Oct 2023 02:13:18 +0200 revlog: move the compression/decompression logic on the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Oct 2023 02:13:18 +0200] rev 51091
revlog: move the compression/decompression logic on the inner object This is a necessary step before being able to move more logic around restoring a revision content there. For now, we do a simple patch for the perf extension logic, when the implementation of the inner object changes, we will likely need some evolution of the API. However this is true of many things in the perf extension. So we will see this later.
Mon, 23 Oct 2023 14:27:07 +0200 revlog: move the splitting-inline-revlog logic inside the inner object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 23 Oct 2023 14:27:07 +0200] rev 51090
revlog: move the splitting-inline-revlog logic inside the inner object This is another large IO block that we need to move within the inner object if we want's it to be self sufficient.
Wed, 25 Oct 2023 01:02:47 +0200 revlog: synchronise the various attribute holding the index filename
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Oct 2023 01:02:47 +0200] rev 51089
revlog: synchronise the various attribute holding the index filename The segmentfile and the attribute need to be synchronized, let's enforce that.
Thu, 19 Oct 2023 01:50:07 +0200 revlog: drop reference to docket in the inline-splitting code
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 Oct 2023 01:50:07 +0200] rev 51088
revlog: drop reference to docket in the inline-splitting code revlog with a docket do not use inline revlog and do not need to split them. So we can remove some code handling docket there.
Tue, 24 Oct 2023 17:03:27 +0200 revlog: move _getsegmentforrevs on the internal object
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Oct 2023 17:03:27 +0200] rev 51087
revlog: move _getsegmentforrevs on the internal object See inline documentation for details.
Tue, 17 Oct 2023 06:02:33 +0200 revlog: create a iteration of a _InnerRevlog object within the revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 17 Oct 2023 06:02:33 +0200] rev 51086
revlog: create a iteration of a _InnerRevlog object within the revlog The goal of this object is to isolate a sub-API that can be implemented by a compiled object (e.g. Rust). So the boundary of this object will be arbitrary depending of what can we easily implemented in the Compiled code. For now, we start simple, and move the code that manage the IO objects in the inner object. More will come in the coming changesets. Note: the object definition could live in the different module to thin the `revlog.py` file, however there are other better candidate for extraction first and I have enought patch stacked on top of the this one for the split in this patch not to be worth it. So I leave this to future me.
Tue, 17 Oct 2023 05:17:02 +0200 revlog: drop the unused `_chunkcache` attribute
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 17 Oct 2023 05:17:02 +0200] rev 51085
revlog: drop the unused `_chunkcache` attribute Apparently, some time ago, the chunk cache moved in the randomaccessfile object.
Tue, 17 Oct 2023 04:54:22 +0200 revlog: drop the unused `_sidedatareadfp` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 17 Oct 2023 04:54:22 +0200] rev 51084
revlog: drop the unused `_sidedatareadfp` method It has no caller anywhere and is probably the remains of some older code.
Fri, 13 Oct 2023 16:11:04 +0200 revlog: also migrates `revlog.upperboundcomp` to ConfigClass
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Oct 2023 16:11:04 +0200] rev 51083
revlog: also migrates `revlog.upperboundcomp` to ConfigClass This was planned but overlooked when doing the rest of the migration.
Fri, 13 Oct 2023 16:03:26 +0200 revlog: small doc to the `files` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Oct 2023 16:03:26 +0200] rev 51082
revlog: small doc to the `files` method
Wed, 11 Oct 2023 02:19:00 +0200 revlog: remove the `_indexfp` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Oct 2023 02:19:00 +0200] rev 51081
revlog: remove the `_indexfp` method The method is only used two time and we want to move that code to a lower level object. So we simply inline the method to simplify further refactoring.
Sat, 14 Oct 2023 03:24:13 +0200 revlog: avoid opening and closing the file for each cloned revision
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 14 Oct 2023 03:24:13 +0200] rev 51080
revlog: avoid opening and closing the file for each cloned revision The previous code was flushing files after each new revision, slowing things down. For exemple, with this change, the evolve repository can run `hg debugupgraderepo --run --optimize re-delta-parent` in about 3.4s instead of 4.5 seconds.
Fri, 13 Oct 2023 23:21:46 +0200 censor: accept censored revision during upgrade
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Oct 2023 23:21:46 +0200] rev 51079
censor: accept censored revision during upgrade They can simply be passed by as censored.
Fri, 13 Oct 2023 22:40:10 +0200 censor: show that censored revision prevent repository upgrade
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Oct 2023 22:40:10 +0200] rev 51078
censor: show that censored revision prevent repository upgrade This is not great.
Thu, 12 Oct 2023 17:41:06 +0100 stream-clone: fix a crash when a repo with an empty revlog is cloned stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 12 Oct 2023 17:41:06 +0100] rev 51077
stream-clone: fix a crash when a repo with an empty revlog is cloned
Tue, 19 Sep 2023 03:15:12 +0200 debug-delta-chain: print less data by default
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 03:15:12 +0200] rev 51076
debug-delta-chain: print less data by default This is faster and simpler to read.
Tue, 19 Sep 2023 03:00:44 +0200 debugdeltachain: add a parameter to display all info
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 03:00:44 +0200] rev 51075
debugdeltachain: add a parameter to display all info This will be useful with the next changeset that change the defaul output to display the minimum amount of information.
Tue, 19 Sep 2023 02:20:49 +0200 debug-delta-chain: actually skip unrequested computation
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 02:20:49 +0200] rev 51074
debug-delta-chain: actually skip unrequested computation Doing quick test on mozilla-unified show we can run up to 2× faster by skipping some of these computation.
Tue, 19 Sep 2023 01:53:03 +0200 debug-delta-chain: add options to control what we compute
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 01:53:03 +0200] rev 51073
debug-delta-chain: add options to control what we compute Currently this mostly controls what we display, but actual computation saving will come soon.
Tue, 19 Sep 2023 01:24:10 +0200 debug-delta-chaing: add a parameter to select revision to look at
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 01:24:10 +0200] rev 51072
debug-delta-chaing: add a parameter to select revision to look at This allows for much faster runtime when we are interrested in some revisions only.
Mon, 18 Sep 2023 23:37:06 +0200 delta-chain: extract some debugdeltachain logic is object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Sep 2023 23:37:06 +0200] rev 51071
delta-chain: extract some debugdeltachain logic is object Moving from a closure to an object's method will help us to extend the command logic.
Mon, 18 Sep 2023 23:26:00 +0200 delta-chain: move the debugdeltachain command in revlogutils
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Sep 2023 23:26:00 +0200] rev 51070
delta-chain: move the debugdeltachain command in revlogutils There is a dedicated `mercurial.revlogutils.debug` module were this code fits well.
Thu, 12 Oct 2023 09:04:12 +0200 dirstate: document the `changing_*` context manager
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Oct 2023 09:04:12 +0200] rev 51069
dirstate: document the `changing_*` context manager The methods that requires them have documentation, but the context themselves had none. This is now fixed.
Tue, 10 Oct 2023 10:47:46 +0200 revlog: deprecate the compatibility config property
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:47:46 +0200] rev 51068
revlog: deprecate the compatibility config property Now that core is no longer use them, we can deprecated them. Let us aim at removing them in the next version.
Tue, 10 Oct 2023 12:03:02 +0200 revlog: remove legacy usage of `_lazydeltabase`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 12:03:02 +0200] rev 51067
revlog: remove legacy usage of `_lazydeltabase` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:36:55 +0200 revlog: remove legacy usage of `_lazydelta`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:36:55 +0200] rev 51066
revlog: remove legacy usage of `_lazydelta` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:36:34 +0200 revlog: remove legacy usage of `canonical_parent_order`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:36:34 +0200] rev 51065
revlog: remove legacy usage of `canonical_parent_order` All core code is now getting the setting from the FeatureConfig object.
Tue, 10 Oct 2023 11:36:23 +0200 revlog: remove legacy usage of `_compute_rank`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:36:23 +0200] rev 51064
revlog: remove legacy usage of `_compute_rank` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:33:33 +0200 revlog: remove legacy usage of `_srmingapsize`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:33:33 +0200] rev 51063
revlog: remove legacy usage of `_srmingapsize` All core code is now getting the setting from the DataConfig object.
Tue, 10 Oct 2023 11:30:07 +0200 revlog: remove legacy usage of `_srdensitythreshold`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:30:07 +0200] rev 51062
revlog: remove legacy usage of `_srdensitythreshold` All core code is now getting the setting from the DataConfig object.
Tue, 10 Oct 2023 11:29:19 +0200 revlog: remove legacy usage of `hassidedata`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:29:19 +0200] rev 51061
revlog: remove legacy usage of `hassidedata` All core code is now getting the setting from the FeatureConfig object.
Tue, 10 Oct 2023 11:27:39 +0200 revlog: remove legacy usage of `_sparserevlog`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:27:39 +0200] rev 51060
revlog: remove legacy usage of `_sparserevlog` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:24:37 +0200 revlog: remove legacy usage of `_withsparseread`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:24:37 +0200] rev 51059
revlog: remove legacy usage of `_withsparseread` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:16:07 +0200 revlog: remove legacy usage of `_maxdeltachainspan`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:16:07 +0200] rev 51058
revlog: remove legacy usage of `_maxdeltachainspan` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:13:24 +0200 revlog: remove legacy usage of `_compengineopts`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:13:24 +0200] rev 51057
revlog: remove legacy usage of `_compengineopts` All core code is now getting the setting from the FeatureConfig object.
Tue, 10 Oct 2023 11:12:06 +0200 revlog: remove legacy usage of `_compengine`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:12:06 +0200] rev 51056
revlog: remove legacy usage of `_compengine` All core code is now getting the setting from the FeatureConfig object.
Wed, 11 Oct 2023 00:04:23 +0200 revlog: remove legacy usage of `_candidate_group_chunk_size`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Oct 2023 00:04:23 +0200] rev 51055
revlog: remove legacy usage of `_candidate_group_chunk_size` All core code is now getting the setting from the DeltaConfig object.
Wed, 11 Oct 2023 00:04:08 +0200 revlog: remove legacy usage of `_debug_delta`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Oct 2023 00:04:08 +0200] rev 51054
revlog: remove legacy usage of `_debug_delta` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:07:15 +0200 revlog: remove legacy usage of `_deltabothparents`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:07:15 +0200] rev 51053
revlog: remove legacy usage of `_deltabothparents` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:05:54 +0200 revlog: remove legacy usage of `_maxchainlen`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:05:54 +0200] rev 51052
revlog: remove legacy usage of `_maxchainlen` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 11:04:40 +0200 revlog: remove legacy usage of `_chunkcachesize`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:04:40 +0200] rev 51051
revlog: remove legacy usage of `_chunkcachesize` All core code is now getting the setting from the DataConfig object.
Tue, 10 Oct 2023 11:04:07 +0200 revlog: remove legacy usage of `_censorable`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:04:07 +0200] rev 51050
revlog: remove legacy usage of `_censorable` All core code is now getting the setting from the FeatureConfig object.
Tue, 10 Oct 2023 11:02:24 +0200 revlog: remove legacy usage of `_mmaplargeindex`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:02:24 +0200] rev 51049
revlog: remove legacy usage of `_mmaplargeindex` All core code is now getting the setting from the DataConfig object.
Tue, 10 Oct 2023 11:02:00 +0200 revlog: remove legacy usage of `_checkambig`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 11:02:00 +0200] rev 51048
revlog: remove legacy usage of `_checkambig` All core code is now getting the setting from the DataConfig object.
Tue, 10 Oct 2023 10:58:28 +0200 revlog: drop the _generaldelta attribute from the imanifeststorage interface
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:58:28 +0200] rev 51047
revlog: drop the _generaldelta attribute from the imanifeststorage interface It never belonged here.
Tue, 10 Oct 2023 10:56:42 +0200 revlog: remove legacy usage of `_generaldelta`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:56:42 +0200] rev 51046
revlog: remove legacy usage of `_generaldelta` All core code is now getting the setting from the DeltaConfig object.
Tue, 10 Oct 2023 18:02:20 +0200 revlog: use the new Config classes in _testrevlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 18:02:20 +0200] rev 51045
revlog: use the new Config classes in _testrevlog the mock object need to follow the new interface. We allow ourself a small hacky import since this is testing code. The legacy attribute are still here because some code still use them. We will drop them when this code is updated.
Tue, 10 Oct 2023 10:04:06 +0200 revlog: skip opener options to pass sparse reading values
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:04:06 +0200] rev 51044
revlog: skip opener options to pass sparse reading values We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:58 +0200 revlog: skip opener options to pass sparse_revlog value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:58 +0200] rev 51043
revlog: skip opener options to pass sparse_revlog value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:50 +0200 revlog: skip opener options to pass mmap_index_threshold value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:50 +0200] rev 51042
revlog: skip opener options to pass mmap_index_threshold value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:42 +0200 revlog: skip opener options to pass enable_ellipsis
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:42 +0200] rev 51041
revlog: skip opener options to pass enable_ellipsis We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:34 +0200 revlog: skip opener options to pass compression option values
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:34 +0200] rev 51040
revlog: skip opener options to pass compression option values We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:26 +0200 revlog: skip opener options to pass compression_engine value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:26 +0200] rev 51039
revlog: skip opener options to pass compression_engine value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:18 +0200 revlog: skip opener options to pass max_chain_len
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:18 +0200] rev 51038
revlog: skip opener options to pass max_chain_len We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:09 +0200 revlog: skip opener options to pass max_deltachain_span
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:09 +0200] rev 51037
revlog: skip opener options to pass max_deltachain_span We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:03:01 +0200 revlog: skip opener options to pass lazy_delta values
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:03:01 +0200] rev 51036
revlog: skip opener options to pass lazy_delta values We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:02:53 +0200 revlog: skip opener options to pass debug_delta value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:53 +0200] rev 51035
revlog: skip opener options to pass debug_delta value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:02:45 +0200 revlog: skip opener options to pass candidate_group_chunk_size value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:45 +0200] rev 51034
revlog: skip opener options to pass candidate_group_chunk_size value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:02:37 +0200 revlog: skip opener option to pass delta_both_parents value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:37 +0200] rev 51033
revlog: skip opener option to pass delta_both_parents value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:02:29 +0200 revlog: skip opener option to pass chunk_cache_size value
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:29 +0200] rev 51032
revlog: skip opener option to pass chunk_cache_size value We can directly set the option in the config object now.
Tue, 10 Oct 2023 10:02:21 +0200 revlog: create the revlog object at the repository level
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:21 +0200] rev 51031
revlog: create the revlog object at the repository level There is currently no value set in it, but we will be able to start centralise config parsing at the repository level.
Tue, 10 Oct 2023 10:02:13 +0200 revlog: overwrite revlog config through copy of the config object
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:13 +0200] rev 51030
revlog: overwrite revlog config through copy of the config object The new objects allow for this kind of blanket approach that make things cleaner. If we have more cases, it would probably deserve a context manager, but since we only have two usage, I don't think it is worth it.
Tue, 10 Oct 2023 10:02:05 +0200 revlog: move configuration attribute into dedicated object
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:02:05 +0200] rev 51029
revlog: move configuration attribute into dedicated object First this make things clearer as the number of configuration attributes has grown out of control, so gathering them make things clearer. Second, this will make future sharing them at different level simpler. Third it will allow us to make initialisation and temporary override simpler soon.
Tue, 10 Oct 2023 10:01:57 +0200 manifestrevlog: flag some inconsistency in bundle/union repo inheritance
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Oct 2023 10:01:57 +0200] rev 51028
manifestrevlog: flag some inconsistency in bundle/union repo inheritance This "work" but still, this is weird, let us point it out.
Sat, 30 Sep 2023 02:02:36 +0200 randomaccessfile: drop explicit passing of file description
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 30 Sep 2023 02:02:36 +0200] rev 51027
randomaccessfile: drop explicit passing of file description The goal of this object is to manage IO, we still have to open the file if necessary, but this is all internal now.
Tue, 26 Sep 2023 02:54:50 +0200 revlog: drop more file description passing between private function
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Sep 2023 02:54:50 +0200] rev 51026
revlog: drop more file description passing between private function They are no longer used as we are covered by the `reading` context
Tue, 26 Sep 2023 02:49:18 +0200 revlog: use a `reading` context in `_enforceinlinesize`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Sep 2023 02:49:18 +0200] rev 51025
revlog: use a `reading` context in `_enforceinlinesize` We are about to enforce reading context on various operation, so we make sure top level method are in the right context. In the future we might move the responsibility of opening the revlog for reading higher in the call chain but lets limit the disruption for now.
Tue, 26 Sep 2023 00:55:49 +0200 revlog: drop the df argument to `sidedata`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Sep 2023 00:55:49 +0200] rev 51024
revlog: drop the df argument to `sidedata` The intend of this argument is better filled by the `revlog.reading` or `revlog._writing` context. So we drop it to leave rooms for further cleanup and improvements.
Tue, 26 Sep 2023 00:54:46 +0200 revlog: drop the df argument to `rawdata`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Sep 2023 00:54:46 +0200] rev 51023
revlog: drop the df argument to `rawdata` The intend of this argument is better filled by the `revlog.reading` or `revlog._writing` context. So we drop it to leave rooms for further cleanup and improvements.
Mon, 25 Sep 2023 22:52:01 +0200 revlog: drop the df argument to `revision`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 22:52:01 +0200] rev 51022
revlog: drop the df argument to `revision` The intend of this argument is better filled by the `revlog.reading` or `revlog._writing` context. So we drop it to leave rooms for further cleanup and improvements.
Tue, 26 Sep 2023 01:05:02 +0200 interfaces: drop the `raw` parameters on ifiledata interface
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Sep 2023 01:05:02 +0200] rev 51021
interfaces: drop the `raw` parameters on ifiledata interface In practice it was not implemented since forever. The `rawdata` method fit that purpose. The interface checking does not detect that because it seems to confuse the `_df` argument for the `raw` one. Dropping that `_df` argument in a descendant changesets revealed the issue.
Mon, 25 Sep 2023 22:51:57 +0200 delta-computer: stop explicitly taking file handle
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 22:51:57 +0200] rev 51020
delta-computer: stop explicitly taking file handle The revlog has all the logic for opening and caching such handles, so no need to duplicate it here. In addition, this let the revlog handle that logic by itself which is better.
Mon, 25 Sep 2023 16:47:55 +0200 censors: simply use `revlog.reading` to keep things open dring rewrite
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 16:47:55 +0200] rev 51019
censors: simply use `revlog.reading` to keep things open dring rewrite We have a dedicated context now, we can simply use it. In practice, we cannot "simply" use it, as `finddeltainfo` still requires the file pointer to be passed explicitly. We will keep the old context manager open for a small bit until we get rid of it in a future changeset.
Mon, 25 Sep 2023 17:18:40 +0200 stream-clone: use `revlog.reading` in `revlog.get_streams`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 17:18:40 +0200] rev 51018
stream-clone: use `revlog.reading` in `revlog.get_streams` We can get the same result while using more standard method, so we do.
Mon, 25 Sep 2023 16:57:53 +0200 debug-revlog: keep the revlog open for the analysis duration
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 16:57:53 +0200] rev 51017
debug-revlog: keep the revlog open for the analysis duration This is more explicit. No performance differences were observed.
Mon, 25 Sep 2023 16:36:17 +0200 repo-upgrade: keep the revlog open while cloning
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 16:36:17 +0200] rev 51016
repo-upgrade: keep the revlog open while cloning This is more explicit. No performance differences were observed.
Mon, 25 Sep 2023 12:37:52 +0200 verify: keep the revlog open for reading while verifying it
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 12:37:52 +0200] rev 51015
verify: keep the revlog open for reading while verifying it This is more explicit. No performances difference were observed.
Mon, 25 Sep 2023 12:32:42 +0200 convert: use `changelogrevision` to fetch changeset data instead of read
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 12:32:42 +0200] rev 51014
convert: use `changelogrevision` to fetch changeset data instead of read This `changelogrevision` is a higher level function that will remain simple to use as we refactor the revlog.
Mon, 25 Sep 2023 12:14:38 +0200 revlog: adapt the `reading` check for `unionrepo`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 12:14:38 +0200] rev 51013
revlog: adapt the `reading` check for `unionrepo` We cannot just rely on the length check for the `unionrepo` as the local revlog might be empty while the other revlog contains data. In addition, we need to also open the second revlog for reading when needed.
Mon, 25 Sep 2023 12:13:38 +0200 revlog: adapt the `reading` check for `bundlerepo`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 12:13:38 +0200] rev 51012
revlog: adapt the `reading` check for `bundlerepo` We cannot just rely on the length check for the `bundlerepo` as the local revlog might be empty with all data in the bundle.
Mon, 25 Sep 2023 12:07:25 +0200 revlog: make `reading` not crash on empty repository
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 12:07:25 +0200] rev 51011
revlog: make `reading` not crash on empty repository If the revlog is empty, the file might not exist and the open will fails. This is not great, but that details or this is now contained in the revlog itself.
Mon, 25 Sep 2023 11:59:38 +0200 changelog: make the `_delayopener` a real proxy
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 11:59:38 +0200] rev 51010
changelog: make the `_delayopener` a real proxy We use the same approach as the `_divertopener`. This make it possible to use other methods of the vfs and not just the `__call__` API.
Mon, 25 Sep 2023 11:23:38 +0200 perf: ensure all readlog's reading is done within a `reading` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 11:23:38 +0200] rev 51009
perf: ensure all readlog's reading is done within a `reading` context We are about to enforce this at the revlog level, so we update the perf code in advance.
Mon, 25 Sep 2023 11:13:44 +0200 perf: change the way we approach revlog reading
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Sep 2023 11:13:44 +0200] rev 51008
perf: change the way we approach revlog reading If the `reading` context manager is available, we should use it over explicit file handle management. This will help us to make file handle management a matter more internal to the revlog.
Tue, 19 Sep 2023 23:14:36 +0200 revlog: document the `rev` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 23:14:36 +0200] rev 51007
revlog: document the `rev` method A small docstring does not hurt.
Tue, 19 Sep 2023 23:14:01 +0200 revlog: document the `clearcaches` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 23:14:01 +0200] rev 51006
revlog: document the `clearcaches` method A small docstring does not hurt.
Tue, 19 Sep 2023 23:13:16 +0200 revlog: document the `update_caches` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 23:13:16 +0200] rev 51005
revlog: document the `update_caches` method A small docstring does not hurt.
Tue, 19 Sep 2023 23:10:05 +0200 revlog: make the `candelta` method private
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 23:10:05 +0200] rev 51004
revlog: make the `candelta` method private It is only used internally, so lets make it clear.
Tue, 19 Sep 2023 23:09:29 +0200 revlog: document the `get_streams` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 23:09:29 +0200] rev 51003
revlog: document the `get_streams` method A small docstring does not hurt.
Tue, 19 Sep 2023 22:52:54 +0200 revlog: document the `is_inline_index` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Sep 2023 22:52:54 +0200] rev 51002
revlog: document the `is_inline_index` method A small docstring does not hurt.
Wed, 11 Oct 2023 15:15:28 +0200 opemvms: add specific files and utilities
Jean-Francois Pieronne <jf.pieronne@laposte.net> [Wed, 11 Oct 2023 15:15:28 +0200] rev 51001
opemvms: add specific files and utilities
Thu, 03 Aug 2023 02:48:28 +0200 openvms: do not check for shebang in openvms script
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 03 Aug 2023 02:48:28 +0200] rev 51000
openvms: do not check for shebang in openvms script It does not apply to them.
Thu, 03 Aug 2023 02:30:57 +0200 openvms: consider worker costly on OpenVMS
Jean-Francois Pieronne <jf.pieronne@laposte.net> [Thu, 03 Aug 2023 02:30:57 +0200] rev 50999
openvms: consider worker costly on OpenVMS As for Windows, the parallel worker feature is less appealing on OpenVMS.
Thu, 03 Aug 2023 02:33:22 +0200 openvms: fix the pager spawning and cleanup
Jean-Francois Pieronne <jf.pieronne@laposte.net> [Thu, 03 Aug 2023 02:33:22 +0200] rev 50998
openvms: fix the pager spawning and cleanup Unsurprisingly, pager handling needs some adjustment.
Thu, 03 Aug 2023 02:32:28 +0200 openvms: make process spawning works on OpenVMS
Jean-Francois Pieronne <jf.pieronne@laposte.net> [Thu, 03 Aug 2023 02:32:28 +0200] rev 50997
openvms: make process spawning works on OpenVMS We need to adjust some behavior for OpenVMS.
Thu, 03 Aug 2023 02:34:17 +0200 openvms: mark symlink as unsupported on OpenVMS
Jean-Francois Pieronne <jf.pieronne@laposte.net> [Thu, 03 Aug 2023 02:34:17 +0200] rev 50996
openvms: mark symlink as unsupported on OpenVMS OpenVMS's symlink emulation is broken on some OpenVMS versions, so we better disable them altogether for now.
Thu, 03 Aug 2023 02:28:52 +0200 openvms: duck-punch a bugfix into `environb` object
Jean-Francois Pieronne <jf.pieronne@laposte.net> [Thu, 03 Aug 2023 02:28:52 +0200] rev 50995
openvms: duck-punch a bugfix into `environb` object The official Python3 build for OpenVMS has some crippling bug that we need to patch dynamically OpenVMS patches
Wed, 11 Oct 2023 00:43:24 +0200 fastexport: simplify code
Joerg Sonnenberger <joerg@bec.de> [Wed, 11 Oct 2023 00:43:24 +0200] rev 50994
fastexport: simplify code
Wed, 11 Oct 2023 02:02:46 +0200 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Oct 2023 02:02:46 +0200] rev 50993
branching: merge stable into default
Tue, 10 Oct 2023 18:29:04 +0200 cleanup: typos, formatting stable
Joerg Sonnenberger <joerg@bec.de> [Tue, 10 Oct 2023 18:29:04 +0200] rev 50992
cleanup: typos, formatting
Sun, 24 Sep 2023 04:35:02 +0200 tests: backed out changeset 8037ddacad47 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 24 Sep 2023 04:35:02 +0200] rev 50991
tests: backed out changeset 8037ddacad47 This issue with 3.11 was real, but it eventually got fixed after people started building exploit and filling CVE See https://github.com/python/cpython/issues/106242 And https://github.com/python/cpython/pull/106816
Thu, 05 Oct 2023 14:47:42 -0300 httppeer: fix static-http: scheme autodetection (issue6833) stable
Anton Shestakov <av6@dwimlabs.net> [Thu, 05 Oct 2023 14:47:42 -0300] rev 50990
httppeer: fix static-http: scheme autodetection (issue6833) Since statichttprepo.make_peer() assumes path is a urlutil.path object (by accessing path.loc), we no longer can just provide a bytestring there. See also 5f71fff8dc74 and cfe8d88a453e.
Wed, 25 Jan 2023 15:34:27 +0100 admin-command: add verify command
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Jan 2023 15:34:27 +0100] rev 50989
admin-command: add verify command Start using the 'admin' namespace by adding a 'verify' command. Invocation is 'admin::verify'. The idea is to progressively add more focused checks than the existing verify command. To do so we need an advanced way to express what we want to check. The first check for admin::verify is 'working-copy.dirstate' which has no options, because it was an easy first check to implement, which verifies the integrity of the dirstate. This changeset was created with the help of Franck Bret.
Wed, 13 Sep 2023 12:25:51 +0200 transaction: abstract away the detection of an abandoned transaction
Raphaël Gomès <rgomes@octobus.net> [Wed, 13 Sep 2023 12:25:51 +0200] rev 50988
transaction: abstract away the detection of an abandoned transaction We're about to add another place where this is used, let's not spill this implementation detail.
Wed, 25 Jan 2023 15:33:39 +0100 commands: add admin namespace
Franck Bret <franck.bret@octobus.net> [Wed, 25 Jan 2023 15:33:39 +0100] rev 50987
commands: add admin namespace In order to stop abusing the 'debug' namespace for non-debug command, it adds a new 'admin' namespace dedicated to 'admin' operations on a repository (i.e commands suitable for administration tasks). This namespace entry would be used to migrate in the future some existing commands from the 'debug' namespace, or other top level commands that may not be directly exposed to end users. (verify command is a perfect candidate for this case)
Thu, 14 Sep 2023 10:52:09 +0100 revlog: make the rust test for node hex prefix resolution exercise the nodemap stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 14 Sep 2023 10:52:09 +0100] rev 50986
revlog: make the rust test for node hex prefix resolution exercise the nodemap
Wed, 13 Sep 2023 18:28:51 +0100 revlog: fix a bug where NULL_NODE failed to be resolved to NULL_REV stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 13 Sep 2023 18:28:51 +0100] rev 50985
revlog: fix a bug where NULL_NODE failed to be resolved to NULL_REV The problem is that nodemap already takes care about NULL_NODE resolution (in `validate_candidate` in `nodemap.rs`), so the special handling in `rev_from_node` is unnecessary and incorrect.
Thu, 14 Sep 2023 11:03:41 +0100 tests: reproduce the nullrev bug in an end-to-end test stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 14 Sep 2023 11:03:41 +0100] rev 50984
tests: reproduce the nullrev bug in an end-to-end test
Wed, 09 Aug 2023 15:46:35 +0200 rust-config: fix incorrect coercion of null values to false
Raphaël Gomès <rgomes@octobus.net> [Wed, 09 Aug 2023 15:46:35 +0200] rev 50983
rust-config: fix incorrect coercion of null values to false As explained in the previous changeset: Probably being too trigger happy about boolean values, I incorrectly set the transform for a `None` to a `Some(false)`. It would cause for example the `ui.formatted` value to be set to `Some(false)`, which turns off the colors among other things, when `None` would trigger the automatic behavior.
Wed, 09 Aug 2023 15:44:56 +0200 rust-config: show default `null` is coerced incorrectly to `false`
Raphaël Gomès <rgomes@octobus.net> [Wed, 09 Aug 2023 15:44:56 +0200] rev 50982
rust-config: show default `null` is coerced incorrectly to `false` Probably being too trigger happy about boolean values, I incorrectly set the transform for a `None` to a `Some(false)`. It would cause for example the `ui.formatted` value to be set to `Some(false)`, which turns off the colors among other things, when `None` would trigger the automatic behavior. This is fixed in the next commit.
Wed, 09 Aug 2023 15:41:18 +0200 rust-config: fix fallback to default not parsing the default value
Raphaël Gomès <rgomes@octobus.net> [Wed, 09 Aug 2023 15:41:18 +0200] rev 50981
rust-config: fix fallback to default not parsing the default value When a config item's default is a string, it sometimes needs to be parsed into another type, like in the case of `cmdserver.max-log-size`, that returns a number of bytes from a human-readable amount like `25MB`. The logic for the fix is explained inline.
Tue, 08 Aug 2023 14:14:00 +0200 rust-config: demonstrate a bug when falling back to non-trivial default values
Raphaël Gomès <rgomes@octobus.net> [Tue, 08 Aug 2023 14:14:00 +0200] rev 50980
rust-config: demonstrate a bug when falling back to non-trivial default values The default value (when the user hasn't configured anything) is not run through the value parser, causing a programming error to happen because of type mismatch. This will be fixed in the next commit.
Fri, 18 Aug 2023 14:34:29 +0200 rust: make `Revision` a newtype
Raphaël Gomès <rgomes@octobus.net> [Fri, 18 Aug 2023 14:34:29 +0200] rev 50979
rust: make `Revision` a newtype This change is the one we've been building towards during this series. The aim is to make `Revision` mean more than a simple integer, holding the information that it is valid for a given revlog index. While this still allows for programmer error, since creating a revision directly and querying a different index with a "checked" revision are still possible, the friction created by the newtype will hopefully make us think twice about which type to use. Enough of the Rust ecosystem relies on the newtype pattern to be efficiently optimized away (even compiler in codegen tests¹), so I'm not worried about this being a fundamental problem. [1] https://github.com/rust-lang/rust/blob/7a70647f195f6b0a0f1ebd72b1542ba91a32f43a/tests/codegen/vec-in-place.rs#L47
Thu, 10 Aug 2023 11:01:07 +0200 rust: implement the `Graph` trait for all revlogs
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Aug 2023 11:01:07 +0200] rev 50978
rust: implement the `Graph` trait for all revlogs This is trivial and makes all the algorithms relying on the trait usable for more use cases.
Thu, 10 Aug 2023 11:00:34 +0200 rust: use the new `UncheckedRevision` everywhere applicable
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Aug 2023 11:00:34 +0200] rev 50977
rust: use the new `UncheckedRevision` everywhere applicable This step converts all revisions that shouldn't be considered "valid" in any context to `UncheckedRevison`, allowing `Revision` to be changed for a stronger type in a later changeset. Note that the conversion from unchecked to checked is manual and requires at least some thought from the programmer, although directly using `Revision` is still possible. A later changeset will make this mistake harder to make.
Mon, 11 Sep 2023 11:52:33 +0200 rust-revlog: split logic for `rawdata` to prepare for `UncheckedRevision` use
Raphaël Gomès <rgomes@octobus.net> [Mon, 11 Sep 2023 11:52:33 +0200] rev 50976
rust-revlog: split logic for `rawdata` to prepare for `UncheckedRevision` use In the next changeset, we will change the logic to use `UncheckedRevision` in the non-general delta case. The general delta case will use the "checked" path since `base_rev_or_base_of_delta_chain` will be checked.
Mon, 07 Aug 2023 15:07:48 +0200 rust: remove unused error variant
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 15:07:48 +0200] rev 50975
rust: remove unused error variant All paths check that the working directory revision is not used.
Mon, 07 Aug 2023 12:53:43 +0200 rust: add `UncheckedRevision` type
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 12:53:43 +0200] rev 50974
rust: add `UncheckedRevision` type This is the start of a series whose aim is to separate "checked" and "unchecked" revision numbers. A "checked" revision number is valid for a given index, allowing us to have faster algorithms that don't do redundant checks all the time and have a clearer view of the kinds of revisions we're working with.
Mon, 21 Aug 2023 17:57:48 -0400 debugwireproto: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:57:48 -0400] rev 50973
debugwireproto: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:54:01 -0400 debugwireargs: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:54:01 -0400] rev 50972
debugwireargs: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:49:57 -0400 debugwalk: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:49:57 -0400] rev 50971
debugwalk: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:47:52 -0400 debug_revlog_stats: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:47:52 -0400] rev 50970
debug_revlog_stats: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:46:44 -0400 debugbackupbundle: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:46:44 -0400] rev 50969
debugbackupbundle: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:43:52 -0400 debugsidedata: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:43:52 -0400] rev 50968
debugsidedata: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:41:01 -0400 debugserve: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:41:01 -0400] rev 50967
debugserve: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:39:22 -0400 debugrevspec: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:39:22 -0400] rev 50966
debugrevspec: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:36:36 -0400 debugrevlogindex: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:36:36 -0400] rev 50965
debugrevlogindex: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:35:13 -0400 debugrevlog: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:35:13 -0400] rev 50964
debugrevlog: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:34:13 -0400 debugrename: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:34:13 -0400] rev 50963
debugrename: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:33:00 -0400 debugrebuildfncache: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:33:00 -0400] rev 50962
debugrebuildfncache: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:31:53 -0400 debugpickmergetool: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:31:53 -0400] rev 50961
debugpickmergetool: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:29:56 -0400 debugp2copies: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:29:56 -0400] rev 50960
debugp2copies: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:29:05 -0400 debugp1copies: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:29:05 -0400] rev 50959
debugp1copies: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:26:56 -0400 debugobsolete: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:26:56 -0400] rev 50958
debugobsolete: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:23:16 -0400 debugmergestate: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:23:16 -0400] rev 50957
debugmergestate: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:20:14 -0400 debugknown: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:20:14 -0400] rev 50956
debugknown: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:18:56 -0400 debuginstall: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:18:56 -0400] rev 50955
debuginstall: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:16:43 -0400 debugindexdot: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:16:43 -0400] rev 50954
debugindexdot: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:15:30 -0400 debuggetbundle: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:15:30 -0400] rev 50953
debuggetbundle: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:14:18 -0400 debugformat: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:14:18 -0400] rev 50952
debugformat: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:12:03 -0400 debugfileset: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:12:03 -0400] rev 50951
debugfileset: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:09:45 -0400 debugextensions: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:09:45 -0400] rev 50950
debugextensions: migrate `opts` to native kwargs
Mon, 21 Aug 2023 17:06:47 -0400 debugdiscovery: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 17:06:47 -0400] rev 50949
debugdiscovery: migrate `opts` to native kwargs
Mon, 21 Aug 2023 16:58:23 -0400 debugdeltafind: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 16:58:23 -0400] rev 50948
debugdeltafind: migrate `opts` to native kwargs
Mon, 21 Aug 2023 16:56:38 -0400 debugdeltachain: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 16:56:38 -0400] rev 50947
debugdeltachain: migrate `opts` to native kwargs
Mon, 21 Aug 2023 16:53:16 -0400 debugdata: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 16:53:16 -0400] rev 50946
debugdata: migrate `opts` to native kwargs
Mon, 21 Aug 2023 16:51:07 -0400 debugcapabilities: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 16:51:07 -0400] rev 50945
debugcapabilities: migrate `opts` to native kwargs
Mon, 21 Aug 2023 16:19:51 -0400 debugbundle: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 16:19:51 -0400] rev 50944
debugbundle: migrate `opts` to native kwargs This is a utility function that's only called by `debugbundle()`. The rest of the command was previously ported.
Fri, 08 Sep 2023 20:34:41 +0200 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Sep 2023 20:34:41 +0200] rev 50943
branching: merge with stable
Wed, 21 Jun 2023 21:57:44 +0200 tags: avoid expensive access to repo.changelog in a loop stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Jun 2023 21:57:44 +0200] rev 50942
tags: avoid expensive access to repo.changelog in a loop repo.changelog needs some cache invalidation when run on filtered repository. Accessing it in that loop can be expensive when there is many heads (e.g. mozilla try and it 25 000 heads). Note that the loop itself seems useless, but after this patch it no longer take about ⅛ of the time we spend computing cache for mozilla try. before : ! wall 0.350994 comb 0.350000 user 0.330000 sys 0.020000 (median of 28) after : ! wall 0.319520 comb 0.310000 user 0.290000 sys 0.020000 (median of 30)
Thu, 22 Jun 2023 19:41:26 +0200 blackbox: add a option to duplicate output to stderr too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Jun 2023 19:41:26 +0200] rev 50941
blackbox: add a option to duplicate output to stderr too This is useful when debugging some performance operation.
Fri, 23 Jun 2023 17:22:42 +0200 perf: add a --update-last flag to perf::tags stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Jun 2023 17:22:42 +0200] rev 50940
perf: add a --update-last flag to perf::tags See inline documentation for details.
Thu, 22 Jun 2023 18:39:29 +0200 perf: add a `--clear-fnode-cache-rev` argument to perf::tags stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Jun 2023 18:39:29 +0200] rev 50939
perf: add a `--clear-fnode-cache-rev` argument to perf::tags This will help us test this in situation closer to an update after a commit or a push.
Thu, 22 Jun 2023 16:03:18 +0200 perf: introduce more cache invalidation option in perf::tags stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Jun 2023 16:03:18 +0200] rev 50938
perf: introduce more cache invalidation option in perf::tags This will help us to assert the performance of different versions in more diverse situations. We introduce helper function in the tags module in case invalidating such cache becomes different in the future.
Fri, 08 Sep 2023 15:33:03 +0200 hgweb: pass strings in WSGI environment correctly from wsgicgi stable
Manuel Jacob <me@manueljacob.de> [Fri, 08 Sep 2023 15:33:03 +0200] rev 50937
hgweb: pass strings in WSGI environment correctly from wsgicgi According to PEP 3333, the strings in the WSGI environment must be translatable to bytes using the ISO-8859-1 codec.
Wed, 06 Sep 2023 18:12:27 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:12:27 +0200] rev 50936
branching: merge stable into default
Wed, 06 Sep 2023 18:11:12 +0200 Added signature for changeset 5a8b54201039 stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:11:12 +0200] rev 50935
Added signature for changeset 5a8b54201039
Wed, 06 Sep 2023 18:11:10 +0200 Added tag 6.5.2 for changeset 5a8b54201039 stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:11:10 +0200] rev 50934
Added tag 6.5.2 for changeset 5a8b54201039
Wed, 06 Sep 2023 18:10:44 +0200 relnotes: add 6.5.2 stable 6.5.2
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:10:44 +0200] rev 50933
relnotes: add 6.5.2
Wed, 30 Aug 2023 12:24:12 +0200 run-tests: detect HGWITHRUSTEXT value stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:24:12 +0200] rev 50932
run-tests: detect HGWITHRUSTEXT value Without this, some manual check in tests/test-dirstate.t could get confused by the lack of `rust` in module policy and break the test.
Wed, 30 Aug 2023 11:31:05 +0100 tests: avoid test environment affecting setup.py stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 30 Aug 2023 11:31:05 +0100] rev 50931
tests: avoid test environment affecting setup.py In particular [RHG_FALLBACK_EXECUTABLE] is being set prematurely, before rhg is built, but probably the rest of the env changes don't help, either.
Mon, 04 Sep 2023 13:33:32 +0100 setup: make the error "Unable to find a working hg binary" more informative stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 04 Sep 2023 13:33:32 +0100] rev 50930
setup: make the error "Unable to find a working hg binary" more informative The error message now shows the attempted hg commands and their stderr, to make it easier to investigate why things are not working. Here's an example output /!\ /!\ Unable to find a working hg binary /!\ Version cannot be extracted from the repository /!\ Re-run the setup once a first version is built /!\ Attempts: /!\ attempt #0: /!\ cmd: ['hg-missing', 'log', '-r.', '-Ttest'] /!\ exception: [Errno 2] No such file or directory: 'hg-missing': 'hg-missing' /!\ attempt #1: /!\ cmd: ['/usr/bin/python3', 'hg', 'log', '-r.', '-Ttest'] /!\ return code: 255 /!\ std output: /!\ std error: *** failed to import extension "topic": No module named 'topic' *** failed to import extension "evolve": No module named 'evolve' abort: accessing `dirstate-v2` repository without associated fast implementation. (check `hg help config.format.use-dirstate-v2` for details) /!\ /!\ Could not determine the Mercurial version /!\ You need to build a local version first /!\ Run `make local` and try again /!\
Fri, 01 Sep 2023 00:09:55 +0200 pycompat: drop usage of hasattr/getattr/setattr/delatt proxy
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 00:09:55 +0200] rev 50929
pycompat: drop usage of hasattr/getattr/setattr/delatt proxy The function remains to ease extensions transition, but we no longer use them in core.
Thu, 31 Aug 2023 23:56:15 +0200 safehasattr: drop usage in favor of hasattr
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 23:56:15 +0200] rev 50928
safehasattr: drop usage in favor of hasattr The two functions should now be equivalent at least in their usage in core.
Thu, 08 Dec 2022 15:33:19 +0100 check-code: drop the `safehasattr` rule
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Dec 2022 15:33:19 +0100] rev 50927
check-code: drop the `safehasattr` rule Since we no longer supports Python 2 we no longer needs to use a custom function to compensate the short comings of the global `hasattr` function in it. We cannot use the Python 3 `hasattr` function instead.
Fri, 01 Sep 2023 16:36:13 +0200 url: ignore some future pytype error
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 16:36:13 +0200] rev 50926
url: ignore some future pytype error As soon as we start using the builtins `hasattr` function, pytype will start getting confused about which types are available or not. So we ignore this error beforehand.
Fri, 01 Sep 2023 16:35:05 +0200 url: move the _generic_proxytunnel in the `has_https` block
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 16:35:05 +0200] rev 50925
url: move the _generic_proxytunnel in the `has_https` block It is only used when https exists. If you stay out of the block, pytype complains that the type of its argument are not declared.
Thu, 08 Dec 2022 15:57:42 +0100 pycompat: deprecate using bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Dec 2022 15:57:42 +0100] rev 50924
pycompat: deprecate using bytes Python2 has been dropped for a while, so lets comply to the signature of the global function. This open the way to drop the use of `pycompat.getattr` and company, and, especially, the associated `util.safehasattr`.
Thu, 31 Aug 2023 02:41:33 +0200 dynamic-import: use sysstr for importing extension and others
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 02:41:33 +0200] rev 50923
dynamic-import: use sysstr for importing extension and others This logic is used by extensions, and python hooks and merge-tools. All this logic eventually deals with native string (unicode in Python 3). This patch makes it handle `str` directly instead of relying on some pycompat low lever layer to do the conversion at the last minutes. We adjust the Python version filtering of a test as the output seems to be present with Python 3.7 too.
Thu, 31 Aug 2023 01:54:48 +0200 extension: check the command attributes using `sysstr`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 01:54:48 +0200] rev 50922
extension: check the command attributes using `sysstr` Since we are checking attributes, lets use the native representation instead of bytes.
Thu, 31 Aug 2023 01:47:07 +0200 extension: access special module members using sysstr
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 01:47:07 +0200] rev 50921
extension: access special module members using sysstr These extensions variables and mapping are module attributes so they should be dealt with unicode `str` in Python 3. We move the part that deal with reading theses variable and checking their validity to use unicode `str` string.
Wed, 30 Aug 2023 11:50:01 +0200 sshpeer: convert command name to sysstr before accessing method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 11:50:01 +0200] rev 50920
sshpeer: convert command name to sysstr before accessing method Method name are `str` so we should pass them as `str`.
Wed, 30 Aug 2023 01:23:30 +0200 localrepo: purge filecache attribute using there unicode name
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 01:23:30 +0200] rev 50919
localrepo: purge filecache attribute using there unicode name This could be better, but that's a good step.
Thu, 31 Aug 2023 01:21:57 +0200 fastannotate: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 01:21:57 +0200] rev 50918
fastannotate: use sysstr to check for attribute presence We do not need bytes here.
Thu, 31 Aug 2023 01:21:04 +0200 fastannotate: use sysstr to deal with some attributes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 01:21:04 +0200] rev 50917
fastannotate: use sysstr to deal with some attributes We are now Python3 only and attribute are always unicode string. So no needs to managed them using bytes.
Fri, 01 Sep 2023 12:09:54 +0200 hgweb: use sysstr to set attribute on diff option
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 12:09:54 +0200] rev 50916
hgweb: use sysstr to set attribute on diff option Attribute identifier should be `str` not `bytes`.
Fri, 01 Sep 2023 11:57:38 +0200 hgweb: use sysstr to get attribute on diff option
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 11:57:38 +0200] rev 50915
hgweb: use sysstr to get attribute on diff option Attribute identifier should be `str` not `bytes`.
Thu, 31 Aug 2023 01:19:49 +0200 diff-option: move attributes handling to sysstr
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 01:19:49 +0200] rev 50914
diff-option: move attributes handling to sysstr Attributes are `str` and should be handled as such.
Fri, 01 Sep 2023 12:11:11 +0200 compression: use sysstr to specify attribute to fetch for priority
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 12:11:11 +0200] rev 50913
compression: use sysstr to specify attribute to fetch for priority These are attributes so they should be `str`.
Wed, 30 Aug 2023 00:45:10 +0200 smartset: set attribute using sysstr instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:45:10 +0200] rev 50912
smartset: set attribute using sysstr instead of bytes We do not needs bytes here.
Wed, 30 Aug 2023 11:53:13 +0200 cachedlocalrepo: use sysstr for attribute name of "file of interest"
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 11:53:13 +0200] rev 50911
cachedlocalrepo: use sysstr for attribute name of "file of interest" The first item is an attribute name, the second one is a filename. So the first one can (and should) be a `str`.
Wed, 30 Aug 2023 13:01:10 +0200 terse-status: use `sysstr` to specify attributes to set
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 13:01:10 +0200] rev 50910
terse-status: use `sysstr` to specify attributes to set We use unicode string to specify attribute and we add a explicit char for the other usage.
Wed, 30 Aug 2023 00:50:28 +0200 path-suboption: deprecated specifying the attributes as bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:50:28 +0200] rev 50909
path-suboption: deprecated specifying the attributes as bytes The known suboptions have been updated, so we can deprecated passing bytes in case some extensions use them.
Wed, 30 Aug 2023 00:49:52 +0200 path-suboption: use str for "_pushloc" suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:49:52 +0200] rev 50908
path-suboption: use str for "_pushloc" suboptions That second argument refer to an attribute and do not needs to be bytes.
Wed, 30 Aug 2023 00:49:16 +0200 path-suboption: use str for "pushrev" suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:49:16 +0200] rev 50907
path-suboption: use str for "pushrev" suboptions That second argument refer to an attribute and do not needs to be bytes.
Wed, 30 Aug 2023 00:48:30 +0200 path-suboption: use str for "bookmarks_mode" suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:48:30 +0200] rev 50906
path-suboption: use str for "bookmarks_mode" suboptions That second argument refer to an attribute and do not needs to be bytes.
Wed, 30 Aug 2023 00:47:48 +0200 path-suboption: use str for "delta_reuse_policy" suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:47:48 +0200] rev 50905
path-suboption: use str for "delta_reuse_policy" suboptions That second argument refer to an attribute and do not needs to be bytes.
Wed, 30 Aug 2023 00:47:16 +0200 path-suboption: use str for "multi_urls" path suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 00:47:16 +0200] rev 50904
path-suboption: use str for "multi_urls" path suboptions That second argument refer to an attribute and do not needs to be bytes.
Fri, 01 Sep 2023 13:08:02 +0200 convert: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 01 Sep 2023 13:08:02 +0200] rev 50903
convert: use sysstr to check for attribute presence We do not need bytes here.
Thu, 31 Aug 2023 16:57:16 +0200 mq: use sysstr to check for attribute access
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 31 Aug 2023 16:57:16 +0200] rev 50902
mq: use sysstr to check for attribute access We do not need bytes here.
Wed, 30 Aug 2023 12:51:27 +0200 lfs: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:51:27 +0200] rev 50901
lfs: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 12:38:02 +0200 mq: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:38:02 +0200] rev 50900
mq: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 14:38:30 +0200 relink: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 14:38:30 +0200] rev 50899
relink: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 14:22:55 +0200 ui: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 14:22:55 +0200] rev 50898
ui: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 14:07:02 +0200 remotefilelog: use sysstr to access for attributes
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 14:07:02 +0200] rev 50897
remotefilelog: use sysstr to access for attributes We do not need bytes here.
Wed, 30 Aug 2023 13:28:09 +0200 hgwebmod: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 13:28:09 +0200] rev 50896
hgwebmod: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 13:07:00 +0200 remotefilelog: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 13:07:00 +0200] rev 50895
remotefilelog: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 13:02:43 +0200 extensions: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 13:02:43 +0200] rev 50894
extensions: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 13:00:14 +0200 bundle2: use sysstr to check for attribute presence
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 13:00:14 +0200] rev 50893
bundle2: use sysstr to check for attribute presence We do not need bytes here.
Wed, 30 Aug 2023 13:32:45 +0200 largefile: use sysstr to check for attribute presence in `hgsubrepoarchive`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 13:32:45 +0200] rev 50892
largefile: use sysstr to check for attribute presence in `hgsubrepoarchive` We do not need bytes here.
Wed, 30 Aug 2023 12:03:11 +0200 largefile: use sysstr to check for attribute presence in `openstore`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:03:11 +0200] rev 50891
largefile: use sysstr to check for attribute presence in `openstore` We do not need bytes here.
Wed, 30 Aug 2023 12:01:37 +0200 largefile: use sysstr to check for attribute presence in `rebase` wrapping
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:01:37 +0200] rev 50890
largefile: use sysstr to check for attribute presence in `rebase` wrapping We do not need bytes here.
Wed, 30 Aug 2023 12:00:56 +0200 largefile: use sysstr to check for attribute presence in `getstatuswriter`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:00:56 +0200] rev 50889
largefile: use sysstr to check for attribute presence in `getstatuswriter` We do not need bytes here.
Wed, 30 Aug 2023 12:24:12 +0200 run-tests: detect HGWITHRUSTEXT value
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Aug 2023 12:24:12 +0200] rev 50888
run-tests: detect HGWITHRUSTEXT value Without this, some manual check in tests/test-dirstate.t could get confused by the lack of `rust` in module policy and break the test.
Tue, 29 Aug 2023 22:13:18 +0200 convert: stabilize subversion date sorter
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Aug 2023 22:13:18 +0200] rev 50887
convert: stabilize subversion date sorter In case of tie, this provides unstable result on my system. So I am adding a couple of tie breaker to fix the test.
Thu, 31 Aug 2023 19:47:33 -0400 rhg: allow setting defaults.cmd to an empty string
Spencer Baugh <sbaugh@janestreet.com> [Thu, 31 Aug 2023 19:47:33 -0400] rev 50886
rhg: allow setting defaults.cmd to an empty string This is used by at least one hg UI to prevent defaults from affecting the command: https://github.com/emacs-mirror/emacs/blob/b71beb7ae7c60a5c5af608420d28fdda5265a264/lisp/vc/vc-hg.el#L245 Let's let it work.
Sun, 20 Aug 2023 17:19:33 -0400 uncommit: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 17:19:33 -0400] rev 50885
uncommit: migrate `opts` to native kwargs
Sun, 20 Aug 2023 17:16:38 -0400 split: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 17:16:38 -0400] rev 50884
split: migrate `opts` to native kwargs
Sun, 20 Aug 2023 17:09:33 -0400 releasenotes: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 17:09:33 -0400] rev 50883
releasenotes: migrate `opts` to native kwargs
Sun, 20 Aug 2023 17:05:52 -0400 narrow: hoist a variable to a higher level to avoid use-before-init warning
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 17:05:52 -0400] rev 50882
narrow: hoist a variable to a higher level to avoid use-before-init warning In practice, this shouldn't generate an IOError, so there wouldn't have been a problem. But PyCharm didn't know that.
Sun, 20 Aug 2023 17:04:17 -0400 narrow: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 17:04:17 -0400] rev 50881
narrow: migrate `opts` to native kwargs
Sun, 20 Aug 2023 16:51:49 -0400 largefiles: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:51:49 -0400] rev 50880
largefiles: migrate `opts` to native kwargs
Sun, 20 Aug 2023 16:43:41 -0400 keyword: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:43:41 -0400] rev 50879
keyword: migrate `opts` to native kwargs
Sun, 20 Aug 2023 16:20:56 -0400 gpg: use a context manager to write `.hgsigs`
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:20:56 -0400] rev 50878
gpg: use a context manager to write `.hgsigs`
Sun, 20 Aug 2023 16:19:41 -0400 gpg: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:19:41 -0400] rev 50877
gpg: migrate `opts` to native kwargs
Sun, 20 Aug 2023 16:10:22 -0400 fetch: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:10:22 -0400] rev 50876
fetch: migrate `opts` to native kwargs
Sun, 20 Aug 2023 16:06:08 -0400 fastexport: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:06:08 -0400] rev 50875
fastexport: migrate `opts` to native kwargs
Mon, 21 Aug 2023 09:50:31 -0400 closehead: wrap transaction handling in a context manager
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 09:50:31 -0400] rev 50874
closehead: wrap transaction handling in a context manager
Sun, 20 Aug 2023 15:38:35 -0400 closehead: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 15:38:35 -0400] rev 50873
closehead: migrate `opts` to native kwargs
Sun, 20 Aug 2023 15:34:11 -0400 churn: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 15:34:11 -0400] rev 50872
churn: migrate `opts` to native kwargs
Sun, 20 Aug 2023 15:30:39 -0400 children: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 15:30:39 -0400] rev 50871
children: migrate `opts` to native kwargs
Sun, 20 Aug 2023 15:24:58 -0400 automv: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 15:24:58 -0400] rev 50870
automv: migrate `opts` to native kwargs
Sun, 20 Aug 2023 15:16:18 -0400 absorb: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 15:16:18 -0400] rev 50869
absorb: migrate `opts` to native kwargs
Mon, 21 Aug 2023 10:21:58 -0400 transaction: fix __repr__() and make the default name bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Aug 2023 10:21:58 -0400] rev 50868
transaction: fix __repr__() and make the default name bytes This likely was always wrong on py3, since going back to aff5996f3043, these were added as a r-strings. Callers seem to always be supplying bytes, which makes the `b'/'.join(...)` part OK, but then bytes can't be interpolated into str with "%s", so it wouldn't have worked in either case.
Thu, 17 Aug 2023 15:53:32 -0400 rhg: support rhg files [FILE]
Spencer Baugh <sbaugh@janestreet.com> [Thu, 17 Aug 2023 15:53:32 -0400] rev 50867
rhg: support rhg files [FILE] This comes mostly for free after the rhg status [FILE] implementation.
Wed, 02 Aug 2023 10:46:47 -0400 rhg: support "status FILE"
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 10:46:47 -0400] rev 50866
rhg: support "status FILE" This change adds a new [file] argument to rhg status, parses them as patterns, canonicalizes the paths, and constructs a new PatternMatcher to intersect with the existing matcher being passed to the status implementation. We also make filepatterns a public module so we can access the pattern-parsing functionality we need from commands/status.rs.
Wed, 02 Aug 2023 10:16:33 -0400 rust-matchers: add PatternMatcher
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 10:16:33 -0400] rev 50865
rust-matchers: add PatternMatcher This should match the behavior of the Python patternmatcher. We need this for status [FILES] support.
Wed, 02 Aug 2023 10:33:11 -0400 rust-status: only visit parts of the tree requested by the matcher
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 10:33:11 -0400] rev 50864
rust-status: only visit parts of the tree requested by the matcher This is an optimization that the matcher is designed to support, but we weren't doing it until now. This is primarily relevant for supporting "hg status [FILES]", where this optimization is crucial for getting good performance (without this optimization, that command will still scan the entire tree, and just filter it down after the fact). When this optimization fires we have to return false from traverse_fs_directory_and_dirstate, representing that that part of the tree *might* have new files which we didn't see because we skipped parts of it. This only affects the cached result of the status, and is necessary to make future status operations (which might use a different matcher) work properly.
Wed, 02 Aug 2023 10:21:18 -0400 rust-status: error on non-existent files in file_set
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 10:21:18 -0400] rev 50863
rust-status: error on non-existent files in file_set file_set here consists of the files that were explicitly specified on the command line. Erroring on them matches the behavior of Python status.
Wed, 02 Aug 2023 10:07:00 -0400 rust-status: explicitly track bad file types
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 10:07:00 -0400] rev 50862
rust-status: explicitly track bad file types Before this, we silently skipped bad file types. Now, we check to see if a path is an exact_match in our matcher, and if so, print an error for it, and only then do we skip it. A path will be an exact match when it's specified as an explicit command line argument, and this error-printing behavior is necessary for compatibility with Python status.
Mon, 14 Aug 2023 09:25:36 -0400 rust: de-hardcode glob_suffix
Spencer Baugh <sbaugh@janestreet.com> [Mon, 14 Aug 2023 09:25:36 -0400] rev 50861
rust: de-hardcode glob_suffix We're adding patternmatcher in a subsequent commit, and this needs needs to be different for includematcher and patternmatcher.
Tue, 08 Aug 2023 11:50:26 -0400 rust: improve the type on DirsMultiset::from_manifest
Spencer Baugh <sbaugh@janestreet.com> [Tue, 08 Aug 2023 11:50:26 -0400] rev 50860
rust: improve the type on DirsMultiset::from_manifest It could only return an HgPathError, but we didn't express this in the type, so we needed some unreachable!()s. Now that is expressed in the type.
Wed, 02 Aug 2023 09:59:49 -0400 rust: don't escape spaces in regex
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 09:59:49 -0400] rev 50859
rust: don't escape spaces in regex Spaces are not in fact a regex special character, and escaping them is not correct.
Wed, 02 Aug 2023 10:09:23 -0400 rust-filepatterns: also normalize RelPath
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 10:09:23 -0400] rev 50858
rust-filepatterns: also normalize RelPath These patterns should be normalized too; this at least does no harm, and is necessary for proper status support.
Wed, 09 Aug 2023 18:08:28 -0400 rust: simplify pattern file parsing
Spencer Baugh <sbaugh@janestreet.com> [Wed, 09 Aug 2023 18:08:28 -0400] rev 50857
rust: simplify pattern file parsing Previously we kept the pattern syntax as a &[u8] until the last possible moment, which meant we had to handle potential errors when parsing that &[u8]. But such errors could never actually occur, given the structure of the code. Now we parse it eagerly (in two places) and pass it around as a PatternSyntax, so we can delete some error handling code. parse_one_pattern is in particular useful for parsing patterns passed on the command line, as we'll support later in this series.
Wed, 02 Aug 2023 09:57:29 -0400 rust-matchers: better support file_set in IntersectionMatcher
Spencer Baugh <sbaugh@janestreet.com> [Wed, 02 Aug 2023 09:57:29 -0400] rev 50856
rust-matchers: better support file_set in IntersectionMatcher Previously, if both of the input matchers had non-exact file sets, IntersectionMatcher would simply have an empty fileset. Now, we duplicate Python behavior: we *union* the filesets of the matchers in that case. This makes some sense, because without exact input file sets, we can't do an exact intersection and must over-approximate. Concretely, this is necessary because the file_set is the list of files that were explicitly listed by the user, and we want to provide explicit errors for all such files, from both matchers.
Mon, 21 Aug 2023 10:00:08 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 21 Aug 2023 10:00:08 +0200] rev 50855
branching: merge stable into default
Sun, 20 Aug 2023 02:17:38 -0400 version: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 02:17:38 -0400] rev 50854
version: migrate `opts` to native kwargs
Sun, 20 Aug 2023 02:16:41 -0400 verify: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 02:16:41 -0400] rev 50853
verify: migrate `opts` to native kwargs
Sun, 20 Aug 2023 02:14:57 -0400 tags: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 02:14:57 -0400] rev 50852
tags: migrate `opts` to native kwargs
Sun, 20 Aug 2023 02:13:50 -0400 tag: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 02:13:50 -0400] rev 50851
tag: migrate `opts` to native kwargs
Sun, 20 Aug 2023 02:10:51 -0400 summary: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 02:10:51 -0400] rev 50850
summary: migrate `opts` to native kwargs This has the added benefit of unconfusing PyCharm- it thought `opts` in the nested functions were str based for some reason.
Sun, 20 Aug 2023 02:01:37 -0400 revert: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 02:01:37 -0400] rev 50849
revert: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:56:23 -0400 rename: drop an unnecessary variable declaration at a wider scope
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:56:23 -0400] rev 50848
rename: drop an unnecessary variable declaration at a wider scope
Sun, 20 Aug 2023 01:54:59 -0400 rename: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:54:59 -0400] rev 50847
rename: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:53:47 -0400 remove: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:53:47 -0400] rev 50846
remove: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:51:52 -0400 purge: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:51:52 -0400] rev 50845
purge: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:49:48 -0400 pull: avoid referencing a variable before it is initialized
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:49:48 -0400] rev 50844
pull: avoid referencing a variable before it is initialized If `urlutil.get_pull_paths()` somehow yields nothing, the reference after the loop appears to be a problem. I noticed this because PyCharm flagged (and still flags) the initialization of this inside the loop as somehow unused. I'm not sure why 1 isn't returned directly where it is set to the result of `postincoming()`, but maybe the code is structured this way in anticipation of future work.
Sun, 20 Aug 2023 01:40:50 -0400 pull: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:40:50 -0400] rev 50843
pull: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:35:14 -0400 paths: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:35:14 -0400] rev 50842
paths: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:32:22 -0400 merge: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:32:22 -0400] rev 50841
merge: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:29:27 -0400 manifest: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:29:27 -0400] rev 50840
manifest: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:27:36 -0400 locate: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:27:36 -0400] rev 50839
locate: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:24:29 -0400 import: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:24:29 -0400] rev 50838
import: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:20:59 -0400 heads: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:20:59 -0400] rev 50837
heads: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:17:45 -0400 forget: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:17:45 -0400] rev 50836
forget: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:15:15 -0400 copy: drop an unused variable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:15:15 -0400] rev 50835
copy: drop an unused variable
Sun, 20 Aug 2023 01:14:42 -0400 copy: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:14:42 -0400] rev 50834
copy: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:12:26 -0400 config: use the writefile() utility to create the sample hgrc
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:12:26 -0400] rev 50833
config: use the writefile() utility to create the sample hgrc This function uses a context manager.
Sun, 20 Aug 2023 01:08:58 -0400 config: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:08:58 -0400] rev 50832
config: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:02:52 -0400 clone: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:02:52 -0400] rev 50831
clone: migrate `opts` to native kwargs
Sun, 20 Aug 2023 01:00:11 -0400 bundle: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 01:00:11 -0400] rev 50830
bundle: migrate `opts` to native kwargs
Sun, 20 Aug 2023 00:56:58 -0400 branches: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 00:56:58 -0400] rev 50829
branches: migrate `opts` to native kwargs
Sun, 20 Aug 2023 00:55:52 -0400 branch: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 00:55:52 -0400] rev 50828
branch: migrate `opts` to native kwargs
Sun, 20 Aug 2023 00:44:15 -0400 bookmark: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 00:44:15 -0400] rev 50827
bookmark: migrate `opts` to native kwargs There are a bunch of callers for `ui.formatter()`, so convert to bytes only for that call.
Sun, 20 Aug 2023 00:35:28 -0400 archive: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 00:35:28 -0400] rev 50826
archive: migrate `opts` to native kwargs I'm not sure how to handle migrating core APIs like `scmutil.match`, so kick that can down the road. (Plus it's used all over, so the callers need to be migrated first.)
Sun, 20 Aug 2023 00:27:27 -0400 backout: migrate `opts` to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 00:27:27 -0400] rev 50825
backout: migrate `opts` to native kwargs It will take a bit to unwind `cmdutil.commit`, so there's a conversion to byteskwargs there, without changing the type of `opts` in this function. That's also useful to flag it as needing to be changed.
Sat, 19 Aug 2023 23:06:40 -0400 cmdutil: migrate `opts` on commitstatus() to native kwargs
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Aug 2023 23:06:40 -0400] rev 50824
cmdutil: migrate `opts` on commitstatus() to native kwargs
Sat, 19 Aug 2023 22:56:14 -0400 cat: avoid round tripping **opts -> byteskwargs -> strkwargs
Matt Harbison <matt_harbison@yahoo.com> [Sat, 19 Aug 2023 22:56:14 -0400] rev 50823
cat: avoid round tripping **opts -> byteskwargs -> strkwargs Some internal users still want byteskwargs, so they are serviced in place. Once this pattern of changing types is eliminated everywhere, the remaining internal uses can be cleaned up individually (hopefully).
Sun, 20 Aug 2023 16:32:18 -0400 gpg: fix an UnboundLocalError whenever using --force stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Aug 2023 16:32:18 -0400] rev 50822
gpg: fix an UnboundLocalError whenever using --force It looks like this has been broke for almost a decade, since 9c89ac99690e.
Thu, 10 Aug 2023 19:00:19 +0100 rhg: fix the bug where sparse config is interpreted as relglob instead of glob stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 10 Aug 2023 19:00:19 +0100] rev 50821
rhg: fix the bug where sparse config is interpreted as relglob instead of glob relglob apparently (in contrast with relpath) matches everywhere in the tree, whereas glob only matches at the root. The python version interprets these patterns as "glob" (see "normalize(include, b'glob', ...)" in match.py)
Mon, 07 Aug 2023 23:12:02 +0200 hgweb: encode WSGI environment using the ISO-8859-1 codec stable
Manuel Jacob <me@manueljacob.de> [Mon, 07 Aug 2023 23:12:02 +0200] rev 50820
hgweb: encode WSGI environment using the ISO-8859-1 codec The WSGI specification (PEP 3333) specifies that on Python 3 all strings passed by the server must be of type str with code points encodable using the ISO 8859-1 codec. For some reason, I introduced a bug in 2632c1ed8f34 by applying the reverse change. Maybe I got confused because PEP 3333 says that arbitrary operating system environment variables may be contained in the WSGI environment and therefore we need to handle the WSGI environment variables like we would handle operating system environment variables. The bug mentioned in the previous paragraph and fixed by this changeset manifested e.g. in the path of the URL being encoded in the wrong way. Browsers encode non-ASCII bytes with the percent-encoding. WSGI servers will decode the percent-encoded bytes and pass them to the application as strings where each byte is mapped to the corresponding code point with the same ordinal (i.e. it is decoded using the ISO-8859-1 codec). Mercurial uses the bytes type for these strings (which makes much more sense), so we need to encode it again using the ISO-8859-1 codec. If we use another codec, it can result in nonsense.
Mon, 07 Aug 2023 11:08:00 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:08:00 +0200] rev 50819
branching: merge stable into default
Mon, 07 Aug 2023 11:05:43 +0200 Added signature for changeset 787af4e0e8b7 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:05:43 +0200] rev 50818
Added signature for changeset 787af4e0e8b7
Mon, 07 Aug 2023 11:05:27 +0200 Added tag 6.5.1 for changeset 787af4e0e8b7 stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:05:27 +0200] rev 50817
Added tag 6.5.1 for changeset 787af4e0e8b7
Mon, 07 Aug 2023 11:04:53 +0200 relnotes: add 6.5.1 stable 6.5.1
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:04:53 +0200] rev 50816
relnotes: add 6.5.1
Thu, 22 Jun 2023 16:02:12 +0200 perf: fix perf::tags stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Jun 2023 16:02:12 +0200] rev 50815
perf: fix perf::tags That return is invalid and unnecessary.
Fri, 21 Jul 2023 15:50:56 +0200 revlog: fix the naming scheme use by split temporary file stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 15:50:56 +0200] rev 50814
revlog: fix the naming scheme use by split temporary file The `-s` is now added on the first piece only and the `.i` is added to the index. This match the initially intended naming scheme.
Fri, 21 Jul 2023 15:15:43 +0200 revlog: show that temporary split file use broken name scheme stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 15:15:43 +0200] rev 50813
revlog: show that temporary split file use broken name scheme The `-s` is added on the wrong part and the `.i` is missing.
Thu, 13 Jul 2023 19:36:43 +0100 fncache: fix a bug that corrupts the fncache after transaction rollback stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 13 Jul 2023 19:36:43 +0100] rev 50812
fncache: fix a bug that corrupts the fncache after transaction rollback
Thu, 13 Jul 2023 19:26:45 +0100 fncache: add a test demonstrating fncache corruption stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 13 Jul 2023 19:26:45 +0100] rev 50811
fncache: add a test demonstrating fncache corruption
Mon, 24 Jul 2023 05:13:52 +0200 transaction: actually delete file created during the transaction on rollback
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 24 Jul 2023 05:13:52 +0200] rev 50810
transaction: actually delete file created during the transaction on rollback Transaction currently has two modes: - one where file created during the transaction are deleted on rollback, - one where file created during the transaction are truncated to 0 on rollback. Before this change, `hg rollback` and `hg recover` are using the "delete" mode and transaction abort is using the "truncate" option. This difference is never really explained. A long time ago, there was two code paths, with this divergence existing for unclear reasons. When the two code paths got merged into a single one, a boolean argument have been added to preserve this divergence, mostly probably as a cargo cult. The divergence is weird and induce bad surprises, and the truncate behavior is a bit odds, introducing other bad surprises (e.g. 08ecbdba186f) So solve this, we stop using the "truncate" behavior and unify on the "delete" behavior. Despite being currently more "common", the truncate behavior seems less natural, resulting in the transaction leaving empty file around. This is landed on default, early in the cycle, to help us catch problems that could emerge.
Fri, 28 Jul 2023 17:08:37 +0100 rhg: tweak rhg fallback code structure
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 28 Jul 2023 17:08:37 +0100] rev 50809
rhg: tweak rhg fallback code structure The goal here is to share the code that accesses the config setting, but also move it to the top-level, so that we can more easily change this code later. (in fact in Jane Street we want to make it choose chg in some cases)
Fri, 21 Jul 2023 15:26:15 +0200 journal: track bookmark deletion
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 15:26:15 +0200] rev 50808
journal: track bookmark deletion Bookmark deletion are now properly tracked by the journal extensions.
Fri, 21 Jul 2023 15:28:52 +0200 journal: show that we do not track deletion
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 15:28:52 +0200] rev 50807
journal: show that we do not track deletion This was an oversight for the initial implementation.
Fri, 21 Jul 2023 09:22:18 -0700 contrib: upgrade merge-lists from clap v3 to clap v4
Martin von Zweigbergk <martinvonz@google.com> [Fri, 21 Jul 2023 09:22:18 -0700] rev 50806
contrib: upgrade merge-lists from clap v3 to clap v4 Mostly to avoid having clap v3 in our dependencies, due to https://osv.dev/vulnerability/GHSA-g98v-hv3f-hcfr (even though that seems pretty harmless).
Wed, 19 Jul 2023 21:45:39 +0200 compat: use cp -R in `test-revlog-delta-find.t` (issue6835) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jul 2023 21:45:39 +0200] rev 50805
compat: use cp -R in `test-revlog-delta-find.t` (issue6835) This follow POSIX and make things compatible with NetBSD.
Wed, 19 Jul 2023 17:42:33 +0200 compat: use cp -R in `test-bundle-phase-internal.t` (issue6835) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jul 2023 17:42:33 +0200] rev 50804
compat: use cp -R in `test-bundle-phase-internal.t` (issue6835) This follow POSIX and make things compatible with NetBSD.
Fri, 21 Jul 2023 03:56:28 +0200 infinitepush: drop the extension
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 03:56:28 +0200] rev 50803
infinitepush: drop the extension The writing have been on the wall for a long time.
Fri, 23 Jun 2023 13:27:09 +0200 perf: display all timing by default
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 23 Jun 2023 13:27:09 +0200] rev 50802
perf: display all timing by default This is much more useful and end up enable it everywhere. I don't think we have strong backward compatibility guarantee for perf.
Mon, 10 Jul 2023 10:53:12 +0200 wrapfunction: deprecated calling "wrapfunction" with bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 10:53:12 +0200] rev 50801
wrapfunction: deprecated calling "wrapfunction" with bytes This will help us to detect and eradicates legacy calls. This is on the path to deprecating `util.safehasattr`.
Mon, 10 Jul 2023 15:39:19 +0200 wrapfunction: deprecates calling `wrappedfunction` with bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 15:39:19 +0200] rev 50800
wrapfunction: deprecates calling `wrappedfunction` with bytes This will help us to detect and eradicates legacy calls. This is on the path to deprecating `util.safehasattr`.
Mon, 10 Jul 2023 19:34:04 +0200 wrapfunction: use sysstr instead of bytes as argument in various tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 19:34:04 +0200] rev 50799
wrapfunction: use sysstr instead of bytes as argument in various tests This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 19:33:14 +0200 wrapfunction: use sysstr instead of bytes as argument in "exthelper"
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 19:33:14 +0200] rev 50798
wrapfunction: use sysstr instead of bytes as argument in "exthelper" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 15:38:53 +0200 wrapfunction: use sysstr instead of bytes as argument in "sqlitestore"
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 15:38:53 +0200] rev 50797
wrapfunction: use sysstr instead of bytes as argument in "sqlitestore" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 19:32:17 +0200 wrapfunction: use sysstr instead of bytes as argument in "share"
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 19:32:17 +0200] rev 50796
wrapfunction: use sysstr instead of bytes as argument in "share" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 19:31:26 +0200 wrapfunction: use sysstr instead of bytes as argument in "perf"
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 19:31:26 +0200] rev 50795
wrapfunction: use sysstr instead of bytes as argument in "perf" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:30:44 +0100 wrapfunction: use sysstr instead of bytes as argument in "zeroconf"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:30:44 +0100] rev 50794
wrapfunction: use sysstr instead of bytes as argument in "zeroconf" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:27:17 +0100 wrapfunction: use sysstr instead of bytes as argument in "sqlitestore"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:27:17 +0100] rev 50793
wrapfunction: use sysstr instead of bytes as argument in "sqlitestore" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:26:18 +0100 wrapfunction: use sysstr instead of bytes as argument in "sparse"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:26:18 +0100] rev 50792
wrapfunction: use sysstr instead of bytes as argument in "sparse" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:25:57 +0100 wrapfunction: use sysstr instead of bytes as argument in "schemes"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:25:57 +0100] rev 50791
wrapfunction: use sysstr instead of bytes as argument in "schemes" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:25:43 +0100 wrapfunction: use sysstr instead of bytes as argument in "remotenames"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:25:43 +0100] rev 50790
wrapfunction: use sysstr instead of bytes as argument in "remotenames" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:25:07 +0100 wrapfunction: use sysstr instead of bytes as argument in "remotefilelog"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:25:07 +0100] rev 50789
wrapfunction: use sysstr instead of bytes as argument in "remotefilelog" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:24:53 +0100 wrapfunction: use sysstr instead of bytes as argument in "pager"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:24:53 +0100] rev 50788
wrapfunction: use sysstr instead of bytes as argument in "pager" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:24:40 +0100 wrapfunction: use sysstr instead of bytes as argument in "narrow"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:24:40 +0100] rev 50787
wrapfunction: use sysstr instead of bytes as argument in "narrow" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:23:12 +0100 wrapfunction: use sysstr instead of bytes as argument in "lfs"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:23:12 +0100] rev 50786
wrapfunction: use sysstr instead of bytes as argument in "lfs" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:22:41 +0100 wrapfunction: use sysstr instead of bytes as argument in "largefiles"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:22:41 +0100] rev 50785
wrapfunction: use sysstr instead of bytes as argument in "largefiles" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:22:28 +0100 wrapfunction: use sysstr instead of bytes as argument in "keyword"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:22:28 +0100] rev 50784
wrapfunction: use sysstr instead of bytes as argument in "keyword" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:22:15 +0100 wrapfunction: use sysstr instead of bytes as argument in "journal"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:22:15 +0100] rev 50783
wrapfunction: use sysstr instead of bytes as argument in "journal" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:21:55 +0100 wrapfunction: use sysstr instead of bytes as argument in "infinitepush"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:21:55 +0100] rev 50782
wrapfunction: use sysstr instead of bytes as argument in "infinitepush" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:21:32 +0100 wrapfunction: use sysstr instead of bytes as argument in "histedit"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:21:32 +0100] rev 50781
wrapfunction: use sysstr instead of bytes as argument in "histedit" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:20:58 +0100 wrapfunction: use sysstr instead of bytes as argument in "highlight"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:20:58 +0100] rev 50780
wrapfunction: use sysstr instead of bytes as argument in "highlight" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 16:47:25 +0200 wrapfunction: use sysstr instead of bytes as argument in the "git" extension
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 16:47:25 +0200] rev 50779
wrapfunction: use sysstr instead of bytes as argument in the "git" extension This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:19:06 +0100 wrapfunction: use sysstr instead of bytes as argument in "fsmonitor"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:19:06 +0100] rev 50778
wrapfunction: use sysstr instead of bytes as argument in "fsmonitor" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 16:12:33 +0200 wrapfunction: use sysstr instead of bytes as argument in "fastannotate"
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 16:12:33 +0200] rev 50777
wrapfunction: use sysstr instead of bytes as argument in "fastannotate" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:10:22 +0100 wrapfunction: use sysstr instead of bytes as argument in "clonebundles"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:10:22 +0100] rev 50776
wrapfunction: use sysstr instead of bytes as argument in "clonebundles" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:10:00 +0100 wrapfunction: use sysstr instead of bytes as argument in "bookflow"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:10:00 +0100] rev 50775
wrapfunction: use sysstr instead of bytes as argument in "bookflow" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Fri, 03 Feb 2023 04:09:49 +0100 wrapfunction: use sysstr instead of bytes as argument in "beautifygraph"
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 04:09:49 +0100] rev 50774
wrapfunction: use sysstr instead of bytes as argument in "beautifygraph" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
Mon, 10 Jul 2023 15:59:04 +0200 byteify-strings: passe sysstr to attr function and wrapper
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 10 Jul 2023 15:59:04 +0200] rev 50773
byteify-strings: passe sysstr to attr function and wrapper These function now accepts string so we should not do byteify them anymore.
Wed, 12 Jul 2023 12:47:08 +0200 repoview: fix the filter created by `extrafilter` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jul 2023 12:47:08 +0200] rev 50772
repoview: fix the filter created by `extrafilter` The `name` variable was updated in each interaction of the loop, making all new filters inheriting from the same base (the last one iterated), leading to terrible terrible misbehavior.
Wed, 12 Jul 2023 12:46:58 +0200 repoview: show `extrafilter` misbehave when other filtering is in play stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jul 2023 12:46:58 +0200] rev 50771
repoview: show `extrafilter` misbehave when other filtering is in play See new changeset for fix and details.
Wed, 12 Jul 2023 10:59:19 +0200 rust-config: add docstring to inner `get_parse` method
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Jul 2023 10:59:19 +0200] rev 50770
rust-config: add docstring to inner `get_parse` method The signature is quite heavy, a docstring to explain the idea doesn't hurt.
Thu, 06 Jul 2023 11:44:30 +0200 rust-config: add devel warning when using undeclared config items
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 11:44:30 +0200] rev 50769
rust-config: add devel warning when using undeclared config items This mirrors the Python implementation now that we're done catching up.
Thu, 06 Jul 2023 12:17:20 +0200 rhg: use default configitem in `cat`
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 12:17:20 +0200] rev 50768
rhg: use default configitem in `cat` Now that we've declared the items, we can get rid of the manual fallback.
Thu, 06 Jul 2023 11:47:41 +0200 rhg: add config defaults to configitems.toml
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 11:47:41 +0200] rev 50767
rhg: add config defaults to configitems.toml This will allow us to use the same default config mechanic as the rest of the code.
Thu, 06 Jul 2023 11:17:55 +0200 rust-blackbox: use `is_extension_enabled` config helper
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 11:17:55 +0200] rev 50766
rust-blackbox: use `is_extension_enabled` config helper It's there, may as well use it to make the code clearer and less bug-prone.
Wed, 05 Jul 2023 23:59:22 +0200 configitems: move blackbox's config items to the new configitems.toml
Raphaël Gomès <rgomes@octobus.net> [Wed, 05 Jul 2023 23:59:22 +0200] rev 50765
configitems: move blackbox's config items to the new configitems.toml In order for the Rust code to gain access to default values of in-core extensions that have a Rust implementation, we need to centralize them alongside the core items declarations. This is the first and so far only one of the extensions that have gained Rust support, I don't think it's worth the churn to move the rest of the extension's configitems yet.
Mon, 13 Feb 2023 18:11:48 +0100 rust-config: add config getters that don't fall back to defaults
Raphaël Gomès <rgomes@octobus.net> [Mon, 13 Feb 2023 18:11:48 +0100] rev 50764
rust-config: add config getters that don't fall back to defaults This is useful in cases where we access config items that are more... lenient with their types than a fresh new system would allow. For now there is only a single use of this, but we might get more later.
Thu, 06 Jul 2023 14:32:07 +0200 rust-config: add support for default config items
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 14:32:07 +0200] rev 50763
rust-config: add support for default config items Now that configitems.toml exists, we can read from it the default values for all core config items. We will add the devel-warning for use of undeclared config items in a later patch when we're done adding the missing entries for `rhg`.
Mon, 23 Jan 2023 18:08:11 +0100 configitems: declare items in a TOML file
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Jan 2023 18:08:11 +0100] rev 50762
configitems: declare items in a TOML file Mercurial ships with Rust code that also needs to read from the config. Having a way of presenting `configitems` to both Python and Rust is needed to prevent duplication, drift, and have the appropriate devel warnings. Abstracting away from Python means choosing a config format. No single format is perfect, and I have yet to come across a developer that doesn't hate all of them in some way. Since we have a strict no-dependencies policy for Mercurial, we either need to use whatever comes with Python, vendor a library, or implement a custom format ourselves. Python stdlib means using JSON, which doesn't support comments and isn't great for humans, or `configparser` which is an obscure, untyped format that nobody uses and doesn't have a commonplace Rust parser. Implementing a custom format is error-prone, tedious and subject to the same issues as picking an existing format. Vendoring opens us to the vast array of common config formats. The ones being picked for most modern software are YAML and TOML. YAML is older and common in the Python community, but TOML is much simpler and less error-prone. I would much rather be responsible for the <1000 lines of `tomli`, on top of TOML being the choice of the Rust community, with robust crates for reading it. The structure of `configitems.toml` is explained inline.
Mon, 23 Jan 2023 17:11:42 +0100 thirdparty: vendor tomli
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Jan 2023 17:11:42 +0100] rev 50761
thirdparty: vendor tomli The next commit will introduce a .toml file to abstract configitems away from Python. Python 3.11 has a toml read-only library (`tomllib`), which gives us a way out of vendoring eventually. For now, we vendor the backport, specifically version 1.2.3 which is still compatible with Python 3.6.
Mon, 23 Jan 2023 18:52:05 +0100 configitems: add `documentation` field
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Jan 2023 18:52:05 +0100] rev 50760
configitems: add `documentation` field It may be useful to expose documentation information in the help in some form. This will be populated in a future changeset by using the current comments that are relevant for users.
Mon, 23 Jan 2023 17:21:14 +0100 configitems: use standard "dynamicdefault" approach in edge case
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Jan 2023 17:21:14 +0100] rev 50759
configitems: use standard "dynamicdefault" approach in edge case This makes for fewer edge cases, which will help a future patch.
Tue, 17 Jan 2023 14:53:18 +0100 configitems: fix typo in devel warning about extension overrides
Raphaël Gomès <rgomes@octobus.net> [Tue, 17 Jan 2023 14:53:18 +0100] rev 50758
configitems: fix typo in devel warning about extension overrides
Wed, 28 Jun 2023 14:23:13 +0200 extensions: imp module is removed in Python 3.12 - use importlib to load files stable
Mads Kiilerich <mads@kiilerich.com> [Wed, 28 Jun 2023 14:23:13 +0200] rev 50757
extensions: imp module is removed in Python 3.12 - use importlib to load files imp has been deprecated for a long time, and has finally been removed in Python 3.12 . imp was only used for loading extensions that has been specified with direct .py path or path to a package directory. The same use cases can be achieved quite simple with importlib, , possiby with small changes in corner cases with undefined behaviour, such as extensions without .py source. There might also be corner cases and undefined behaviour around use of sys.modules and reloading.
Tue, 27 Jun 2023 13:05:03 +0200 utils: imp module is removed in Python 3.12 - get is_frozen() from _imp stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 13:05:03 +0200] rev 50756
utils: imp module is removed in Python 3.12 - get is_frozen() from _imp imp has been deprecated for a long time, and has finally been removed in Python 3.12 . The successor importlib is using the same internal _imp module as imp, but doesn't expose it's is_frozen. Using the internal function directly seems like the cleanest solution. Another alternative to imp.is_frozen("__main__") is sys.modules['__main__'].__spec__.origin == 'frozen' but that seems even more internal and fragile.
Tue, 27 Jun 2023 22:31:44 +0200 extensions: address ast deprecations introduced in Python 3.12 stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 22:31:44 +0200] rev 50755
extensions: address ast deprecations introduced in Python 3.12 Tests would fail with: .../mercurial/extensions.py:910: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead if isinstance(a, ast.Str): .../mercurial/extensions.py:912: DeprecationWarning: ast.Bytes is deprecated and will be removed in Python 3.14; use ast.Constant instead elif isinstance(a, ast.Bytes): .../mercurial/extensions.py:913: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead name = a.s
Tue, 27 Jun 2023 08:39:12 +0200 vfs: handle shutil.rmtree deprecation of onerror in Python 3.12 stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 08:39:12 +0200] rev 50754
vfs: handle shutil.rmtree deprecation of onerror in Python 3.12 Tests would fail with warnings: .../mercurial/vfs.py:289: DeprecationWarning: onerror argument is deprecated, use onexc instead The excinfo changed slightly, but we don't use it anyway.
Tue, 27 Jun 2023 10:09:11 +0200 tests: fix sortdict doctest with Python 3.12 stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 10:09:11 +0200] rev 50753
tests: fix sortdict doctest with Python 3.12 The output of OrderedDict changed to use plain dict syntax: $ python3.11 -c "import collections;print(collections.OrderedDict([('a', 0), ('b', 1)]))" OrderedDict([('a', 0), ('b', 1)]) $ python3.12 -c "import collections;print(collections.OrderedDict([('a', 0), ('b', 1)]))" OrderedDict({'a': 0, 'b': 1})
Tue, 27 Jun 2023 13:51:50 +0200 utils: stop using datetime.utcfromtimestamp() deprecated in Python 3.12 stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 13:51:50 +0200] rev 50752
utils: stop using datetime.utcfromtimestamp() deprecated in Python 3.12 Python3.12 made tests fail with warnings: DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.fromtimestamp(timestamp, datetime.UTC). Computing the diff while in timestamp seconds seems to preserve to the original intent from ae04af1ce78d. It would be nice to have some doctest coverage of this, with the problematic corner cases that has popped up over time...
Thu, 06 Jul 2023 16:07:34 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 16:07:34 +0200] rev 50751
branching: merge stable into default
Thu, 06 Jul 2023 16:04:36 +0200 Added signature for changeset 3ffc7209bbae stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 16:04:36 +0200] rev 50750
Added signature for changeset 3ffc7209bbae
Thu, 06 Jul 2023 16:04:18 +0200 Added tag 6.5 for changeset 3ffc7209bbae stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 16:04:18 +0200] rev 50749
Added tag 6.5 for changeset 3ffc7209bbae
Thu, 06 Jul 2023 16:02:59 +0200 relnotes: add 6.5 final stable 6.5
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jul 2023 16:02:59 +0200] rev 50748
relnotes: add 6.5 final
Thu, 06 Jul 2023 11:58:24 +0200 rust-changelog: removed now useless early conditional for NULL_REVISION stable
Georges Racinet <georges.racinet@octobus.net> [Thu, 06 Jul 2023 11:58:24 +0200] rev 50747
rust-changelog: removed now useless early conditional for NULL_REVISION Now that the underlying `RevlogEntry` returned for `NULL_REVISION` is viable, it has become pointless to check NULL_REVISION several times, even for performance: the check will be far more frequent than the benefit of bailing earlier in the rare case where the requested revision is `NULL_REVISION`. This case is covered explicitly by the first assertion of `test_data_from_rev_null`.
Thu, 06 Jul 2023 11:53:40 +0200 rust-revlog: fix RevlogEntry.data() for NULL_REVISION stable
Georges Racinet <georges.racinet@octobus.net> [Thu, 06 Jul 2023 11:53:40 +0200] rev 50746
rust-revlog: fix RevlogEntry.data() for NULL_REVISION Before this change, the pseudo-entry returned by `Revlog.get_entry` for `NULL_REVISION` would trigger errors in application code using it. For example, this fixes a crash spotted with changelog data while implementing RHGitaly: `Changelog.data_for_rev(-1)` was already returning the pseudo content as expected, e.g., for `hg log`, but `Changelog.entry_for_rev(-1).data()` would still crash with "corrupted revlog, hash check failed for revision -1". There is an added test for this scenario.
Thu, 06 Jul 2023 11:43:26 +0200 rust-revlog: using constant in test stable
Georges Racinet <georges.racinet@octobus.net> [Thu, 06 Jul 2023 11:43:26 +0200] rev 50745
rust-revlog: using constant in test Always better
Thu, 30 Mar 2023 11:34:30 +0200 rust-revlog: fix incorrect results with NULL_NODE prefixes stable
Georges Racinet <georges.racinet@octobus.net> [Thu, 30 Mar 2023 11:34:30 +0200] rev 50744
rust-revlog: fix incorrect results with NULL_NODE prefixes In case a short hash is a prefix of `NULL_NODE`, the correct revision number lookup is `NULL_REVISION` only if there is no match in the nodemap. Indeed, if there is a single nodemap match, then it is an ambiguity with the always matching `NULL_NODE`. Before this change, using the Mercurial development repository as a testbed (it has public changesets with node ID starting with `0005` and `0009`), this is what `rhg` did (plain `hg` provided for reference) ``` $ rust/target/debug/rhg cat -r 000 README README: no such file in rev 000000000000 $ hg cat -r 000 README abort: ambiguous revision identifier: 000 ``` Here is the expected output for `rhg` on ambiguous prefixes (again, before this change): ``` $ rust/target/debug/rhg cat -r 0001 README abort: ambiguous revision identifier: 0001 ``` The test provided by 8c29af0f6d6e in `test-rhg.t` could become flaky with this change, unless all hashes are fixed. We expect reviewers to be more sure about that than we are.
Thu, 30 Mar 2023 10:29:29 +0200 rust-revlog: split out method for `rev_from_node` without persistent nodemap stable
Georges Racinet <georges.racinet@octobus.net> [Thu, 30 Mar 2023 10:29:29 +0200] rev 50743
rust-revlog: split out method for `rev_from_node` without persistent nodemap This will make easier for the bug fix that is about to come.
Thu, 08 Jun 2023 00:03:54 -0400 win32mbcs: unbyteify some strings for py3 support stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 08 Jun 2023 00:03:54 -0400] rev 50742
win32mbcs: unbyteify some strings for py3 support A crash was reported on the TortoiseHg bug tracker for this[1]. [1] https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5905
Tue, 04 Jul 2023 12:30:31 +0200 heptapod-ci: turn off pipelines for merge request events stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 Jul 2023 12:30:31 +0200] rev 50741
heptapod-ci: turn off pipelines for merge request events These are always duplicated by the external (from the user) push, or internal (from Heptapod itself) push pipeline, so they're entirely redundant.
Tue, 04 Jul 2023 12:23:05 +0200 heptapod-ci: always make the default run condition explicit stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 Jul 2023 12:23:05 +0200] rev 50740
heptapod-ci: always make the default run condition explicit This has no effect on behavior, it's just to make everything obvious.
Tue, 04 Jul 2023 12:21:45 +0200 heptapod-ci: remove push exception for named branches stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 Jul 2023 12:21:45 +0200] rev 50739
heptapod-ci: remove push exception for named branches The internal workings of Heptapod cause even fast-forward merges to look like pushes to Gitlab. The only way to run a pipeline on topic-less named branches is not through the web interface. I am probably the only person affected by this, so it's not really a problem. This was confirmed with Georges, the maintainer of Heptapod, though the only way to be *actually* sure, is to merge this and see.
Mon, 03 Jul 2023 15:28:17 +0200 heptapod-ci: (hopefully) fix the pipeline savings system stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 03 Jul 2023 15:28:17 +0200] rev 50738
heptapod-ci: (hopefully) fix the pipeline savings system There is no easy way for me to test this outside of the actual repo since it would require setting up `heptapod-runner` locally, making a Git repo with the right changes, etc. It's not worth my time at this point. If this fails, I'll try to ask for help from Georges, the maintainer of Heptapod.
Mon, 03 Jul 2023 11:02:36 +0200 heptapod-ci: don't run pipelines for topic-less branches stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 03 Jul 2023 11:02:36 +0200] rev 50737
heptapod-ci: don't run pipelines for topic-less branches See inline comment for more details.
Tue, 27 Jun 2023 16:19:42 +0200 clonebundles: add warning if auto-generate is enabled without formats stable
Mathias De Mare <mathias.de_mare@nokia.com> [Tue, 27 Jun 2023 16:19:42 +0200] rev 50736
clonebundles: add warning if auto-generate is enabled without formats
Tue, 27 Jun 2023 15:34:24 +0200 clonebundles: fix display of auto-generate.on-change lines stable
Mathias De Mare <mathias.de_mare@nokia.com> [Tue, 27 Jun 2023 15:34:24 +0200] rev 50735
clonebundles: fix display of auto-generate.on-change lines
Mon, 26 Jun 2023 18:00:28 +0200 hgweb: drop references to deprecated cgitb stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 18:00:28 +0200] rev 50734
hgweb: drop references to deprecated cgitb cgitb is going away and gives warnings when importing, and that make tests fail: $TESTTMP/hgweb.cgi:5: DeprecationWarning: 'cgitb' is deprecated and slated for removal in Python 3.13 The lack of a "nice" high level error handler is not a huge problem, neither for users (where it is disabled anyway) or for tests (where we don't use a browser and the plain tracebacks often are more readable). It is inevitable that it is going away, and there is no obvious alternative. Remove it and move on.
Tue, 27 Jun 2023 12:09:17 +0200 setup: fall back to setuptools setup if distutils isn't available stable
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 12:09:17 +0200] rev 50733
setup: fall back to setuptools setup if distutils isn't available The setuptools comments around this seems slightly outdated. Setuptools is improving and distutils is being deprecated, so it should perhaps be the default. But at least, it is a fair fallback.
Thu, 23 Mar 2023 16:45:12 +0100 tests: use simple mock smtp server instead of deprecated asyncore smtpd stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 23 Mar 2023 16:45:12 +0100] rev 50732
tests: use simple mock smtp server instead of deprecated asyncore smtpd test-patchbomb-tls.t would fail with: .../hg/tests/dummysmtpd.py:6: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio import asyncore .../hg/tests/dummysmtpd.py:8: DeprecationWarning: The smtpd module is deprecated and unmaintained and will be removed in Python 3.12. Please see aiosmtpd (https://aiosmtpd.readthedocs.io/) for the recommended replacement. import smtpd The recommended migration path to the standalone asiosmtpd would be overkill. The tests do not need a full smtp server - we can just use a very simple mock hack to preserve the existing test coverage.
Mon, 26 Jun 2023 16:45:13 +0200 tests: fix dummysmtpd argument check stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 16:45:13 +0200] rev 50731
tests: fix dummysmtpd argument check
Mon, 26 Jun 2023 15:51:39 +0200 tests: improve test-patchbomb-tls.t by by logging errors and data stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 15:51:39 +0200] rev 50730
tests: improve test-patchbomb-tls.t by by logging errors and data The actual SSL error might be like: ::1 ssl error: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1002) and will probably vary so much that it can't be checked in the test. It is however very useful when debugging failures.
Thu, 23 Mar 2023 16:48:44 +0100 tests: show test-patchbomb-tls.t smtp server log stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 23 Mar 2023 16:48:44 +0100] rev 50729
tests: show test-patchbomb-tls.t smtp server log Improve test coverage by exposing what the smtp server actually receives. Make dummystmtpd redirect stderr to a log file.
Wed, 28 Jun 2023 01:31:10 +0200 demandimport: don't delay _distutils_hack import stable
Mads Kiilerich <mads@kiilerich.com> [Wed, 28 Jun 2023 01:31:10 +0200] rev 50728
demandimport: don't delay _distutils_hack import test-demandimport.py would fail on 'import distutils.msvc9compiler' because warnings: /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils. warnings.warn( /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") Telling demandimport to ignore this module will allow the hack to work as intended. Note: The test for distutils.msvc9compiler comes from 2205d00b6d2b. But since then, distutils is going away, and setuptools has moved forward and is replacing it. It is unclear exactly what is being tested here and how setuptools should depended on msvc9compiler. The test might no longer be relevant.
Wed, 22 Mar 2023 16:05:59 +0100 tests: update test-remotefilelog-gc.t for Python 3.11 stable
Mads Kiilerich <mads@kiilerich.com> [Wed, 22 Mar 2023 16:05:59 +0100] rev 50727
tests: update test-remotefilelog-gc.t for Python 3.11 The test output changed because test coverage changed because normpath changed: $ python3.10 -c 'import os; print(repr(os.path.normpath("asdas\0das")))' 'asdas\x00das' $ python3.11 -c 'import os; print(repr(os.path.normpath("asdas\0das")))' 'asdas'
Mon, 26 Jun 2023 14:54:00 +0200 tests: use grep -F instead of obsolescent fgrep stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 14:54:00 +0200] rev 50726
tests: use grep -F instead of obsolescent fgrep Testing on Fedora 38 failed with: fgrep: warning: fgrep is obsolescent; using grep -F The warning comes from https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 . For further anecdotal evidence of the change, see https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep . grep -F is POSIX, but there is a risk that it doesn't work the same on all platforms - especially older Unix versions. It should however always be possible to put a GNU grep in $PATH before running the tests.
Mon, 26 Jun 2023 14:34:58 +0200 tests: use grep -E instead of obsolescent egrep stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 26 Jun 2023 14:34:58 +0200] rev 50725
tests: use grep -E instead of obsolescent egrep Testing on Fedora 38 failed with: egrep: warning: egrep is obsolescent; using grep -E The warning comes from https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 . For further anecdotal evidence of the change, see https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep . This reverses the code check that goes back to e7d3b509af8b. grep -E is POSIX, but there is a risk that it doesn't work the same on all platforms - especially older Unix versions. It should however always be possible to put a GNU grep in $PATH before running the tests.
Mon, 26 Jun 2023 11:15:30 +0100 dirstate: avoid leaking disk space in `hg debugrebuilddirstate` stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 26 Jun 2023 11:15:30 +0100] rev 50724
dirstate: avoid leaking disk space in `hg debugrebuilddirstate` Before this MR running `hg debugrebuilddirstate` simply grows the dirstate without bound, never shrinking it, because the unused bytes counter stays low, even though the entirety of the file becomes unused.
Mon, 26 Jun 2023 11:21:43 +0100 dirstate-v2: actually fix the dirstate-v2 upgrade race stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 26 Jun 2023 11:21:43 +0100] rev 50723
dirstate-v2: actually fix the dirstate-v2 upgrade race It looks like the previous fix for the dirstate-v2 upgrade race didn't work. The problem is that it only recovers in case the size of the v1 `dirstate` file is smaller than the `v2` one, whereas in real life it's always larger. This commit changes the test to be more realistic, which reveals the crash, and changes the code to fix the crash.
Thu, 22 Jun 2023 14:24:45 +0200 Added signature for changeset bb42988c7e15 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 14:24:45 +0200] rev 50722
Added signature for changeset bb42988c7e15
Thu, 22 Jun 2023 14:24:21 +0200 Added tag 6.5rc0 for changeset bb42988c7e15 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 14:24:21 +0200] rev 50721
Added tag 6.5rc0 for changeset bb42988c7e15
Thu, 22 Jun 2023 12:36:49 +0200 relnotes: add 6.5rc0 stable 6.5rc0
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 12:36:49 +0200] rev 50720
relnotes: add 6.5rc0
Thu, 22 Jun 2023 11:36:37 +0200 branching: merge default into stable for 6.5rc0 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 11:36:37 +0200] rev 50719
branching: merge default into stable for 6.5rc0
Thu, 22 Jun 2023 11:28:17 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 11:28:17 +0200] rev 50718
branching: merge stable into default
Thu, 22 Jun 2023 11:18:47 +0200 Added signature for changeset 271a4ab29605 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 11:18:47 +0200] rev 50717
Added signature for changeset 271a4ab29605
Thu, 22 Jun 2023 11:18:27 +0200 Added tag 6.4.5 for changeset 271a4ab29605 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 11:18:27 +0200] rev 50716
Added tag 6.4.5 for changeset 271a4ab29605
Thu, 22 Jun 2023 11:17:40 +0200 relnotes: add 6.4.5 stable 6.4.5
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jun 2023 11:17:40 +0200] rev 50715
relnotes: add 6.4.5
Wed, 21 Jun 2023 14:00:50 -0400 narrow: indicated the default of 'Yes' when confirming auto-remove-includes
Jason R. Coombs <jaraco@jaraco.com> [Wed, 21 Jun 2023 14:00:50 -0400] rev 50714
narrow: indicated the default of 'Yes' when confirming auto-remove-includes
Wed, 21 Jun 2023 15:55:07 +0200 clone-bundles: check we generate a valid specification
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Jun 2023 15:55:07 +0200] rev 50713
clone-bundles: check we generate a valid specification The short bundle-spec are ambiguous and should be expanded to a full one before clone bundle can use it. We fix the issue and add a test actually using the generated manifest for a clone bundle operation.
Wed, 21 Jun 2023 15:53:33 +0200 bundle-spec: add an official method to format a spec into a string
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 21 Jun 2023 15:53:33 +0200] rev 50712
bundle-spec: add an official method to format a spec into a string This will be useful for automatic-clonebundles.
Mon, 19 Jun 2023 18:15:35 +0200 clonebundles: adds a auto-generate.serve-inline option
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 18:15:35 +0200] rev 50711
clonebundles: adds a auto-generate.serve-inline option This new option disable the "external" serving of auto generated bundle in favor of using the new "inline bundle" feature that allow serving such bundle through the mercurial protocol. This is a less efficient, but very easy to setup way to start using clone bundle.
Mon, 19 Jun 2023 18:15:27 +0200 clone-bundle: only add the REQUIRESNI bit for http(s)
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 18:15:27 +0200] rev 50710
clone-bundle: only add the REQUIRESNI bit for http(s) we don't needs it for `peer-bundle-cache://` for example
Tue, 23 May 2023 10:24:57 +0200 stream-clone: add a stream-v3 variant of test-persistent-nodemap.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 May 2023 10:24:57 +0200] rev 50709
stream-clone: add a stream-v3 variant of test-persistent-nodemap.t This will be useful to track and validate future changes to the stream-v3 protocol.
Tue, 23 May 2023 10:18:01 +0200 stream-clone: split the stream part out of test-persistent-nodemap.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 May 2023 10:18:01 +0200] rev 50708
stream-clone: split the stream part out of test-persistent-nodemap.t We want to test multiple variants, so let's make it an independent test. Small adaptations and simplifications are needed in the test output as the tested repository is now shorter.
Tue, 23 May 2023 03:09:46 +0200 stream-clone: explicitly split debug test output for application per version
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 May 2023 03:09:46 +0200] rev 50707
stream-clone: explicitly split debug test output for application per version Altering the format may introduce significant changes in output and in order. It is going to be simpler to deal with explicitly different blocks for the output.
Thu, 01 Jun 2023 17:39:22 +0100 stream-clone: add a v3 version of the protocol
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Jun 2023 17:39:22 +0100] rev 50706
stream-clone: add a v3 version of the protocol This new version is less rigid regarding the extract number of files and number of bytes to be actually transfered, it also lays the groundwork for other improvements. The format stays experimental, but this is an interesting base to build upon.
Thu, 01 Jun 2023 18:20:28 +0100 stream-clone: fix the help for an argument of perf::stream-locked-section
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2023 18:20:28 +0100] rev 50705
stream-clone: fix the help for an argument of perf::stream-locked-section The help for `--stream-version` had a typo and missed a value.
Tue, 20 Jun 2023 02:35:30 +0200 infinitepush: aggressively deprecated infinite push
pierre-yves.david@ens-lyon.org [Tue, 20 Jun 2023 02:35:30 +0200] rev 50704
infinitepush: aggressively deprecated infinite push We add a large warning and an explicit abort. Both can be disable through config, but neither are explicitly documented. If any user exists I really want them to get in touch with the community.
Mon, 19 Jun 2023 16:13:16 +0200 clone-bundle: double check that inline clone bundle does not break local case
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 16:13:16 +0200] rev 50703
clone-bundle: double check that inline clone bundle does not break local case Since there is a large NotImplementedError in the code, I prefer we have a double check here.
Mon, 19 Jun 2023 15:48:03 +0200 clone-bundle: drop the now unused `inlineclonebundles` capabilities
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 15:48:03 +0200] rev 50702
clone-bundle: drop the now unused `inlineclonebundles` capabilities We no longer us the capabilities as a side way to passe argument to the `clonebundle commands`
Mon, 19 Jun 2023 15:49:35 +0200 clonebundles: introduce a new write protocol command
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 15:49:35 +0200] rev 50701
clonebundles: introduce a new write protocol command The old wire command does not take argument so we need a new command. We make that new command take argument to prepare it for the future (like narrow support).
Mon, 19 Jun 2023 11:28:45 +0200 clone-bundles: reorder some test section and add titles
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 11:28:45 +0200] rev 50700
clone-bundles: reorder some test section and add titles This make things clearer around the inline clone bundle tests.
Mon, 19 Jun 2023 11:04:27 +0200 clone-bundle: rename the methods and wireprotole command
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2023 11:04:27 +0200] rev 50699
clone-bundle: rename the methods and wireprotole command The current naming is very clone centric, since then, the url scheme was moved to a more generic wording to make room for other use-cases (e.g. pull bundles). We apply the same logic to the internal API and, very important prior to the release, to the wire protocol command.
Sun, 18 Jun 2023 00:04:53 +0200 delta-find: remove dead code intended to deal with forced delta reuse
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 18 Jun 2023 00:04:53 +0200] rev 50698
delta-find: remove dead code intended to deal with forced delta reuse Since the case was dealt with sooner (see XXX), we no longer need to deal with it in this part of the code.
Thu, 20 Apr 2023 15:56:58 -0400 library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com> [Thu, 20 Apr 2023 15:56:58 -0400] rev 50697
library: incorporate demandimport into runpy invocation
Mon, 17 Apr 2023 09:38:52 -0400 library: enable runpy invocation on mercurial package
Jason R. Coombs <jaraco@jaraco.com> [Mon, 17 Apr 2023 09:38:52 -0400] rev 50696
library: enable runpy invocation on mercurial package
Mon, 12 Jun 2023 16:51:08 +0200 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Jun 2023 16:51:08 +0200] rev 50695
match: add `filepath:` pattern to match an exact filepath relative to the root It's useful in certain automated workflows to make sure we recurse in directories whose name conflicts with files in other revisions. In addition it makes it possible to avoid building a potentially costly regex, improving performance when the set of files to match explicitly is large. The benchmark below are run in the following configuration : # data-env-vars.name = mozilla-central-2018-08-01-zstd-sparse-revlog # benchmark.name = files # benchmark.variants.rev = tip # benchmark.variants.files = all-list-filepath-sorted # bin-env-vars.hg.flavor = no-rust It also includes timings using the re2 engine (through the `google-re2` module) to show how much can be saved by just using a better regexp engine. Pattern time (seconds) time using re2 ----------------------------------------------------------- just "." 0.4 0.4 list of "filepath:…" 1.3 1.3 list of "path:…" 25.7 3.9 list of patterns 29.7 10.4 As you can see, Without re2, using "filepath:" instead of "path:" is a huge win. With re2, it is still about three times faster to not have to build the regex.
Sat, 17 Jun 2023 23:47:31 +0200 path: use the next `display` argument to deal with boolean stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2023 23:47:31 +0200] rev 50694
path: use the next `display` argument to deal with boolean We have a generic mechanism that we can now use for the special case now.
Thu, 15 Jun 2023 09:51:29 +0200 path: display proper user facing value for pulled-delta-reuse-policy stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jun 2023 09:51:29 +0200] rev 50693
path: display proper user facing value for pulled-delta-reuse-policy The integer was not what the user expect nor what could be provided as a config value.
Thu, 15 Jun 2023 09:50:46 +0200 paths: add an argument to format the suboption display stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jun 2023 09:50:46 +0200] rev 50692
paths: add an argument to format the suboption display We will use it in the next function to the delta policy display. It could also be use to deal with the other special case in the command code, but that is unnecessary churn for stable so that part will go on default.
Fri, 09 Jun 2023 14:32:09 +0100 ui: fix crash in `hg paths` when pulled-delta-reuse-policy is in use stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 09 Jun 2023 14:32:09 +0100] rev 50691
ui: fix crash in `hg paths` when pulled-delta-reuse-policy is in use The crash is a result of [value] being an int, but being used as a bytestring.
Fri, 09 Jun 2023 14:31:40 +0100 ui: add a test demonstrating a crash in `hg paths` stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 09 Jun 2023 14:31:40 +0100] rev 50690
ui: add a test demonstrating a crash in `hg paths`
Sat, 17 Jun 2023 04:05:53 +0200 re2: fix reporting of availability in `hg debuginstall` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2023 04:05:53 +0200] rev 50689
re2: fix reporting of availability in `hg debuginstall` We add and use an official API to check is re2 is available. This prevent the bug previously in place were debuginstall was considering confusing `None` (i.e. non-initialized) and `False` (i.e. unavailable).
Sat, 17 Jun 2023 04:05:18 +0200 re: make _checkre2 a static method stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2023 04:05:18 +0200] rev 50688
re: make _checkre2 a static method There is no need to it to be a method, so we make it at least a static method to make it easier to call.
Sat, 17 Jun 2023 04:02:25 +0200 re2: exit `_checkre2` early if calling it is useless stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2023 04:02:25 +0200] rev 50687
re2: exit `_checkre2` early if calling it is useless If we already know if re2 is supported there is no need to run the check again. Stricly speaking we don't call it twice, but this seems a simple enough safeguard to include in this series.
Sun, 18 Jun 2023 00:09:39 +0200 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 18 Jun 2023 00:09:39 +0200] rev 50686
branching: merge with stable
Tue, 20 Jun 2023 02:36:52 +0200 backout: remove db9b6ce803a9
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Jun 2023 02:36:52 +0200] rev 50685
backout: remove db9b6ce803a9 That changeset lost its topic for unknown reason and ended up being picked by some automation. So I backout it previous incarnation until it can get properly reviewed.
Mon, 19 Jun 2023 23:27:18 +0200 infinitepush: aggressively deprecated infinite push
pierre-yves.david@ens-lyon.org [Mon, 19 Jun 2023 23:27:18 +0200] rev 50684
infinitepush: aggressively deprecated infinite push We add a large warning and an explicit abort. Both can be disable through config, but neither are explicitly documented. If any user exists I really want them to get in touch with the community.
Tue, 13 Jun 2023 14:35:36 +0200 rust-dependencies: switch from `users` to `whoami`
Raphaël Gomès <rgomes@octobus.net> [Tue, 13 Jun 2023 14:35:36 +0200] rev 50683
rust-dependencies: switch from `users` to `whoami` `users` is unmaintained, with the maintainer apparently MIA. `whoami` is a popular crate that does simple wrapping of platform-specific calls. This makes the overhead from using `blackbox` lower. It used to be up 10ms on slower hardware for both calls, now down to <1ms which is always good.
Mon, 12 Jun 2023 23:41:28 +0200 rust-hg-core: move from `ouroboros` to `self_cell`
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Jun 2023 23:41:28 +0200] rev 50682
rust-hg-core: move from `ouroboros` to `self_cell` `ouroboros` has a fundamental soundness problem that, while not applicable today, could become applicable given new compiler optimizations.¹ `self_cell` is a crate that accomplishes a lot of the same things that `ouroboros` did while remaining sound (that is, unless a new soundness issue is discovered) by not assuming as much about the memory layout of the program. `self_cell` has been scrutinized heavily in the past few months by very competent people, some from the compiler team and has shown no weaknesses for a while, with a 1.0 stable release coming out a couple months ago. Our internal API is exactly the same, this is just an implementation detail. To reiterate, no actual soundness issue was found with our use of `ouroboros`, but there might be evolutions of `rustc` (or even a future separate compiler) that could generate unsound code. [1] https://github.com/joshua-maros/ouroboros/issues/88
Fri, 02 Jun 2023 15:12:05 +0200 debug-revlog-stats: make it use the new store entry API
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jun 2023 15:12:05 +0200] rev 50681
debug-revlog-stats: make it use the new store entry API This give use free tree manifest support in the process.
Fri, 02 Jun 2023 15:10:50 +0200 store: use the revlog type from revlog's constant instead of custom one
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jun 2023 15:10:50 +0200] rev 50680
store: use the revlog type from revlog's constant instead of custom one We already have a revlog type that everybody use. So we use that one instead.
Mon, 12 Jun 2023 23:24:41 +0200 repair: use `is_manifestlog` to recognise manifest revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2023 23:24:41 +0200] rev 50679
repair: use `is_manifestlog` to recognise manifest revlog This is simpler that comparing flag, and we want to remove these flags anyway.
Tue, 06 Jun 2023 04:56:54 +0200 perf: add a perf::stream-consume
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Jun 2023 04:56:54 +0200] rev 50678
perf: add a perf::stream-consume We know how long it take to generate, lets check how long it take to apply now.
Tue, 06 Jun 2023 04:09:05 +0200 perf: add a perf::stream-generate command
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Jun 2023 04:09:05 +0200] rev 50677
perf: add a perf::stream-generate command This record the time we take to generate a bundle.
Mon, 12 Jun 2023 18:04:09 +0200 perf: add a new "context" argument to timer
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2023 18:04:09 +0200] rev 50676
perf: add a new "context" argument to timer This allow to simple setup/teardown outside of the timed section. Especially using object that need context manager, like a temporary files.
Tue, 06 Jun 2023 01:48:10 +0200 perf: add support for stream-v3 during benchmark
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Jun 2023 01:48:10 +0200] rev 50675
perf: add support for stream-v3 during benchmark This is getting important as the v3 protocol will diverge from the v2 protocol.
Tue, 06 Jun 2023 01:43:48 +0200 perf: add a function to find a stream version generator
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Jun 2023 01:43:48 +0200] rev 50674
perf: add a function to find a stream version generator The logic is clearer and can be reused for other commands in the future.
Thu, 18 May 2023 19:23:59 +0100 treemanifest: make `updatecaches` update the nodemaps for all directories
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 18 May 2023 19:23:59 +0100] rev 50673
treemanifest: make `updatecaches` update the nodemaps for all directories Without this, if the cache for a nested directory is in a bad state, it's very hard to repair it.
Wed, 31 May 2023 10:37:55 +0100 stream-clone: avoid opening a revlog in case we do not need it
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 31 May 2023 10:37:55 +0100] rev 50672
stream-clone: avoid opening a revlog in case we do not need it Opening an revlog has a cost, especially if it is inline as we have to scan the file and construct an index. To prevent the associated slowdown, we just do a minimal scan to check that an inline file is still inline, and simply stream the file without creating a revlog when we can. This provides a big boost compared to the previous changeset, even if the full generation is still penalized by the initial gathering of information. All benchmarks are run on linux with Python 3.10.7. # benchmark.name = hg.exchange.stream.generate # benchmark.variants.version = v2 ### Compared to the previous changesets We get a large win all across the board! # mercurial-2018-08-01-zstd-sparse-revlog before: 0.250694 seconds after: 0.105986 seconds (-57.72%) # pypy-2018-08-01-zstd-sparse-revlog before: 3.885657 seconds after: 1.709748 seconds (-56.00%) # netbeans-2018-08-01-zstd-sparse-revlog before: 16.679371 seconds after: 7.687469 seconds (-53.91%) # mozilla-central-2018-08-01-zstd-sparse-revlog before: 38.575482 seconds after: 17.520316 seconds (-54.58%) # mozilla-try-2019-02-18-zstd-sparse-revlog before: 81.160994 seconds after: 37.073753 seconds (-54.32%) ### Compared to 6.4.3 We are still significantly slower than 6.4.3, the extra time is usually twice slower than the extra time we observe on the locked section, which is a quite interesting information. Except for mercurial-central that is much faster. That discrepancy is not really explained yet. # mercurial-2018-08-01-zstd-sparse-revlog 6.4.3: 0.072560 seconds after: 0.105986 seconds (+46.07%) (- 0.03 seconds) # pypy-2018-08-01-zstd-sparse-revlog 6.4.3: 1.211193 seconds after: 1.709748 seconds (+41.16%) (-0.45 seconds) # netbeans-2018-08-01-zstd-sparse-revlog 6.4.3: 4.932843 seconds after: 7.687469 seconds (+55.84%) (-2.75 seconds) # mozilla-central-2018-08-01-zstd-sparse-revlog 6.4.3: 34.012226 seconds after: 17.520316 seconds (-48.49%) (-16.49 seconds) # mozilla-try-2019-02-18-zstd-sparse-revlog 6.4.3: 23.850555 seconds after: 37.073753 seconds (+55.44%) (+13.22 seconds)
Tue, 30 May 2023 17:43:59 +0100 store: stop relying on a `revlog_type` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 30 May 2023 17:43:59 +0100] rev 50671
store: stop relying on a `revlog_type` property We want to know if a file is related to a revlog, but the rest is dealt with differently already, so we simplify things further. as a bonus, this cleanup This provides a small but noticeable speedup. The number below use `hg perf::stream-locked-section` to measure the time spend in the locked section of the streaming clone. Number are run on various repository and compare different steps.: 1) the effect of this patchs, 2) the effect of the cleanup series, 2) current state compared to because large refactoring. All benchmarks are run on linux with Python 3.10.7. ### Effect of this patch # mercurial-2018-08-01-zstd-sparse-revlog # benchmark.name = perf-stream-locked-section before: 0.030246 seconds after: 0.029274 seconds (-3.21%) # pypy-2018-08-01-zstd-sparse-revlog before: 0.545012 seconds after: 0.520872 seconds (-4.43%) # netbeans-2018-08-01-zstd-sparse-revlog before: 2.719939 seconds after: 2.626791 seconds (-3.42%) # mozilla-central-2018-08-01-zstd-sparse-revlog before: 6.304179 seconds after: 6.096700 seconds (-3.29%) # mozilla-try-2019-02-18-zstd-sparse-revlog before: 14.142687 seconds after: 13.640779 seconds (-3.55%) ### Effect of this series A small but sizeable speedup # mercurial-2018-08-01-zstd-sparse-revlog before: 0.031122 seconds after: 0.029274 seconds (-5.94%) # pypy-2018-08-01-zstd-sparse-revlog before: 0.589970 seconds after: 0.520872 seconds (-11.71%) # netbeans-2018-08-01-zstd-sparse-revlog before: 2.980300 seconds after: 2.626791 seconds (-11.86%) # mozilla-central-2018-08-01-zstd-sparse-revlog before: 6.863204 seconds after: 6.096700 seconds (-11.17%) # mozilla-try-2019-02-18-zstd-sparse-revlog before: 14.921393 seconds after: 13.640779 seconds (-8.58%) ### Current state compared to the pre-refactoring state The refactoring introduced multiple string manipulation and dictionary creation that seems to induce a signifiant slowdown Slowdown # mercurial-2018-08-01-zstd-sparse-revlog 6.4.3: 0.019459 seconds after: 0.029274 seconds (+50.44%) ## pypy-2018-08-01-zstd-sparse-revlog 6.4.3: 0.290715 seconds after: 0.520872 seconds (+79.17%) # netbeans-2018-08-01-zstd-sparse-revlog 6.4.3: 1.403447 seconds after: 2.626791 seconds (+87.17%) # mozilla-central-2018-08-01-zstd-sparse-revlog 6.4.3: 3.163549 seconds after: 6.096700 seconds (+92.72%) # mozilla-try-2019-02-18-zstd-sparse-revlog 6.4.3: 6.702184 seconds after: 13.640779 seconds (+103.53%)
Tue, 30 May 2023 16:38:13 +0100 store: directly pass the filesize in the `details` of revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 30 May 2023 16:38:13 +0100] rev 50670
store: directly pass the filesize in the `details` of revlog The dictionary only contains 1 (or 0) entries, we can directly store that information (or None). Moving to a simpler argument passing result in a noticable speedup (because Python) The number below use `hg perf::stream-locked-section` to measure the time spend in the locked section of the streaming clone. Number are run on various repository. ### mercurial-2018-08-01-zstd-sparse-revlog before: 0.031247 seconds after: 0.030246 seconds (-3.20%) ### mozilla-central-2018-08-01-zstd-sparse-revlog before: 6.718968 seconds after: 6.304179 seconds (-6.17%) ### mozilla-try-2019-02-18-zstd-sparse-revlog before: 14.631343 seconds after: 14.142687 seconds (-3.34%) ### netbeans-2018-08-01-zstd-sparse-revlog before: 2.895584 seconds after: 2.719939 seconds (-6.07%) ### pypy-2018-08-01-zstd-sparse-revlog before: 0.561843 seconds after: 0.543034 seconds (-3.35%)
Tue, 30 May 2023 16:35:10 +0100 store: explicitly pass file_size when creating StoreFile
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 30 May 2023 16:35:10 +0100] rev 50669
store: explicitly pass file_size when creating StoreFile A small cleanup before large cleanup in the next patch.
Tue, 30 May 2023 16:33:28 +0100 store: have the revlog determine which files are volatile itself
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 30 May 2023 16:33:28 +0100] rev 50668
store: have the revlog determine which files are volatile itself This is a first step toward simplifying the walk step.
Mon, 12 Jun 2023 10:50:00 +0200 test-dirstate-version-fallback: future-proof the test for a different default stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Jun 2023 10:50:00 +0200] rev 50667
test-dirstate-version-fallback: future-proof the test for a different default Dirstate-v2 will become the default at some point, which would cause this test to fail. Let's save someone else the headache later.
Wed, 08 Mar 2023 14:23:43 +0100 clonebundles: add support for inline (streaming) clonebundles
Mathias De Mare <mathias.de_mare@nokia.com> [Wed, 08 Mar 2023 14:23:43 +0100] rev 50666
clonebundles: add support for inline (streaming) clonebundles The idea behind inline clonebundles is to send them through the ssh or https connection to the Mercurial server. We've been using this specifically for streaming clonebundles, although it works for 'regular' clonebundles as well (but is less relevant, since pullbundles exist). We've had this enabled for around 9 months for a part of our users. A few benefits are: - no need to secure an external system, since everything goes through the same Mercurial server - easier scaling (in our case: no risk of inconsistencies between multiple mercurial-server mirrors and nginx clonebundles hosts) Remaining topics/questions right now: - The inline clonebundles don't work for https yet. This is because httppeer doesn't seem to support sending client capabilities. I didn't focus on that as my main goal was to get this working for ssh.
Thu, 08 Jun 2023 17:02:04 +0200 Added signature for changeset da372c745e0f stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Jun 2023 17:02:04 +0200] rev 50665
Added signature for changeset da372c745e0f
Thu, 08 Jun 2023 17:02:00 +0200 Added tag 6.4.4 for changeset da372c745e0f stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Jun 2023 17:02:00 +0200] rev 50664
Added tag 6.4.4 for changeset da372c745e0f
Thu, 08 Jun 2023 17:01:29 +0200 relnotes: add 6.4.4 stable 6.4.4
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Jun 2023 17:01:29 +0200] rev 50663
relnotes: add 6.4.4
Thu, 08 Jun 2023 14:28:21 +0200 revlog: avoid possible collision between directory and temporary index stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 14:28:21 +0200] rev 50662
revlog: avoid possible collision between directory and temporary index Since 6.4, we create a temporary index file to write the split data without overwriting the inline version too early. However, the store encoding does not prevent these new `.i.s` file to collide with a directory with the same name. While the odds for such a collision to happens are fairly low, the collision would prevent Mercurial from working. The store encoding have a mitigation solution in place to prevent such collisions from happening for `.i` and `.d` files, but not for other extensions. We cannot update this encoding scheme to solve the issue since it would diverge from older version of Mercurial. Instead, we create an alternative directory tree dedicated to such files. The use of the `.i` extension combined with store encoding will prevent collisions there.
Thu, 08 Jun 2023 11:08:19 +0200 revlog: move the computation of the split_index path in a property stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 11:08:19 +0200] rev 50661
revlog: move the computation of the split_index path in a property This is about to become more complex, so we gather the logic in a single place.
Mon, 05 Jun 2023 16:43:27 +0200 rust-dirstate: fall back to v1 if reading v2 failed stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 05 Jun 2023 16:43:27 +0200] rev 50660
rust-dirstate: fall back to v1 if reading v2 failed This will help us not fail when a v1 dirstate is present on disk while a v2 was expected (which could happen with a racy/interrupted upgrade).
Mon, 05 Jun 2023 17:29:52 +0200 dirstate: add test showing dirstate version mismatch causes an error stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 05 Jun 2023 17:29:52 +0200] rev 50659
dirstate: add test showing dirstate version mismatch causes an error We should fall back to trying dirstate v1 when v2 fails to read.
Mon, 05 Jun 2023 16:30:25 +0200 rust-dirstate: rename `has_dirstate_v2` to `use_dirstate_v2` stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 05 Jun 2023 16:30:25 +0200] rev 50658
rust-dirstate: rename `has_dirstate_v2` to `use_dirstate_v2` It is closer to the right semantics. I added a docstring to better explain the reasonning. In the next patch(es), I will address the underlying issue of finding the "wrong" version of the dirstate on disk.
Mon, 05 Jun 2023 03:11:26 +0200 delta-find: fix pulled-delta-reuse-policy=forced behavior stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jun 2023 03:11:26 +0200] rev 50657
delta-find: fix pulled-delta-reuse-policy=forced behavior The code that select delta still has too many oportunity to discard the delta is has been forcibly asked to reuse. However is is fairly easy to use a dedicated fastpath for this case. So we do so. Cleaning other code that tries to enforce that policy will be done on default.
Thu, 08 Jun 2023 03:49:44 +0200 delta-find: display more information about the search in some case stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 03:49:44 +0200] rev 50656
delta-find: display more information about the search in some case This will be useful to access the effect of the delta reuse policy.
Thu, 08 Jun 2023 03:05:10 +0200 deltafind: issue debug information when we fast-path rivial case too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 03:05:10 +0200] rev 50655
deltafind: issue debug information when we fast-path rivial case too More debug options never hurts.
Thu, 08 Jun 2023 03:11:51 +0200 delta-find: gather the condition to blindly use a full snapshot together stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 03:11:51 +0200] rev 50654
delta-find: gather the condition to blindly use a full snapshot together We are about to make the `if` body bigger, so having only one of them is simpler/
Thu, 08 Jun 2023 02:49:10 +0200 delta-find: initialize the debug information much sooner (when possible) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 02:49:10 +0200] rev 50653
delta-find: initialize the debug information much sooner (when possible) This help us to record debug information in alternative path.
Thu, 08 Jun 2023 02:42:28 +0200 delta-find: fix `parents` round detection stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 02:42:28 +0200] rev 50652
delta-find: fix `parents` round detection We should compare integer with integer, instead of bytes (node).
Thu, 08 Jun 2023 02:35:03 +0200 delta-find: intrduce a `_one_dbg_data` method stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 02:35:03 +0200] rev 50651
delta-find: intrduce a `_one_dbg_data` method This helps with the initialisation of the expected debug information.
Thu, 08 Jun 2023 01:52:35 +0200 delta-find: move final debug processing in a `_dbg_process_data` method stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 01:52:35 +0200] rev 50650
delta-find: move final debug processing in a `_dbg_process_data` method This will help us making sure we can call the necessary debugging code in alternative codepath.
Thu, 08 Jun 2023 01:19:01 +0200 delta-fine: use the `_debug_search` attribute directly stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 01:19:01 +0200] rev 50649
delta-fine: use the `_debug_search` attribute directly By adjusting the value at creation time, we can avoid the need to use and intermediate variable.
Thu, 08 Jun 2023 01:11:47 +0200 delta-find: move the `gather_debug` logic in a property stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 01:11:47 +0200] rev 50648
delta-find: move the `gather_debug` logic in a property This will make it simpler to get be reused in multiple places.
Thu, 08 Jun 2023 01:07:00 +0200 tests: check `pulled-delta-reuse-policy=forced` without general delta stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2023 01:07:00 +0200] rev 50647
tests: check `pulled-delta-reuse-policy=forced` without general delta If general delta is not available, the amount of delta we can reuse at all will be more limited. We check that application still work and does not corrupt the repository.
Wed, 31 May 2023 18:08:56 +0100 tree-manifest: allow `debugupgraderepo` to run on tree manifest repo
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 31 May 2023 18:08:56 +0100] rev 50646
tree-manifest: allow `debugupgraderepo` to run on tree manifest repo There does not seems to be anything wrong with running the current logic on them. So we remove the limitation.
Tue, 25 Apr 2023 15:28:40 +0200 bundles: clarify streaming v2 bundle usage stable
Mathias De Mare <mathias.de_mare@nokia.com> [Tue, 25 Apr 2023 15:28:40 +0200] rev 50645
bundles: clarify streaming v2 bundle usage This seems useful to clarify through the documentation (we were still using debugcreatestreamclonebundle, even though 'hg bundle' is already an option...).
Wed, 31 May 2023 16:04:16 +0100 stream-clone: update debugcreatestreamclonebundle helps
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 31 May 2023 16:04:16 +0100] rev 50644
stream-clone: update debugcreatestreamclonebundle helps People to stop using streamv1, so we should point them to alternative in the place where people might find it.
Thu, 25 May 2023 00:23:05 +0200 rewrite: simplify the `retained_extras` extra logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2023 00:23:05 +0200] rev 50643
rewrite: simplify the `retained_extras` extra logic First, we move the definition of value outside of the rebase extensions, as this apply to all rebase-like operation and some live in other place (like evolve). Second we make it a simple set, so that it is easy for an extension to add a new value in it. Third, we move the associated logic in core too. That make it easily available to other extensions. Fourth we simplify it usage, as the verbose version of the filtering is just a handful on line long, we are just going to test all the value for updates, so the Projection overlay is not bringing much here. Note that, we make it a module level set, is a key is worth preserving it is probably worth preserving in all cases. This was already the behavior prior to this change.
Mon, 05 Jun 2023 11:07:08 +0200 revlog: fix a bug in revlog splitting stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 05 Jun 2023 11:07:08 +0200] rev 50642
revlog: fix a bug in revlog splitting Specifically, if the .i.s files are not added to the transaction, then a follow-up modification of such a file records it into transaction as non-empty, which is incorrect.
Mon, 29 May 2023 18:41:58 +0200 stream-clone: smoothly detect and handle a case were a revlog is split
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 18:41:58 +0200] rev 50641
stream-clone: smoothly detect and handle a case were a revlog is split This detect and handle the most common case for a race condition around stream and revlog splitting. The one were the revlog is split between the initial collection of data and the time were we start considering stream that data. In such case, we repatch an inlined version of that revlog together when this happens. This is necessary as stream-v2 promised a specific number of bytes and a specific number of files to the client. In stream-v3, we will have the opportunity to just send a split revlog instead. Getting a better version of the protocol for stream-v3 is still useful, but it is no longer a blocket to fix that race condition. Note that another, rarer race condition exist, were the revlog is split while we creating the revlog and extracing content from it. This can be dealt with later.
Mon, 29 May 2023 14:07:58 +0200 stream-clone: implement decidated `get_streams` method for revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 14:07:58 +0200] rev 50640
stream-clone: implement decidated `get_streams` method for revlog For revlog, we can do better using the maximum linkrev expected. This approach open the way to dealing with a much larger set of non-trivial changes, like splitting of inline revlogs. We will actually tackle this issue in the next changesets (thanks to this one).
Sun, 28 May 2023 05:52:58 +0200 stream-clone: make it the responsability of the store entry to stream content
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 28 May 2023 05:52:58 +0200] rev 50639
stream-clone: make it the responsability of the store entry to stream content The store entry has more context, this will especially be true when it comes to revlogs. So we move the details of how to retrieve binary content to the StoreEntry. The stream clone code now focus on the protocol bits.
Mon, 29 May 2023 11:42:16 +0200 store: declare a `files` method on BaseStoreEntry
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 11:42:16 +0200] rev 50638
store: declare a `files` method on BaseStoreEntry This will help pytype to type check. We have to move `StoreFile` earlier in the file to use it in the type declaration.
Sun, 28 May 2023 05:23:46 +0200 revlog: add a `get_revlog` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 28 May 2023 05:23:46 +0200] rev 50637
revlog: add a `get_revlog` method This might seen weird, but I actually thing we have been needing this for a long time. There is multiple object that kind of pretend being revlogs while actually wrapping the actual revlog. Since multiple code needs to access the actuel revlog. See documentation for more details. Expect cleanup of various places one the current series is done.
Mon, 29 May 2023 04:26:39 +0200 stream-clone: drop the _emit_v2 function
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 04:26:39 +0200] rev 50636
stream-clone: drop the _emit_v2 function It has no user left.
Mon, 29 May 2023 04:24:39 +0200 stream-clone: directly use `_entries_walk` to generate stream-v2
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 04:24:39 +0200] rev 50635
stream-clone: directly use `_entries_walk` to generate stream-v2 This does not requires that much changes and will give us much more flexibility, like improving revlog handling to gracefully handle race situation.
Mon, 29 May 2023 04:12:30 +0200 stream-clone: pre-indent some code
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 04:12:30 +0200] rev 50634
stream-clone: pre-indent some code This make the next changeset clearer.
Sun, 28 May 2023 04:12:10 +0200 local-clone: perform the hardlink/copy based from _entries_walk returns
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 28 May 2023 04:12:10 +0200] rev 50633
local-clone: perform the hardlink/copy based from _entries_walk returns We previously used `_v2_walk`. However it is not bringing us much. So lets use the higher level function instead. This will offer us more flexibility with the `_v2_walk` function… like deleting it eventually.
Mon, 29 May 2023 04:24:29 +0200 store: cache the file_size when we get it from disk
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 04:24:29 +0200] rev 50632
store: cache the file_size when we get it from disk The point of caching `files` is to ensure consistency and avoiding redoing expensive work. So we cache the file_size once retrieved.
Sun, 28 May 2023 03:46:48 +0200 store: cache the `files()` return for store entries
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 28 May 2023 03:46:48 +0200] rev 50631
store: cache the `files()` return for store entries This make it more efficient to directly use the entries list to retrieve data in various location. It also make the entry record the file size it previously promissed to user code, especially the stream clone code.
Sat, 27 May 2023 04:22:18 +0200 stream-clone: introduce a richer TempCopyManager object
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2023 04:22:18 +0200] rev 50630
stream-clone: introduce a richer TempCopyManager object This replace the previous `copy` callable with a richer object that allow access to the backup path. This will simplify the user code as they won't need to keep and pass around the backup path explicitly.
Mon, 29 May 2023 13:29:01 +0200 store: properly compute the targer_id of manifestlog in no-fncache walk
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 13:29:01 +0200] rev 50629
store: properly compute the targer_id of manifestlog in no-fncache walk Creating RevlogStoreEntry is good, but we need to drop the final `00manifest` part to create something correct.
Mon, 29 May 2023 13:28:33 +0200 store: do not drop the final `/` when creating manifestlog instance
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 13:28:33 +0200] rev 50628
store: do not drop the final `/` when creating manifestlog instance This bug, inherited from the upgrade code leads to the acces/creation of broken revlog with name `DIRECTORY00manifest.i` instead of `DIRECTORY/00manifest.i` We fix it in its own changeset to preserve the "pure code movement" aspect of the previous changesets.
Sat, 27 May 2023 04:01:17 +0200 store: add a `get_revlog_instance` method on revlog entries
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2023 04:01:17 +0200] rev 50627
store: add a `get_revlog_instance` method on revlog entries The upgrade code needs this a lot, and the stream code is about to needs it too. So we start by moving the upgrade code in a more generic location.
Mon, 29 May 2023 02:22:20 +0200 stream-clone: add a test that highlight crash on revlog splitting
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 02:22:20 +0200] rev 50626
stream-clone: add a test that highlight crash on revlog splitting This has been a long running problem, we should have a tests for it.
Mon, 29 May 2023 01:38:59 +0200 stream-clone: remove unused code in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 01:38:59 +0200] rev 50625
stream-clone: remove unused code in test-clone-stream.t We are not using the extension we create inline, we are using `tests/testlib/ext-stream-clone-steps.py`. So let us deleted the unused version.
Mon, 29 May 2023 01:38:34 +0200 stream-clone: document the ext-stream-clone-steps.py utility extension
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 01:38:34 +0200] rev 50624
stream-clone: document the ext-stream-clone-steps.py utility extension This extension is useful, let us clarify how to use it.
Mon, 29 May 2023 12:15:10 +0200 test-treemanifest: cleanup the test to more easily show server side error
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 12:15:10 +0200] rev 50623
test-treemanifest: cleanup the test to more easily show server side error This made my life easier debugging.
Thu, 01 Jun 2023 22:32:21 +0100 test: make test-contrib-perf.t more robust stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2023 22:32:21 +0100] rev 50622
test: make test-contrib-perf.t more robust Some code path are far too fast now. We raise de number to make sure the run keep to that floor.
Thu, 02 Feb 2023 17:26:10 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:26:10 +0100] rev 50621
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:51 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:51 +0100] rev 50620
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Fri, 03 Feb 2023 02:57:49 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 02:57:49 +0100] rev 50619
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Fri, 03 Feb 2023 01:05:41 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 01:05:41 +0100] rev 50618
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Fri, 03 Feb 2023 01:04:22 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 01:04:22 +0100] rev 50617
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Fri, 03 Feb 2023 01:03:45 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Feb 2023 01:03:45 +0100] rev 50616
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:38:14 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:38:14 +0100] rev 50615
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:38:04 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:38:04 +0100] rev 50614
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:44 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:44 +0100] rev 50613
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:37 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:37 +0100] rev 50612
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:31 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:31 +0100] rev 50611
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:25 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:25 +0100] rev 50610
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:11 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:11 +0100] rev 50609
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:02 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:02 +0100] rev 50608
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:55 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:55 +0100] rev 50607
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:47 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:47 +0100] rev 50606
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:38 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:38 +0100] rev 50605
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:32 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:32 +0100] rev 50604
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:25 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:25 +0100] rev 50603
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:15 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:15 +0100] rev 50602
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:36:07 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:36:07 +0100] rev 50601
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:35:47 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:35:47 +0100] rev 50600
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:35:38 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:35:38 +0100] rev 50599
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:35:31 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:35:31 +0100] rev 50598
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:35:09 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:35:09 +0100] rev 50597
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:35:01 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:35:01 +0100] rev 50596
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:34:48 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:34:48 +0100] rev 50595
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:34:33 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:34:33 +0100] rev 50594
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:34:25 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:34:25 +0100] rev 50593
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:34:17 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:34:17 +0100] rev 50592
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:34:09 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:34:09 +0100] rev 50591
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:33:56 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:33:56 +0100] rev 50590
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:32:38 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:32:38 +0100] rev 50589
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:30:50 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:30:50 +0100] rev 50588
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:30:18 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:30:18 +0100] rev 50587
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:29:39 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:29:39 +0100] rev 50586
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:28:40 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:28:40 +0100] rev 50585
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:28:30 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:28:30 +0100] rev 50584
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:28:15 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:28:15 +0100] rev 50583
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:28:07 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:28:07 +0100] rev 50582
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:27:58 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:27:58 +0100] rev 50581
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:27:50 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:27:50 +0100] rev 50580
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:27:43 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:27:43 +0100] rev 50579
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:27:33 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:27:33 +0100] rev 50578
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:27:22 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:27:22 +0100] rev 50577
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:27:06 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:27:06 +0100] rev 50576
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:26:32 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:26:32 +0100] rev 50575
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:26:23 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:26:23 +0100] rev 50574
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:24:16 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:24:16 +0100] rev 50573
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:24:05 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:24:05 +0100] rev 50572
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:55 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:55 +0100] rev 50571
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:46 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:46 +0100] rev 50570
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:37 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:37 +0100] rev 50569
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:37:58 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:37:58 +0100] rev 50568
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:31 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:31 +0100] rev 50567
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:20 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:20 +0100] rev 50566
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:12 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:12 +0100] rev 50565
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:23:03 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:23:03 +0100] rev 50564
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:22:55 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:22:55 +0100] rev 50563
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:21:45 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:21:45 +0100] rev 50562
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:21:36 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:21:36 +0100] rev 50561
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:21:22 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:21:22 +0100] rev 50560
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:21:14 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:21:14 +0100] rev 50559
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:21:04 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:21:04 +0100] rev 50558
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:20:54 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:20:54 +0100] rev 50557
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:20:46 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:20:46 +0100] rev 50556
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:19:55 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:19:55 +0100] rev 50555
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:19:46 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:19:46 +0100] rev 50554
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:19:35 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:19:35 +0100] rev 50553
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:19:26 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:19:26 +0100] rev 50552
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:18:37 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:18:37 +0100] rev 50551
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Thu, 02 Feb 2023 17:18:24 +0100 safehasattr: pass attribute name as string instead of bytes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Feb 2023 17:18:24 +0100] rev 50550
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Wed, 31 May 2023 12:02:56 -0300 debug: `isinstance(a, x) or isinstance(a, y)` is `isinstance(a, (x, y))`
Anton Shestakov <av6@dwimlabs.net> [Wed, 31 May 2023 12:02:56 -0300] rev 50549
debug: `isinstance(a, x) or isinstance(a, y)` is `isinstance(a, (x, y))`
Wed, 31 May 2023 12:01:25 -0300 debug: update usage strings of debugignore and debugnodemap
Anton Shestakov <av6@dwimlabs.net> [Wed, 31 May 2023 12:01:25 -0300] rev 50548
debug: update usage strings of debugignore and debugnodemap Multiple files can be specified for debugignore. debugnodemap does not take a revision argument.
Wed, 31 May 2023 12:00:21 -0300 debug: slightly improve wording on the InputErrors from the previous patch
Anton Shestakov <av6@dwimlabs.net> [Wed, 31 May 2023 12:00:21 -0300] rev 50547
debug: slightly improve wording on the InputErrors from the previous patch
Wed, 31 May 2023 11:30:33 -0300 debug: use InputError instead of CommandError for validating arguments
Anton Shestakov <av6@dwimlabs.net> [Wed, 31 May 2023 11:30:33 -0300] rev 50546
debug: use InputError instead of CommandError for validating arguments
Fri, 26 May 2023 17:41:25 +0200 clonebundle: add a `filter_bundle_url` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2023 17:41:25 +0200] rev 50545
clonebundle: add a `filter_bundle_url` function This function does nothing by default, but give extension the opportunity to alter the URL, typically, this could be used to inject authentication token when serving clone bundle for private repositories.
Fri, 26 May 2023 16:55:52 +0200 clonebundles: move the manifest reading in a dedicated function
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2023 16:55:52 +0200] rev 50544
clonebundles: move the manifest reading in a dedicated function We are about to make the logic more advanced to help hosting solution, so we need to centralize it first.
Wed, 31 May 2023 22:36:50 +0200 doc: format argument for date uses strftime format string (issue6818) stable
Joerg Sonnenberger <joerg@bec.de> [Wed, 31 May 2023 22:36:50 +0200] rev 50543
doc: format argument for date uses strftime format string (issue6818)
Thu, 20 Apr 2023 11:23:45 +0200 clonebundles: filter out invalid schemes instead of failing on them stable
Mathias De Mare <mathias.de_mare@nokia.com> [Thu, 20 Apr 2023 11:23:45 +0200] rev 50542
clonebundles: filter out invalid schemes instead of failing on them Previously, an invalid clonebundle scheme would result in a failed clone. By specifying a list of schemes we support, we can make sure adding a new scheme (like the one for inline clonebundles) does not result in clones failing for older clients.
Thu, 20 Apr 2023 10:48:12 +0200 clonebundles: demonstrate bad behaviour when unknown scheme is present stable
Mathias De Mare <mathias.de_mare@nokia.com> [Thu, 20 Apr 2023 10:48:12 +0200] rev 50541
clonebundles: demonstrate bad behaviour when unknown scheme is present
Mon, 29 May 2023 17:04:14 +0100 rhg: support `rhg files` with `ui.relative-paths=false`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 May 2023 17:04:14 +0100] rev 50540
rhg: support `rhg files` with `ui.relative-paths=false`
Mon, 29 May 2023 16:53:18 +0100 rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 May 2023 16:53:18 +0100] rev 50539
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Mon, 29 May 2023 16:47:39 +0100 rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 May 2023 16:47:39 +0100] rev 50538
rhg: test `rhg files --config ui.relative-paths ...` Add some tests. All of these are falling back for now, will be fixed in follow-up commits.
Thu, 01 Jun 2023 12:05:32 +0100 cleanup: simplify code
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Jun 2023 12:05:32 +0100] rev 50537
cleanup: simplify code
Wed, 31 May 2023 19:00:11 +0100 dirstate: better error messages when dirstate is corrupted
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 31 May 2023 19:00:11 +0100] rev 50536
dirstate: better error messages when dirstate is corrupted The current error message "Overflow in dirstate" sounds confusing because it suggests either a certain size limit that's being exceeded, or integer arithmetic overflowing. The reality is just a file being shorter than expected.
Wed, 31 May 2023 18:18:52 +0100 rust: remove an unused error variant DirstateMapError::EmptyPath
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 31 May 2023 18:18:52 +0100] rev 50535
rust: remove an unused error variant DirstateMapError::EmptyPath
Thu, 20 Apr 2023 16:07:47 -0400 hg: move unreachable code to where it could be reached
Jason R. Coombs <jaraco@jaraco.com> [Thu, 20 Apr 2023 16:07:47 -0400] rev 50534
hg: move unreachable code to where it could be reached
Tue, 23 May 2023 01:39:47 +0200 stream-clone: support streamv3 on the cli [hg bundle]
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 23 May 2023 01:39:47 +0200] rev 50533
stream-clone: support streamv3 on the cli [hg bundle] We add support and test for this. The support is still experimental, so the various name and identifier will eventually need to be renamed when stream-v3 gets out of experimental.
Tue, 23 May 2023 01:28:56 +0200 stream-clone: add the `-exp` prefix to the bundle part
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 May 2023 01:28:56 +0200] rev 50532
stream-clone: add the `-exp` prefix to the bundle part We forget to do so in 58adcabc295f, however this is important to prevent "current" client to send incompatible version to future client.
Mon, 21 Feb 2022 14:44:22 +0100 zstd: hack include order to ensure that our zstd.h is found
Joerg Sonnenberger <joerg@bec.de> [Mon, 21 Feb 2022 14:44:22 +0100] rev 50531
zstd: hack include order to ensure that our zstd.h is found If the regular Python CFLAGS include directories that already have the zstd headers available, a different and possible incompatible version can be picked up otherwise. Sadly, it seems like Python has no easy way to prefix flags before the rest.
Thu, 18 May 2023 17:07:43 -0700 exchange: allow passing no includes/excludes to `pull()`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2023 17:07:43 -0700] rev 50530
exchange: allow passing no includes/excludes to `pull()` I would expect that `exchange.pull(includepats=[])` results in an empty list of include patterns to be passed to the remote, but it doesn't currently because we check for any truthy value instead of checking specifically for `not None`.
Tue, 16 May 2023 12:31:07 +0200 stabletailgraph: add test cases challenging the open merge stack
pacien <pacien.trangirard@pacien.net> [Tue, 16 May 2023 12:31:07 +0200] rev 50529
stabletailgraph: add test cases challenging the open merge stack This adds three more complex test cases with situations requiring tricky state update in the stack-based iteration (arriving soon).
Fri, 21 Apr 2023 14:33:33 +0200 stabletailgraph: naive version of leap computation
pacien <pacien.trangirard@pacien.net> [Fri, 21 Apr 2023 14:33:33 +0200] rev 50528
stabletailgraph: naive version of leap computation This adds a naive reference implementation of the computation of leap and specific leap sets (described in the code documentation). The existing tests are enriched accordingly.
Fri, 21 Apr 2023 16:19:32 +0200 stabletailgraph: extract _parents util func
pacien <pacien.trangirard@pacien.net> [Fri, 21 Apr 2023 16:19:32 +0200] rev 50527
stabletailgraph: extract _parents util func
Mon, 22 May 2023 19:04:05 +0200 stabletailgraph: clarify excl part size computation
pacien <pacien.trangirard@pacien.net> [Mon, 22 May 2023 19:04:05 +0200] rev 50526
stabletailgraph: clarify excl part size computation
Fri, 21 Apr 2023 14:32:58 +0200 stabletailgraph: clarify naiveness of current implementation
pacien <pacien.trangirard@pacien.net> [Fri, 21 Apr 2023 14:32:58 +0200] rev 50525
stabletailgraph: clarify naiveness of current implementation Both the naive and the actual versions of the algorithms are going to co-exist for the tests. This makes is clearer that this one is naive.
Fri, 19 May 2023 14:49:50 +0200 stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 May 2023 14:49:50 +0200] rev 50524
stream-clone: introduce the notion of an experimental "v3" version We introduce a new experimental "v3" stream protocol, disabled by default. In practice the "v3-exp" protocol introduced in this changeset is identical to v2, but this changeset, lay the groundwork for having a new protocol: configuration, capability exchange, test coverage, etc. The actual protocol work will starts in the coming changesets.
Sat, 20 May 2023 01:39:13 +0200 stream-clone: check is a compatible protocol can be found
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2023 01:39:13 +0200] rev 50523
stream-clone: check is a compatible protocol can be found The previous code was explicitly checking if "v2" is listed in the "stream" bundle2 capability. The new code is checking is there is anything common between the versions supported client side and server side overlaps. This prepare the introduction of more stream version than "v2".
Sat, 20 May 2023 01:22:49 +0200 stream-clone: bail-out earlier if stream clone is not requested
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2023 01:22:49 +0200] rev 50522
stream-clone: bail-out earlier if stream clone is not requested The `canperformstreamclone` function is bit messy. However it seems clearer to me to check if a stream-clone have been requested by the client or the server at all, before checking if a compatible protocol can be negotiated with the server. So I am doing some gratuitous movement so reorder conditional.
Sat, 20 May 2023 01:19:26 +0200 stream-clone: bail-out earlier if pull is partial
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2023 01:19:26 +0200] rev 50521
stream-clone: bail-out earlier if pull is partial The `canperformstreamclone` function is bit messy. However it seems clearer to me to process the very generic condition about "can we consider a stream-clone at all", before checking if a stream-clone is requested and if a compatible protocol can be negotiated with the server. So I am doing some gratuitous movement so reorder conditional.
Sat, 20 May 2023 01:17:27 +0200 stream-clone: bail-out earlier if destination repo is not empty
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2023 01:17:27 +0200] rev 50520
stream-clone: bail-out earlier if destination repo is not empty The `canperformstreamclone` function is bit messy. However it seems clearer to me to process the very generic condition about "can we consider a stream-clone at all", before checking if a stream-clone is requested and if a compatible protocol can be negotiated with the server. So I am doing some gratuitous movement so reorder conditional.
Sun, 21 May 2023 00:00:57 +0200 stream-clone: check the version of streaming clone supported by the client
Arseniy Alekseyev <aalekseyev@janestreet.com> [Sun, 21 May 2023 00:00:57 +0200] rev 50519
stream-clone: check the version of streaming clone supported by the client Make the server refuse to produce streaming clone bundle, if the client doesn't specify the stream=v2 capability. This is in preparation to introduce stream=v3. As far as I can tell, this capability was added at the same time as support for bundle2-based streaming pulls was added, so I don't expect clients to break. (the modern client doesn't break, at any rate)
Sun, 21 May 2023 01:03:19 +0200 stream-clone: make sure the `stream` capability is set when bundling
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 01:03:19 +0200] rev 50518
stream-clone: make sure the `stream` capability is set when bundling This is important to start narrowing protocol option in the next changesets.
Sun, 21 May 2023 00:00:29 +0200 stream-clone: upgrade the error message for bad stream request
Arseniy Alekseyev <aalekseyev@janestreet.com> [Sun, 21 May 2023 00:00:29 +0200] rev 50517
stream-clone: upgrade the error message for bad stream request The new version if more compact and more consistent with the general Mercurial usage.
Sun, 21 May 2023 03:21:00 +0200 stream-clone: yield cache entry in `_entries_walk` too
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 03:21:00 +0200] rev 50516
stream-clone: yield cache entry in `_entries_walk` too The new function now cover the same ground as _v2_walk.
Sun, 21 May 2023 03:10:59 +0200 stream-clone: introduce a _entries_walk
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 03:10:59 +0200] rev 50515
stream-clone: introduce a _entries_walk That function insert itself between the store and `_v2_walk`. It only deals with StoreEntry unlike `_v2_walk` that deal with actual file. A share of the `_v2_walk` logic will be moved in this new `_entry_walk` function. Having this function will help us to implement a new "v3" version of the protocol that will be more entry centric.
Sun, 21 May 2023 02:29:33 +0200 store: make `walk` return an entry for obsolescence if requested so
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 02:29:33 +0200] rev 50514
store: make `walk` return an entry for obsolescence if requested so Instead of having dedicated code in the streamclone code, we should have the store deal with advertising the data it contains.
Sun, 21 May 2023 02:16:24 +0200 store: yield phases before changelog
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 02:16:24 +0200] rev 50513
store: yield phases before changelog Creating the `changelog.i` file make the repository usable, so dealing with phase earlier seems better.
Sun, 21 May 2023 02:15:04 +0200 store: make `walk` return an entry for phase if requested so
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 02:15:04 +0200] rev 50512
store: make `walk` return an entry for phase if requested so Instead of having dedicated code in the streamclone code, we should have the store deal with advertising the data it contains.
Mon, 22 May 2023 10:20:24 +0100 cli: add a test of `hg debugnodemap --manifest`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 22 May 2023 10:20:24 +0100] rev 50511
cli: add a test of `hg debugnodemap --manifest` this is a new option that's not tested yet
Thu, 18 May 2023 19:37:12 +0100 cli: fix spelling in `debugnodemap` error messages
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 18 May 2023 19:37:12 +0100] rev 50510
cli: fix spelling in `debugnodemap` error messages
Thu, 18 May 2023 18:45:54 +0100 cli: make debugnodemap capable of inspecting an arbitrary nodemap
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 18 May 2023 18:45:54 +0100] rev 50509
cli: make debugnodemap capable of inspecting an arbitrary nodemap This lets us inspect the manifest nodemap and individual directory nodemaps when treemanifest is used.
Thu, 18 May 2023 17:53:17 +0100 rust: mostly avoid streaming zstd decompression
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 18 May 2023 17:53:17 +0100] rev 50508
rust: mostly avoid streaming zstd decompression Streaming ZStd decompression seems slightly slower, and the API we use makes it very inconvenient to re-use the decompression context. Instead of using that, use the buffer-backed version, because we can give a reasonable-ish size estimate.
Thu, 18 May 2023 17:25:18 +0100 rust: in zstd decompression, avoid a useless vec initialization
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 18 May 2023 17:25:18 +0100] rev 50507
rust: in zstd decompression, avoid a useless vec initialization
Thu, 18 May 2023 17:18:54 +0100 rust: speed up zstd decompression by re-using the decompression context
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 18 May 2023 17:18:54 +0100] rev 50506
rust: speed up zstd decompression by re-using the decompression context Admittedly, zstd is already pretty fast, but this change makes it a bit faster yet: it saves ~5% of time it takes to read our large repo. The actual motivating use case is treemanifest: in treemanifest we end up reading *lots* of small directories, and many of them need decompression, and there the saving for [rhg files] is >10%. (which also seems unreasonable, we should probably keep things uncompressed more)
Tue, 16 May 2023 10:44:25 +0200 store: rename `topfiles` to `top_entries`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 16 May 2023 10:44:25 +0200] rev 50505
store: rename `topfiles` to `top_entries` The method is now returning StoreEntries let us rename the method for clarity.
Tue, 16 May 2023 10:43:36 +0200 store: rename `datafiles` to `data_entries`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 16 May 2023 10:43:36 +0200] rev 50504
store: rename `datafiles` to `data_entries` The method is now returning StoreEntries let us rename the method for clarity.
Mon, 15 May 2023 22:03:39 +0200 store: use boolean property for upgrade's matchrevlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:03:39 +0200] rev 50503
store: use boolean property for upgrade's matchrevlog
Mon, 15 May 2023 22:11:27 +0200 store: use the new boolean property in `upgrade`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:11:27 +0200] rev 50502
store: use the new boolean property in `upgrade`
Mon, 15 May 2023 22:11:02 +0200 store: use the new boolean property in `remotefilelogserver`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:11:02 +0200] rev 50501
store: use the new boolean property in `remotefilelogserver`
Mon, 15 May 2023 22:10:33 +0200 store: use the boolean property in `repair_issue6528`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:10:33 +0200] rev 50500
store: use the boolean property in `repair_issue6528`
Mon, 15 May 2023 22:10:04 +0200 store: use the new boolean property in `narrow`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:10:04 +0200] rev 50499
store: use the new boolean property in `narrow`
Mon, 15 May 2023 22:09:43 +0200 store: use the boolean property in `store`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:09:43 +0200] rev 50498
store: use the boolean property in `store`
Mon, 15 May 2023 22:09:15 +0200 store: introduce boolean property for revlog type
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 22:09:15 +0200] rev 50497
store: introduce boolean property for revlog type This will avoid exposing implementation details to more generic code.
Mon, 15 May 2023 09:03:15 +0200 store: issue a single entry for each revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:03:15 +0200] rev 50496
store: issue a single entry for each revlog We now yield a single entry, with data about each files involved. This help to simplify multiple code using this and it will help to further simplify and fixes the streaming code.
Mon, 15 May 2023 09:02:59 +0200 store: rename `unencoded_path` to `entry_path` for StoreEntry
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:02:59 +0200] rev 50495
store: rename `unencoded_path` to `entry_path` for StoreEntry This remove the ambiguity with StoreFile and make sure use code will be using the right API.
Mon, 15 May 2023 09:02:43 +0200 store: do the revlog matching on entry directly
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:02:43 +0200] rev 50494
store: do the revlog matching on entry directly This is the last blocker to safely merge the revlog files in a single entry.
Mon, 15 May 2023 09:02:26 +0200 store: split the wrapping of encodedstore between _wrap and datafiles
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:02:26 +0200] rev 50493
store: split the wrapping of encodedstore between _wrap and datafiles The `datafiles` method of `basicstore` is doing a lot of work that should be done on decoded filename. So we now wrap `_walk` to do the decoding, and less work in `datafiles`. This is necessary to make sure file from the same revlog can be grouped together.
Mon, 15 May 2023 09:02:09 +0200 store: introduce a main_file_path method for revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:02:09 +0200] rev 50492
store: introduce a main_file_path method for revlog This help code that need to point revlog to an index file. This is put to use in the upgrade code.
Mon, 15 May 2023 09:01:53 +0200 upgrade: actually use StoreEntry API to create revlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:01:53 +0200] rev 50491
upgrade: actually use StoreEntry API to create revlog Lets make use of the semanctic of the object we are passed.
Mon, 15 May 2023 09:01:36 +0200 upgrade: use StoreEntry object in upgrade
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:01:36 +0200] rev 50490
upgrade: use StoreEntry object in upgrade We will make more use of the API in the next changeset, but just moving to use entry is a significant change for the engine codebase.
Mon, 15 May 2023 09:01:18 +0200 upgrade: drop a quick fix that is not longer necessary
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:01:18 +0200] rev 50489
upgrade: drop a quick fix that is not longer necessary We won't issue bad revlog from topfile anymore.
Mon, 15 May 2023 09:01:02 +0200 store: use StoreEntry API instead of parsing filename in largefile
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:01:02 +0200] rev 50488
store: use StoreEntry API instead of parsing filename in largefile This is more explicit and more robust.
Mon, 15 May 2023 09:00:46 +0200 store: use StoreEntry API instead of parsing filename when listing manifestlog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:00:46 +0200] rev 50487
store: use StoreEntry API instead of parsing filename when listing manifestlog This is more explicit and more robust.
Mon, 15 May 2023 09:00:28 +0200 store: use StoreEntry API instead of parsing filename when fixing issue6528
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:00:28 +0200] rev 50486
store: use StoreEntry API instead of parsing filename when fixing issue6528 This is more explicit and more robust. We also introduce a small output change as it make things simpler and this is a affecting a debug-command.
Mon, 15 May 2023 09:00:13 +0200 store: use StoreEntry API instead of parsing filename in remotefilelog
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 09:00:13 +0200] rev 50485
store: use StoreEntry API instead of parsing filename in remotefilelog This is more explicit and more robust.
Mon, 15 May 2023 08:59:56 +0200 store: use StoreEntry API instead of parsing filename in narrow
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:59:56 +0200] rev 50484
store: use StoreEntry API instead of parsing filename in narrow This is more explicit and more robust.
Mon, 15 May 2023 08:59:38 +0200 store: add a `target_id` attribute on RevlogStoreEntry
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:59:38 +0200] rev 50483
store: add a `target_id` attribute on RevlogStoreEntry This hold the "target" (file, directory, etc) of a revlog. Having this available will help a lot of code to avoid direct file path access.
Mon, 15 May 2023 08:59:22 +0200 store: actually tag tree manifest revlogs as manifest revlogs
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:59:22 +0200] rev 50482
store: actually tag tree manifest revlogs as manifest revlogs It turn out we have been mislabeling these for a long while. This is now fixed.
Mon, 15 May 2023 08:59:06 +0200 store: also gather files per revlog in `topfiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:59:06 +0200] rev 50481
store: also gather files per revlog in `topfiles` This conclude out revlog gathering.
Mon, 15 May 2023 08:58:49 +0200 store: also group files by revlog in fncache version of datafiles
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:58:49 +0200] rev 50480
store: also group files by revlog in fncache version of datafiles One more step.
Mon, 15 May 2023 08:58:33 +0200 store: add logic to group revlog file together
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:58:33 +0200] rev 50479
store: add logic to group revlog file together For now each file get its own entry, this will help stopping this, soon™. We use such gathering in the `basicstore` code.
Mon, 15 May 2023 08:58:16 +0200 store: change `_walk` return to `(filename, (type, size))`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:58:16 +0200] rev 50478
store: change `_walk` return to `(filename, (type, size))` If we are to group file per revlog, having the filename as the "main key" will be useful. This change will make the following changes clearer.
Mon, 15 May 2023 08:58:01 +0200 store: lazily get file size on demand for the fncache case
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:58:01 +0200] rev 50477
store: lazily get file size on demand for the fncache case We don't have the information in the first place, so we can avoid querying the file system inconditionnaly for use case we don't needs it. This change requires the StoreFile class to be passed a vfs to retrieve the file_size if needed. In the non-fncache case, we already have the information from file system walking, so we keep it and use it.
Mon, 15 May 2023 08:57:45 +0200 store: only access is_volatile information through the file object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:57:45 +0200] rev 50476
store: only access is_volatile information through the file object This make sure other code only access this information through the proper API, and it prepare for store entries to be able to agregate multiple files.
Mon, 15 May 2023 08:57:30 +0200 store: only access file_size information through the file object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:57:30 +0200] rev 50475
store: only access file_size information through the file object This make sure other code only access this information through the proper API, and it prepare for store entries to be able to agregate multiple files.
Mon, 15 May 2023 08:57:14 +0200 store: have custom init for entries class
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:57:14 +0200] rev 50474
store: have custom init for entries class This will get useful to add special processing later in this series.
Mon, 15 May 2023 08:56:56 +0200 store: use specialized class for store entries
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:56:56 +0200] rev 50473
store: use specialized class for store entries We introduce two different classes for revlog and other entries. For now, we still have multiple entry for the same revlog, but we will work toward grouping the different file in a single entry in this series. Having the distinction is a step toward this goal.
Mon, 15 May 2023 08:56:40 +0200 store: introduce a EntryFile object to actually access file info
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:56:40 +0200] rev 50472
store: introduce a EntryFile object to actually access file info For now a StoreEntry match a single file, but the goal is to eventually combine multiple file in a higher level Entry, so we need to introduce this distinction and use it first.
Mon, 15 May 2023 08:56:23 +0200 store: use a StoreEntry object instead of tuple for store files
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:56:23 +0200] rev 50471
store: use a StoreEntry object instead of tuple for store files We want to make the store return more semantic information instead of a stream of file path. To achieve this, we start with adding a simple object that hold the same information as the tuple it replace, and do a simple update to the user code to fetch and use the same information. From there, we will be able to iteratively upgrade the codebase toward better objects.
Mon, 15 May 2023 08:56:08 +0200 store: no longer explicitly mark the splitted index as ignored
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:56:08 +0200] rev 50470
store: no longer explicitly mark the splitted index as ignored Since the fncache is going to automatically recognised it as non "normal" revlog file, we don't need to explicitly make it ignored.
Mon, 15 May 2023 08:55:52 +0200 store: cleanup what is recognized as a revlog file
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:55:52 +0200] rev 50469
store: cleanup what is recognized as a revlog file The temporary file from `censor` are not relevant to the store as they are just temporary. So let `fncache` and `datafiles` forget about them.
Mon, 15 May 2023 08:55:34 +0200 store: only inclure revlog related file in `datafiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:55:34 +0200] rev 50468
store: only inclure revlog related file in `datafiles` This is a "reading" equivalent of the previous patches (see that patch for details).
Mon, 15 May 2023 08:55:19 +0200 store: do not record file that are not part of a revlog in fncache
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:55:19 +0200] rev 50467
store: do not record file that are not part of a revlog in fncache The fncache exist to list file to copy/stream when cloning a repository, it should only contains file that are relevant for a revlog in such case. For example, temporary file are not relevant. So we now skip the addiction of non-relevant file to the fn-cache in the first place.
Mon, 15 May 2023 08:55:02 +0200 revlog-split: expand the some test to cover the success case too
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:55:02 +0200] rev 50466
revlog-split: expand the some test to cover the success case too It seems useful to double check the case of a transaction successfully committed before trying the one with transaction abort.
Mon, 15 May 2023 08:54:47 +0200 transaction: use a ".bck" extension for all backup file
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:54:47 +0200] rev 50465
transaction: use a ".bck" extension for all backup file There are too much code in Mercurial that assume file function from extension. Keeping the original extension when doing backup is just creating confusion (for exemple, backup of revlog's confused with new version revlogs). So we change the backup name from now on to be explicilty backup file and prevent this kind of problem. (note that repository using fncache is less affected (but still affected) by this kind of problem as the backup are not listed in the fncache).
Mon, 15 May 2023 08:54:33 +0200 repair-issue6528: remove a now useless continue
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 15 May 2023 08:54:33 +0200] rev 50464
repair-issue6528: remove a now useless continue The condition for that continue have been excplicly filtered out of the `files` list a handful of line earlier.
Tue, 09 May 2023 11:35:50 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 May 2023 11:35:50 +0200] rev 50463
branching: merge stable into default
Fri, 28 Apr 2023 12:12:42 +0200 stabletailgraph: clarify omission of linear parts in test sorts
pacien <pacien.trangirard@pacien.net> [Fri, 28 Apr 2023 12:12:42 +0200] rev 50462
stabletailgraph: clarify omission of linear parts in test sorts Those are not interesting and are collapsed using globs. Only the tagged nodes are interesting.
Fri, 28 Apr 2023 11:50:49 +0200 stabletailgraph: omit uninteresting linear parts in test log
pacien <pacien.trangirard@pacien.net> [Fri, 28 Apr 2023 11:50:49 +0200] rev 50461
stabletailgraph: omit uninteresting linear parts in test log The test uses tags for the nodes of interest. There is no need to print the linear parts which exist only to force the rank.
Sun, 16 Apr 2023 22:49:42 +0200 stabletailgraph: fix typo in test
pacien <pacien.trangirard@pacien.net> [Sun, 16 Apr 2023 22:49:42 +0200] rev 50460
stabletailgraph: fix typo in test
Sun, 16 Apr 2023 22:17:30 +0200 stabletailgraph: fix terminology in doc
pacien <pacien.trangirard@pacien.net> [Sun, 16 Apr 2023 22:17:30 +0200] rev 50459
stabletailgraph: fix terminology in doc
Fri, 28 Apr 2023 16:28:43 +0200 perf: introduce a `perf::stream-locked-section` command
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Apr 2023 16:28:43 +0200] rev 50458
perf: introduce a `perf::stream-locked-section` command This command benchmark the initial part of a stream clone, where the repository is locked.
Wed, 03 May 2023 18:17:32 -0300 transaction: tr._names are actually bytes, use byte string to join them
Anton Shestakov <av6@dwimlabs.net> [Wed, 03 May 2023 18:17:32 -0300] rev 50457
transaction: tr._names are actually bytes, use byte string to join them Looks like this is never checked in the tests? But trying e.g. `print(tr)` by hand before this change would give: TypeError: sequence item 0: expected str instance, bytes found Looks like tr._names are always bytes (although this isn't actually enforced, but maybe at some point it will at least be type checked e.g. by pytype).
Mon, 17 Apr 2023 00:27:46 +0200 nix: add nix-defined package and devel env (flake)
pacien <pacien.trangirard@pacien.net> [Mon, 17 Apr 2023 00:27:46 +0200] rev 50456
nix: add nix-defined package and devel env (flake) This adds a Nix Flake which defines: - package recipies to build and run Mercurial (C, C+Rust variants), - a meta package to run the test suite in an isolated sandbox, - a development environment with some tools (notably Python and the Black formatter, pinned to match the CI). Python is pinned to the recommended version. The Rust toolchain is a fairly recent one provided by the Nixpkgs channel. It is not yet pinned to the same version as the "reference" Debian package, but this does not seem to cause any issue. Example usage of local commands are provided in the `flake.nix` file. Once merged, it should also be possible to pull and run directly from the source repository directly with something like: `nix run hg+https://foss.heptapod.net/mercurial/mercurial-devel?ref=TOPIC&dir=contrib/nix' -- version`
Thu, 20 Apr 2023 16:55:19 +0200 hgignore: ignore nix result symlink
pacien <pacien.trangirard@pacien.net> [Thu, 20 Apr 2023 16:55:19 +0200] rev 50455
hgignore: ignore nix result symlink
Sun, 16 Apr 2023 23:48:24 +0200 tests: add test ignore list for nix
pacien <pacien.trangirard@pacien.net> [Sun, 16 Apr 2023 23:48:24 +0200] rev 50454
tests: add test ignore list for nix Some tests cannot run properly in the nix sandbox. This adds a list of tests to ignore when running in that context.
Tue, 21 Mar 2023 14:29:35 +0000 ui: keep the progress bar around when writing if stdout is not a tty
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Mar 2023 14:29:35 +0000] rev 50453
ui: keep the progress bar around when writing if stdout is not a tty
Fri, 10 Mar 2023 11:20:18 +0000 tests: in filterpyflakes, tolerate non-ascii file contents
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 10 Mar 2023 11:20:18 +0000] rev 50452
tests: in filterpyflakes, tolerate non-ascii file contents
Mon, 30 Jan 2023 13:37:48 +0000 comments: fix spelling
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 30 Jan 2023 13:37:48 +0000] rev 50451
comments: fix spelling
Fri, 07 Apr 2023 14:23:12 +0200 heptapod-ci: display python version
Axel Prel <axel.prel@xcg-consulting.fr> [Fri, 07 Apr 2023 14:23:12 +0200] rev 50450
heptapod-ci: display python version it will be useful to debug in the CI
Tue, 18 Apr 2023 11:55:23 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 18 Apr 2023 11:55:23 +0200] rev 50449
branching: merge stable into default
Fri, 14 Apr 2023 19:59:44 +0100 sha1dc: Make sure SHA1DC_BIGENDIAN is set on Darwin/PowerPC
Sevan Janiyan <venture37@geeklan.co.uk> [Fri, 14 Apr 2023 19:59:44 +0100] rev 50448
sha1dc: Make sure SHA1DC_BIGENDIAN is set on Darwin/PowerPC __BYTE_ORDER__ is not defined on old toolchains so sha1dc gets built in little endian mode on a big endian platform, hilarity ensues. Tested on Mac OS X Tiger 10.4.
Sat, 13 Apr 2019 03:44:55 +0200 hidden: add support to explicitly access hidden changesets with SSH peers
Manuel Jacob <me@manueljacob.de> [Sat, 13 Apr 2019 03:44:55 +0200] rev 50447
hidden: add support to explicitly access hidden changesets with SSH peers This implements support for using --remote-hidden with an SSH server. The remote `hg serve --stdio` call is passed the `--hidden` flag as a request to access hidden changesets. This approach has benefits similar to the one we used for HTTP peers. It * works around the lack of global parameters in wire protocol v1, * reuses the `--hidden` flag (that does not use the wireproto), and * can be safely ignored by older client (fitting the best effort contract). Same as for HTTP, the feature is experimental so we have all the room we needs to update the implementation in the future if deemed necessary. The SSH version of the `--remote-hidden` config uses the same configuration as the HTTP support to control the access to this feature. The name of the user running the command is used for the checking. Test written by Pierre-Yves David.
Sat, 13 Apr 2019 03:44:47 +0200 hidden: support passing --hidden with `serve --stdio`
Manuel Jacob <me@manueljacob.de> [Sat, 13 Apr 2019 03:44:47 +0200] rev 50446
hidden: support passing --hidden with `serve --stdio` This currently has no effect since the server code will filter the repository again. However, it is clearer to put this change in its own changeset. This will mostly impact ssh peers, clients being now able to pass --hidden when spawning the server. See the next changeset for details on how this is going to be used.
Sat, 13 Apr 2019 01:53:59 +0200 hgweb: move ismember from `hgweb.common` to `scmutil`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 13 Apr 2019 01:53:59 +0200] rev 50445
hgweb: move ismember from `hgweb.common` to `scmutil` To implement hidden access control for other protocol than http, we need code outside of hgweb to access this logic.
Fri, 05 Apr 2019 01:17:15 +0200 hidden: add support for --remote-hidden to HTTP peer
Manuel Jacob <me@manueljacob.de> [Fri, 05 Apr 2019 01:17:15 +0200] rev 50444
hidden: add support for --remote-hidden to HTTP peer Test written by Pierre-Yves David.
Sat, 13 Apr 2019 02:01:26 +0200 hidden: add support to explicitly access hidden changesets via HTTP
Manuel Jacob <me@manueljacob.de> [Sat, 13 Apr 2019 02:01:26 +0200] rev 50443
hidden: add support to explicitly access hidden changesets via HTTP We now detect hidden access request and validate them while handling HTTP wireprotocol command. This changeset only introduces server support. Client support is added in a subsequent changeset. The mechanism we use for the HTTP wireprotocol is the same as the one used to lift filtering for hgweb. The use of the global `access-hidden` parameter in the http url is a simple and effective approach that * works around the lack of global parameters in wire protocol v1, * reuses the mechanism used for hgweb (that does not use the wireproto), and * can be safely ignored by older client (fitting the best effort contract). The feature is still experimental, so we can easily update the implementation details in the future. However, landing a first implementation now will help test the feature in the wild and iterate on alternative implementations if deemed necessary.
Sat, 13 Apr 2019 02:00:20 +0200 hidden: support for explicitly accessing hidden changesets in wireproto server
Manuel Jacob <me@manueljacob.de> [Sat, 13 Apr 2019 02:00:20 +0200] rev 50442
hidden: support for explicitly accessing hidden changesets in wireproto server This installs the basic infrastructure to be able to access hidden changeset through the wireprotocol. Each wireprotocol server still needs a way to define how the feature is triggered.
Fri, 05 Apr 2019 12:11:52 +0200 hidden: add support for --remote-hidden to localpeer
Manuel Jacob <me@manueljacob.de> [Fri, 05 Apr 2019 12:11:52 +0200] rev 50441
hidden: add support for --remote-hidden to localpeer
Thu, 04 Apr 2019 18:07:30 +0200 pull: add --remote-hidden option and pass it through peer creation
Manuel Jacob <me@manueljacob.de> [Thu, 04 Apr 2019 18:07:30 +0200] rev 50440
pull: add --remote-hidden option and pass it through peer creation This option will allow to pull changesets that are hidden on the remote. This is useful when looking into a changeset’s evolution history, resolving evolution instability or mirroring a repository. The option is best effort and will only affect the pull when it can. The option will be ignored when it cannot be honored. Support for each type of peer is yet to be implemented. They currently all warn about lack of support. The warning code will get removed as peers gain support for this option. The option is still experimental, so we will have freedom to update the UI or implementation before it graduates out of experimental. Based on a changeset by Pierre-Yves David, which added the option.
Sat, 13 Apr 2019 01:17:56 +0200 hgweb: add support to explicitly access hidden changesets
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 13 Apr 2019 01:17:56 +0200] rev 50439
hgweb: add support to explicitly access hidden changesets This changeset adds a "global" `access-hidden` argument to hgweb. This argument lift the "hidden" filtering. This means the request has access to hidden (eg: obsolete) changesets. Secret changesets remains filtered. This feature has multiple applications. The first main use case is to allow the hgweb interface to display more obsolescence related data, such as the Anton Shestakov work to add `obslog` support to hgweb. The second foreseen usecase is support for a `--remote-hidden` argument to `hg pull` and `hg clone`. This flag will make it possible to retrieve hidden (typically obsolete) changeset under some conditions. This is useful when digging up obsolescence history or when doing full mirroring. More on this feature coming in later changesets. To avoid exposing information by mistake, access to this feature is currently controlled with the `experimental.server.allow-hidden-access` config option. The option works the same way as `web.allow-push`. The current default is to not allow any hidden access. However we might change it before the feature stop being experimental.
Tue, 14 Mar 2023 05:30:34 +0100 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Mar 2023 05:30:34 +0100] rev 50438
clone-bundles: add an option to generate bundles in the background This is what the "on-change" version have been doing from the start, it seems useful to also offer this option in the command.
Tue, 14 Mar 2023 05:09:16 +0100 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Mar 2023 05:09:16 +0100] rev 50437
clone-bundles: add a command to clear all bundles
Tue, 14 Mar 2023 04:46:53 +0100 clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Mar 2023 04:46:53 +0100] rev 50436
clone-bundles: add more test cases for automatic generation See inline documentation for details.
Mon, 13 Mar 2023 19:16:19 +0100 clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Mar 2023 19:16:19 +0100] rev 50435
clone-bundles: introduce a command to refresh bundle This command allows for a different mode than the one attached to the transation. It might fit some hosting setup better.
Mon, 13 Mar 2023 04:18:45 +0100 clone-bundles: add a configuration to control auto-generation on changes
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Mar 2023 04:18:45 +0100] rev 50434
clone-bundles: add a configuration to control auto-generation on changes We are about to introduce a "manual" way to deal with automatic clone management but running a command using some internal API. The first step is to introduce a way to control the "on changes" behavior.
Mon, 13 Mar 2023 18:44:52 +0100 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Mar 2023 18:44:52 +0100] rev 50433
clone-bundles: also control automation based on absolute number of revisions
Mon, 13 Mar 2023 20:01:42 +0100 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Mar 2023 20:01:42 +0100] rev 50432
clone-bundles: only regenerate the clone bundle when cached ration is low See inline documentation for details.
Tue, 24 Mar 2020 03:25:33 +0100 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 24 Mar 2020 03:25:33 +0100] rev 50431
clone-bundles: garbage collect older bundle when generating new ones See inline documentation for details.
Mon, 13 Mar 2023 17:34:18 +0100 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Mar 2023 17:34:18 +0100] rev 50430
clone-bundles: add a basic first version of automatic bundle generation See inline documentation for details.
Fri, 14 Apr 2023 10:41:40 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 14 Apr 2023 10:41:40 +0200] rev 50429
branching: merge stable into default
Wed, 12 Apr 2023 00:57:01 +0200 tests: automatically glob the discovery timing information
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Apr 2023 00:57:01 +0200] rev 50428
tests: automatically glob the discovery timing information Time is not stable in tests.
Thu, 06 Apr 2023 11:41:51 +0100 rhg: support `status --print0`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 06 Apr 2023 11:41:51 +0100] rev 50427
rhg: support `status --print0` This seems very easy to support, and useful because it makes it possible to parse the [hg status] output even if the user creates files with '\n' characters by accident.
Thu, 30 Mar 2023 22:22:44 +0200 stabletailgraph: implement stable-tail sort
pacien <pacien.trangirard@pacien.net> [Thu, 30 Mar 2023 22:22:44 +0200] rev 50426
stabletailgraph: implement stable-tail sort This adds the computation of the "stable-tail sort", an incremental node sorting method. It is a stepping stone for the implementation of faster label discovery (for example for obs markers) and more caching.
Wed, 05 Apr 2023 16:09:08 +0200 heptapod: add `.gitattributes` file to improve language detection
Raphaël Gomès <rgomes@octobus.net> [Wed, 05 Apr 2023 16:09:08 +0200] rev 50425
heptapod: add `.gitattributes` file to improve language detection I am fully aware of the irony.
Fri, 07 Apr 2023 15:42:49 +0200 peer: rename makepeer() → _make_peer()
Manuel Jacob <me@manueljacob.de> [Fri, 07 Apr 2023 15:42:49 +0200] rev 50424
peer: rename makepeer() → _make_peer() In httppeer and sshpeer, there previously were makepeer() and make_peer(), which was confusing. Therefore, this changeset renames one of the functions. makepeer() was the internal function called by make_peer() and some debug command. This function is renamed to _make_peer().
Tue, 04 Apr 2023 11:58:35 +0200 rust: configure MSRV in Clippy
Georges Racinet <georges.racinet@octobus.net> [Tue, 04 Apr 2023 11:58:35 +0200] rev 50423
rust: configure MSRV in Clippy This setting makes Clippy never apply lints that are meant for later versions. In case the target precise toolchain is the one running, it does not make a difference, but this gives us a machine-parseable specification that is pretty standard. The README and `hg help rust` are updated to state that `clippy.toml` is the single source of truth about that, also lifting a minor ambiguity: it is fine if the MSRV is lagging behind the version in Debian testing.
Tue, 04 Apr 2023 11:47:32 +0200 rust-readme: mentioned that format check is enforced by CI
Georges Racinet <georges.racinet@octobus.net> [Tue, 04 Apr 2023 11:47:32 +0200] rev 50422
rust-readme: mentioned that format check is enforced by CI
Tue, 04 Apr 2023 11:46:26 +0200 rust-readme: mentioning clippy
Georges Racinet <georges.racinet@octobus.net> [Tue, 04 Apr 2023 11:46:26 +0200] rev 50421
rust-readme: mentioning clippy especially since there is a CI check for it.
Tue, 04 Apr 2023 11:44:43 +0200 rust-readme: rst fixes
Georges Racinet <georges.racinet@octobus.net> [Tue, 04 Apr 2023 11:44:43 +0200] rev 50420
rust-readme: rst fixes
Mon, 03 Apr 2023 16:29:30 +0200 rustdoc: nodemap doc refreshing
Georges Racinet <georges.racinet@octobus.net> [Mon, 03 Apr 2023 16:29:30 +0200] rev 50419
rustdoc: nodemap doc refreshing Not pretending to be comprehensive. - correcting some inconsistencies - adding a few missing doc-comments - adding more cross references (in some cases it's right beside the current documentation item, but it will nevertheless also be useful, because `rustdoc` will warn us if inconsistencies arise).
Mon, 03 Apr 2023 16:14:34 +0200 rustdoc: fixed or introduced crossrefs in nodemap.rs
Georges Racinet <georges.racinet@octobus.net> [Mon, 03 Apr 2023 16:14:34 +0200] rev 50418
rustdoc: fixed or introduced crossrefs in nodemap.rs
Mon, 03 Apr 2023 16:03:41 +0200 rustdoc: summary line for hg_path_to_os_string
Georges Racinet <georges.racinet@octobus.net> [Mon, 03 Apr 2023 16:03:41 +0200] rev 50417
rustdoc: summary line for hg_path_to_os_string The main motivation of this change is to avoid the TODO being the summary line, even though this leads to a pretty obvious summary. Then doc-comments for the other functions are introduced for consistency.
Mon, 03 Apr 2023 15:58:36 +0200 rustdoc: wording for checkexec
Georges Racinet <georges.racinet@octobus.net> [Mon, 03 Apr 2023 15:58:36 +0200] rev 50416
rustdoc: wording for checkexec Notably separating the summary line for correct display at module level.
Mon, 03 Apr 2023 15:32:39 +0200 rustdoc: fixed warnings about links
Georges Racinet <georges.racinet@octobus.net> [Mon, 03 Apr 2023 15:32:39 +0200] rev 50415
rustdoc: fixed warnings about links This is the minimal fix making those that actually were supposed to be links to work (including in private items).
Thu, 30 Mar 2023 12:21:38 +0200 rust-changelog: introduce ChangelogEntry parent entries accessors
Georges Racinet <georges.racinet@octobus.net> [Thu, 30 Mar 2023 12:21:38 +0200] rev 50414
rust-changelog: introduce ChangelogEntry parent entries accessors Straightforwards now that lifetimes are explicit in `RevlogEntry` parent accessors.
Thu, 30 Mar 2023 12:20:53 +0200 rust-revlog: fix lifetime problem for RevlogEntry parent entries accessors
Georges Racinet <georges.racinet@octobus.net> [Thu, 30 Mar 2023 12:20:53 +0200] rev 50413
rust-revlog: fix lifetime problem for RevlogEntry parent entries accessors Without this, the lifetime of the result is equated to the lifetime of the `self` reference, preventing callers, e.g., to take a `RevlogEntry` and return its `p1_entry()`, as it looks like returning something that does not outlive the *reference to* the `RevlogEntry`.
Thu, 30 Mar 2023 12:14:57 +0200 rust-revlog: explicit naming for `RevlogEntry` lifetime
Georges Racinet <georges.racinet@octobus.net> [Thu, 30 Mar 2023 12:14:57 +0200] rev 50412
rust-revlog: explicit naming for `RevlogEntry` lifetime This matches what has been done in `revlog::changelog::ChangelogRevisionData`, and has the advantage of making things clearer when we introduce other, shorter lived lifetimes.
Wed, 29 Mar 2023 20:50:42 +0200 rust-changelog: introducing an intermediate `ChangelogEntry`
Georges Racinet <georges.racinet@octobus.net> [Wed, 29 Mar 2023 20:50:42 +0200] rev 50411
rust-changelog: introducing an intermediate `ChangelogEntry` Before this change, client code needing to extract, e.g, the Node ID and the description from a changeset had no other choice than calling both `entry_for_rev()` and `data_for_rev()`. This duplicates some (limited) computation, and more importantly imposes bad hygiene for client code: at some point of developement, the client code would have to pass over both entry and data in its internal layers, which at some point of development would raise the question whether they are consistent. We introduce the intermediate `ChangelogEntry` from which both conversion to the generic `RevlogEntry` and extraction of `ChangelogRevisionData` are possible. It might grow some convenience methods in the future. We keep the `data_for_rev()` method of `Changelog` for compatibility, pointing users at the more powerful alternative.
Wed, 29 Mar 2023 21:03:39 +0200 rust-changelog: added a test for `NULL_REVISION` special case
Georges Racinet <georges.racinet@octobus.net> [Wed, 29 Mar 2023 21:03:39 +0200] rev 50410
rust-changelog: added a test for `NULL_REVISION` special case The result is due to `Revlog.get_rev_data()` returning an empty byte string for `NULL_REVISION`, followed by special case for emtpty byte strings in `ChangelogRevisionData::new()`.
Wed, 29 Mar 2023 20:24:58 +0200 rust-changelog: made doc-comments more consistent
Georges Racinet <georges.racinet@octobus.net> [Wed, 29 Mar 2023 20:24:58 +0200] rev 50409
rust-changelog: made doc-comments more consistent The most important is the one about `data_for_rev`, that looked like a copy-paste leftover (got me confused first time I read this code, before I actually learned there were both `Entry` and RevisionData`. In the comment for the `struct`, "changelog" was probably more about the format in general (as documented elsewhere) than as an identifier. Some of the "Return something" had "of", half had "for".
Tue, 21 Mar 2023 20:47:30 -0400 extras: re-use Projection from jaraco.collections
Jason R. Coombs <jaraco@jaraco.com> [Tue, 21 Mar 2023 20:47:30 -0400] rev 50408
extras: re-use Projection from jaraco.collections
Tue, 21 Mar 2023 17:21:45 -0400 extras: expose 'retained_extras' for extensions to extend
Jason R. Coombs <jaraco@jaraco.com> [Tue, 21 Mar 2023 17:21:45 -0400] rev 50407
extras: expose 'retained_extras' for extensions to extend
Tue, 21 Mar 2023 17:17:09 -0400 extras: extract function for projecting names from a gettable object
Jason R. Coombs <jaraco@jaraco.com> [Tue, 21 Mar 2023 17:17:09 -0400] rev 50406
extras: extract function for projecting names from a gettable object
Sat, 25 Mar 2023 23:02:33 +0100 hgweb: add "children" into the JSON template for a changeset
Manuel Jacob <me@manueljacob.de> [Sat, 25 Mar 2023 23:02:33 +0100] rev 50405
hgweb: add "children" into the JSON template for a changeset The children are shown in the HTML templates, so I don’t see a reason against including them in the JSON template as well.
Fri, 24 Mar 2023 10:43:47 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 24 Mar 2023 10:43:47 +0100] rev 50404
branching: merge stable into default
Wed, 22 Mar 2023 15:19:02 +0100 help: fix formatting for http config section
Julien Cristau <jcristau@mozilla.com> [Wed, 22 Mar 2023 15:19:02 +0100] rev 50403
help: fix formatting for http config section
Mon, 20 Mar 2023 23:16:14 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 20 Mar 2023 23:16:14 +0100] rev 50402
branching: merge stable into default
Thu, 09 Mar 2023 13:02:13 -0600 fastexport: rework newline logic
Felipe Contreras <felipe.contreras@gmail.com> [Thu, 09 Mar 2023 13:02:13 -0600] rev 50401
fastexport: rework newline logic Newlines should only be added when otherwise the stream would look weird without them (on blobs), therefore they are the exception. Flip the logic so they are added, not skipped.
Mon, 06 Mar 2023 11:27:57 +0000 encoding: avoid quadratic time complexity when json-encoding non-UTF8 strings
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 06 Mar 2023 11:27:57 +0000] rev 50400
encoding: avoid quadratic time complexity when json-encoding non-UTF8 strings Apparently the code uses "+=" with a bytes object, which is linear-time, so the whole encoding is quadratic-time. This patch makes us use a bytearray object, instead, which has a(n amortized-)constant-time append operation. The encoding is still not particularly fast, but at least a 10MB file takes tens of seconds, not many hours to encode.
Wed, 08 Mar 2023 11:01:11 +0100 bundle: prevent implicite bundling of internal changeset
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 11:01:11 +0100] rev 50399
bundle: prevent implicite bundling of internal changeset Now that the two mains source of on-disk bundle are preventing the inclusion of internal changesets in their bundling. We can add a lower level check that would prevent any other leakage of internal-phase changesets. We keep the door open to some usage, like the temporary bundle using during strip for example.
Fri, 10 Mar 2023 07:19:25 +0100 bundle: abort if the user request bundling of internal changesets
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 07:19:25 +0100] rev 50398
bundle: abort if the user request bundling of internal changesets See inline comments for details.
Fri, 10 Mar 2023 07:10:19 +0100 strip: do now include internal changeset in the strip backup
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 07:10:19 +0100] rev 50397
strip: do now include internal changeset in the strip backup See inline comment for details.
Wed, 08 Mar 2023 11:00:30 +0100 revset: add `_internal()` predicate
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 11:00:30 +0100] rev 50396
revset: add `_internal()` predicate This predicate help core code to select internal changeset (in the internal phase).
Fri, 10 Mar 2023 03:41:18 +0100 strip: drop the assert about bundled revision
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 03:41:18 +0100] rev 50395
strip: drop the assert about bundled revision This is working well, so no need for extract computation. See the previous changeset for the rationnal of still have these assert around for a short interval.
Thu, 09 Mar 2023 15:06:59 +0100 strip: explicitly compute the boundary of the backup bundle
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 09 Mar 2023 15:06:59 +0100] rev 50394
strip: explicitly compute the boundary of the backup bundle We want to make change to the set of backed up revision in a future changeset, we start with a change of the computation without any changes in the semantic to clarify later changeset. The could of costly assert are here to testify that the result is still correct. They will be removed in the next changesets, but I wanted them in this changeset to help in case someone bisect a regression to this changeset in the future.
Fri, 10 Mar 2023 04:04:10 +0100 outgoing: fix common-heads computation from `missingroots` argument
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 04:04:10 +0100] rev 50393
outgoing: fix common-heads computation from `missingroots` argument When initializing a `outgoing` object, the `common set` can be defined explicitly (with the `commonheads` argument`) or implicitly (with the missingroots arguments). It turns out the logic to compute `commonheads` from `missingroots` is buggy, as it does not consider the parents of enough changesets. Previously, it only considered parents of "missingroots` items, while it need to consider all parents of missing. Here is an example: F |\ C E | | B D |/ A If we use [E] as missing-roots, the missing set is [E, F], and the common-heads are [C, D]. However you cannot only consider the parent of [E] to find them, as [C] is not a parent of [E]. This already fix the bundle generated in one test, and it would prevent many other to misbehave with future change from this series.
Thu, 09 Mar 2023 01:26:04 +0100 bundle: include required phases when saving a bundle (issue6794)
Jason R. Coombs <jaraco@jaraco.com>, Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 09 Mar 2023 01:26:04 +0100] rev 50392
bundle: include required phases when saving a bundle (issue6794) We now properly computes and includes phases above secret in bundle, previously, they would be skipped, and then the code computing them would crash. Note that from this changeset, we also include the heads associated with the changegroup's "target" phase. This turned out to be necessary to ensure the movement of changeset included in the bundle, but already known locally. This explain why lines for "secret" heads appears in multiple tests.
Wed, 08 Mar 2023 17:33:33 +0100 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 17:33:33 +0100] rev 50391
bundle: add test bundling changeset in the "archived" phase Having this test highlight that phase bundling above secret is significantly broken. Fixes coming in the next changesets.
Wed, 08 Mar 2023 15:23:22 +0100 bundle: introduce a "v3" spec
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 15:23:22 +0100] rev 50390
bundle: introduce a "v3" spec This is a small update from "v2", we use the freshly out of experimental changelog version "03' format (alignment with bundle version is a coincidence) and we now bundle phases by default. We shall use v3 as the default bundle type later, when changegroup version '03' is a bit more established
Wed, 08 Mar 2023 15:43:23 +0100 bundle: add some phase boundary in the bundle type test case
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 15:43:23 +0100] rev 50389
bundle: add some phase boundary in the bundle type test case Same logic as the previous one, we want the tests to cover richer cases. It actually reveal a bug in `hg bundle foo.hg REMOTE` involving secret. So this is definitly not a bad idea.
Wed, 08 Mar 2023 15:21:39 +0100 bundle: expand the graph we us for bundletype/bundlespec tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 15:21:39 +0100] rev 50388
bundle: expand the graph we us for bundletype/bundlespec tests We are about to test more things, especially phase bundling, so we need a graph a bit more complex than a single node. The test "code" was a bit simplified in the process, but no test-semantic changes were made.
Tue, 07 Mar 2023 04:50:29 +0100 revset: include all non-public phases in _notpublic
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Mar 2023 04:50:29 +0100] rev 50387
revset: include all non-public phases in _notpublic We forgot up to update this when new phases were added.
Thu, 02 Mar 2023 04:11:29 +0100 dirstate: remove _actual_file_name methode
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Mar 2023 04:11:29 +0100] rev 50386
dirstate: remove _actual_file_name methode This is dead-code
Tue, 28 Feb 2023 15:00:26 -0500 revlog: add an exception hint when processing LFS flags without the extension
Matt Harbison <matt_harbison@yahoo.com> [Tue, 28 Feb 2023 15:00:26 -0500] rev 50385
revlog: add an exception hint when processing LFS flags without the extension It would be even better if this was either detected sooner, or the transaction completed (especially since the read/write processors aren't needed for the exchange). But this makes it easier for the user to resolve until that can be figured out.
Mon, 27 Feb 2023 23:12:23 -0500 tests: drop py36 conditionals in test-bad-extension.t
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 23:12:23 -0500] rev 50384
tests: drop py36 conditionals in test-bad-extension.t Since this is a `>=` test, it's really conditionalizing py27 content, which isn't a thing anymore.
Mon, 27 Feb 2023 23:11:05 -0500 tests: drop py36 conditionals in test-hook.t
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 23:11:05 -0500] rev 50383
tests: drop py36 conditionals in test-hook.t Since this is a `>=` test, it's really conditionalizing py27 content, which isn't a thing anymore.
Mon, 27 Feb 2023 22:51:18 -0500 tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 22:51:18 -0500] rev 50382
tests: drop py36 conditionals in test-http-bad-server.t Since this is a `>=` test, it's really conditionalizing py27 content, which isn't a thing anymore.
Mon, 27 Feb 2023 23:04:09 -0500 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 23:04:09 -0500] rev 50381
configitems: enable changegroup3 by default (unless using infinitepush) The LFS extension requires this, and if it isn't enabled on the client (or the LFS extension isn't loaded), a web client gets a 500 instead of a sensible error message. Now it gets a different (client) error, but maybe it can be handled more gracefully. c0f11347b107 indicates that treemanifest repos have this issue too. 29cfc474c5fd mentions gating this behind `experimental` so that the format could change, but that was 7 years ago and we now have an experimental `changegroup4` as well. We can keep this as a config for the next cycle in case someone runs into an unexpected problem, and then jettison it if the infinitepush bundle name changes are either acceptable as-is or can be created differently.
Mon, 27 Feb 2023 19:59:55 -0500 infinitepush: opt out of changegroup3 unless explicitly configured
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 19:59:55 -0500] rev 50380
infinitepush: opt out of changegroup3 unless explicitly configured This is currently a no-op, as changegroup3 is disabled by default. But when it is enabled, it changes the hash names of the bundle files. As I don't use this extension, I have no idea if that's OK or not. So keep the current default behavior until we can get more info from actual users, while allowing them to opt-in for testing purposes.
Wed, 01 Mar 2023 13:31:17 -0500 statichttprepo: unbyteify several IOError messages
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 13:31:17 -0500] rev 50379
statichttprepo: unbyteify several IOError messages Builtin errors generally want str messages.
Wed, 01 Mar 2023 13:11:51 -0500 statichttprepo: fix the vfs.join() method to match the base class definition
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 13:11:51 -0500] rev 50378
statichttprepo: fix the vfs.join() method to match the base class definition Flagged by PyCharm. The superclass implementation raised NotImplementedError.
Wed, 01 Mar 2023 12:38:36 -0500 mail: unbyteify the SMTPException message
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 12:38:36 -0500] rev 50377
mail: unbyteify the SMTPException message This is a subclass of OSError, which wants str instead of bytes.
Wed, 01 Mar 2023 12:37:05 -0500 mail: add a missing argument to properly override starttls
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 12:37:05 -0500] rev 50376
mail: add a missing argument to properly override starttls I didn't look into when this changed, but it was flagged by PyCharm.
Wed, 01 Mar 2023 11:53:31 -0500 crecord: switch a curses argument to bool to appease type checkers
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 11:53:31 -0500] rev 50375
crecord: switch a curses argument to bool to appease type checkers
Wed, 01 Mar 2023 11:45:57 -0500 grep: avoid reassigning byteskwargs to strkwargs
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 11:45:57 -0500] rev 50374
grep: avoid reassigning byteskwargs to strkwargs PyCharm flagged each of these `get()` calls with bytes. We still pass the bytes form to the formatter to avoid changing the API, until all callers can be changed.
Wed, 01 Mar 2023 11:33:57 -0500 cat: drop unnecessary internal roundtrip of kwargs
Matt Harbison <matt_harbison@yahoo.com> [Wed, 01 Mar 2023 11:33:57 -0500] rev 50373
cat: drop unnecessary internal roundtrip of kwargs PyCharm seems to stick with the type at the initial assignment, so it flagged the `get()` with a bytes key since the method argument has str keys. It wasn't a bug, but then the bytes form is otherwise unused, and converted back to str.
Thu, 04 May 2023 14:17:28 +0200 Added signature for changeset fc445f8abcf9 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 May 2023 14:17:28 +0200] rev 50369
Added signature for changeset fc445f8abcf9
Thu, 04 May 2023 14:17:19 +0200 Added tag 6.4.3 for changeset fc445f8abcf9 stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 May 2023 14:17:19 +0200] rev 50368
Added tag 6.4.3 for changeset fc445f8abcf9
Thu, 04 May 2023 14:16:07 +0200 relnotes: add 6.4.3 stable 6.4.3
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 May 2023 14:16:07 +0200] rev 50367
relnotes: add 6.4.3
Wed, 03 May 2023 00:16:38 +0200 backup: fix issue when the backup end up in a different directory stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 May 2023 00:16:38 +0200] rev 50366
backup: fix issue when the backup end up in a different directory Because of store encoding, we might end up with the backup in a different directory than the initial copy (for example if the backup path make it cross the 120 char limit). This can create crash, especially since 6.4 where backup are used during revlog split. Making sure the directory exists fixes these crash We added a test covering this case. Strictly speaking, this has always been broken, however the new code in 6.4 triggers it more easily.
Wed, 03 May 2023 00:12:34 +0200 vfsproxy: inherit the `createmode` attribute too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 03 May 2023 00:12:34 +0200] rev 50365
vfsproxy: inherit the `createmode` attribute too It is an important part of the API when creating directory. We will need it in the next changeset.
Tue, 02 May 2023 21:43:45 +0200 revlog: test more complex file pattern for revlog split stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 02 May 2023 21:43:45 +0200] rev 50364
revlog: test more complex file pattern for revlog split There have been a report of failure while splitting revlog. The file name involved was important. The pattern involved here are not problematic, but it help to setup the machinery to test multiple files, the actual fix and problematic file will arrive in a later changeset.
Tue, 02 May 2023 15:40:13 +0200 repo-upgrade: write new requirement before upgrading the dirstate stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 02 May 2023 15:40:13 +0200] rev 50363
repo-upgrade: write new requirement before upgrading the dirstate This will prevent a small race condition where another hg process still believes the repo is dirstate-v1 during the upgrade process. This is good to have, but it is not a proper fix for the underlying problem. There is code that assumes a requirement means a usage, e.g. having the `generaldelta` requirement would imply *all* revlogs to use general delta, but it's not true, it simply means that the repository advertises to the client it needs to understand `generaldelta` in order to read the repo. In the case of the dirstate, having the requirement *technically* should always be the same as using dirstate-v2, since there is only one dirstate and requirements should be as minimal as possible. However, we should not assume this and make the code more robust in a future patch (series).
Wed, 26 Apr 2023 15:30:35 -0400 rhg: correctly relativize copy source path stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Wed, 26 Apr 2023 15:30:35 -0400] rev 50362
rhg: correctly relativize copy source path
Wed, 26 Apr 2023 15:31:02 -0400 rhg: don't print copy source when --no-status is passed stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Wed, 26 Apr 2023 15:31:02 -0400] rev 50361
rhg: don't print copy source when --no-status is passed
Wed, 26 Apr 2023 16:18:12 -0400 tests: add test for status copy source formatting stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Wed, 26 Apr 2023 16:18:12 -0400] rev 50360
tests: add test for status copy source formatting
Tue, 25 Apr 2023 17:49:35 -0400 fix: highlight the required configuration and behavior of the fixer tools stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 25 Apr 2023 17:49:35 -0400] rev 50359
fix: highlight the required configuration and behavior of the fixer tools The problem is that `hg help fix` didn't mention *how* to configure the tools, and while I knew that `{rootpath}` existed in the configuration, I missed that the tools require reading content from stdin. (I configured `gofmt` to use `{rootpath}`, and that had the effect of squashing all changes in a file at `.` into the first commit and emptying that content from its descendants.) Basically all this does is put a pointer in the default (command level) help to the extension level help that mentions the configuration, and moves the extension level help that documents reading from stdin and writing to stdout to the top to give it more prominence. The last sentence is adjusted a bit to reflect the new location.
Tue, 18 Apr 2023 15:26:55 +0200 debug-delta: add minimal documentation for `devel.bundle-delta` option stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Apr 2023 15:26:55 +0200] rev 50358
debug-delta: add minimal documentation for `devel.bundle-delta` option So the next person won't have to grep the code to know what it is doing.
Wed, 19 Apr 2023 16:37:11 +0200 delta-find: simply code that is now never invoqued without general delta stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Apr 2023 16:37:11 +0200] rev 50357
delta-find: simply code that is now never invoqued without general delta Finish early in on-general delta case mean a lot of code can assume that general delta is not enabled.
Tue, 18 Apr 2023 17:17:31 +0200 delta-find: add a simple safeguard to prevent bad non-general-delta stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Apr 2023 17:17:31 +0200] rev 50356
delta-find: add a simple safeguard to prevent bad non-general-delta This make it easier to catch request to build delta that does not make sense in the general delta world. It seems better to raise a programming error than to corrupt the repository.
Wed, 19 Apr 2023 18:16:19 +0200 delta-find: never do anything fancy when general delta is off stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Apr 2023 18:16:19 +0200] rev 50355
delta-find: never do anything fancy when general delta is off Without general delta, the only option is to do a delta against the previous revision in the revlog, or to do a full snapshot. So no need to dive into the more complicated logic. This prevent Mercurial to misbehave when applying remote deltas when `pulled-delta-reuse-policy` was set to "try-base" or "forced" and would produce and store invalid deltas. We add an associated tests to make sure this scenario is covered by tests. There are more code to cleanup after this, but I what to keep the fixing patch simple.
Wed, 19 Apr 2023 16:59:03 +0200 delta-find: assume the target-rev if not specified stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Apr 2023 16:59:03 +0200] rev 50354
delta-find: assume the target-rev if not specified This will be useful in the next patch, but I am putting it in its own commit to make sure we can easily bisect any subtle side effect. (none are expected, but still)
Thu, 20 Apr 2023 09:23:58 -0400 chg: set CHGHG before connecting to command server stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Thu, 20 Apr 2023 09:23:58 -0400] rev 50353
chg: set CHGHG before connecting to command server cf4d2f31 (!523) changed chg to set `CHGHG` itself when spawning a new command server, in order to ensure that the path to the `hg` executable would be checked during server validation. (This is useful when chg is built with `HGPATHREL`). However, that change broke chg because it failed to set `CHGHG` before trying to connect to an existing command server. This means that if `CHGHG` is not present in the environment, chg will always spawn a new command server, entirely negating the point of chg. This breakage wasn't initially caught because of the difficulty of writing automated tests with the `HGPATHREL` feature enabled, which meant the change was only tested manually to make sure that it fixed the problem with `HGPATHREL` that prompted the change. In practice, this functionality is only really useful when chg is built with `HGPATHREL`, so I considered wrapping it in an `#ifdef` to preserve the old behavior by default. However, this makes it hard to write tests since one would have to explicitly set `HGPATHREL=1` when running `run-tests.py` (which is why the original change lacked tests). It would be great if there were a way of testing features that are gated behind conditional compilation.
Mon, 24 Apr 2023 10:30:08 -0400 chg: declare environ (issue6812) stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Mon, 24 Apr 2023 10:30:08 -0400] rev 50352
chg: declare environ (issue6812)
Tue, 18 Apr 2023 11:48:22 +0200 relnotes: add 6.4.2 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 18 Apr 2023 11:48:22 +0200] rev 50351
relnotes: add 6.4.2
Tue, 18 Apr 2023 11:41:03 +0200 Added signature for changeset f952be90b051 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 18 Apr 2023 11:41:03 +0200] rev 50350
Added signature for changeset f952be90b051
Tue, 18 Apr 2023 11:40:57 +0200 Added tag 6.4.2 for changeset f952be90b051 stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 18 Apr 2023 11:40:57 +0200] rev 50349
Added tag 6.4.2 for changeset f952be90b051
Tue, 18 Apr 2023 01:23:27 +0200 revlog-split: make sure the self._indexfile attribut is reset (issue6811) stable 6.4.2
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Apr 2023 01:23:27 +0200] rev 50348
revlog-split: make sure the self._indexfile attribut is reset (issue6811) Before this change, after a transaction committing a file split, a revlog object would have its `self._indexfile` attribute desynchronised from the actual file storing the data. If that same object is reused (as we do for the manifest during clone bundles), this lead to the data being writting in the wrong location and the repository to go corrupt. We not properly reset the attribut when applicable and everything is back in working order.
Tue, 18 Apr 2023 00:07:52 +0200 revlog-split: also check a case where bundle contains multiple changegroup stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Apr 2023 00:07:52 +0200] rev 50347
revlog-split: also check a case where bundle contains multiple changegroup This case is not affected, we remains in the same transaction. However it seems important to improve the test coverage around these "features". It also helped to assert the scop of the critical bug.
Tue, 18 Apr 2023 01:12:00 +0200 revlog-split: show manifest data loss situation when using clonebundle stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Apr 2023 01:12:00 +0200] rev 50346
revlog-split: show manifest data loss situation when using clonebundle After the commit of the transaction from applying the clone bundle, changes to the manifest from the subsequent pull would write index data in the wrong file. This lead to data being "lost" after the pull and the repository to be corrupted. We add a test checking this specific scenario. In practice, the issue only affects the manifest but we also test the issue with a file for future proofing things up. See test documentation and failure for details.
Thu, 13 Apr 2023 14:21:01 +0200 Added signature for changeset 83ea6ce48b4f stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 13 Apr 2023 14:21:01 +0200] rev 50345
Added signature for changeset 83ea6ce48b4f
Thu, 13 Apr 2023 14:21:00 +0200 Added tag 6.4.1 for changeset 83ea6ce48b4f stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 13 Apr 2023 14:21:00 +0200] rev 50344
Added tag 6.4.1 for changeset 83ea6ce48b4f
Thu, 13 Apr 2023 14:20:26 +0200 relnotes: add 6.4.1 stable 6.4.1
Raphaël Gomès <rgomes@octobus.net> [Thu, 13 Apr 2023 14:20:26 +0200] rev 50343
relnotes: add 6.4.1
Wed, 12 Apr 2023 17:28:39 +0200 sslutil: set context security level for legacy tls testing (issue6760) stable
pacien <pacien.trangirard@pacien.net> [Wed, 12 Apr 2023 17:28:39 +0200] rev 50342
sslutil: set context security level for legacy tls testing (issue6760) Current versions of OpenSSL do not allow the use of TLS <1.2 when the library's security level is >=1 (1 being the default on most distributions). Setting the security level in addition to the minimum protocol is therefore necessary for the legacy protocol tests. This is done here ONLY when testing, when: - explicitly setting the cipher string, or - using the "--insecure" flag, or - using the "devel.serverexactprotocol" testing option. See: https://github.com/openssl/openssl/blob/master/NEWS.md#major-changes-between-openssl-30-and-openssl-310-14-mar-2023
Thu, 13 Apr 2023 11:28:48 +0200 configitems: make devel.serverexactprotocol look dangerous stable
pacien <pacien.trangirard@pacien.net> [Thu, 13 Apr 2023 11:28:48 +0200] rev 50341
configitems: make devel.serverexactprotocol look dangerous Because it is.
Thu, 13 Apr 2023 04:12:31 +0200 rebase: do not cleanup the working copy when --dry-run is used (issue6802) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 13 Apr 2023 04:12:31 +0200] rev 50340
rebase: do not cleanup the working copy when --dry-run is used (issue6802) Since we did not touch the working copy, we don't need to clean it up. This will avoid wiping exiting changes out.
Tue, 11 Apr 2023 17:06:08 +0200 rebase: add a test showing that --dry-run wipes working copy changes stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 11 Apr 2023 17:06:08 +0200] rev 50339
rebase: add a test showing that --dry-run wipes working copy changes Eating people's data on --dry-run seems like a bad idea.
Sat, 01 Apr 2023 05:58:59 +0200 match: match explicit file using a set stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Apr 2023 05:58:59 +0200] rev 50338
match: match explicit file using a set The matcher as all the logic to do quick comparison against explicit patterns, however the pattern matcher was shadowing the code using that set and used the compiled regex pattern in all cases, which is quite slow. We restore the usage of the set based matching to boost performance. Building the regexp is still consuming a large amount of time (actually, the majority of the time), which is still silly. Maybe using re2 would help that, but this is a quest for another adventure. Another path to improve this is to have a pattern type dedicated to match the exact path to a file only (not a directory). This pattern could use the set matching only and be skipped in the regex all together. Benchmarks ========== In the following benchmark we are comparing the `hg cat` and `hg files` run time when matching against all files in the repository. They are run: - without the rust extensions - with the standard python engine (so without re2) Performance improvement in this series -------------------------------------- ###### hg files ############################################################### ### mercurial-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 0.230092 seconds prev-changeset: 0.230069 seconds this-changeset: 0.211425 seconds (-8.36%) ### mercurial-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 0.234235 seconds prev-changeset: 0.231165 seconds (-1.38%) this-changeset: 0.212300 seconds (-9.43%) ### pypy-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 0.613567 seconds prev-changeset: 0.616799 seconds this-changeset: 0.510852 seconds (-16.82%) ### pypy-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 0.801880 seconds prev-changeset: 0.616393 seconds (-23.22%) this-changeset: 0.511903 seconds (-36.23%) ### netbeans-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 21.541828 seconds prev-changeset: 21.586773 seconds this-changeset: 13.648347 seconds (-36.76%) ### netbeans-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 172.759857 seconds prev-changeset: 21.908197 seconds (-87.32%) this-changeset: 13.945110 seconds (-91.93%) ### mozilla-central-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 62.474221 seconds prev-changeset: 61.279490 seconds (-1.22%) this-changeset: 29.529469 seconds (-52.40%) ### mozilla-central-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 1364.180218 seconds prev-changeset: 62.473549 seconds (-95.40%) this-changeset: 30.625249 seconds (-97.75%) ###### hg cat ################################################################# ### mercurial-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 0.764407 seconds prev-changeset: 0.763883 seconds this-changeset: 0.737326 seconds (-3.68%) ### mercurial-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 0.768924 seconds prev-changeset: 0.765848 seconds this-changeset: 0.174d0b seconds (-4.44%) ### pypy-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 2.065220 seconds prev-changeset: 2.070498 seconds this-changeset: 1.939482 seconds (-6.08%) ### pypy-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 2.276388 seconds prev-changeset: 2.069197 seconds (-9.15%) this-changeset: 1.931746 seconds (-15.19%) ### netbeans-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 40.967983 seconds prev-changeset: 41.392423 seconds this-changeset: 32.181681 seconds (-22.20%) ### netbeans-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 216.388709 seconds prev-changeset: 41.648689 seconds (-80.88%) this-changeset: 32.580817 seconds (-85.04%) ### mozilla-central-2018-08-01-zstd-sparse-revlog ### sorted base-changeset: 105.228510 seconds prev-changeset: 103.315670 seconds (-1.23%) this-changeset: 69.416118 seconds (-33.64%) ### mozilla-central-2018-08-01-zstd-sparse-revlog ### shuffled base-changeset: 1448.722784 seconds prev-changeset: 104.369358 seconds (-92.80%) this-changeset: 70.554789 seconds (-95.13%) Different way to list the same data with this revision ------------------------------------------------------ ###### hg files ############################################################### ### mercurial-2018-08-01-zstd-sparse-revlog root: 0.119182 seconds glob: 0.120697 seconds (+1.27%) sorted: 0.211425 seconds (+77.40%) shuffled: 0.212300 seconds (+78.13%) ### pypy-2018-08-01-zstd-sparse-revlog root: 0.121986 seconds glob: 0.124822 seconds (+2.32%) sorted: 0.510852 seconds (+318.78%) shuffled: 0.511903 seconds (+319.64%) ### netbeans-2018-08-01-zstd-sparse-revlog root: 0.173984 seconds glob: 0.227203 seconds (+30.59%) sorted: 13.648347 seconds (+7744.59%) shuffled: 13.945110 seconds (+7915.16%) ### mozilla-central-2018-08-01-zstd-sparse-revlog root: 0.366463 seconds glob: 0.491030 seconds (+33.99%) sorted: 29.529469 seconds (+7957.96%) shuffled: 30.625249 seconds (+8256.97%) ###### hg cat ################################################################# ### mercurial-2018-08-01-zstd-sparse-revlog glob: 0.647471 seconds root: 0.643120 seconds shuffled: 0.174d0b seconds (+13.92%) sorted: 0.737326 seconds (+13.88%) ### mozilla-central-2018-08-01-zstd-sparse-revlog glob: 40.596983 seconds root: 40.129136 seconds shuffled: 70.554789 seconds (+73.79%) sorted: 69.416118 seconds (+70.99%) ### netbeans-2018-08-01-zstd-sparse-revlog glob: 18.777924 seconds root: 18.613905 seconds shuffled: 32.580817 seconds (+73.51%) sorted: 32.181681 seconds (+71.38%) ### pypy-2018-08-01-zstd-sparse-revlog glob: 1.555319 seconds root: 1.536534 seconds shuffled: 1.931746 seconds (+24.20%) sorted: 1.939482 seconds (+24.70%)
Sat, 01 Apr 2023 05:57:09 +0200 match: sort patterns before compiling them into a regex stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Apr 2023 05:57:09 +0200] rev 50337
match: sort patterns before compiling them into a regex While investigating cripping performance for `hg cat` in some context, I discovered that, for large inputs, building a regex from out of order patterns result may result in a *much* slower regex and a much slower associated matcher's performance. So we are now sorting the patterns to help the regex engine. There is more to the story as we rely on regexp more than we should. See the next changeset for details. Benchmarks ========== In the following benchmark we are comparing the `hg cat` and `hg files` run time when matching against the full list of files in the repository. They are run: - without the rust extensions - with the standard python enfine (so without re2) sort vs non-sorted - Before this changeset (3f5137543773) --------------------------------------------------------- ###### hg files ############################################################### ### mercurial-2018-08-01-zstd-sparse-revlog sorted: 0.230092 seconds shuffled: 0.234235 seconds (+1.80%) ### pypy-2018-08-01-zstd-sparse-revlog sorted: 0.613567 seconds shuffled: 0.801880 seconds (+30.69%) ### mozilla-central-2018-08-01-zstd-sparse-revlog sorted: 62.474221 seconds shuffled: 1364.180218 seconds (+2083.59%) ### netbeans-2018-08-01-zstd-sparse-revlog sorted: 21.541828 seconds shuffled: 172.759857 seconds (+701.97%) ###### hg cat ################################################################# ### mercurial-2018-08-01-zstd-sparse-revlog sorted: 0.764407 seconds shuffled: 0.768924 seconds ### pypy-2018-08-01-zstd-sparse-revlog sorted: 2.065220 seconds shuffled: 2.276388 seconds (+10.22%) ### netbeans-2018-08-01-zstd-sparse-revlog sorted: 40.967983 seconds shuffled: 216.388709 seconds (+428.19%) ### mozilla-central-2018-08-01-zstd-sparse-revlog sorted: 105.228510 seconds shuffled: 1448.722784 seconds (+1276.74%) sort vs non-sorted - With this changeset ---------------------------------------- ###### hg files ############################################################### ### mercurial-2018-08-01-zstd-sparse-revlog all-list-pattern-sorted: 0.230069 all-list-pattern-shuffled: 0.231165 ### pypy-2018-08-01-zstd-sparse-revlog all-list-pattern-sorted: 0.616799 all-list-pattern-shuffled: 0.616393 ### netbeans-2018-08-01-zstd-sparse-revlog all-list-pattern-sorted: 21.586773 all-list-pattern-shuffled: 21.908197 ### mozilla-central-2018-08-01-zstd-sparse-revlog all-list-pattern-sorted: 61.279490 all-list-pattern-shuffled: 62.473549 ###### hg cat ################################################################# ### mercurial-2018-08-01-zstd-sparse-revlog sorted: 0.763883 seconds shuffled: 0.765848 seconds ### pypy-2018-08-01-zstd-sparse-revlog sorted: 2.070498 seconds shuffled: 2.069197 seconds ### netbeans-2018-08-01-zstd-sparse-revlog sorted: 41.392423 seconds shuffled: 41.648689 seconds ### mozilla-central-2018-08-01-zstd-sparse-revlog sorted: 103.315670 seconds shuffled: 104.369358 seconds
Mon, 27 Mar 2023 17:30:14 -0400 chg: populate CHGHG if not set stable
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Mon, 27 Mar 2023 17:30:14 -0400] rev 50336
chg: populate CHGHG if not set Normally, chg determines which `hg` executable to use by first consulting the `$CHGHG` and `$HG` environment variables, and if neither are present defaults to the `hg` found in the user's `$PATH`. If built with the `HGPATHREL` compiler flag, chg will instead assume that there exists an `hg` executable in the same directory as the `chg` binary and attempt to use that. This can cause problems in situations where there are multiple actively-used Mercurial installations on the same system. When a `chg` client connects to a running command server, the server process performs some basic validation to determine whether a new command server needs to be spawned. These checks include things like checking certain "sensitive" environment variables and config sections, as well as checking whether the mtime of the extensions, hg's `__version__.py` module, and the Python interpreter have changed. Crucially, the command server doesn't explicitly check whether the executable it is running from matches the executable that the `chg` client would have otherwise invoked had there been no existing command server process. Without `HGPATHREL`, this still gets implicitly checked during the validation step, because the only way to specify an alternate hg executable (apart from `$PATH`) is via the `$CHGHG` and `$HG` environment variables, both of which are checked. With `HGPATHREL`, however, the command server has no way of knowing which hg executable the client would have run. This means that a client located at `/version_B/bin/chg` will happily connect to a command server running `/version_A/bin/hg` instead of `/version_B/bin/hg` as expected. A simple solution is to have the client set `$CHGHG` itself, which then allows the command server's environment validation to work as intended. I have tested this manually using two locally built hg installations and it seems to work with no ill effects. That said, I'm not sure how to write an automated test for this since the `chg` available to the tests isn't even built with the `HGPATHREL` compiler flag to begin with.
Fri, 07 Apr 2023 12:11:44 +0200 run-tests: remove obsolete coverage check and packaging import (issue6805) stable
pacien <pacien.trangirard@pacien.net> [Fri, 07 Apr 2023 12:11:44 +0200] rev 50335
run-tests: remove obsolete coverage check and packaging import (issue6805) This removes an obsolete `coverage` version check (version from a decade ago). This also conveniently removes the dependency over `packaging.version`, which requires some additional installation since Python 3.10.
Wed, 05 Apr 2023 11:58:25 +0200 test-tx-rollback: more lenient glob for kill status (issue6807) stable
pacien <pacien.trangirard@pacien.net> [Wed, 05 Apr 2023 11:58:25 +0200] rev 50334
test-tx-rollback: more lenient glob for kill status (issue6807) The "killed" message may have some prefix and/or suffix which differ depending on the platform. This makes the pinned test output more lenient to accept those.
Mon, 27 Mar 2023 06:24:44 +0200 commands: correct documentation of hg serve’s --ipv6 option stable
Manuel Jacob <me@manueljacob.de> [Mon, 27 Mar 2023 06:24:44 +0200] rev 50333
commands: correct documentation of hg serve’s --ipv6 option When the --ipv6 option is given, the server doesn’t listen to a IPv4 socket. This can be verified by running two servers, one with and one without the option, which works fine. I think that listening to both a IPv4 and a IPv6 socket would be better, but given that the Python standard library class underlying the HTTP server supports only one socket, this is not trivial.
Fri, 24 Mar 2023 19:19:37 +0000 rhg: don't crash on empty directory names in path_encode, just in case stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 24 Mar 2023 19:19:37 +0000] rev 50332
rhg: don't crash on empty directory names in path_encode, just in case I don't expect that to be possible, but there's nothing in path_encode.rs that prevents it, and the old code didn't crash in this case, so it's better to be defensive.
(0) -30000 -10000 -1920 tip