Mon, 11 Dec 2017 15:43:56 +0800 hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net> [Mon, 11 Dec 2017 15:43:56 +0800] rev 35409
hgweb: render next pages on /graph incrementally Previously, when user scrolled down to see the next page on /graph, all hgweb did was re-render everything that would be visible (by simply incrementing revcount). It was not efficient at all, and this patch makes /graph page behave similarly to the regular /log: every new page only consists of new changesets, no duplication, and only jsdata is based on the full set of changesets required to build accurate graph. This is achieved by adding "?graphtop=<node>" to the next page URL template, effectively remembering where the graph started, and using that value to create the new `tree` that covers the whole visible graph. That variable is then used to produce jsdata for redrawing graph client-side. nextentry is used for the same purpose as on /log page (to format the next page URL), but it's not a part of the graph.
Mon, 11 Dec 2017 13:47:58 +0800 hgweb: split graphdata() into jsdata() and nodes()
Anton Shestakov <av6@dwimlabs.net> [Mon, 11 Dec 2017 13:47:58 +0800] rev 35408
hgweb: split graphdata() into jsdata() and nodes() nodes keyword passed to the template can be any iterator, but jsdata needs to be a list because it gets JSONified.
Sun, 10 Dec 2017 15:56:22 +0800 hgweb: calculate <canvas> width and height client-side
Anton Shestakov <av6@dwimlabs.net> [Sun, 10 Dec 2017 15:56:22 +0800] rev 35407
hgweb: calculate <canvas> width and height client-side hgweb determines and passes to templates some variables related to graph appearance, like bg_height, canvaswidth and canvasheight. bg_height was and still is used for graph.scale() call in graph.tmpl, and the two latter variables were used in <canvas> element as width and height properties, and they were set before JS code got to run. Setting these properties server-side doesn't make a lot of sense, because a graph that has been scaled should calculate things like width and height on its own when being rendered. Let's move (re)sizing <canvas> to JavaScript (to Graph.render function) and stop parsing HTML with regular expressions just to know new width and height. That extra loop that only counts cols is required because <canvas> can't be resized after or in the process of rendering (or it gets cleared). Incidentally, SVG doesn't have this problem and I'm hoping to switch graph to using it in future. There also was truecanvasheight, but according to hg grep --all it was never used, see d490edc71146.
Fri, 08 Dec 2017 21:50:11 +0800 hgweb: filter graphmod.colored() output before iterating over it
Anton Shestakov <av6@dwimlabs.net> [Fri, 08 Dec 2017 21:50:11 +0800] rev 35406
hgweb: filter graphmod.colored() output before iterating over it Consumers in this function use output of graphmod.colored(), but only want items with type == CHANGESET, so let's filter it early. This is primarily just a refactoring, but it also fixes a potential small bug with `rows = len(tree)` (this variable is used for "Rows shown" line in raw-graph) if there are items of other types.
Mon, 11 Dec 2017 05:56:35 +0530 py3: introduce pycompat.ziplist as zip is a generator on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Dec 2017 05:56:35 +0530] rev 35405
py3: introduce pycompat.ziplist as zip is a generator on Python 3 Similar to map, the return value of zip was also turned into a generator on Python 3. We have multiple occurences in our codebase where we retrieve the values of zip multiple times, so let's introduce pycompat.ziplist similar to pycompat.maplist. Differential Revision: https://phab.mercurial-scm.org/D1675
Mon, 11 Dec 2017 05:26:46 +0530 py3: pass bytes from extension to ui.write() in test-revlog-mmapindex.t
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Dec 2017 05:26:46 +0530] rev 35404
py3: pass bytes from extension to ui.write() in test-revlog-mmapindex.t This makes the test pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D1674
Sun, 10 Dec 2017 06:36:48 +0530 py3: handle keyword arguments correctly in hgext/record.py
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Dec 2017 06:36:48 +0530] rev 35403
py3: handle keyword arguments correctly in hgext/record.py Differential Revision: https://phab.mercurial-scm.org/D1673
Sun, 10 Dec 2017 06:36:35 +0530 py3: handle keyword arguments correctly in bundlerepo.py
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Dec 2017 06:36:35 +0530] rev 35402
py3: handle keyword arguments correctly in bundlerepo.py Differential Revision: https://phab.mercurial-scm.org/D1672
Sun, 10 Dec 2017 06:36:20 +0530 py3: handle keyword arguments correctly in debugcommands.py
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Dec 2017 06:36:20 +0530] rev 35401
py3: handle keyword arguments correctly in debugcommands.py Differential Revision: https://phab.mercurial-scm.org/D1671
Mon, 11 Dec 2017 09:27:40 -0800 memfilectx: make changectx argument mandatory in constructor (API)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Dec 2017 09:27:40 -0800] rev 35400
memfilectx: make changectx argument mandatory in constructor (API) committablefilectx has three subclasses: workingfilectx, memfilectx, and overlayfilectx. committablefilectx takes an optional (change) ctx instance to its constructor. If it's provided, it's set on the instance as self._changectx. If not, that property is supposed to be defined by the class. However, only workingfilectx does that. The other two will have the property undefined if it's not passed in the constructor. That seems bad to me. This patch makes the changectx argument to the memfilectx constructor mandatory because that fixes the failure I ran into. It seems like we should also fix the overlayfilectx case. Differential Revision: https://phab.mercurial-scm.org/D1658
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip