+exit;
+
+##########################################################
+
+sub process_changed
+{
+
+ my $chgd = shift;
+ my $git_to = shift;
+ my $git_from = shift;
+
+ my @lines = split(/!/,$chgd);
+ my @changed_rows;
+ my %commits;
+ my @commit_logs;
+ 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)/!);
+ push(@changed_rows,[$1,$3]) if (m!(^\S+)(\s+)(\S+)!);
+ $commits{$3} = 1 if $scm eq 'git';
+ }
+ if ($git_from && $git_to)
+ {
+ 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 %cd UTC%w(160,2,2)%s';
+ foreach my $commit ( keys %commits )
+ {
+ my $commitlog =
+ `$gitcmd -n 1 --pretty=format:"$format" $commit 2>&1`;
+ push(@commit_logs,$commitlog);
+ }
+ @commit_logs = reverse (sort @commit_logs);
+ s/epoch:.*\n// for (@commit_logs);
+ }
+ return (\@changed_rows,\@commit_logs);
+}
+