logtoprocess: drop support for ui.log() call with invalid msg arguments (BC)
Before, the logtoprocess extension put a formatted message into $MSG1, and
its arguments to $MSG2... If the specified arguments couldn't be formatted
because of a caller bug, an unformatted message was passed in to $MSG1
instead of exploding. This behavior doesn't make sense.
Since I'm planning to formalize the ui.log() interface such that we'll no
longer have to extend the ui class, I want to remove any features not
conforming to the ui.log() API. So this patch removes the support for
ill-formed arguments, and $MSG{n} (where n > 1) parameters which seems
useless as long as the message can be formatted. The $MSG1 variable isn't
renamed for the maximum compatibility.
In future patches, a formatted msg will be passed to a processlogger object,
instead of overriding the ui.log() function.
.. bc::
The logtoprocess extension no longer supports invalid ``ui.log()``
arguments. A log message is always formatted and passed in to the
``$MSG1`` environment variable.
logtoprocess: leverage procutil.shellenviron() to stringify variables (BC)
This should make the extension more Py3 friendly. The environment variables
of the main process are copied to the dict by shellenviron().
.. bc::
Boolean options passed to the logtoprocess extension are now formatted
as ``0`` or ``1`` instead of ``None``, ``False``, or ``True``.
templater: check invalid use of list expression properly (
issue5920)
The error message is still cryptic, but it should be better.
tests: fix wireproto redirection test on systems without tls1.2
Our automated package builder has some ancient configuration that
lacks modern TLS, which is how we noticed this.
Tested: the test now passes on both macOS High Sierra (has tls1.2) and
Ubuntu Trusty (which does not).
py3: add b suffix to make sure file is opened in bytes mode
Differential Revision: https://phab.mercurial-scm.org/D5263
py3: don't use dict.iterkeys()
dict.iterkeys() is not present on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5262