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)
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.
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.
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.
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.
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.
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:12:27 +0200] rev 50936
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:11:12 +0200] rev 50935
Added signature for changeset
5a8b54201039
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
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Sep 2023 18:10:44 +0200] rev 50933
relnotes: add 6.5.2
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.
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.
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
/!\
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.
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.
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.
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.
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.
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`.
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.
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.
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.
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`.
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.
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.
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.
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`.
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`.
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.
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`.