From: Andrew Dunstan Date: Tue, 4 May 2010 14:01:00 +0000 (+0000) Subject: allow for configured git url X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/71b424c02b08b8b348bb1194ae2ca43a34d59655 allow for configured git url --- diff --git a/cgi-bin/pgstatus.pl b/cgi-bin/pgstatus.pl index 41d5c33..df499f5 100755 --- a/cgi-bin/pgstatus.pl +++ b/cgi-bin/pgstatus.pl @@ -231,12 +231,13 @@ if (@config_flags) } my $scm = $client_conf->{scm} || 'cvs'; +my $scmurl = $client_conf->{scm_url}; my $logst = <bind_param(10,$log_file_names); $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; diff --git a/cgi-bin/show_log.pl b/cgi-bin/show_log.pl index 58b6b0b..925be5e 100755 --- a/cgi-bin/show_log.pl +++ b/cgi-bin/show_log.pl @@ -26,7 +26,7 @@ my $logdate = $query->param('dt'); $logdate =~ s/[^a-zA-Z0-9_ -]//g; 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); @@ -41,7 +41,7 @@ if ($system && $logdate) my $statement = <[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; @@ -88,13 +89,13 @@ EOS 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+)!$1!; + s!(^\S+)(\s+)(\S+)!$1!; } elsif ($scm eq 'cvs') {