Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 15:09:28 -0700] rev 45702
tests: update test-copies-chain-merge.t to not use empty files
Merging empty files is not very interesting or realistic.
Differential Revision: https://phab.mercurial-scm.org/D9172
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Oct 2020 19:19:10 +0900] rev 45701
revset: fix sorting key of wdir revision
It would go wrong on Python 2, and would crash on Python 3.
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:18:26 +0900] rev 45700
grep: move prep() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:04:39 +0900] rev 45699
grep: move readfile() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:00:03 +0900] rev 45698
grep: move getbody() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:56:40 +0900] rev 45697
grep: add stub class that maintains cache and states of grep operation
Prepares for extracting stateful functions from commands.grep().
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:23:49 +0900] rev 45696
grep: move match and diff logic to new module
commands.grep() has lots of functions and classes. Let's split it into
reusable components so we can leverage them to implement a revset predicate
for 'hg grep --diff'. I want to do 'hg log -r "diff(pattern)"'.
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:17:26 +0900] rev 45695
grep: explicitly pass regexp to closure functions
These functions will be extracted to new module.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 08 Oct 2020 17:29:51 +0530] rev 45694
upgrade: improve documentation of matchrevlog()
It was not clear what selected for cloning meant. I updated with an extra line
of description.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Oct 2020 09:46:03 -0700] rev 45693
automation: support running against Python 3.9
We just added CPython 3.9.0 to the automation environment. Let's
support actions targeting it.
One side-effect of this change is that we'll produce Windows wheels
for Python 3.9 by default. This is desirable.
Differential Revision: https://phab.mercurial-scm.org/D9189
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Oct 2020 09:22:59 -0700] rev 45692
automation: upgrade packages in Linux environment
It's been a while since we've ran `pip-compile -U`. Let's do that.
When I ran this command, black was upgraded and newer versions of
black complains about formatting differences. I didn't feel like
shaving a yak, so I pinned the current black version to avoid
churn.
I manually ran tests against all major Python versions and I'm fairly
certain no new test failures were introduced.
Differential Revision: https://phab.mercurial-scm.org/D9188
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2020 18:17:20 -0700] rev 45691
packaging: upgrade packages in Windows environment
I ran `pip-compile -U` to update all packages to latest versions.
I did this so the Windows environment is more modern.
dulwich 0.20 dropped support for Python 2.7. Rather than add
yet another requirements.txt file, I decided to just pin at an
older release to minimize complexity.
Differential Revision: https://phab.mercurial-scm.org/D9187
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2020 18:07:34 -0700] rev 45690
contrib: install Python 3.9.0
We update the Windows and Linux environments to install CPython 3.9.0,
which was released a few days ago.
Differential Revision: https://phab.mercurial-scm.org/D9186
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2020 18:02:47 -0700] rev 45689
contrib: stop installing Python 3.5 and 3.6 in Windows environment
We're only publishing Python 3.7+ wheels and other builds on Windows.
Python 3.5 and 3.6 are not supported on this platform. Let's stop
installing them in the development environment.
Differential Revision: https://phab.mercurial-scm.org/D9185
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Oct 2020 09:17:47 -0700] rev 45688
py3: convert an exception message to bytes
One of our users ran into this (unrelated to my recent work on
more specific errors).
Differential Revision: https://phab.mercurial-scm.org/D9184
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