Thu, 06 May 2021 08:37:40 -0700 packaging: move documentation HTML building to own function
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 08:37:40 -0700] rev 47207
packaging: move documentation HTML building to own function This is part of some light refactoring to enable us to use PyOxidizer for WiX MSI installer generation. Differential Revision: https://phab.mercurial-scm.org/D10685
Thu, 06 May 2021 16:04:24 -0700 pyoxidizer: support code signing
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 16:04:24 -0700] rev 47206
pyoxidizer: support code signing Newer versions of PyOxidizer feature built-in support for code signing. You simply declare a code signer in the Starlark configuration file, activate it for automatic signing, and PyOxidizer will add code signatures to signable files as it encounters them. This commit teaches our Starlark configuration file to enable automatic code signing. But only on Windows for the moment, as our immediate goal is to overhaul the Windows packaging. The feature is opt-in: you must pass variables to PyOxidizer's build context via `pyoxidizer build --var` or `pyoxidizer build --var-env` to activate code signing. Differential Revision: https://phab.mercurial-scm.org/D10684
Thu, 06 May 2021 16:03:43 -0700 pyoxidizer: support producing MSI installers
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 16:03:43 -0700] rev 47205
pyoxidizer: support producing MSI installers Newer versions of PyOxidizer have support for building WiX MSI installers "natively." Essentially, you can script the definition of your WiX installer via Starlark and PyOxidizer can invoke WiX tools to produce the installer. This commit teaches our PyOxidizer config file to produce MSI installers similarly to how `contrib/packaging/packging.py wix` would do it. We had to make a very minor change to `mercurial.wxs` to reflect different paths depending on who builds. This is because when PyOxidizer builds WiX installers, it does so from an isolated directory, not Mercurial's source directory. We simply copy the files into the build environment so they are accessible. After this change, running `pyoxidizer build msi` produces a nearly identical install layout to what the previous method produces. When I applied this series on top of the 5.8 tag, here is the list of differences and explanations: * docs/*.html files are missing from the new installer because the Python build environment doesn't have docutils. * .pyd and .exe files differ, likely because I'm using a different Visual Studio toolchain on my local computer than the official build environment. * Various .dist-info/ directories have different names. This is because older versions of PyOxidizer had buggy behavior and weren't properly normalizing package names in .dist-info/ directories. e.g. we went from `cached-property-1.5.2.dist-info` to `cached_property-1.5.2.dist-info`. * Translations (.mo files) may be missing if gettext isn't in %Path%. This is because the packaging.py code installs gettext and ensures it can be found. * Some *.dist-info/RECORD files vary due to SHA-256 content digest divergence due to build environment differences. (This should be harmless.) * The new install layout ships a python3.dll because newer versions of PyOxidizer ship this file. * The new install layout has a different vcruntime140.dll and also a vcruntime140_1.dll because newer versions of PyOxidizer ship a newer version of the Visual C++ Redistributable Runtime. The new PyOxidizer functionality is not yet integrated with packaging.py. This will come in a subsequent commit. So for now, the new functionality introduced here is unused. Differential Revision: https://phab.mercurial-scm.org/D10683
Thu, 06 May 2021 16:16:21 -0700 pyoxidizer: use allocator_backend instead of raw_allocator
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 16:16:21 -0700] rev 47204
pyoxidizer: use allocator_backend instead of raw_allocator The name of this attribute changed in PyOxidizer 0.11. Differential Revision: https://phab.mercurial-scm.org/D10682
Thu, 06 May 2021 15:58:37 -0700 pyoxidizer: simplify targets
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 15:58:37 -0700] rev 47203
pyoxidizer: simplify targets The split targets existed to enable the use of a non-default distribution flavor on Windows. Modern versions of PyOxidizer use the "standalone_dynamic" distribution flavor by default. So our split brain workaround is no longer needed. Here, we unify the targets. We also remove an unreferenced target function to create a resources file. Differential Revision: https://phab.mercurial-scm.org/D10681
Thu, 06 May 2021 15:56:04 -0700 contrib: install PyOxidizer 0.16.0
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 15:56:04 -0700] rev 47202
contrib: install PyOxidizer 0.16.0 PyOxidizer now provides MSI installers and pre-built Linux binaries. So we install that way. This significantly reduces the time to bootstrap a new machine in automation, as building PyOxidizer from source on a low core count machine takes several minutes. This change temporarily breaks the ability of the automated environment to use the in-repo pyoxidizer.bzl configuration file, as there are backwards-incompatible changes with the upgrade that need to be reflected. We'll handle those in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D10680
Thu, 06 May 2021 16:13:33 -0700 pyoxidizer: pin Python to 3.8
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 16:13:33 -0700] rev 47201
pyoxidizer: pin Python to 3.8 Newer versions of PyOxidizer use version 3.9 by default. As part of upgrading PyOxidizer, we want to pin the version at 3.8 so we can compare differences more easily. Differential Revision: https://phab.mercurial-scm.org/D10679
Thu, 06 May 2021 16:00:44 -0700 pyoxidizer: remove some boilerplate in file
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 16:00:44 -0700] rev 47200
pyoxidizer: remove some boilerplate in file This isn't used for anything and can safely be removed. Differential Revision: https://phab.mercurial-scm.org/D10678
Thu, 06 May 2021 15:45:04 -0700 contrib: upgrade Rust in Windows automation
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 15:45:04 -0700] rev 47199
contrib: upgrade Rust in Windows automation I'm not sure why we don't install the minimum required Rust version here like we do for Linux. Whatever: that's unrelated to wanting to stay modern. Differential Revision: https://phab.mercurial-scm.org/D10677
Thu, 06 May 2021 15:44:29 -0700 contrib: update Python versions in Windows automation
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 15:44:29 -0700] rev 47198
contrib: update Python versions in Windows automation Let's keep our Python versions modern. Differential Revision: https://phab.mercurial-scm.org/D10676
Thu, 06 May 2021 15:41:52 -0700 automation: update rust in Linux environment
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 15:41:52 -0700] rev 47197
automation: update rust in Linux environment Our minimum supported Rust is 1.41.1 per rust/README.rst. We also bump the modern Rust version to latest stable to stay current. Differential Revision: https://phab.mercurial-scm.org/D10675
Thu, 06 May 2021 15:40:47 -0700 automation: install latest Python versions in Linux environment
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 15:40:47 -0700] rev 47196
automation: install latest Python versions in Linux environment Let's keep our Linux environment up to date. Differential Revision: https://phab.mercurial-scm.org/D10674
Thu, 06 May 2021 17:46:57 -0700 automation: create Python 3.5 variant of requirements.txt
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 May 2021 17:46:57 -0700] rev 47195
automation: create Python 3.5 variant of requirements.txt The automation environment is refusing to build with the previous file because some dependencies won't install on Python 3.5. I couldn't find an easy way to salvage the situation with a single requirements.txt file. So, I decided to introduce a variant for Python 3.5. As part of this, we update packages to latest versions. (I do question why we are still supporting Python 3.5...) Differential Revision: https://phab.mercurial-scm.org/D10690
Sat, 15 May 2021 09:45:10 +0000 hgweb: Fix deprecation warning in Python 3.10 (issue6520)
Karthikeyan Singaravelan <tir.karthi@gmail.com> [Sat, 15 May 2021 09:45:10 +0000] rev 47194
hgweb: Fix deprecation warning in Python 3.10 (issue6520) Differential Revision: https://phab.mercurial-scm.org/D10711
Mon, 10 May 2021 21:59:13 +0200 dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry`
Simon Sapin <simon.sapin@octobus.net> [Mon, 10 May 2021 21:59:13 +0200] rev 47193
dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry` This is actually necessary to make `DirstateMap::has_dir` correct, since it assumes that a node without a `DirstateEntry` has at least one descedant node with a `DirstateEntry`. This bug would become apparent when a later changeset persists tree nodes on disk in the "dirstate-v2" format. Differential Revision: https://phab.mercurial-scm.org/D10706
Mon, 10 May 2021 21:31:05 +0200 dirstate-tree: Refactor DirstateMap::drop_file to be recursive
Simon Sapin <simon.sapin@octobus.net> [Mon, 10 May 2021 21:31:05 +0200] rev 47192
dirstate-tree: Refactor DirstateMap::drop_file to be recursive It should behave the same as before. This will enable the next changeset to run code on the way "down" (in order to removing newly-empty nodes). Differential Revision: https://phab.mercurial-scm.org/D10705
Tue, 11 May 2021 12:22:26 -0700 templates: fix `revset('parents()') % ...` in amend message template
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 May 2021 12:22:26 -0700] rev 47191
templates: fix `revset('parents()') % ...` in amend message template I don't understand why, but putting `revset('parents()') % {desc}` in the commit message template for amend resulted in a crash because `memctx.hex()` did `hex(self.node())` and its node was None. This patch fixes that. Martin von Zweigbergk <martinvonz@google.com> Differential Revision: https://phab.mercurial-scm.org/D10707
Thu, 15 Apr 2021 19:54:03 +0200 path: teach the `hg path` command to display boolean sub-option
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 19:54:03 +0200] rev 47190
path: teach the `hg path` command to display boolean sub-option The next changeset introduce one. Differential Revision: https://phab.mercurial-scm.org/D10450
Fri, 16 Apr 2021 01:18:28 +0200 parselist: move the function from config to stringutil
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 01:18:28 +0200] rev 47189
parselist: move the function from config to stringutil We move the function in a lower level module to avoid cycle. It moves next to `parsebool` who had to migrate for the same reasons. Differential Revision: https://phab.mercurial-scm.org/D10449
Fri, 16 Apr 2021 02:14:21 +0200 bookmark: use `list_paths` to access path definition
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 02:14:21 +0200] rev 47188
bookmark: use `list_paths` to access path definition The content of the `[paths]` config section is receiving transformation that make it hard to recognise whats the actual name, and the next changeset will make it worse. So we use the official API for this instead. Differential Revision: https://phab.mercurial-scm.org/D10448
Thu, 15 Apr 2021 16:58:20 +0200 urlutil: make `paths` class old list of `path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 16:58:20 +0200] rev 47187
urlutil: make `paths` class old list of `path` We move from a `{name → path}` mapping to a `{name → [path]}` mapping. And update all user code accordingly. For now, all the list contains exactly one element, but we are now in a good place to make the config understand a list of url. Differential Revision: https://phab.mercurial-scm.org/D10447
Thu, 15 Apr 2021 17:15:43 +0200 urlutil: extract `chain_path` in a function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 17:15:43 +0200] rev 47186
urlutil: extract `chain_path` in a function This will no longer modify `path` inplace so it does not make much sense as a method. Differential Revision: https://phab.mercurial-scm.org/D10446
Thu, 15 Apr 2021 17:12:25 +0200 urlutil: add a `copy` method to `path
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 17:12:25 +0200] rev 47185
urlutil: add a `copy` method to `path This will be useful when inheriting from multiple path at the same time. Differential Revision: https://phab.mercurial-scm.org/D10445
Thu, 15 Apr 2021 12:33:05 +0200 template: add a `paths` field to all entry in peerurls
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 12:33:05 +0200] rev 47184
template: add a `paths` field to all entry in peerurls This make it possible to display multiple path per name in the near future. Differential Revision: https://phab.mercurial-scm.org/D10444
Fri, 07 May 2021 10:39:58 +0200 cache: avoid warming the fnodetags cache after clone stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 07 May 2021 10:39:58 +0200] rev 47183
cache: avoid warming the fnodetags cache after clone That cache can quite expensive to compute on large repository as not that `hg clone` is warming all cache, this can introduces a significant slowdown for clone time[1]. As a stop gap measure introduce a quick fix for that on stable, skipping the fnodetags cache post-clone. [1] https://www.mercurial-scm.org/pipermail/mercurial/2021-April/052679.html Differential Revision: https://phab.mercurial-scm.org/D10695
Wed, 05 May 2021 17:47:30 -0400 run-tests: fix whitelist/blacklist with directories on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 May 2021 17:47:30 -0400] rev 47182
run-tests: fix whitelist/blacklist with directories on Windows The file name is resolved with `os.path.relpath()` in the `Test` constructor, which yields `\` on Windows. That doesn't match the `/` separator when using MSYS tools to build the list, and it isn't obvious that this is the problem because directory separators can mostly be used interchangeably. The `--test-list` argument already seems to be properly handled.
Thu, 11 Mar 2021 23:20:41 -0500 run-tests: ignore PermissionError when checking available ports stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 23:20:41 -0500] rev 47181
run-tests: ignore PermissionError when checking available ports I'm not sure what this is, but I'm getting it occasionally when running in WSL. When it was raised, none of the tests could run.
Tue, 11 May 2021 18:10:59 +0200 status: Add some more tests
Simon Sapin <simon.sapin@octobus.net> [Tue, 11 May 2021 18:10:59 +0200] rev 47180
status: Add some more tests Trying to improve coverage for various non-ovbious scenarios Differential Revision: https://phab.mercurial-scm.org/D10704
Sat, 08 May 2021 00:21:31 -0400 run-tests: use the same python version for shebang lines on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 May 2021 00:21:31 -0400] rev 47179
run-tests: use the same python version for shebang lines on Windows The latest py3 is used if the minor number isn't specified. After running the script to install all of the build dependencies, that moved the default from 3.8 to 3.9 on the CI system. That in turn caused a bunch of tests to be skipped that were running prior, even when the test runner was invoked with `py -3.8`. While we should almost always use the latest version, we really shouldn't make it hard to test different versions or allow things to randomly break in subtle ways like that. Differential Revision: https://phab.mercurial-scm.org/D10702
Fri, 14 May 2021 10:01:29 +0000 vfs: Fix deprecation warning in Python 3.10 (issue6520)
Karthikeyan Singaravelan <tir.karthi@gmail.com> [Fri, 14 May 2021 10:01:29 +0000] rev 47178
vfs: Fix deprecation warning in Python 3.10 (issue6520) Differential Revision: https://phab.mercurial-scm.org/D10710
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip