Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Oct 2020 08:08:54 -0700] rev 45687
tests: fix test-url.py on py3, broken by D9179
Differential Revision: https://phab.mercurial-scm.org/D9180
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Oct 2020 16:14:06 +0200] rev 45686
revset: add a `node` key for sorting
Sorting by node give an arbitrary, but stable order which is useful for
sampling.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 Oct 2020 22:32:41 -0700] rev 45685
pyoxidizer: produce working Python 3 Windows installers (
issue6366)
While we've had code to produce Python 3 Windows installers with
PyOxidizer, we haven't been advertising them on the web site due to
a bug in making TLS connections and issues around resource handling.
This commit upgrades our PyOxidizer install and configuration to
use a recent Git commit of PyOxidizer. This new version of PyOxidizer
contains a *ton* of changes, improvements, and bug fixes. Notably,
Windows shared distributions now mostly "just work" and the TLS bug
and random problems with Python extension modules in the standard
library go away. And Python has been upgraded from 3.7 to 3.8.6.
The price we pay for this upgrade is a ton of backwards incompatible
changes to Starlark.
I applied this commit (the overall series actually) on stable to
produce Windows installers for Mercurial 5.5.2, which I published
shortly before submitting this commit for review.
In order to get the stable branch working, I decided to take a
less aggressive approach to Python resource management. Previously,
we were attempting to load all Python modules from memory and were
performing some hacks to copy Mercurial's non-module resources
into additional directories in Starlark. This commit implements
a resource callback function in Starlark (a new feature since
PyOxidizer 0.7) to dynamically assign standard library resources
to in-memory loading and all other resources to filesystem loading.
This means that Mercurial's files and all the other packages we ship
in the Windows installers (e.g. certifi and pygments) are loaded
from the filesystem instead of from memory. This avoids issues
due to lack of __file__ and enables us to ship a working Python
3 installer on Windows.
The end state of the install layout after this patch is not
ideal for @: we still copy resource files like templates and
help text to directories next to the hg.exe executable. There
is code in @ to use importlib.resources to load these files and
we could likely remove these copies once this lands on @. But for
now, the install layout mimics what we've shipped for seemingly
forever and is backwards compatible. It allows us to achieve the
milestone of working Python 3 Windows installers and gets us a
giant step closer to deleting Python 2.
Differential Revision: https://phab.mercurial-scm.org/D9148
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 13:19:18 -0700] rev 45684
tests: set git config using `git config` for simplicity
I also took the liberty to not set the same config value twice as we
did before.
Differential Revision: https://phab.mercurial-scm.org/D9176
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 13:10:16 -0700] rev 45683
tests: use `git init` instead of unusual synonym `git init-db`
I had never heard of `git init-db` until I saw our tests.
Differential Revision: https://phab.mercurial-scm.org/D9175
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 13:37:31 -0700] rev 45682
errors: name arguments to Abort constructor
Differential Revision: https://phab.mercurial-scm.org/D9179
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 15:35:44 -0700] rev 45681
errors: stop passing non-strings to Abort's constructor
The next patch will change `Abort`'s constructor and `__bytes__`
functions and they will start assuming that the first argument is the
messages as `bytes`.
Differential Revision: https://phab.mercurial-scm.org/D9178
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 21:06:18 -0700] rev 45680
errors: name arguments to UnknownCommand constructor
Differential Revision: https://phab.mercurial-scm.org/D9166
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 20:45:52 -0700] rev 45679
errors: name arguments to AmbiguousCommand constructor
Differential Revision: https://phab.mercurial-scm.org/D9165
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 20:37:35 -0700] rev 45678
errors: name arguments to CommandError constructor
Because readability counts.
Differential Revision: https://phab.mercurial-scm.org/D9164
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 21:52:27 -0700] rev 45677
errors: move UnknownCommand and AmbiguousCommand near CommandError
They seem closely related.
Differential Revision: https://phab.mercurial-scm.org/D9163
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 07 Oct 2020 00:45:41 +0800] rev 45676
templatekw: make {successorssets} always return a list (
issue6342)
Previously, {successorssets} returns an empty string instead of an empty list
for a non-obsolete changeset. The changing type of the JSON output makes it
hard to consume from statically-typed languages.
Differential Revision: https://phab.mercurial-scm.org/D9158
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 07 Oct 2020 00:39:52 +0800] rev 45675
tests: test output of {predecessors}, {successorssets} for non-obsolete csets
Differential Revision: https://phab.mercurial-scm.org/D9157
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 23:19:01 -0700] rev 45674
branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Oct 2020 09:45:00 +0200] rev 45673
copies: move `merged` testing sooner
previously `is_merged` was an expensive callback. Now that all this data is
pre-computed, this is is a simple membership testing.
So it is probably cheaper than the membership testing.
Differential Revision: https://phab.mercurial-scm.org/D9141
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Oct 2020 09:42:39 +0200] rev 45672
copies: return None instead of ChangingFiles when relevant
If they are not relevant data, they are no need to fetch them.
Differential Revision: https://phab.mercurial-scm.org/D9140
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Oct 2020 09:29:49 +0200] rev 45671
copies: add a HASCOPIESINFO flag to highlight rev with useful data
If some files changes that may impact copy tracing are detected, we set this
flag. This helps the copy tracing algorithm to skip fetching possibly expensive
data when unnecessary.
Differential Revision: https://phab.mercurial-scm.org/D9139
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 16 Sep 2020 21:00:02 +0200] rev 45670
salvaged: properly deal with salvaged file during copy tracing
When salvaged files are encountered, the removal have been reverted and we
should keep the rename information from the other side.
The conditional was starting to be quite hairy, so we spell it out in multiple
elif case for readability.
This fixes the associated test cases introduced a while back. The changeset centric copy tracing is now (known) bug free.
Differential Revision: https://phab.mercurial-scm.org/D9130
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Sep 2020 10:55:17 +0200] rev 45669
salvaged: persist the salvaged set on disk
With the new side data storage, this is trivial.
Differential Revision: https://phab.mercurial-scm.org/D9129
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Sep 2020 22:47:54 +0200] rev 45668
changing-files: add clean computation of changed file for merges
This is "a tad more complicated" than the previous cases. See inline
documentation for details (have fun).
Differential Revision: https://phab.mercurial-scm.org/D9128
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Sep 2020 22:46:29 +0200] rev 45667
changing-files: add clean computation of changed files for linear changesets
The `files` field is not reliable, so we need to compute things from scratch. We
deal with the second simplest case, linear changesets. We diff the current
manifest with the parent manifest. This reveal the file added, changed and
removed.
Differential Revision: https://phab.mercurial-scm.org/D9127
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Sep 2020 22:38:08 +0200] rev 45666
changing-files: add clean computation of changed files for roots
The `files` field is not reliable, so we need to compute things from scratch. We
start with the simplest case root changesets. In the beginning they was nothing,
then user said "let there be files" and there were added files.
Differential Revision: https://phab.mercurial-scm.org/D9126
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Sep 2020 09:21:33 +0200] rev 45665
changing-files: add a debug command display changed files
The binary output from sidedata is useful to verify the underlying data do not
get corrupted. However having a human readable version is much simpler for
debuging the changed files data itself.
So we add a debug command to dump this information and we use it in the tests.
Differential Revision: https://phab.mercurial-scm.org/D9125
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Sep 2020 23:16:09 +0200] rev 45664
side-data: add a test to check sidedata upgrade
We want to make sure that sidedata computed at commit time and during upgrade
are the same. To do so, we upgrade the repository in `test-copies-chain-merge.t`
since the file is checking all the special case that we need to catch. The
sidedata content in both case should be the same.
Differential Revision: https://phab.mercurial-scm.org/D9124