%def name="refs(commit, at_rev=None)">
## Build a cache of refs for selector, based on this the files ref selector gets pre-selected values
% if h.is_svn(c.rhodecode_repo):
## since SVN doesn't have an commit<->refs association, we simply inject it
## based on our at_rev marker
% if at_rev and at_rev.startswith('branches/'):
<%
commit.branch = at_rev
%>
% endif
% if at_rev and at_rev.startswith('tags/'):
<%
commit.tags.append(at_rev)
%>
% endif
% endif
%if commit.merge:
${_('merge')}
%endif
%if h.is_hg(c.rhodecode_repo):
%for book in commit.bookmarks:
${h.shorter(book)}
%endfor
%endif
%for tag in commit.tags:
${tag}
%endfor
%if commit.branch:
${h.shorter(commit.branch)}
%endif
%def>