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