diff --git a/kallithea/controllers/files.py b/kallithea/controllers/files.py --- a/kallithea/controllers/files.py +++ b/kallithea/controllers/files.py @@ -94,7 +94,6 @@ class FilesController(BaseRepoController category='warning') raise HTTPNotFound() except(ChangesetDoesNotExistError, LookupError), e: - log.error(traceback.format_exc()) msg = _('Such revision does not exist for this repository') h.flash(msg, category='error') raise HTTPNotFound() @@ -115,7 +114,6 @@ class FilesController(BaseRepoController if file_node.is_dir(): raise RepositoryError('given path is a directory') except(ChangesetDoesNotExistError,), e: - log.error(traceback.format_exc()) msg = _('Such revision does not exist for this repository') h.flash(msg, category='error') raise HTTPNotFound() diff --git a/kallithea/lib/vcs/backends/hg/repository.py b/kallithea/lib/vcs/backends/hg/repository.py --- a/kallithea/lib/vcs/backends/hg/repository.py +++ b/kallithea/lib/vcs/backends/hg/repository.py @@ -463,10 +463,10 @@ class MercurialRepository(BaseRepository rev_spec = "%%s & %s(%%s)" % _revset_predicates[ref_type] try: revs = self._repo.revs(rev_spec, ref_name, ref_name) - except (LookupError, ): + except LookupError: msg = ("Ambiguous identifier %s:%s for %s" % (ref_type, ref_name, self.name)) raise ChangesetDoesNotExistError(msg) - except (IndexError, ValueError, RepoLookupError, TypeError): + except RepoLookupError: msg = ("Revision %s:%s does not exist for %s" % (ref_type, ref_name, self.name)) raise ChangesetDoesNotExistError(msg) if revs: