# HG changeset patch # User Takumi IINO # Date 2014-01-07 15:35:03 # Node ID 43cfad930d385c411657afa4a352f150a209f410 # Parent 1bcf669084bb794b663eb51ee16f4377b8f1ef69 hgweb: avoid invalid infinity scroll request when overwritten web.style Infinity scroll is broken when you override the web.style in the following ways: $ hg --config='web.style=gitweb' serve $ open http://localhost:8080/shortlog?style=paper ajaxScrollInit should use http://localhost:8080/shortlog/%next%?style=paper. however, http://localhost:8080/shortlog/%next% is used actually. It is missing style parameter. This patch add style parameter to request url. diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -373,6 +373,7 @@ class hgweb(object): "motd": motd, "sessionvars": sessionvars, "pathdef": makebreadcrumb(req.url), + "style": style, }) return tmpl diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -448,7 +448,9 @@ class hgwebdir(object): "logourl": logourl, "logoimg": logoimg, "staticurl": staticurl, - "sessionvars": sessionvars}) + "sessionvars": sessionvars, + "style": style, + }) return tmpl def updatereqenv(self, env): diff --git a/mercurial/templates/paper/graph.tmpl b/mercurial/templates/paper/graph.tmpl --- a/mercurial/templates/paper/graph.tmpl +++ b/mercurial/templates/paper/graph.tmpl @@ -124,7 +124,7 @@ graph.render(data);