diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -1860,6 +1860,17 @@ class Repository(Base, BaseModel): .all() @property + def cached_diffs_relative_dir(self): + """ + Return a relative to the repository store path of cached diffs + used for safe display for users, who shouldn't know the absolute store + path + """ + return os.path.join( + os.path.dirname(self.repo_name), + self.cached_diffs_dir.split(os.path.sep)[-1]) + + @property def cached_diffs_dir(self): path = self.repo_full_path return os.path.join( diff --git a/rhodecode/templates/admin/repos/repo_edit_caches.mako b/rhodecode/templates/admin/repos/repo_edit_caches.mako --- a/rhodecode/templates/admin/repos/repo_edit_caches.mako +++ b/rhodecode/templates/admin/repos/repo_edit_caches.mako @@ -60,6 +60,10 @@
${_('Cached diff name')}: | +${c.rhodecode_db_repo.cached_diffs_relative_dir} | +
${_('Cached diff files')}: | ${c.cached_diff_count} |