Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/protocol.py @ 5963:5be210afe1b8
hgweb: explicitly check if requested command exists
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 28 Jan 2008 14:58:03 +0100 |
parents | d0576d065993 |
children | 948a41e77902 |
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py Mon Jan 28 13:42:40 2008 +0100 +++ b/mercurial/hgweb/protocol.py Mon Jan 28 14:58:03 2008 +0100 @@ -10,6 +10,14 @@ from mercurial.i18n import gettext as _ from mercurial.node import * +# __all__ is populated with the allowed commands. Be sure to add to it if +# you're adding a new command, or the new command won't work. + +__all__ = [ + 'lookup', 'heads', 'branches', 'between', 'changegroup', + 'changegroupsubset', 'capabilities', 'unbundle', 'stream_out', +] + def lookup(web, req): try: r = hex(web.repo.lookup(req.form['key'][0]))