- Nov 20, 2023
-
-
Pierre-Yves David authored
Moving more code before doing more logic changes.
-
Pierre-Yves David authored
Moving more code before doing more logic changes.
-
Pierre-Yves David authored
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.
-
- Dec 22, 2023
-
-
Pierre-Yves David authored
As we are about to introduce another object related to finding delta. So lets have a minimal docstring to the existing one.
-
- Jan 11, 2024
-
-
Pierre-Yves David authored
Since we already manually deal with writing on the side and delaying visibily, we no longer need this.
-
Pierre-Yves David authored
The only user is now gone.
-
Pierre-Yves David authored
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".
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- Jan 03, 2024
-
-
Georges Racinet authored
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.
-
- Jan 08, 2024
-
-
Anton Shestakov authored
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.
-
- Dec 18, 2023
-
-
Anton Shestakov authored
-
Anton Shestakov authored
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.
-
- Jan 04, 2024
-
-
Arun Kulshreshtha authored
-
Arun Kulshreshtha authored
-
- Dec 19, 2023
-
-
Pierre-Yves David authored
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.
-
Pierre-Yves David authored
As pytype flagged bug in this method it highlighted that this methode being never called anywhere.
-
Pierre-Yves David authored
It is not because it is NotImplemented that it should use a bad signature. Fix it to please pytype.
-
Pierre-Yves David authored
It is not because it is NotImplemented that it should use a bad signature. Fix it to please pytype.
-
Pierre-Yves David authored
This will avoid pytype complaining about the try/except range.
-
Pierre-Yves David authored
pytype point that the subclass signature have been updated.
-
- Dec 20, 2023
-
-
Pierre-Yves David authored
After loosing 2d6 SAN, I eventually understood that pytype was confused by method return type. Pytype is now happy.
-
- Dec 19, 2023
-
-
Pierre-Yves David authored
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.
-
Pierre-Yves David authored
The `tmpl` variable is used in the `except` and `finally`, so we need it created before the `try` is open.
-
Pierre-Yves David authored
This seems to appease a confused pytype.
-
Pierre-Yves David authored
This seems to be a Windows only attribute.
-
Pierre-Yves David authored
This is an optional import so we should not complains about it.
-
Pierre-Yves David authored
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.
-
- Dec 20, 2023
-
-
Pierre-Yves David authored
If pytype did not crash while generating stub, that message is kind of confusing. It seems simple enough to avoid it in this case.
-
Pierre-Yves David authored
As the imported types are now used by type annotation, these ugly assert are no longer needed.
-
Pierre-Yves David authored
We can't assign type to the "for" variant on the fly, so we type the variable and method used instead.
-
Pierre-Yves David authored
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.
-
- Dec 19, 2023
-
-
Pierre-Yves David authored
We support direct type annotations now, while pytype is starting to complains about them.
-
- Dec 20, 2023
-
-
Pierre-Yves David authored
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.
-
Pierre-Yves David authored
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.
-
- Nov 08, 2023
-
-
Pierre-Yves David authored
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%)
-
- Oct 09, 2023
-
-
Pierre-Yves David authored
They currently do nothing, but this open the way to actually use them.
-
Pierre-Yves David authored
This config will be used for behavior and performance adjustment depending of the repository role.
-