# HG changeset patch # User Marcin Kuzminski # Date 2013-03-27 18:38:05 # Node ID 03028bf372d7283650c911fc90e3302f946a321c # Parent 0e18540fd1c736db1d3af8d30517f5670b2ceb20 missing changesets should return 404 not redirect + flash. It feels more correct. diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py +++ b/rhodecode/controllers/changeset.py @@ -26,7 +26,7 @@ import logging import traceback from collections import defaultdict -from webob.exc import HTTPForbidden, HTTPBadRequest +from webob.exc import HTTPForbidden, HTTPBadRequest, HTTPNotFound from pylons import tmpl_context as c, url, request, response from pylons.i18n.translation import _ @@ -204,7 +204,7 @@ class ChangesetController(BaseRepoContro except (RepositoryError, ChangesetDoesNotExistError, Exception), e: log.error(traceback.format_exc()) h.flash(str(e), category='error') - return redirect(url('changeset_home', repo_name=c.repo_name)) + raise HTTPNotFound() c.changes = OrderedDict() diff --git a/rhodecode/templates/errors/error_document.html b/rhodecode/templates/errors/error_document.html --- a/rhodecode/templates/errors/error_document.html +++ b/rhodecode/templates/errors/error_document.html @@ -33,16 +33,16 @@ -
- <% messages = h.flash.pop_messages() %> - % if messages: - - % endif -
+
+ <% messages = h.flash.pop_messages() %> + % if messages: + + % endif +