inital version of links to diff in scm
This commit is contained in:
parent
1691f3b9ae
commit
7208f79828
|
@ -18,6 +18,9 @@ sub build : Chained('/') PathPart CaptureArgs(1) {
|
||||||
$c->stash->{prevBuild} = getPreviousBuild($c, $c->stash->{build});
|
$c->stash->{prevBuild} = getPreviousBuild($c, $c->stash->{build});
|
||||||
$c->stash->{prevSuccessfulBuild} = getPreviousSuccessfulBuild($c, $c->stash->{build});
|
$c->stash->{prevSuccessfulBuild} = getPreviousSuccessfulBuild($c, $c->stash->{build});
|
||||||
|
|
||||||
|
$c->stash->{mappers} = [$c->model('DB::UriRevMapper')->all];
|
||||||
|
|
||||||
|
|
||||||
notFound($c, "Build with ID $id doesn't exist.")
|
notFound($c, "Build with ID $id doesn't exist.")
|
||||||
if !defined $c->stash->{build};
|
if !defined $c->stash->{build};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
[% USE date %]
|
[% USE date %]
|
||||||
|
[% USE String %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
|
|
||||||
|
@ -277,6 +278,22 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
[% BLOCK renderDiffUri; %]
|
||||||
|
[% nouri = 1 %]
|
||||||
|
[% FOREACH m IN mappers %]
|
||||||
|
[% base = m.baseuri %]
|
||||||
|
[% url = bi1.uri %]
|
||||||
|
[% path = url.replace(base, '') %]
|
||||||
|
[% IF url.match(base) %]
|
||||||
|
<a target="_new" href="[% m.uri.replace('_path_', path).replace('_1_', bi1.revision).replace('_2_', bi2.revision) %]">[% contents %]</a>
|
||||||
|
[% nouri = 0 %]
|
||||||
|
[% END %]
|
||||||
|
[% END %]
|
||||||
|
[% IF nouri %]
|
||||||
|
[% contents %]
|
||||||
|
[% END %]
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% BLOCK renderInputDiff; %]
|
[% BLOCK renderInputDiff; %]
|
||||||
<table class="tablesorter clean">
|
<table class="tablesorter clean">
|
||||||
[% IF !nestedDiff %]
|
[% IF !nestedDiff %]
|
||||||
|
@ -291,7 +308,7 @@
|
||||||
<tr><td><b>[% bi1.name %]</b></td><td>[% INCLUDE renderInputValue input=bi1 %] to [% INCLUDE renderInputValue input=bi2 %]</td></tr>
|
<tr><td><b>[% bi1.name %]</b></td><td>[% INCLUDE renderInputValue input=bi1 %] to [% INCLUDE renderInputValue input=bi2 %]</td></tr>
|
||||||
[% ELSIF bi1.uri == bi2.uri && bi1.revision != bi2.revision %]
|
[% ELSIF bi1.uri == bi2.uri && bi1.revision != bi2.revision %]
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<b>[% bi1.name %]</b></td><td>Revision changed from [% bi1.revision %] to [% bi2.revision %].
|
<b>[% bi1.name %]</b></td><td><tt>[% INCLUDE renderDiffUri contents=('Revision changed from ' _ bi1.revision _ ' to ' _ bi2.revision) %]</tt>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
[% ELSIF bi1.dependency.id != bi2.dependency.id || bi1.path != bi2.path %]
|
[% ELSIF bi1.dependency.id != bi2.dependency.id || bi1.path != bi2.path %]
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
@ -420,6 +420,11 @@ create table JobsetInputHashes (
|
||||||
foreign key (project, jobset) references Jobsets(project, name) on delete cascade on update cascade
|
foreign key (project, jobset) references Jobsets(project, name) on delete cascade on update cascade
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table UriRevMapper (
|
||||||
|
baseuri text not null,
|
||||||
|
uri text not null,
|
||||||
|
primary key (baseuri)
|
||||||
|
);
|
||||||
|
|
||||||
-- Some indices.
|
-- Some indices.
|
||||||
create index IndexBuildInputsOnBuild on BuildInputs(build);
|
create index IndexBuildInputsOnBuild on BuildInputs(build);
|
||||||
|
|
Loading…
Reference in a new issue