Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:34:08 +0100] rev 43356
packaging: fix docker-centos5 - use pythonexe and set to "python" as before
Fix
92a51a45d44c .
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:18:17 +0100] rev 43355
packaging: move dockerrpm output directory creation to dockerrpm
Avoid having to compute the directory in two places in different environments.
Mads Kiilerich <mads@kiilerich.com> [Thu, 31 Oct 2019 11:53:11 +0100] rev 43354
packaging: drop "support" for unsupported Fedora versions
Fedora 31 has just been released, and Fedora 29 will be EOL in a month. Don't
spend any time thinking about dead stuff.
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:39:18 -0400] rev 43353
mail: black wants to add this blank line
I can't figure out how this got overlooked on previous runs, but here
we are. It looks like the culprit change is already public?
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:29:45 -0400] rev 43352
hghave: verify we have a black that is new enough for our format
We require what is currently the absolute latest black, so let's be paranoid.
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:17:39 -0400] rev 43351
contrib: fix up example fix configuration for our move to released black
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 22:24:14 +0100] rev 43350
phabricator: use True primitive instead of b'true' for phabupdate actions
Something I'd missed in the creatediff port. This didn't matter before with
the old PHP form style wireformat, but breaks with the new arcanist format.
Differential Revision: https://phab.mercurial-scm.org/D7152
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 15:07:56 +0100] rev 43349
setup: allow py3 install without env vars
5.2 is the first release of Mercurial where py3 support is expected to be
widely used, therefore we should allow installing it without hoop-jumping.
Differential Revision: https://phab.mercurial-scm.org/D7151
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 11:07:25 +0100] rev 43348
formatting: drop `grey`, our custom black version
Now that the official black has all we want, we can drop this.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 10:43:47 +0100] rev 43347
formatting: using black to check for formatting
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 10:41:30 +0100] rev 43346
formatting: run black version 19.10b0 on the codebase
The latest version of black is out and contains the change we needed. So we can
start using it now.
note: `test-check-format.t` will complains about this changes because it still
use `grey` and need to be migrated to `black`. See next changesets for this.
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:16:59 +0100] rev 43345
packaging: fix buildrpm whitespace
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:16:38 +0100] rev 43344
packaging: drop outdated buildrpm "tested on" comment
Packaging usually works on other versions too, and it is not efficient to
maintain the list in repo. It is already out of sync with the Makefile targets.
Mads Kiilerich <mads@kiilerich.com> [Mon, 28 Oct 2019 00:29:42 +0100] rev 43343
packaging: also include hgweb.wsgi in rpms
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 21:28:26 +0100] rev 43342
packaging: introduce Python3 support as buildrpm --python3
Just overrule the HGPYTHON3 warning.
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 21:40:21 +0100] rev 43341
packaging: be explicit about Python version in rpm spec
Fedora 31 has Python3 at /usr/bin/python ... but expect everybody to not just
find python in $PATH but be explicit about whether they want python2 or
python3. mercurial.spec just used 'python' and would fail when it unknowingly
used Python 3 and ended up with Mercurial setup.py reporting "Python 3.7
detected." and talking about the HGPYTHON3 environment variable.
For now, just be explicit about using system python2 as python executable when
building rpms.
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:17:33 +0100] rev 43340
packaging: make python snippets in rpm building python3 compatible
Fedora 31 has Python3 at /usr/bin/python, and buildrpm would fail on snippets
that use python2 syntax. Instead of forcing python2, just accept for the future
while staying backwards compatible.
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Oct 2019 21:49:48 +0900] rev 43339
py3: fix patchbomb to accept non-ASCII header value for email preview
Since mail.headencode() is disabled by -n/--test, non-ASCII header value
has to be allowed.
Spotted by Denis Laxalde.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 25 Oct 2019 12:10:45 +0200] rev 43338
tests: check patchbomb with a non-ascii commit message
This fails on Python 3 but gets fixed in the next changeset.
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:49:09 +0900] rev 43337
formatter: fix handling of None value in templater mapping
For historical reasons, None in mapping dict means there's no such keyword,
and falls back to b"". That's fine in log templates where mapping item is
generally a callable returning a value (which may be None,) but the formatter
directly puts an "evaluated" value in the mapping. So the None value has
to be lifted to wrappedvalue(None) to avoid confusion in the template engine.
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:36:52 +0900] rev 43336
config: add support for defaultvalue of list of printable elements
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:30:59 +0900] rev 43335
config: fix -Tjson to not crash due to unsupported defaultvalue types
Maybe it isn't great to ignore unsupported types at all, but otherwise
"hg config -Tjson" would crash.
Denis Laxalde <denis@laxalde.org> [Sun, 27 Oct 2019 18:12:24 +0100] rev 43334
tests: handle Message-Id email header possible wrapping
The "Message-Id" header will get wrapped with a new line when exceeding
75 characters on Python 3 (see changeset
7d4f2e4899c5 introducing usage
of email.header.Header.encode and respective doc). This will occur in an
unpredictable manner depending on the hostname's length. To make the
test output consistent across Python versions and hostname
configuration, we add a filter to unwrap this header value.
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:51:53 +0900] rev 43333
py3: leverage pycompat.long
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 25 Oct 2019 14:02:40 +0200] rev 43332
packaging: remove version info from Breaks+Replaces in Debian package
The versioned Breaks: and Replaces: cause problem when trying to install
our package over the one in Debian.
$ sudo apt install ./packages/debian-buster/mercurial_5.2~rc0+15-buster-
a2ff3aff81d2_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mercurial' instead of './packages/debian-buster/mercurial_5.2~rc0+15-buster-
a2ff3aff81d2_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mercurial : Breaks: mercurial-common (< 5.2~rc0+15-buster-
a2ff3aff81d2) but 5.2~rc0-1 is to be installed
E: Unable to correct problems, you have held broken packages.
Removing version information resolves the situation.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 17:28:57 +0200] rev 43331
py3: fix generated non-ascii message in test-notify.t
The resulting "Subject:" header contains an encoded word in Python 3 so
we have to add distinct outputs for Python 3 but underlying values are
the same:
>>> from email.header import decode_header
>>> decode_header('=?utf-8?b?w6AuLi4=?=')
[(b'\xc3\xa0...', 'utf-8')]
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 14:28:20 +0200] rev 43330
py3: decode encoding literal before passing to .decode()
bytes.decode(<encoding>) wants an str as "encoding" parameter,
it raises a TypeError if given a bytestring. encoding.encoding and
encoding.fallbackencoding are bytes values.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 16:34:43 +0200] rev 43329
py3: decode payload of notify email
This fixes one UnicodeEncodeError in test-notify.t:422 when testing the
notify hook with non-ascii content (there are more later). We only
decode on Python 3, since it's not safe for sure on Python 2.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:50:15 +0200] rev 43328
py3: decode email headers with mail.headdecode() in notify extension
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:46:16 +0200] rev 43327
py3: use stdlib's parseaddr() to get sender header in notify extension
In Python 3, email headers are unicode string so using
stringutil.email() will not work as it compares with bytestring. So
let's use email.utils.parseaddr() from the stdlib which has a consistent
behavior across Python versions. The same is done in patchbomb
extension already.