mercurial/hgweb/webcommands.py
changeset 25660 328739ea70c3
parent 25602 85fb416f2fa7
child 26129 a103ecb8a04a
equal deleted inserted replaced
25659:d60678a567a9 25660:328739ea70c3
    74         req.respond(HTTP_OK, web.ctype)
    74         req.respond(HTTP_OK, web.ctype)
    75         return content
    75         return content
    76 
    76 
    77     try:
    77     try:
    78         fctx = webutil.filectx(web.repo, req)
    78         fctx = webutil.filectx(web.repo, req)
    79     except error.LookupError, inst:
    79     except error.LookupError as inst:
    80         try:
    80         try:
    81             content = manifest(web, req, tmpl)
    81             content = manifest(web, req, tmpl)
    82             req.respond(HTTP_OK, web.ctype)
    82             req.respond(HTTP_OK, web.ctype)
    83             return content
    83             return content
    84         except ErrorResponse:
    84         except ErrorResponse:
   158     path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
   158     path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
   159     if not path:
   159     if not path:
   160         return manifest(web, req, tmpl)
   160         return manifest(web, req, tmpl)
   161     try:
   161     try:
   162         return _filerevision(web, req, tmpl, webutil.filectx(web.repo, req))
   162         return _filerevision(web, req, tmpl, webutil.filectx(web.repo, req))
   163     except error.LookupError, inst:
   163     except error.LookupError as inst:
   164         try:
   164         try:
   165             return manifest(web, req, tmpl)
   165             return manifest(web, req, tmpl)
   166         except ErrorResponse:
   166         except ErrorResponse:
   167             raise inst
   167             raise inst
   168 
   168