Thu, 14 Dec 2017 21:30:00 +0800 hgweb: update graph function docstring
Anton Shestakov <av6@dwimlabs.net> [Thu, 14 Dec 2017 21:30:00 +0800] rev 35411
hgweb: update graph function docstring
Tue, 12 Dec 2017 22:05:21 -0800 rebase: fix for hgsubversion
Phil Cohen <phillco@fb.com> [Tue, 12 Dec 2017 22:05:21 -0800] rev 35410
rebase: fix for hgsubversion 5c25fe7fb1e broke something in the hgsubversion test path, causing it raise an abort (Abort: nothing to merge) during a perfectly good rebase. I tracked it down to this change. It's probably not hgsubversion related. I suspect that using the same `wctx` from before the initial update causes problems with the wctx's cached manifest property. I noticed we also sometimes stick random gunk on the wctx object in other places (like in `copies.py`) so it's probably best to reset it for now. The line I added before was actually useless since we don't pass wctx to the initial `merge.update`, so it defaults to `repo[None]`. So I just removed it. Differential Revision: https://phab.mercurial-scm.org/D1679
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
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip