Mercurial > hg
view tests/test-wsgicgi.t @ 51588:1574718fa62f
profiler: flush after writing the profiler output
Otherwise, the profiler output might only partially appears until the next flush
of the buffer. Since profiling often happens for long operation, the next flush
can be a long time away.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 14 Apr 2024 02:36:55 +0200 |
parents | 04bfcb416745 |
children | 46afce95e5a5 |
line wrap: on
line source
$ hg init test $ cat >hgweb.cgi <<HGWEB > #!$PYTHON > from mercurial import demandimport; demandimport.enable() > from mercurial.hgweb import hgweb > from mercurial.hgweb import wsgicgi > application = hgweb(b"test", b"Empty test repository") > wsgicgi.launch(application) > HGWEB $ chmod 755 hgweb.cgi Check that non-ASCII bytes roundtrip correctly. $ . "$TESTDIR/cgienv" $ PATH_INFO="/rev/$(python -c 'import sys; sys.stdout.buffer.write(b"\xe2\x80\x94")')"; export PATH_INFO $ QUERY_STRING="style=raw"; export QUERY_STRING $ "$PYTHON" ./hgweb.cgi | grep error error: unknown revision '\xe2\x80\x94' (esc)