hydra: when no external url is given for diff's of git/hg input, revert to a diff done on a local available clone

This commit is contained in:
Rob Vermaas
2011-08-25 14:50:31 +00:00
parent c51af99ecf
commit 5d3f5f9fca
4 changed files with 38 additions and 2 deletions

View File

@ -308,7 +308,14 @@
[% END %]
[% END %]
[% IF nouri %]
[% contents %]
[% res = bi1.uri.split(' ') %]
[% url = res.0 %]
[% branch = res.1 %]
[% IF bi1.type == "hg" || bi1.type == "git" %]
<a target="_new" href="/api/scmdiff?uri=[% url %]&rev1=[% bi1.revision %]&rev2=[% bi2.revision %]&type=[% bi1.type %]&branch=[% branch %]">[% contents %]</a>
[% ELSE %]
[% contents %]
[% END %]
[% END %]
[% END %]