Changeset - 7268209e8843
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2019-01-07 00:00:22
mads@kiilerich.com
Grafted from: e33e6926d29e
middleware: drop special handling of hg RepoError

The 'not found' case should never happen - we check that repo exists before
calling out to hg.

And the Mercurial RepoError handling was muting if *not* 'not found'. That
seems very harmful - better to get a clear error.

We are thus better without the special handling of RepoError.
1 file changed with 0 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/middleware/simplehg.py
Show inline comments
 
@@ -151,9 +151,6 @@ class SimpleHg(BaseVCSController):
 
            environ['REPO_NAME'] = str_repo_name # used by hgweb_mod.hgweb
 
            app = self.__make_app(repo_path, baseui)
 
            return app(environ, start_response)
 
        except RepoError as e:
 
            if str(e).find('not found') != -1:
 
                return HTTPNotFound()(environ, start_response)
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            return HTTPInternalServerError()(environ, start_response)
0 comments (0 inline, 0 general)