diff rhodecode/controllers/admin/repos.py @ 3110:144128efc6ab beta

- #683 fixed difference between messages about not mapped repositories
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 14 Dec 2012 04:19:12 +0100
parents 4cc9bb83ecb4
children 3259dc7caea4 0226b6d6b2b5
line wrap: on
line diff
--- a/rhodecode/controllers/admin/repos.py	Fri Dec 14 04:03:46 2012 +0100
+++ b/rhodecode/controllers/admin/repos.py	Fri Dec 14 04:19:12 2012 +0100
@@ -89,12 +89,7 @@
         repo = db_repo.scm_instance
 
         if c.repo_info is None:
-            h.flash(_('%s repository is not mapped to db perhaps'
-                      ' it was created or renamed from the filesystem'
-                      ' please run the application again'
-                      ' in order to rescan repositories') % repo_name,
-                      category='error')
-
+            h.not_mapped_error(repo_name)
             return redirect(url('repos'))
 
         ##override defaults for exact repo info here git/hg etc
@@ -310,12 +305,7 @@
         repo_model = RepoModel()
         repo = repo_model.get_by_repo_name(repo_name)
         if not repo:
-            h.flash(_('%s repository is not mapped to db perhaps'
-                      ' it was moved or renamed  from the filesystem'
-                      ' please run the application again'
-                      ' in order to rescan repositories') % repo_name,
-                      category='error')
-
+            h.not_mapped_error(repo_name)
             return redirect(url('repos'))
         try:
             action_logger(self.rhodecode_user, 'admin_deleted_repo',