From: Andrew Dunstan Date: Sun, 31 Jan 2010 01:20:47 +0000 (+0000) Subject: use URL for Git repo if it's a git build X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/196ae12217eca5d957036b6e9e7dbd4f46356920 use URL for Git repo if it's a git build --- diff --git a/cgi-bin/show_log.pl b/cgi-bin/show_log.pl index 839af54..58b6b0b 100755 --- a/cgi-bin/show_log.pl +++ b/cgi-bin/show_log.pl @@ -27,6 +27,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 $scm; use vars qw($info_row); @@ -40,7 +41,7 @@ if ($system && $logdate) my $statement = <[4]; $branch = $row->[5]; my $log_file_names = $row->[6]; + $scm = $row->[7]; + $scm ||= 'cvs'; # legacy scripts $log_file_names =~ s/^\{(.*)\}$/$1/; @log_file_names=split(',',$log_file_names) if $log_file_names; @@ -84,11 +87,20 @@ 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 @lines = split(/!/,$chgd); foreach (@lines) { - next unless m!^pgsql/!; - s!(^\S+)(\s+)(\S+)!$1$2$3!; + if ($scm eq 'git') + { + s!(^\S+)(\s+)(\S+)!$1!; + } + elsif ($scm eq 'cvs') + { + next unless m!^pgsql/!; + s!(^\S+)(\s+)(\S+)!$1$2$3!; + } } $chgd = join("\n",@lines); $chgd ||= 'not recorded';