diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1265,6 +1265,7 @@ def graph(web, req, tmpl): for (id, type, ctx, vtx, edges) in fulltree()] def nodes(): + parity = paritygen(web.stripecount) for row, (id, type, ctx, vtx, edges) in enumerate(tree): entry = webutil.commonentry(web.repo, ctx) edgedata = [{'col': edge[0], @@ -1276,6 +1277,7 @@ def graph(web, req, tmpl): entry.update({'col': vtx[0], 'color': (vtx[1] - 1) % 6 + 1, + 'parity': next(parity), 'edges': edgedata, 'row': row, 'nextrow': row + 1}) diff --git a/mercurial/templates/monoblue/graph.tmpl b/mercurial/templates/monoblue/graph.tmpl --- a/mercurial/templates/monoblue/graph.tmpl +++ b/mercurial/templates/monoblue/graph.tmpl @@ -29,7 +29,6 @@
The revision graph only works with JavaScript-enabled browsers.
-
@@ -40,12 +39,6 @@ var data = {jsdata|json}; var graph = new Graph(); graph.scale({bg_height}); - - graph.vertex = function(x, y, radius, color, parity, cur) \{ - Graph.prototype.vertex.apply(this, arguments); - return ['
  • ', '']; - } - graph.render(data); diff --git a/mercurial/templates/monoblue/graphentry.tmpl b/mercurial/templates/monoblue/graphentry.tmpl --- a/mercurial/templates/monoblue/graphentry.tmpl +++ b/mercurial/templates/monoblue/graphentry.tmpl @@ -1,7 +1,9 @@ -
  • - - {desc|strip|firstline|escape|nonempty} - - {alltags} -
    {date|rfc822date}, by {author|person}
    +
  • +
    + + {desc|strip|firstline|escape|nonempty} + + {alltags} +
    {date|rfc822date}, by {author|person}
    +
  • diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css --- a/mercurial/templates/static/style-monoblue.css +++ b/mercurial/templates/static/style-monoblue.css @@ -478,27 +478,29 @@ canvas { top: -0.7em; } -ul#nodebgs li.parity0 { +ul#graphnodes li.parity0 { background: #F1F6F7; } -ul#nodebgs li.parity1 { +ul#graphnodes li.parity1 { background: #FFFFFF; } ul#graphnodes { - position: absolute; - z-index: 10; - top: 7px; list-style: none inside none; + margin: 0; + padding: 0; } -ul#nodebgs { - list-style: none inside none; +ul#graphnodes li { + height: 37px; + overflow: visible; + padding-top: 2px; } -ul#graphnodes li, ul#nodebgs li { - height: 39px; +ul#graphnodes li .fg { + position: absolute; + z-index: 10; } ul#graphnodes li .info { diff --git a/tests/test-hgweb-symrev.t b/tests/test-hgweb-symrev.t --- a/tests/test-hgweb-symrev.t +++ b/tests/test-hgweb-symrev.t @@ -731,9 +731,9 @@ Set up the repo $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'graph?style=monoblue' | egrep $REVLINKS
  • files
  • - third - second - first + third + second + first less more | (0) tip @@ -813,8 +813,8 @@ Set up the repo $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'graph/xyzzy?style=monoblue' | egrep $REVLINKS
  • files
  • - second - first + second + first less more | (0) tip