changeset 5933:0e9bd6876b42

cleanup: remove dead code and templates related to 'Switch To' a33448d81f70 introduced a new 'Switch To' functionality and removed the last reference to branch_tag_switcher and thus to switch_to_list.html and the tags, bookmarks and branches pages. We don't need these pages ... and if we do, we will implement them differently. They are mostly YUI datatables with compare links that only can compare within the same kind of revision names.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 23 May 2016 18:02:33 +0200
parents 73e44865f204
children 4636870ac51a
files kallithea/config/routing.py kallithea/controllers/bookmarks.py kallithea/controllers/branches.py kallithea/controllers/home.py kallithea/controllers/tags.py kallithea/templates/bookmarks/bookmarks.html kallithea/templates/bookmarks/bookmarks_data.html kallithea/templates/branches/branches.html kallithea/templates/branches/branches_data.html kallithea/templates/switch_to_list.html kallithea/templates/tags/tags.html kallithea/templates/tags/tags_data.html kallithea/tests/functional/test_branches.py kallithea/tests/functional/test_tags.py
diffstat 14 files changed, 0 insertions(+), 772 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/routing.py	Mon May 23 18:02:33 2016 +0200
+++ b/kallithea/config/routing.py	Mon May 23 18:02:33 2016 +0200
@@ -543,8 +543,6 @@
                 controller='summary', action='repo_size',
                 conditions=dict(function=check_repo))
 
-    rmap.connect('branch_tag_switcher', '/{repo_name:.*?}/branches-tags',
-                 controller='home', action='branch_tag_switcher')
     rmap.connect('repo_refs_data', '/{repo_name:.*?}/refs-data',
                  controller='home', action='repo_refs_data')
 
@@ -731,15 +729,6 @@
     rmap.connect('summary_home_summary', '/{repo_name:.*?}/summary',
                 controller='summary', conditions=dict(function=check_repo))
 
-    rmap.connect('branches_home', '/{repo_name:.*?}/branches',
-                controller='branches', conditions=dict(function=check_repo))
-
-    rmap.connect('tags_home', '/{repo_name:.*?}/tags',
-                controller='tags', conditions=dict(function=check_repo))
-
-    rmap.connect('bookmarks_home', '/{repo_name:.*?}/bookmarks',
-                controller='bookmarks', conditions=dict(function=check_repo))
-
     rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
                 controller='changelog', conditions=dict(function=check_repo))
 
--- a/kallithea/controllers/bookmarks.py	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-# -*- coding: utf-8 -*-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-"""
-kallithea.controllers.bookmarks
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Bookmarks controller for Kallithea
-
-This file was forked by the Kallithea project in July 2014.
-Original author and date, and relevant copyright and licensing information is below:
-:created_on: Dec 1, 2011
-:author: marcink
-:copyright: (c) 2013 RhodeCode GmbH, and others.
-:license: GPLv3, see LICENSE.md for more details.
-"""
-
-import logging
-
-from pylons import tmpl_context as c
-
-from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
-from kallithea.lib.base import BaseRepoController, render
-from kallithea.lib.compat import OrderedDict
-from webob.exc import HTTPNotFound
-
-log = logging.getLogger(__name__)
-
-
-class BookmarksController(BaseRepoController):
-
-    def __before__(self):
-        super(BookmarksController, self).__before__()
-
-    @LoginRequired()
-    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
-                                   'repository.admin')
-    def index(self):
-        if c.db_repo_scm_instance.alias != 'hg':
-            raise HTTPNotFound()
-
-        c.repo_bookmarks = OrderedDict()
-
-        bookmarks = [(name, c.db_repo_scm_instance.get_changeset(hash_)) for \
-                 name, hash_ in c.db_repo_scm_instance._repo._bookmarks.items()]
-        ordered_tags = sorted(bookmarks, key=lambda x: x[1].date, reverse=True)
-        for name, cs_book in ordered_tags:
-            c.repo_bookmarks[name] = cs_book
-
-        return render('bookmarks/bookmarks.html')
--- a/kallithea/controllers/branches.py	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-# -*- coding: utf-8 -*-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-"""
-kallithea.controllers.branches
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-branches controller for Kallithea
-
-This file was forked by the Kallithea project in July 2014.
-Original author and date, and relevant copyright and licensing information is below:
-:created_on: Apr 21, 2010
-:author: marcink
-:copyright: (c) 2013 RhodeCode GmbH, and others.
-:license: GPLv3, see LICENSE.md for more details.
-"""
-
-import logging
-import binascii
-
-from pylons import tmpl_context as c
-
-from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
-from kallithea.lib.base import BaseRepoController, render
-from kallithea.lib.compat import OrderedDict
-from kallithea.lib.utils2 import safe_unicode
-
-log = logging.getLogger(__name__)
-
-
-class BranchesController(BaseRepoController):
-
-    def __before__(self):
-        super(BranchesController, self).__before__()
-
-    @LoginRequired()
-    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
-                                   'repository.admin')
-    def index(self):
-
-        def _branchtags(localrepo):
-            bt_closed = {}
-            for bn, heads in localrepo.branchmap().iteritems():
-                tip = heads[-1]
-                if 'close' in localrepo.changelog.read(tip)[5]:
-                    bt_closed[bn] = tip
-            return bt_closed
-
-        cs_g = c.db_repo_scm_instance.get_changeset
-
-        c.repo_closed_branches = {}
-        if c.db_repo.repo_type == 'hg':
-            bt_closed = _branchtags(c.db_repo_scm_instance._repo)
-            _closed_branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),)
-                                for n, h in bt_closed.items()]
-
-            c.repo_closed_branches = OrderedDict(sorted(_closed_branches,
-                                                    key=lambda ctx: ctx[0],
-                                                    reverse=False))
-
-        _branches = [(safe_unicode(n), cs_g(h))
-                     for n, h in c.db_repo_scm_instance.branches.items()]
-        c.repo_branches = OrderedDict(sorted(_branches,
-                                             key=lambda ctx: ctx[0],
-                                             reverse=False))
-
-        return render('branches/branches.html')
--- a/kallithea/controllers/home.py	Mon May 23 18:02:33 2016 +0200
+++ b/kallithea/controllers/home.py	Mon May 23 18:02:33 2016 +0200
@@ -118,17 +118,6 @@
     @LoginRequired()
     @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
                                    'repository.admin')
-    def branch_tag_switcher(self, repo_name):
-        if request.is_xhr:
-            c.db_repo = Repository.get_by_repo_name(repo_name)
-            if c.db_repo:
-                c.db_repo_scm_instance = c.db_repo.scm_instance
-                return render('/switch_to_list.html')
-        raise HTTPBadRequest()
-
-    @LoginRequired()
-    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
-                                   'repository.admin')
     @jsonify
     def repo_refs_data(self, repo_name):
         repo = Repository.get_by_repo_name(repo_name).scm_instance
--- a/kallithea/controllers/tags.py	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-"""
-kallithea.controllers.tags
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Tags controller for Kallithea
-
-This file was forked by the Kallithea project in July 2014.
-Original author and date, and relevant copyright and licensing information is below:
-:created_on: Apr 21, 2010
-:author: marcink
-:copyright: (c) 2013 RhodeCode GmbH, and others.
-:license: GPLv3, see LICENSE.md for more details.
-
-"""
-
-import logging
-
-from pylons import tmpl_context as c
-
-from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
-from kallithea.lib.base import BaseRepoController, render
-from kallithea.lib.compat import OrderedDict
-
-log = logging.getLogger(__name__)
-
-
-class TagsController(BaseRepoController):
-
-    def __before__(self):
-        super(TagsController, self).__before__()
-
-    @LoginRequired()
-    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
-                                   'repository.admin')
-    def index(self):
-        c.repo_tags = OrderedDict()
-
-        tags = [(name, c.db_repo_scm_instance.get_changeset(hash_)) for \
-                 name, hash_ in c.db_repo_scm_instance.tags.items()]
-        ordered_tags = sorted(tags, key=lambda x: x[1].date, reverse=True)
-        for name, cs_tag in ordered_tags:
-            c.repo_tags[name] = cs_tag
-
-        return render('tags/tags.html')
--- a/kallithea/templates/bookmarks/bookmarks.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-## -*- coding: utf-8 -*-
-<%inherit file="/base/base.html"/>
-
-<%block name="title">
-    ${_('%s Bookmarks') % c.repo_name}
-</%block>
-
-<%def name="breadcrumbs_links()">
-    <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
-    ${_('Bookmarks')}
-</%def>
-
-<%block name="header_menu">
-    ${self.menu('repositories')}
-</%block>
-
-<%def name="main()">
-${self.repo_context_bar('switch-to')}
-<div class="box">
-    <!-- box / title -->
-    <div class="title">
-        ${self.breadcrumbs()}
-    </div>
-    <!-- end box / title -->
-    %if c.repo_bookmarks:
-    <div class="info_box" id="compare_bookmarks" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="btn btn-small">${_('Compare Bookmarks')}</a></div>
-    %endif
-    <div class="table">
-        <%include file='bookmarks_data.html'/>
-    </div>
-</div>
-
-<script type="text/javascript">
-$('#compare_bookmarks').click(function(e){
-    e.preventDefault();
-    var org = $('input[name=compare_org]:checked')[0];
-    var other = $('input[name=compare_other]:checked')[0];
-
-    if(org && other){
-        var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='book',org_ref_name='__ORG__',other_ref_type='book',other_ref_name='__OTHER__')}";
-        var u = compare_url.replace('__ORG__',org.value)
-                           .replace('__OTHER__',other.value);
-        window.location=u;
-    }
-});
-
-// main table sorting
-var myColumnDefs = [
-    {key:"name",label:"${_('Name')}",sortable:true,
-        sortOptions: { sortFunction: nameSort }},
-    {key:"date",label:"${_('Date')}",sortable:true,
-        sortOptions: { sortFunction: dateSort }},
-    {key:"author",label:"${_('Author')}",sortable:true},
-    {key:"revision",label:"${_('Revision')}",sortable:true,
-        sortOptions: { sortFunction: revisionSort }},
-    {key:"compare",label:"${_('Compare')}",sortable:false}
-];
-
-var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data"));
-
-myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
-
-myDataSource.responseSchema = {
-    fields: [
-        {key:"raw_name"},
-        {key:"name"},
-        {key:"raw_date"},
-        {key:"date"},
-        {key:"author"},
-        {key:"last_rev_raw"},
-        {key:"revision"},
-        {key:"compare"}
-    ]
-};
-
-var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
-    {
-         sortedBy:{key:"name",dir:"asc"},
-         MSG_SORTASC:"${_('Click to sort ascending')}",
-         MSG_SORTDESC:"${_('Click to sort descending')}",
-         MSG_EMPTY:"${_('No records found.')}",
-         MSG_ERROR:"${_('Data error.')}",
-         MSG_LOADING:"${_('Loading...')}"
-    }
-);
-myDataTable.subscribe('postRenderEvent',function(oArgs) {
-    tooltip_activate();
-    var func = function(node){
-        return node.parentNode.parentNode.parentNode.parentNode.parentNode;
-    }
-    q_filter('q_filter_bookmarks',$('div.table tr td .logbooks .booktag a'),func);
-});
-
-</script>
-
-</%def>
--- a/kallithea/templates/bookmarks/bookmarks_data.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-%if c.repo_bookmarks:
-   <div id="table_wrap" class="yui-skin-sam">
-    <table id="bookmarks_data">
-    <thead>
-        <tr>
-            <th class="left">Raw name</th> ##notranslation
-            <th class="left">${_('Name')}</th>
-            <th class="left">Raw date</th> ##notranslation
-            <th class="left">${_('Date')}</th>
-            <th class="left">${_('Author')}</th>
-            <th class="left">Raw rev</th> ##notranslation
-            <th class="left">${_('Revision')}</th>
-            <th class="left">${_('Compare')}</th>
-        </tr>
-    </thead>
-    %for cnt,book in enumerate(c.repo_bookmarks.items()):
-        <tr class="parity${cnt%2}">
-            <td>${book[0]}</td>
-            <td>
-                <span class="logbooks">
-                    <span class="booktag">${h.link_to(book[0],
-                    h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span>
-                </span>
-            </td>
-            <td>${book[1]._timestamp}</td>
-            <td><span class="tooltip" title="${h.age(book[1].date)}">${h.fmt_date(book[1].date)}</span></td>
-            <td title="${book[1].author}">${h.person(book[1].author)}</td>
-            <td>${book[1].revision}</td>
-            <td>
-              <div>
-                  <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id)}" class="revision-link">${h.show_id(book[1])}</a>
-              </div>
-            </td>
-            <td>
-                <input class="branch-compare" type="radio" name="compare_org" value="${book[0]}"/>
-                <input class="branch-compare" type="radio" name="compare_other" value="${book[0]}"/>
-            </td>
-        </tr>
-    %endfor
-    </table>
-    </div>
-%else:
-    ${_('There are no bookmarks yet')}
-%endif
--- a/kallithea/templates/branches/branches.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-## -*- coding: utf-8 -*-
-<%inherit file="/base/base.html"/>
-
-<%block name="title">
-    ${_('%s Branches') % c.repo_name}
-</%block>
-
-<%def name="breadcrumbs_links()">
-    <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
-    ${_('Branches')}
-</%def>
-
-<%block name="header_menu">
-    ${self.menu('repositories')}
-</%block>
-
-<%def name="main()">
-${self.repo_context_bar('switch-to')}
-<div class="box">
-    <!-- box / title -->
-    <div class="title">
-        ${self.breadcrumbs()}
-    </div>
-    <!-- end box / title -->
-    %if c.repo_branches:
-    <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="btn btn-small">${_('Compare Branches')}</a></div>
-    %endif
-    <div class="table">
-        <%include file='branches_data.html'/>
-    </div>
-</div>
-
-<script type="text/javascript">
-$('#compare_branches').click(function(e){
-    e.preventDefault();
-    var org = $('input[name=compare_org]:checked')[0];
-    var other = $('input[name=compare_other]:checked')[0];
-
-    if(org && other){
-        var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref_name='__ORG__',other_ref_type='branch',other_ref_name='__OTHER__')}";
-        var u = compare_url.replace('__ORG__',org.value)
-                           .replace('__OTHER__',other.value);
-        window.location=u;
-    }
-});
-
-// main table sorting
-var myColumnDefs = [
-    {key:"name",label:"${_('Name')}",sortable:true,
-        sortOptions: { sortFunction: nameSort }},
-    {key:"date",label:"${_('Date')}",sortable:true,
-        sortOptions: { sortFunction: dateSort }},
-    {key:"author",label:"${_('Author')}",sortable:true},
-    {key:"revision",label:"${_('Revision')}",sortable:true,
-        sortOptions: { sortFunction: revisionSort }},
-    {key:"compare",label:"${_('Compare')}",sortable:false}
-];
-
-var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data"));
-
-myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
-
-myDataSource.responseSchema = {
-    fields: [
-        {key:"raw_name"},
-        {key:"name"},
-        {key:"raw_date"},
-        {key:"date"},
-        {key:"author"},
-        {key:"last_rev_raw"},
-        {key:"revision"},
-        {key:"compare"}
-    ]
-};
-
-var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
-    {
-         sortedBy:{key:"name",dir:"asc"},
-         MSG_SORTASC:"${_('Click to sort ascending')}",
-         MSG_SORTDESC:"${_('Click to sort descending')}",
-         MSG_EMPTY:"${_('No records found.')}",
-         MSG_ERROR:"${_('Data error.')}",
-         MSG_LOADING:"${_('Loading...')}"
-    }
-);
-myDataTable.subscribe('postRenderEvent',function(oArgs) {
-    tooltip_activate();
-    var func = function(node){
-        return node.parentNode.parentNode.parentNode.parentNode.parentNode;
-    }
-    q_filter('q_filter_branches',$('div.table tr td .logtags .branchtag a'),func);
-});
-
-</script>
-
-</%def>
--- a/kallithea/templates/branches/branches_data.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-%if c.repo_branches:
-   <div id="table_wrap" class="yui-skin-sam">
-    <table id="branches_data">
-      <thead>
-        <tr>
-            <th class="left">Raw name</th> ##notranslation
-            <th class="left">${_('Name')}</th>
-            <th class="left">Raw date</th> ##notranslation
-            <th class="left">${_('Date')}</th>
-            <th class="left">${_('Author')}</th>
-            <th class="left">Raw rev</th> ##notranslation
-            <th class="left">${_('Revision')}</th>
-            <th class="left">${_('Compare')}</th>
-        </tr>
-      </thead>
-        %for cnt,branch in enumerate(c.repo_branches.items()):
-        <tr class="parity${cnt%2}">
-            <td>${branch[0]}</td>
-            <td>
-                <span class="logtags">
-                    <span class="branchtag">
-                    ${h.link_to(branch[0],h.url('changelog_home',repo_name=c.repo_name,branch=branch[0]))}
-                    </span>
-                </span>
-            </td>
-            <td>${branch[1]._timestamp}</td>
-            <td><span class="tooltip" title="${h.age(branch[1].date)}">${h.fmt_date(branch[1].date)}</span></td>
-            <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
-            <td>${branch[1].revision}</td>
-            <td>
-                <div>
-                    <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id)}" class="revision-link">${h.show_id(branch[1])}</a>
-                </div>
-            </td>
-            <td>
-                <input class="branch-compare" type="radio" name="compare_org" value="${branch[0]}"/>
-                <input class="branch-compare" type="radio" name="compare_other" value="${branch[0]}"/>
-            </td>
-        </tr>
-        %endfor
-        ## closed branches if any
-        % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches:
-          %for cnt,branch in enumerate(c.repo_closed_branches.items()):
-          <tr class="parity${cnt%2}">
-              <td>${branch[0]}</td>
-              <td>
-                  <span class="logtags">
-                      <span class="branchtag">
-                      ${h.link_to(branch[0]+' [closed]',h.url('changelog_home',repo_name=c.repo_name,branch=branch[0]))}
-                      </span>
-                  </span>
-              </td>
-              <td>${branch[1]._timestamp}</td>
-              <td><span class="tooltip" title="${h.age(branch[1].date)}">${h.fmt_date(branch[1].date)}</span></td>
-              <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
-              <td>${branch[1].revision}</td>
-              <td>
-                <div>
-                    <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id)}" class="revision-link">${h.show_id(branch[1])}</a>
-                </div>
-              </td>
-              <td></td>
-          </tr>
-          %endfor
-        %endif
-    </table>
-    </div>
-%else:
-    ${_('There are no branches yet')}
-%endif
--- a/kallithea/templates/switch_to_list.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-## -*- coding: utf-8 -*-
-<li>
-    <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"><i class="icon-fork"></i> ${'%s (%s)' % (_('Branches'),len(c.db_repo_scm_instance.branches.values()))}</a>
-    <ul>
-    %if c.db_repo_scm_instance.branches.values():
-        %for cnt,branch in enumerate(c.db_repo_scm_instance.branches.items()):
-            <li><div><pre>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=(branch[0] if '/' not in branch[0] else branch[1]), at=branch[0]))}</pre></div></li>
-        %endfor
-    %else:
-        <li>${h.link_to(_('There are no branches yet'),'#')}</li>
-    %endif
-    </ul>
-</li>
-%if c.db_repo_scm_instance.closed_branches.values():
-<li>
-    <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"><i class="icon-fork"></i> ${'%s (%s)' % (_('Closed Branches'),len(c.db_repo_scm_instance.closed_branches.values()))}</a>
-    <ul>
-        %for cnt,branch in enumerate(c.db_repo_scm_instance.closed_branches.items()):
-            <li><div><pre>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=(branch[0] if '/' not in branch[0] else branch[1]), at=branch[0]))}</pre></div></li>
-        %endfor
-    </ul>
-</li>
-%endif
-<li>
-    <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"><i class="icon-tag"></i> ${'%s (%s)' % (_('Tags'),len(c.db_repo_scm_instance.tags.values()))}</a>
-    <ul>
-    %if c.db_repo_scm_instance.tags.values():
-        %for cnt,tag in enumerate(c.db_repo_scm_instance.tags.items()):
-         <li><div><pre>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=(tag[0] if '/' not in tag[0] else tag[1]), at=tag[0]))}</pre></div></li>
-        %endfor
-    %else:
-        <li>${h.link_to(_('There are no tags yet'),'#')}</li>
-    %endif
-    </ul>
-</li>
-%if c.db_repo_scm_instance.alias == 'hg':
-<li>
-    <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"><i class="icon-bookmark"></i> ${'%s (%s)' % (_('Bookmarks'),len(c.db_repo_scm_instance.bookmarks.values()))}</a>
-    <ul>
-    %if c.db_repo_scm_instance.bookmarks.values():
-        %for cnt,book in enumerate(c.db_repo_scm_instance.bookmarks.items()):
-         <li><div><pre>${h.link_to('%s - %s' % (book[0],h.short_id(book[1])),h.url('files_home',repo_name=c.repo_name,revision=(book[0] if '/' not in book[0] else book[1]), at=book[0]))}</pre></div></li>
-        %endfor
-    %else:
-        <li>${h.link_to(_('There are no bookmarks yet'),'#')}</li>
-    %endif
-    </ul>
-</li>
-%endif
--- a/kallithea/templates/tags/tags.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-## -*- coding: utf-8 -*-
-<%inherit file="/base/base.html"/>
-
-<%block name="title">
-    ${_('%s Tags') % c.repo_name}
-</%block>
-
-<%def name="breadcrumbs_links()">
-    <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
-    ${_('Tags')}
-</%def>
-
-<%block name="header_menu">
-    ${self.menu('repositories')}
-</%block>
-
-<%def name="main()">
-${self.repo_context_bar('switch-to')}
-<div class="box">
-    <!-- box / title -->
-    <div class="title">
-        ${self.breadcrumbs()}
-    </div>
-    <!-- end box / title -->
-    %if c.repo_tags:
-    <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="btn btn-small">${_('Compare Tags')}</a></div>
-    %endif
-    <div class="table">
-        <%include file='tags_data.html'/>
-    </div>
-</div>
-
-<script type="text/javascript">
-$('#compare_tags').click(function(e){
-    e.preventDefault();
-    var org = $('input[name=compare_org]:checked')[0];
-    var other = $('input[name=compare_other]:checked')[0];
-
-    if(org && other){
-        var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref_name='__ORG__',other_ref_type='tag',other_ref_name='__OTHER__')}";
-        var u = compare_url.replace('__ORG__',org.value)
-                           .replace('__OTHER__',other.value);
-        window.location=u;
-    }
-});
-
-// main table sorting
-var myColumnDefs = [
-    {key:"name",label:"${_('Name')}",sortable:true,
-        sortOptions: { sortFunction: nameSort }},
-    {key:"date",label:"${_('Date')}",sortable:true,
-        sortOptions: { sortFunction: dateSort }},
-    {key:"author",label:"${_('Author')}",sortable:true},
-    {key:"revision",label:"${_('Revision')}",sortable:true,
-        sortOptions: { sortFunction: revisionSort }},
-    {key:"compare",label:"${_('Compare')}",sortable:false}
-];
-
-var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data"));
-
-myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
-
-myDataSource.responseSchema = {
-    fields: [
-        {key:"raw_name"},
-        {key:"name"},
-        {key:"raw_date"},
-        {key:"date"},
-        {key:"author"},
-        {key:"last_rev_raw"},
-        {key:"revision"},
-        {key:"compare"}
-    ]
-};
-
-var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
-    {
-         sortedBy:{key:"name",dir:"asc"},
-         MSG_SORTASC:"${_('Click to sort ascending')}",
-         MSG_SORTDESC:"${_('Click to sort descending')}",
-         MSG_EMPTY:"${_('No records found.')}",
-         MSG_ERROR:"${_('Data error.')}",
-         MSG_LOADING:"${_('Loading...')}"
-    }
-);
-myDataTable.subscribe('postRenderEvent',function(oArgs) {
-    tooltip_activate();
-    var func = function(node){
-        return node.parentNode.parentNode.parentNode.parentNode.parentNode;
-    }
-    q_filter('q_filter_tags',$('div.table tr td .logtags .tagtag a'),func);
-});
-
-</script>
-
-</%def>
--- a/kallithea/templates/tags/tags_data.html	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-%if c.repo_tags:
-   <div id="table_wrap" class="yui-skin-sam">
-    <table id="tags_data">
-      <thead>
-        <tr>
-            <th class="left">Raw name</th> ##notranslation
-            <th class="left">${_('Name')}</th>
-            <th class="left">Raw date</th> ##notranslation
-            <th class="left">${_('Date')}</th>
-            <th class="left">${_('Author')}</th>
-            <th class="left">Raw rev</th> ##notranslation
-            <th class="left">${_('Revision')}</th>
-            <th class="left">${_('Compare')}</th>
-        </tr>
-      </thead>
-        %for cnt,tag in enumerate(c.repo_tags.items()):
-        <tr class="parity${cnt%2}">
-            <td>${tag[0]}</td>
-            <td>
-                <span class="logtags">
-                    <span class="tagtag">${h.link_to(tag[0],
-                    h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
-                    </span>
-                </span>
-            </td>
-            <td>${tag[1]._timestamp}</td>
-            <td><span class="tooltip" title="${h.age(tag[1].date)}">${h.fmt_date(tag[1].date)}</span></td>
-            <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
-            <td>${tag[1].revision}</td>
-            <td>
-                <div>
-                    <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id)}" class="revision-link">${h.show_id(tag[1])}</a>
-                </div>
-            </td>
-            <td>
-                <input class="branch-compare" type="radio" name="compare_org" value="${tag[0]}"/>
-                <input class="branch-compare" type="radio" name="compare_other" value="${tag[0]}"/>
-            </td>
-        </tr>
-        %endfor
-    </table>
-   </div>
-%else:
-    ${_('There are no tags yet')}
-%endif
--- a/kallithea/tests/functional/test_branches.py	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-from kallithea.tests import *
-
-
-class TestBranchesController(TestController):
-
-    def test_index_hg(self):
-        self.log_user()
-        response = self.app.get(url(controller='branches',
-                                    action='index', repo_name=HG_REPO))
-        response.mustcontain("""<a href="/%s/changelog?branch=default">default</a>""" % HG_REPO)
-
-        # closed branches
-        response.mustcontain("""<a href="/%s/changelog?branch=git">git [closed]</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changelog?branch=web">web [closed]</a>""" % HG_REPO)
-
-    def test_index_git(self):
-        self.log_user()
-        response = self.app.get(url(controller='branches',
-                                    action='index', repo_name=GIT_REPO))
-        response.mustcontain("""<a href="/%s/changelog?branch=master">master</a>""" % GIT_REPO)
--- a/kallithea/tests/functional/test_tags.py	Mon May 23 18:02:33 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-from kallithea.tests import *
-
-
-class TestTagsController(TestController):
-
-    def test_index_hg(self):
-        self.log_user()
-        response = self.app.get(url(controller='tags', action='index', repo_name=HG_REPO))
-        response.mustcontain("""<a href="/%s/changeset/96507bd11ecc815ebc6270fdf6db110928c09c1e">tip</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/2c96c02def9a7c997f33047761a53943e6254396">v0.2.0</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/fef5bfe1dc17611d5fb59a7f6f95c55c3606f933">v0.1.11</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/92831aebf2f8dd4879e897024b89d09af214df1c">v0.1.10</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/8680b1d1cee3aa3c1ab3734b76ee164bbedbc5c9">v0.1.9</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/ecb25ba9c96faf1e65a0bc3fd914918420a2f116">v0.1.8</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/f67633a2894edaf28513706d558205fa93df9209">v0.1.7</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/02b38c0eb6f982174750c0e309ff9faddc0c7e12">v0.1.6</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/a6664e18181c6fc81b751a8d01474e7e1a3fe7fc">v0.1.5</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200">v0.1.4</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/17544fbfcd33ffb439e2b728b5d526b1ef30bfcf">v0.1.3</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720">v0.1.2</a>""" % HG_REPO)
-        response.mustcontain("""<a href="/%s/changeset/eb3a60fc964309c1a318b8dfe26aa2d1586c85ae">v0.1.1</a>""" % HG_REPO)
-
-    def test_index_git(self):
-        self.log_user()
-        response = self.app.get(url(controller='tags', action='index', repo_name=GIT_REPO))
-
-        response.mustcontain("""<a href="/%s/changeset/137fea89f304a42321d40488091ee2ed419a3686">v0.2.2</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/5051d0fa344d4408a2659d9a0348eb2d41868ecf">v0.2.1</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/599ba911aa24d2981225f3966eb659dfae9e9f30">v0.2.0</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/c60f01b77c42dce653d6b1d3b04689862c261929">v0.1.11</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/10cddef6b794696066fb346434014f0a56810218">v0.1.10</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/341d28f0eec5ddf0b6b77871e13c2bbd6bec685c">v0.1.9</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/74ebce002c088b8a5ecf40073db09375515ecd68">v0.1.8</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/4d78bf73b5c22c82b68f902f138f7881b4fffa2c">v0.1.7</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/0205cb3f44223fb3099d12a77a69c81b798772d9">v0.1.6</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/6c0ce52b229aa978889e91b38777f800e85f330b">v0.1.5</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/7d735150934cd7645ac3051903add952390324a5">v0.1.4</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/5a3a8fb005554692b16e21dee62bf02667d8dc3e">v0.1.3</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/0ba5f8a4660034ff25c0cac2a5baabf5d2791d63">v0.1.2</a>""" % GIT_REPO)
-        response.mustcontain("""<a href="/%s/changeset/e6ea6d16e2f26250124a1f4b4fe37a912f9d86a0">v0.1.1</a>""" % GIT_REPO)