}
my $scm = $client_conf->{scm} || 'cvs';
+my $scmurl = $client_conf->{scm_url};
my $logst = <<EOSQL;
insert into build_status
(sysname, snapshot,status, stage, log,conf_sum, branch,
changed_this_run, changed_since_success,
- log_archive_filenames , log_archive, build_flags, scm)
+ log_archive_filenames , log_archive, build_flags, scm, scmurl)
values(?,?,?,?,?,?,?,?,?,?,?,?,?)
EOSQL
;
$sth->bind_param(11,undef,{ pg_type => DBD::Pg::PG_BYTEA });
$sth->bind_param(12,$config_flags);
$sth->bind_param(13,$scm);
+$sth->bind_param(13,$scmurl);
$sth->execute;
$sth->finish;
my $log = "";
my $conf = "";
-my ($stage,$changed_this_run,$changed_since_success,$sysinfo,$branch);
+my ($stage,$changed_this_run,$changed_since_success,$sysinfo,$branch,$scmurl);
my $scm;
use vars qw($info_row);
my $statement = <<EOS;
select log,conf_sum,stage, changed_this_run, changed_since_success,branch,
- log_archive_filenames, scm
+ log_archive_filenames, scm, scmurl
from build_status
where sysname = ? and snapshot = ?
my $log_file_names = $row->[6];
$scm = $row->[7];
$scm ||= 'cvs'; # legacy scripts
+ $scmurl = $row->[8];
$log_file_names =~ s/^\{(.*)\}$/$1/;
@log_file_names=split(',',$log_file_names)
if $log_file_names;
foreach my $chgd ($changed_this_run,$changed_since_success)
{
my $cvsurl = 'http://anoncvs.postgresql.org/cvsweb.cgi';
- my $giturl = 'http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;';
+ my $giturl = $scmurl || 'http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=';
my @lines = split(/!/,$chgd);
foreach (@lines)
{
if ($scm eq 'git')
{
- s!(^\S+)(\s+)(\S+)!<a href="$giturl;h=$3">$1</a>!;
+ s!(^\S+)(\s+)(\S+)!<a href="$giturl$3">$1</a>!;
}
elsif ($scm eq 'cvs')
{