##// END OF EJS Templates
git: fix lookups....
git: fix lookups. - prioritize referenace names over numerical ids - numerical ids are supported as a fallback if ref matching is unsuccessful.

File last commit:

r4650:5d2569e3 default
r4656:a9d6cd92 default
Show More
compare_commits.mako
88 lines | 3.7 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 ## Changesets table !
<%namespace name="base" file="/base/base.mako"/>
%if c.ancestor:
pull-requests: fix way how pull-request calculates common ancestors....
r4346 <div class="ancestor">${_('Compare was calculated based on this common ancestor commit')}:
<a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=c.ancestor)}">${h.short_id(c.ancestor)}</a>
pull-request: extended default reviewers functionality....
r1769 <input id="common_ancestor" type="hidden" name="common_ancestor" value="${c.ancestor}">
templating: use .mako as extensions for template files.
r1282 </div>
%endif
<div class="container">
<input type="hidden" name="__start__" value="revisions:sequence">
<table class="rctable compare_view_commits">
<tr>
pull-requests: expose commit versions in the pull-request commit list. Fixes #5642
r4615 % if hasattr(c, 'commit_versions'):
<th>ver</th>
% endif
templating: use .mako as extensions for template files.
r1282 <th>${_('Time')}</th>
<th>${_('Author')}</th>
<th>${_('Commit')}</th>
<th></th>
<th>${_('Description')}</th>
</tr>
issue-trackers: cache the fetched issue tracker paterns before loop iteration in summary and compare.
r2446 ## to speed up lookups cache some functions before the loop
<%
active_patterns = h.get_active_pattern_entries(c.repo_name)
pull-requests: fixed multiple repetitions of referenced tickets in pull requests summary sidebar.
r4650 urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns)
issue-trackers: cache the fetched issue tracker paterns before loop iteration in summary and compare.
r2446 %>
pull-requests: overhaul of the UX by adding new sidebar...
r4482
templating: use .mako as extensions for template files.
r1282 %for commit in c.commit_ranges:
<tr id="row-${commit.raw_id}"
commit_id="${commit.raw_id}"
class="compare_select"
style="${'display: none' if c.collapse_all_commits else ''}"
>
pull-requests: expose commit versions in the pull-request commit list. Fixes #5642
r4615 % if hasattr(c, 'commit_versions'):
<td class="tooltip" title="${_('Pull request version this commit was introduced')}">
<code>${('v{}'.format(c.commit_versions[commit.raw_id][0]) if c.commit_versions[commit.raw_id] else 'latest')}</code>
</td>
% endif
templating: use .mako as extensions for template files.
r1282 <td class="td-time">
${h.age_component(commit.date)}
</td>
<td class="td-user">
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 ${base.gravatar_with_user(commit.author, 16, tooltip=True)}
templating: use .mako as extensions for template files.
r1282 </td>
<td class="td-hash">
<code>
repo-commits: ported changeset code into pyramid views....
r1951 <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}">
diffs: added handy quick file selector in diffs views.
r3100 r${commit.idx}:${h.short_id(commit.raw_id)}
templating: use .mako as extensions for template files.
r1282 </a>
${h.hidden('revisions',commit.raw_id)}
</code>
</td>
commits: unified expand commit logic and UI....
r3187 <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}" onclick="commitsController.expandCommit(this); return false">
icons: make expand icon same as before
r3168 <i class="icon-expand-linked"></i>
templating: use .mako as extensions for template files.
r1282 </td>
<td class="mid td-description">
<div class="log-container truncate-wrap">
pull-requests: fixed multiple repetitions of referenced tickets in pull requests summary sidebar.
r4650 <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}">${urlify_commit_message(commit.message, c.repo_name, issues_container_callback=getattr(c, 'referenced_commit_issues', lambda p:p)(commit.serialize()))}</div>
templating: use .mako as extensions for template files.
r1282 </div>
</td>
</tr>
%endfor
commits/ux: use similar as in files expand/collapse toggle.
r4126 <tr class="compare_select_hidden" style="${('' if c.collapse_all_commits else 'display: none')}">
templating: use .mako as extensions for template files.
r1282 <td colspan="5">
commits/ux: use similar as in files expand/collapse toggle.
r4126 ${_ungettext('{} commit hidden, click expand to show them.', '{} commits hidden, click expand to show them.', len(c.commit_ranges)).format(len(c.commit_ranges))}
templating: use .mako as extensions for template files.
r1282 </td>
</tr>
% if not c.commit_ranges:
<tr class="compare_select">
<td colspan="5">
${_('No commits in this compare')}
</td>
</tr>
% endif
</table>
<input type="hidden" name="__end__" value="revisions:sequence">
</div>
<script>
commits: unified expand commit logic and UI....
r3187 commitsController = new CommitsController();
templating: use .mako as extensions for template files.
r1282 $('.compare_select').on('click',function(e){
var cid = $(this).attr('commit_id');
$('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl'));
});
</script>