Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 10:26:33 -0500] rev 40548
remotefilelog: fix various whitespace issues in docstring
Differential Revision: https://phab.mercurial-scm.org/D5230
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 19:42:50 +0900] rev 40547
ui: add config knob to redirect status messages to stderr (API)
This option can be used to isolate structured output from status messages.
For now, "stdio" (stdout/err pair) and "stderr" are supported. In future
patches, I'll add the "channel" option which will send status messages to
a separate command-server channel with some metadata attached, maybe in
CBOR encoding.
This is a part of the generic templating plan:
https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Sanity_check_output
.. api::
Status messages may be sent to a dedicated stream depending on
configuration. Don't use ``ui.status()``, etc. as a shorthand for
conditional writes. Use ``ui.write()`` for data output.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Nov 2018 22:25:12 -0500] rev 40546
phabricator: ensure the command summaries are available in extension help
Previously, `hg help phabricator` listed the 3 supported commands at the bottom
of the extension help, but said "no help text available".
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Nov 2018 23:49:39 +0000] rev 40545
hgweb: cast bytearray to bytes
PEP-3333 seems to indicate that bytes is the only allowed type that can
be used to express the output of a WSGI application. And some WSGI
environments seem to enforce this (mod_wsgi does).
This commit universally casts bytearray instances to bytes to appease
the WSGI specification.
I found this because wireprotov2 is emitting bytearray instances. I'd
like to keep things that way because the way it builds a data
structure, bytearray is more efficient. I'd rather keep the low-level
code efficient (and using bytearray) and cast at the edges than impose
a performance penalty on code that may run outside WSGI contexts.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 08 Nov 2018 20:04:07 -0500] rev 40544
help: unjumble the list of default config values for `internals.config`
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 20:53:31 +0900] rev 40543
ui: hide fin/fout/ferr attributes behind @property functions
This allows keeping references to fout/ferr/fin which are updated when these
properties are changed. See the next patch.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 17:42:53 +0900] rev 40542
ui: label prompt and echo messages
I'm going to add a dedicated command-server channel for status messages,
which carries metadata alongside a message text. 'ui.*' label provides a
hint how message text should be processed.
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 18:17:30 +0900] rev 40541
ui: add inner function to select write destination
I'm going to add a config knob to redirect any status messages to stderr.
This function helps to switch underlying file objects.
# no-check-commit because of existing write_err() function
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 18:04:22 +0900] rev 40540
ui: remove _write() and _write_err() functions
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 18:03:09 +0900] rev 40539
ui: move pre/post processes from low-level write()s to _writenobuf()
This helps adding a dedicated stream for status/error messages. I don't
want to add _write*() function per stream.
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 17:56:17 +0900] rev 40538
ui: pass in file object to _writenobuf()
See the subsequent patches for why. The "if" block in _writenobuf() will
be removed soon.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Nov 2018 17:24:39 +0100] rev 40537
perf: fix perfrevlogrevisions --reverse
Currently, 'endrev' equals `len(revlog)`, a revision that does not exist.
When asking for the reverse order, the arguments passed to xrange are
`xrange(len(revlog), startrev)` which then crash.
We need to offset 'endrev' by one so we don't crash anymore. Also, we offset
'startrev' to ensure we get the same number of revisions with and without the
`--reverse` option.
Differential Revision: https://phab.mercurial-scm.org/D5228
Boris Feld <boris.feld@octobus.net> [Tue, 06 Nov 2018 11:54:15 +0100] rev 40536
procutil: import concerns about creationflags on Windows from D1701
I don't have the need anymore for the change in D1701 nor the time to
investigate the changes on all supported Windows platforms.
I import the stuff I learned on D1701 in the `runbgcommand` so the next people
working on it can starts from there.
Differential Revision: https://phab.mercurial-scm.org/D5229
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 05 Nov 2018 14:14:32 -0800] rev 40535
localrepo: extract loading of hgrc files to standalone function
Various 3rd party extensions supplement where per-repo config data
lives. Looking at their sources, they resort to unorthodox means to
inject the config data. And the way they do it is susceptible to
corner cases. e.g. not processing automatic extension loads,
not reacting to new or disabled extensions in configs, etc.
This commit extracts the core logic of loading hgrc files into
a standalone function so there is a clear function that can be
monkeypatched to inject per-repo config data at repository open
time.
Differential Revision: https://phab.mercurial-scm.org/D5221