D2817: hgweb: construct static URL like hgweb does
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa5c478843c82: hgweb: construct static URL like hgweb does (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2817?vs=6883=6947 REVISION DETAIL https://phab.mercurial-scm.org/D2817 AFFECTED FILES mercurial/hgweb/hgwebdir_mod.py CHANGE DETAILS 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 @@ -542,7 +542,8 @@ sessionvars = webutil.sessionvars(vars, r'?') logourl = config('web', 'logourl') logoimg = config('web', 'logoimg') -staticurl = config('web', 'staticurl') or url + 'static/' +staticurl = (config('web', 'staticurl') + or wsgireq.req.apppath + '/static/') if not staticurl.endswith('/'): staticurl += '/' To: indygreg, #hg-reviewers, durin42 Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D2817: hgweb: construct static URL like hgweb does
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY hgwebdir has a bit of code for constructing URLs. This reinvents wheels from our parsedrequest instance. And sometimes the behavior varies from what hgweb does. We'll want to converge that behavior. This commit changes hgwebdir so its staticurl template keyword is constructed the same way as hgweb's. There's probably room to factor this into a shared function. But let's solve the problem of divergence first. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2817 AFFECTED FILES mercurial/hgweb/hgwebdir_mod.py CHANGE DETAILS 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 @@ -542,7 +542,8 @@ sessionvars = webutil.sessionvars(vars, r'?') logourl = config('web', 'logourl') logoimg = config('web', 'logoimg') -staticurl = config('web', 'staticurl') or url + 'static/' +staticurl = (config('web', 'staticurl') + or wsgireq.req.apppath + '/static/') if not staticurl.endswith('/'): staticurl += '/' To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel