changeset 6765:c5e10169d127 stable

helpers: more helpful error messages for changeset not found
author Mads Kiilerich <madski@unity3d.com>
date Thu, 10 Nov 2016 16:10:41 +0100
parents ea9342f8d46b
children d1cb4036a922
files kallithea/lib/base.py kallithea/lib/helpers.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/base.py	Thu Nov 10 17:54:05 2016 +0100
+++ b/kallithea/lib/base.py	Thu Nov 10 16:10:41 2016 +0100
@@ -513,7 +513,8 @@
                     category='error')
             raise webob.exc.HTTPNotFound()
         except ChangesetDoesNotExistError as e:
-            h.flash(h.literal(_('Changeset not found')),
+            h.flash(h.literal(_('Changeset for %s %s not found in %s') %
+                              (ref_type, ref_name, repo.repo_name)),
                     category='error')
             raise webob.exc.HTTPNotFound()
         except RepositoryError as e:
--- a/kallithea/lib/helpers.py	Thu Nov 10 17:54:05 2016 +0100
+++ b/kallithea/lib/helpers.py	Thu Nov 10 16:10:41 2016 +0100
@@ -620,7 +620,7 @@
             else:
                 # changeset cannot be found - it might have been stripped or removed
                 lbl = rev[:12]
-                title_ = _('Changeset not found')
+                title_ = _('Changeset %s not found') % lbl
             if parse_cs:
                 return link_to(lbl, url_, title=title_, class_='tooltip')
             return link_to(lbl, url_, raw_id=rev.raw_id, repo_name=repo_name,