Fix treatment if gitweb URLs.
authorAndrew Dunstan <andrew@dunslane.net>
Thu, 17 Mar 2011 14:55:49 +0000 (07:55 -0700)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 17 Mar 2011 14:55:49 +0000 (07:55 -0700)
cgi-bin/show_log.pl
templates/log.tt

index 75dd2e7c2dcfb4e6bb0243053b29d38ccb49e809..064337d882729f82cbedae043cb68e692753f1ef 100755 (executable)
@@ -103,6 +103,8 @@ if ($system && $logdate)
        $scm = $row->[7];
        $scm ||= 'cvs'; # legacy scripts
        $scmurl = $row->[8];
        $scm = $row->[7];
        $scm ||= 'cvs'; # legacy scripts
        $scmurl = $row->[8];
+       $scmurl = 'http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=' 
+           if ($scmurl eq 'http://git.postgresql.org/git/postgresql.git');
        $log_file_names =~ s/^\{(.*)\}$/$1/;
        @log_file_names=split(',',$log_file_names)
            if $log_file_names;
        $log_file_names =~ s/^\{(.*)\}$/$1/;
        @log_file_names=split(',',$log_file_names)
            if $log_file_names;
index c78ebaa704bf55619b5e8c416a9169eaeb23fa92..29d51e8344ade531c9d56adceaeab4edaf98d18a 100644 (file)
@@ -104,8 +104,9 @@ See accompanying License file for license details
 [% IF changed_this_run_logs.0 %]
 <h5>Git log</h5>
 <pre>
 [% IF changed_this_run_logs.0 %]
 <h5>Git log</h5>
 <pre>
+[% IF last_build_git_ref && git_head_ref %]
 <a href="https://github.com/postgres/postgres/compare/[% last_build_git_ref %]...[% git_head_ref %]">Change Set for this build</a>
 <a href="https://github.com/postgres/postgres/compare/[% last_build_git_ref %]...[% git_head_ref %]">Change Set for this build</a>
-
+[% END %]
 [% FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
 [%- END -%]
 </pre>
 [% FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
 [%- END -%]
 </pre>