# HG changeset patch # User Marcin Kuzminski # Date 1364409485 -3600 # Node ID 03028bf372d7283650c911fc90e3302f946a321c # Parent 0e18540fd1c736db1d3af8d30517f5670b2ceb20 missing changesets should return 404 not redirect + flash. It feels more correct. diff -r 0e18540fd1c7 -r 03028bf372d7 rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py Wed Mar 27 19:37:14 2013 +0100 +++ b/rhodecode/controllers/changeset.py Wed Mar 27 19:38:05 2013 +0100 @@ -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 @@ 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 -r 0e18540fd1c7 -r 03028bf372d7 rhodecode/templates/errors/error_document.html --- a/rhodecode/templates/errors/error_document.html Wed Mar 27 19:37:14 2013 +0100 +++ b/rhodecode/templates/errors/error_document.html Wed Mar 27 19:38:05 2013 +0100 @@ -33,16 +33,16 @@ -
- <% messages = h.flash.pop_messages() %> - % if messages: - - % endif -
+
+ <% messages = h.flash.pop_messages() %> + % if messages: + + % endif +