Thu, 11 Feb 2021 15:11:10 -0800 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Feb 2021 15:11:10 -0800] rev 47018
rewriteutil: point to help about instability when rewriting creates orphan This replicates the message from the evolve extension. Differential Revision: https://phab.mercurial-scm.org/D10517
Tue, 27 Apr 2021 14:59:45 -0700 help: add topic about evolution, based on text from evolve extension
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Apr 2021 14:59:45 -0700] rev 47017
help: add topic about evolution, based on text from evolve extension I've taken the text produced by `hg help evolution` when the evolve extension is enabled and made that available by the same command with just hg core. Changes I've made: * Added "(EXPERIMENTAL)" to the title. (That doesn't hide the topic from `hg help`, though.) * Replaced old-style `experimental.evolution=<names>` config by new-style `experimental.evolution.<name>=true`. * Replaces a "obsolete markers" by "obsolescence markers". * Removed most content from "Current feature status". When the evolve extension is enabled, its help text takes precedence. Differential Revision: https://phab.mercurial-scm.org/D10516
Thu, 11 Feb 2021 15:02:57 -0800 rewriteutil: add devel warning if precheck is called with contexts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Feb 2021 15:02:57 -0800] rev 47016
rewriteutil: add devel warning if precheck is called with contexts I'm trying to upstream parts from the evolve extension. This check exists there. Differential Revision: https://phab.mercurial-scm.org/D10515
Tue, 27 Apr 2021 11:02:41 -0700 rewriteutil: replace "null changeset" by "the null revision" in error message
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Apr 2021 11:02:41 -0700] rev 47015
rewriteutil: replace "null changeset" by "the null revision" in error message The evolve extension uses "the null revision" and we seem to use that term much more frequently in core too. Differential Revision: https://phab.mercurial-scm.org/D10514
Tue, 20 Apr 2021 08:28:11 -0700 relnotes: copy contents of "next" to "5.8" and clear "next" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Apr 2021 08:28:11 -0700] rev 47014
relnotes: copy contents of "next" to "5.8" and clear "next" The same procedure as every year^Wcycle. Unlike previous cycles, I haven't actually recorded the copy because we don't want to propagate further changes in "next" (from the stable branch) to "5.8". Differential Revision: https://phab.mercurial-scm.org/D10500
Tue, 20 Apr 2021 13:01:47 -0700 dirstateguard: use mktemp-like functionality to generate the backup filenames stable
Kyle Lippincott <spectral@google.com> [Tue, 20 Apr 2021 13:01:47 -0700] rev 47013
dirstateguard: use mktemp-like functionality to generate the backup filenames Previously these were generated with names like: `dirstate.backup.commit.<memory address of dirstateguard>` This could cause problems if two hg commands ran at the same time that used the same memory address, (which is apparently not uncommon if chg is involved), as memory addresses are not unique across processes. This issue was reported in the post-review comments on http://phab.mercurial-scm.org/D9952. Differential Revision: https://phab.mercurial-scm.org/D10504
Mon, 29 Mar 2021 01:52:06 +0200 node: replace nullid and friends with nodeconstants class
Joerg Sonnenberger <joerg@bec.de> [Mon, 29 Mar 2021 01:52:06 +0200] rev 47012
node: replace nullid and friends with nodeconstants class The introduction of 256bit hashes require changes to nullid and other constant magic values. Start pushing them down from repository and revlog where sensible. Differential Revision: https://phab.mercurial-scm.org/D9465
Sat, 24 Apr 2021 16:30:05 +0200 repoview: separate concerns in _filteredrepotypes comment stable
Georges Racinet <georges.racinet@octobus.net> [Sat, 24 Apr 2021 16:30:05 +0200] rev 47011
repoview: separate concerns in _filteredrepotypes comment The cited issue in Python bugtracker is closed, but hasn't been fixed. We've been able to use the attached example and reproduce it with Python 3.9. The point where it turns from needless stress on the GC to the an actual leak is when one factors in the fact that the GC was before Python 3.4 unable to collect some types (see PEP 442). Note that even with Python 2.7, the simple example of cycles due to __mro__ are collectable. This was seen again with the example attached on the CPython issue.
Fri, 23 Apr 2021 18:30:53 +0200 repoview: fix memory leak of filtered repo classes stable
Georges Racinet <georges.racinet@octobus.net> [Fri, 23 Apr 2021 18:30:53 +0200] rev 47010
repoview: fix memory leak of filtered repo classes The leak occurs in long-running server processes with extensions, and is measured at 110kB per request. Before this change, the contents of the `_filteredrepotypes` cache are not properly garbage collected, despite it begin a `WeakKeyDictionary`. Extensions have a tendency to generate a new repository class for each `localrepo` instantiation. Server processes based on `hgwebdir_mod` will instantiate a new `localrepo` for each HTTP request that involves a repository. As a result, with a testing process that repeatedly opens a repository with several extensions activated (`topic` notably among them), we see a steady increase in resident memory of 110kB per repository instantiation before this change. This is also true, if we call `gc.collect()` at each instantiation, like `hgwebdir_mod` does, or not. The cause of the leak is that the *values* aren't weak references. This change uses `weakref.ref` for the values, and this makes in our measurements the resident size increase drop to 5kB per repository instantiation, with no explicit call of `gc.collect()` at all. There is currently no reason to believe that this remaining leak of 5kB is related to or even due to Mercurial core. We've also seen evidence that `ui.ui` instances weren't properly garbage collected before the change (with the change, they are). This could explain why the figures are relatively high. In theory, the collection of weak references could lead to much more misses in the cache, so we measured the impact on the original case that was motivation for introducing that cache in 7e89bd0cfb86 (see also issue5043): `hg convert` of the mozilla-central repository. The bad news here is that there is a major memory leak there, both with and without the present changeset. There were no more cache misses, and we could see no more memory leak with this change: the resident size after importing roughly 100000 changesets was at 12.4GB before, and 12.5GB after. The small increase is mentioned for completeness only, and we believe that it should be ignored, at least as long as the main leak isn't fixed. At less than 1% of the main leak, even finding out whether it is merely noise would be wasteful. Original context where this was spotted and first mitigated: https://foss.heptapod.net/heptapod/heptapod/-/issues/466 The leak reduction was also obtained in Heptapod inner HTTP server, which amounts to the same as `hgwebdir_mod` for these questions. The measurements done with Python 3.9, similar figures seen with 3.8. More work on our side would be needed to give measurements with 2.7, because of testing server process does not support it.
Sat, 24 Apr 2021 15:46:39 +0200 repoview: style change in newtype() cache handling stable
Georges Racinet <georges.racinet@octobus.net> [Sat, 24 Apr 2021 15:46:39 +0200] rev 47009
repoview: style change in newtype() cache handling This way of writing it does not change the logic at all, but is more fit for the change we want to make in the next changeset. If anything, that's one dict lookup less in the hot path, but that should be non measurable.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip