Files @ b61824e61e68
Branch filter:

Location: kallithea/rhodecode/templates/branches/branches_data.html

Marcin Kuzminski
Don't cache dulwich Repos, in pararell multithreaded evniroment dulwich pack file openers
can break badly. We need to create Repo() objects always for each call, even when it's
taken from cache.
Fixed issue with dulwich filedescriptor leak ref #573
%if c.repo_branches:
   <div id="table_wrap" class="yui-skin-sam">
    <table id="branches_data">
      <thead>
        <tr>
            <th class="left">${_('Name')}</th>
            <th class="left">${_('Date')}</th>
            <th class="left">${_('Author')}</th>
            <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>
                <span class="logtags">
                    <span class="branchtag">${h.link_to(branch[0],
                    h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
                </span>
            </td>
            <td><span class="tooltip" title="${h.tooltip(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>
                <div>
                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
                </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
        % 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>
                  <span class="logtags">
                      <span class="branchtag">${h.link_to(branch[0]+' [closed]',
                      h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
                  </span>
              </td>
              <td><span class="tooltip" title="${h.tooltip(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>
                <div>
                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
                </div>
              </td>
              <td></td>
          </tr>
          %endfor
        %endif
    </table>
    </div>
%else:
    ${_('There are no branches yet')}
%endif