##// END OF EJS Templates
hgweb: always return iterable from @webcommand functions (API)...
hgweb: always return iterable from @webcommand functions (API) We had to hack up this function to support our transition to the new response API. Now that we're done with the transition (!!), we can return to returning an iterator of content chunks from these functions. It is tempting to return a normal object and not a generator. However, as the keyword extension demonstrates, extensions may wish to wrap commands and have a try..finally block around execution. Since there is a generator producing content and that generator could be executing code, the try..finally needs to live for as long as the generator is running. That means we have to return a generator so wrappers can consume the generator inside a try..finally. .. api:: hgweb @webcommand functions must use the new response object passed in via ``web.res`` to initiate sending of a response. The hgweb WSGI application will no longer start sending the response automatically. Differential Revision: https://phab.mercurial-scm.org/D2796
Gregory Szorc -
r36896:67fb0dca default
Show More
Name Size Modified Last Commit Author
/ mercurial / hgweb
__init__.py Loading ...
common.py Loading ...
hgweb_mod.py Loading ...
hgwebdir_mod.py Loading ...
request.py Loading ...
server.py Loading ...
webcommands.py Loading ...
webutil.py Loading ...
wsgicgi.py Loading ...