Files
@ 631e8000eae8
Branch filter:
Location: kallithea/rhodecode/templates/compare/compare_cs.html - annotation
631e8000eae8
1.7 KiB
text/html
diff parser: match the header order of hg diff --git patches
The output might look like:
diff --git a/A b/B
old mode 100644
new mode 100755
rename from A
rename to B
--- a/A
+++ b/B
Such files were shown as 'modified binary file chmod 100644 => 100755' without
diff.
Now the chmod and diff will be shown ... but still not the rename.
Correct parsing of headers do require a better parser - one do not just use a
regexp.
The output might look like:
diff --git a/A b/B
old mode 100644
new mode 100755
rename from A
rename to B
--- a/A
+++ b/B
Such files were shown as 'modified binary file chmod 100644 => 100755' without
diff.
Now the chmod and diff will be shown ... but still not the rename.
Correct parsing of headers do require a better parser - one do not just use a
regexp.
b262e349a7a5 b262e349a7a5 b262e349a7a5 16af24982e30 b262e349a7a5 2053053e0882 41b4edf77b5b b262e349a7a5 b262e349a7a5 b262e349a7a5 b262e349a7a5 b262e349a7a5 f29469677319 5f1f77948355 5f1f77948355 5f1f77948355 c9b85375776d f29469677319 f29469677319 f29469677319 f29469677319 e8db9fe4cca3 e8db9fe4cca3 e8db9fe4cca3 e8db9fe4cca3 e8db9fe4cca3 25d77aef2729 b262e349a7a5 b262e349a7a5 2053053e0882 2053053e0882 2053053e0882 9f9e7c937eb0 2053053e0882 2053053e0882 2053053e0882 2053053e0882 2053053e0882 2053053e0882 b262e349a7a5 f29469677319 | ## Changesets table !
<div class="container">
%if not c.cs_ranges:
<span class="empty_data">${_('No changesets')}</span>
%else:
<table class="compare_view_commits noborder">
%for cs in reversed(c.cs_ranges):
<tr>
<td>
%if cs.raw_id in c.statuses:
<div title="${c.statuses[cs.raw_id][1]}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cs.raw_id][0])}" /></div>
%endif
</td>
<td><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${cs.date}</span></td>
<td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
<td><div class="author">${h.person(cs.author)}</div></td>
<td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.other_repo.repo_name,revision=cs.raw_id))}
%if c.as_form:
${h.hidden('revisions',cs.raw_id)}
%endif
</td>
<td>
%if cs.branch:
<span class="branchtag">${cs.branch}</span>
%endif
</td>
<td><div class="message tooltip" title="${h.tooltip(cs.message)}" style="white-space:normal">${h.urlify_commit(h.shorter(cs.message, 60),c.repo_name)}</div></td>
</tr>
%endfor
</table>
%if c.ancestor:
<span class="ancestor">${_('Ancestor')}:
${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))}
</span>
%endif
%if c.as_form:
${h.hidden('ancestor_rev',c.ancestor)}
${h.hidden('merge_rev',c.cs_ranges[-1].raw_id)}
%endif
%endif
</div>
|