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.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 tip