Files @ f33cc4af706b
Branch filter:

Location: kallithea/kallithea/templates/switch_to_list.html

domruf
tests: finally block also needs to be executed if api_call itself fails

The cleanup code (finally block) should be executed as soon as something what
changes the db fails.

I don't remember which one but one of these tests failed and caused all the
others to fail as well because the database wasn't cleaned up after the first
failure. That made finding the root cause more difficult then it should have
been.
## -*- 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