# HG changeset patch # User Marcin Kuzminski # Date 2011-12-04 22:44:25 # Node ID d0effbe1acb157b737eca420883ab5883f011719 # Parent 1d1ccb873d00d0d3c02d8d16eca988a4feea17df banned git-repos to use bookmarks views diff --git a/rhodecode/controllers/bookmarks.py b/rhodecode/controllers/bookmarks.py --- a/rhodecode/controllers/bookmarks.py +++ b/rhodecode/controllers/bookmarks.py @@ -29,6 +29,7 @@ from pylons import tmpl_context as c from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator from rhodecode.lib.base import BaseRepoController, render from rhodecode.lib.compat import OrderedDict +from webob.exc import HTTPNotFound log = logging.getLogger(__name__) @@ -42,6 +43,9 @@ class BookmarksController(BaseRepoContro super(BookmarksController, self).__before__() def index(self): + if c.rhodecode_repo.alias != 'hg': + raise HTTPNotFound() + c.repo_bookmarks = OrderedDict() bookmarks = [(name, c.rhodecode_repo.get_changeset(hash_)) for \ diff --git a/rhodecode/templates/switch_to_list.html b/rhodecode/templates/switch_to_list.html --- a/rhodecode/templates/switch_to_list.html +++ b/rhodecode/templates/switch_to_list.html @@ -23,6 +23,7 @@ %endif +%if c.rhodecode_repo.alias == 'hg':
  • ${h.link_to('%s (%s)' % (_('bookmarks'),len(c.rhodecode_repo.bookmarks.values()),),h.url('bookmarks_home',repo_name=c.repo_name),class_='bookmarks childs')} -
  • \ No newline at end of file + +%endif \ No newline at end of file