#!/usr/bin/perl -w
#
-# Emacs, you like -*- CPerl -*- right?
+# Extract information about recent SVN commits
#
-# This CGI script presents the results of the build_farm build
# tridge@samba.org, April 2001
# vance@samba.org, August 2004
-
use strict;
use lib "web";
use util;
# very little difference
my $start_date = POSIX::strftime("%Y-%m-%d", gmtime(time() - $days*60*60*24));
- open(FILE, "svn log --verbose --non-interactive $repo_url/$tree_dir |");
+ open(FILE, "svn log --verbose --non-interactive $repo_url/$tree_dir -r HEAD:'{$start_date}' |");
#open(FILE, "< log.txt") or die "Could not open log: $!";
while (defined (my $line = <FILE>)) {
}
}
- elsif ($line =~ /\s+R (.*)/) {
+ elsif ($line =~ /\s+R (.*)/ ||
+ $line =~ /\s+D (.*)/) {
my $file = $1;
$file =~ s#^/$tree_dir/##o;
if ($entry->{REMOVED}) {
######################################
# main program
-if ($#ARGV < 4) {
+if ($#ARGV < 4 || $ARGV[0] eq '--help' || $ARGV[0] eq '-h') {
print "
-Usage: svnlog.pl <repository-url> <tree-dir> <days> <tree> <dest>
-}";
+Usage: svnlog.pl <REPOSITORY-URL> <TREE-DIR> <DAYS> <TREE> <DEST>
+
+Extract all commits to REPOSITORY-URL/TREE-DIR in the last
+DAYS days. Store the results in DEST, indexed under TREE,
+in a format easily readable by the build farm web scripts.
+";
exit(1);
}