Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/webcommands.py @ 6217:fe8dbbe9520d
Avoid importing mercurial.node/mercurial.repo stuff from mercurial.hg
author | Joel Rosdahl <joel@rosdahl.net> |
---|---|
date | Thu, 06 Mar 2008 22:51:16 +0100 |
parents | 948a41e77902 |
children | 2c370f08c486 |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Thu Mar 06 22:23:41 2008 +0100 +++ b/mercurial/hgweb/webcommands.py Thu Mar 06 22:51:16 2008 +0100 @@ -6,7 +6,8 @@ # of the GNU General Public License, incorporated herein by reference. import os, mimetypes -from mercurial import revlog, util, hg +from mercurial import revlog, util +from mercurial.repo import RepoError from common import staticfile, ErrorResponse, HTTP_OK, HTTP_NOT_FOUND # __all__ is populated with the allowed commands. Be sure to add to it if @@ -67,7 +68,7 @@ hi = web.repo.changelog.count() - 1 try: ctx = web.repo.changectx(hi) - except hg.RepoError: + except RepoError: return web.search(tmpl, hi) # XXX redirect to 404 page? return web.changelog(tmpl, ctx, shortlog = shortlog)