my @changed_rows;
my %commits;
my @commit_logs;
- my $gitcmd = "TZ=UTC GIT_DIR=$local_git_clone git log --stat --date=local";
+ my $gitcmd = "TZ=UTC GIT_DIR=$local_git_clone git log --date=local";
foreach (@lines)
{
next if ($scm eq 'cvs' and ! m!^(pgsql|master|REL\d_\d_STABLE)/!);
}
if ($git_from && $git_to)
{
- my $format =
- 'commit %H%nAuthor: %cN <%ce>%nDate: %cd UTC%n%n%w(80,4,4)%s%n%n%b%n';
+ my $format = 'commit %h %cd UTC%w(160,2,2)%s';
my $gitlog = `$gitcmd --pretty=format:"$format" $git_from..$git_to 2>&1`;
@commit_logs = split(/(?=^commit)/m,$gitlog)
}
else
{
# normally we expect to have the git refs. this is just a fallback.
- my $format =
- 'epoch: %at%ncommit %H%nAuthor: %cN <%ce>%nDate: %cd UTC%n%n' .
- '%w(80,4,4)%s%n%n%b%n';
+ my $format = 'epoch: %at%ncommit %h %cd UTC%w(160,2,2)%s';
foreach my $commit ( keys %commits )
{
my $commitlog =
pagebutton = 'none'
%]
[%- BLOCK gitlog ;
- loglines = clog.split('\n');
- firstline = loglines.shift;
- commitref = firstline.replace('commit ([0-9A-Fa-f]+)','$1');
-%]
-<!--
-git_head_ref [% git_head_ref %]
-last_build_git_ref [% last_build_git_ref %]
-last_success_git_ref [% last_success_git_ref %]
--->
-commit <a href="[% giturl ; commitref %]">[% commitref %]</a>
-[% loglines.join("\n") | html %]
+ commitref = clog.replace('commit ([0-9A-Fa-f]+)(.|\n)*','$1');
+ logtail = clog.replace('commit ([0-9A-Fa-f]+)','');
+ logtail = logtail.replace('\n',' ');
+%]<a href="[% giturl ; commitref %]">[% commitref %]</a>[% logtail | html %]
[% END -%]
<h1>PostgreSQL Build Farm Log</h1>
<h2>Details for system "[% system %]"[% IF stage != 'OK' %] failure at stage [% stage ; ELSE %], status 'OK'[% END %], snapshot taken [% urldt %]</h2>
<pre>
[% conf | html %]
</pre>
+<table>
+<tr>
+<td valign="top">
<h3>Files changed this run</h3>
[%- IF changed_this_run.0 -%]
<pre>
[%- END -%]
</pre>
[% END %]
+</td>
+<td valign="top" style="padding-left: 10pt;">
[% IF changed_this_run_logs.0 %]
<h5>Git log</h5>
-<blockquote><pre>
-[%- FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
-[%IF not loop.last %]
-===================================================================
-[% END -%]
+<pre>
+<a href="https://github.com/postgres/postgres/compare/[% last_build_git_ref %]...[% git_head_ref %]">Change Set for this build</a>
+
+[% FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
[%- END -%]
-</pre></blockquote>
+</pre>
+</td>
[%- ELSE %]
-<pre>
not recorded
</pre>
+</td>
[% END -%]
+</tr>
[% IF stage != 'OK' %]
+<tr>
+<td valign="top">
<h3>Files changed since last success</h3>
[%- IF changed_since_success.0 %]
<pre>
[%- END -%]
</pre>
[% END %]
+</td>
+<td valign="top" style="padding-left: 10pt;">
[% IF changed_since_success_logs.0 %]
<h5>Git log</h5>
-<blockquote><pre>
-[%- FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]
-[%IF not loop.last %]
-===================================================================
-[% END -%]
+<pre>
+<a href="https://github.com/postgres/postgres/compare/[% last_success_git_ref %]...[% last_build_git_ref %]">Change Set prior to this build</a>
+
+<a href="https://github.com/postgres/postgres/compare/[% last_success_git_ref %]...[% git_head_ref %]">Change Set including this build</a>
+
+[% FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]
[%- END -%]
-</pre></blockquote>
+</pre>
+</td>
[%- ELSE %]
<pre>
not recorded
</pre>
+</td>
[% END -%]
+</tr>
[% END %]
+</table>
<h3>Log</h3>
<pre>
[% log | html %]