Sun, 25 Feb 2018 13:24:35 +0900 templatekw: add 'requires' flag to switch to exception-safe interface
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 13:24:35 +0900] rev 36445
templatekw: add 'requires' flag to switch to exception-safe interface The current templatekw interface, f(repo, ctx, templ, **args), is horrible because it's quite easy to encounter TypeError, ValueError, etc. It's also bad for Python 3 porting due to the **kwargs issue. This patch introduces a flag to switch to new f(context, mapping) API seen in templater functions. The requirement spec isn't verified (yet) because context.resource() can gracefully raise a ResourceUnavailable exception, but it's planned to be used as a filter in the help, such as "Revision Keywords" (if 'ctx' in requires), "File Keywords" (if 'fctx' in requires), etc. showauthor() is ported to the new API as an example. 20 more follows.
Sun, 25 Feb 2018 12:50:30 +0900 templater: specialize ResourceUnavailable error so that it can be caught
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 12:50:30 +0900] rev 36444
templater: specialize ResourceUnavailable error so that it can be caught See the next patch how it will be used.
Sun, 25 Feb 2018 12:47:53 +0900 templater: move specialized exception types to top
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 12:47:53 +0900] rev 36443
templater: move specialized exception types to top I'm going to add one more exception type.
Sun, 25 Feb 2018 14:14:33 +0900 templatekw: minimize resource dependency of {envvars} and {termwidth}
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 14:14:33 +0900] rev 36442
templatekw: minimize resource dependency of {envvars} and {termwidth} These keywords can be evaluated without a repo.
Sun, 25 Feb 2018 14:12:34 +0900 templatekw: simply override {graphwidth} function by mapping variable
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 14:12:34 +0900] rev 36441
templatekw: simply override {graphwidth} function by mapping variable
Sun, 25 Feb 2018 16:40:41 +0900 remotenames: drop redundant templatekw names from help text
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 16:40:41 +0900] rev 36440
remotenames: drop redundant templatekw names from help text Also removed the second "List of" phrase, which is obvious from the type "List of strings."
Sun, 25 Feb 2018 13:42:51 +0900 narrow: drop redundant templatekw/revset names from help text
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 13:42:51 +0900] rev 36439
narrow: drop redundant templatekw/revset names from help text ":<name>:" is automatically added by the registrar.
Sun, 25 Feb 2018 21:04:12 -0500 run-tests: don't mask errors when a server fails to start
Matt Harbison <matt_harbison@yahoo.com> [Sun, 25 Feb 2018 21:04:12 -0500] rev 36438
run-tests: don't mask errors when a server fails to start There are sporadic instances of this on Windows. They seem to happen more frequently after the test machine is rebooted, although the only way to hit it on my laptop is to loop certain tests with -j9 for hours. The problem with masking out the specific failure is that there's no way to know if it's the same line in the test that's failing, or if it is random. The justification for adding this masking in 52e9e63f1495 was that the failures occur regularly, but that's not the case anymore. The port number is still printed, in case that turns out to be useful.
Mon, 26 Feb 2018 17:27:08 +0530 py3: use bytes instead of str in isinstance
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 26 Feb 2018 17:27:08 +0530] rev 36437
py3: use bytes instead of str in isinstance Internally we use bytes everywhere, and str on Python 3 is unicodes, so we need to make sure we are doing the right check. Differential Revision: https://phab.mercurial-scm.org/D2458
Mon, 26 Feb 2018 18:00:29 +0530 py3: convert a map expression into list comprehension
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 26 Feb 2018 18:00:29 +0530] rev 36436
py3: convert a map expression into list comprehension map returns a map object on Python 3 and here we wanted a list instead. Differential Revision: https://phab.mercurial-scm.org/D2456
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip