Mercurial > hg
view tests/test-newcgi.t @ 45796:e9555305c5c6
templates: include all non-branch namespaces in default one-line summary
I left out branches and custom namespaces on purpose from D9252
because I figured that people like us (Google) who have custom
namespaces can also have custom configs. However, I just realized that
this makes everyone with the topic extension lose the topic they've
had in rebase output for a long time (ever since someone was nice
enough to add it in D741). Sorry about the churn.
The more generic template couldn't easily keep the "log.bookmark"
label in the template because the namespace is called "bookmarks"
(plural). That means that we can't be compatible with users' existing
configs for "log.bookmark", so I decided to change the labels to be in
a brand-new "oneline-summary" namespace.
Differential Revision: https://phab.mercurial-scm.org/D9262
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 29 Oct 2020 09:03:08 -0700 |
parents | 9448b2e4c9fa |
children | d5cd1fd690f3 |
line wrap: on
line source
#require no-msys # MSYS will translate web paths as if they were file paths This tests if CGI files from after d0db3462d568 but before d74fc8dec2b4 still work. $ hg init test $ cat >hgweb.cgi <<HGWEB > #!$PYTHON > # > # An example CGI script to use hgweb, edit as necessary > > import cgitb > cgitb.enable() > > from mercurial import demandimport; demandimport.enable() > from mercurial.hgweb import hgweb > from mercurial.hgweb import wsgicgi > from mercurial.hgweb.request import wsgiapplication > > def make_web_app(): > return hgweb(b"test", b"Empty test repository") > > wsgicgi.launch(wsgiapplication(make_web_app)) > HGWEB $ chmod 755 hgweb.cgi $ cat >hgweb.config <<HGWEBDIRCONF > [paths] > test = test > HGWEBDIRCONF $ cat >hgwebdir.cgi <<HGWEBDIR > #!$PYTHON > # > # An example CGI script to export multiple hgweb repos, edit as necessary > > import cgitb > cgitb.enable() > > from mercurial import demandimport; demandimport.enable() > from mercurial.hgweb import hgwebdir > from mercurial.hgweb import wsgicgi > from mercurial.hgweb.request import wsgiapplication > > def make_web_app(): > return hgwebdir(b"hgweb.config") > > wsgicgi.launch(wsgiapplication(make_web_app)) > HGWEBDIR $ chmod 755 hgwebdir.cgi $ . "$TESTDIR/cgienv" $ "$PYTHON" hgweb.cgi > page1 $ "$PYTHON" hgwebdir.cgi > page2 $ PATH_INFO="/test/" $ PATH_TRANSLATED="/var/something/test.cgi" $ REQUEST_URI="/test/test/" $ SCRIPT_URI="http://hg.omnifarious.org/test/test/" $ SCRIPT_URL="/test/test/" $ "$PYTHON" hgwebdir.cgi > page3 $ grep -i error page1 page2 page3 [1]