Thu, 15 Mar 2018 20:27:38 +0900 log: do no expect templateresources() returning a dict
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Mar 2018 20:27:38 +0900] rev 37072
log: do no expect templateresources() returning a dict The resources dict will be replaced with new resource mapper object, which won't implement __getitem__(key). Share the whole resources object with _graphnodeformater() to make porting easier.
Fri, 16 Mar 2018 23:11:55 +0900 templatekw: mark _showlist() as deprecated (API)
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 23:11:55 +0900] rev 37071
templatekw: mark _showlist() as deprecated (API) .. api:: ``templatekw._showlist()`` is deprecated in favor of ``templateutil._showcompatlist()``, which takes ``context`` in place of ``templ``.
Fri, 16 Mar 2018 23:09:21 +0900 templater: drop 'templ' from resources dict
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 23:09:21 +0900] rev 37070
templater: drop 'templ' from resources dict Partially resolves cycle, templ -> context -> templ. This will make it easier to replace the resources dict with new immutable resource mapper interface.
Fri, 16 Mar 2018 23:01:51 +0900 templatekw: stop using _showlist() which is about to be deprecated
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 23:01:51 +0900] rev 37069
templatekw: stop using _showlist() which is about to be deprecated Use the new context-based API instead.
Fri, 16 Mar 2018 22:47:15 +0900 templater: use template context to render old-style list template
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 22:47:15 +0900] rev 37068
templater: use template context to render old-style list template Prepares for dropping the 'templ' resource. This means old-style list templates are processed by the same engine class as the one for the list node. I think that's fine since templates for the same list should be tightly coupled, and I believe the extension point for the engine classes isn't actually used. Now templatekw._showlist() is a compatibility wrapper for _showcompatlist(), and will be deprecated soon. The function is still marked as private since I plan to change the interface to get rid of closures capturing context and mapping.
Fri, 16 Mar 2018 22:36:40 +0900 templater: add context.preload(t) to test if the specified template exists
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 22:36:40 +0900] rev 37067
templater: add context.preload(t) to test if the specified template exists I'm going to remove 'templ' from the resources dict because it is the only resource that the caller can't provide. This also implies that putting 'templ' into the resources dict creates a reference cycle. context.preload(t) will be used in place of templater.__contains__().
Sun, 18 Mar 2018 12:28:19 +0900 annotate: pack line content into annotateline object (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 12:28:19 +0900] rev 37066
annotate: pack line content into annotateline object (API) Just for code readability. We can do that since the annotateline type is no longer used while computing the history.
Tue, 13 Mar 2018 22:18:06 +0900 annotate: drop linenumber flag from fctx.annotate() (API)
Yuya Nishihara <yuya@tcha.org> [Tue, 13 Mar 2018 22:18:06 +0900] rev 37065
annotate: drop linenumber flag from fctx.annotate() (API) Now linenumber=True is fast enough to be enabled by default.
Mon, 12 Mar 2018 20:45:10 +0900 annotate: do not construct attr.s object per line while computing history
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Mar 2018 20:45:10 +0900] rev 37064
annotate: do not construct attr.s object per line while computing history Unfortunately, good abstraction has a cost. It's way slower to construct an annotateline() object than creating a plain tuple or a list. This patch changes the internal data structure from row-based to columnar, so the decorate() function can be instant (i.e. no Python in hot loop.) For code readability, the outermost tuple is switched to an attr.s object instead. (original, row-based attr.s) $ hg annot mercurial/commands.py --time > /dev/null time: real 11.470 secs (user 11.400+0.000 sys 0.070+0.000) $ hg annot mercurial/commands.py --time --line-number > /dev/null time: real 39.590 secs (user 39.500+0.000 sys 0.080+0.000) (this patch, columnar) $ hg annot mercurial/commands.py --time > /dev/null time: real 11.780 secs (user 11.710+0.000 sys 0.070+0.000) $ hg annot mercurial/commands.py --time --line-number > /dev/null time: real 12.240 secs (user 12.170+0.000 sys 0.090+0.000) (cf. 4.3.3, row-based tuple) $ hg annot mercurial/commands.py --time --line-number > /dev/null time: real 19.540 secs (user 19.460+0.000 sys 0.080+0.000)
Thu, 15 Mar 2018 18:05:49 -0700 wireproto: explicitly track which requests are active
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Mar 2018 18:05:49 -0700] rev 37063
wireproto: explicitly track which requests are active We previously only tracked which requests are receiving. A misbehaving client could accidentally have multiple requests with the same ID in flight. We now explicitly track which request IDs are currently active. We make it illegal to receive a frame associated with a request ID that has already been dispatched. Differential Revision: https://phab.mercurial-scm.org/D2901
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip