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 36475
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 36474
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 36473
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 36472
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 36471
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 36470
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 36469
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 36468
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 36467
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 36466
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
Mon, 26 Feb 2018 16:22:15 +0530 py3: use email.generator module instead of email.Generator
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 26 Feb 2018 16:22:15 +0530] rev 36465
py3: use email.generator module instead of email.Generator On py2: >>> import email >>> import email.generator as emailgen >>> email.Generator.Generator is emailgen.Generator True email.Generator is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2454
Mon, 26 Feb 2018 16:16:37 +0530 py3: use pycompat.strkwargs to convert kwargs keys to str
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 26 Feb 2018 16:16:37 +0530] rev 36464
py3: use pycompat.strkwargs to convert kwargs keys to str Differential Revision: https://phab.mercurial-scm.org/D2452
Mon, 26 Feb 2018 01:01:35 -0500 py3: whitelist test-push-http.t as passing
Augie Fackler <augie@google.com> [Mon, 26 Feb 2018 01:01:35 -0500] rev 36463
py3: whitelist test-push-http.t as passing Differential Revision: https://phab.mercurial-scm.org/D2451
Mon, 26 Feb 2018 00:51:41 -0500 util: handle fileno() on Python 3 throwing io.UnsupportedOperation
Augie Fackler <augie@google.com> [Mon, 26 Feb 2018 00:51:41 -0500] rev 36462
util: handle fileno() on Python 3 throwing io.UnsupportedOperation Fortunately, the exception exists on Python 2 so we don't have to do something weirder than this. Differential Revision: https://phab.mercurial-scm.org/D2450
(0) -30000 -10000 -3000 -1000 -300 -100 -14 +14 +100 +300 +1000 +3000 +10000 tip