Ignore the make test and for the waf test for samba4 build on buildsamba02
[build-farm.git] / svnlog.pl
index 375b69abd2d7a31174e2f1c9f8fb156124570242..02a507dbcbb2594f2bcbdf6f0e82019dee336e38 100755 (executable)
--- a/svnlog.pl
+++ b/svnlog.pl
@@ -1,12 +1,10 @@
 #!/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;
@@ -55,7 +53,7 @@ sub svn_parse($$$$)
        # 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>)) {
 
@@ -117,7 +115,8 @@ sub svn_parse($$$$)
                                        }
                                }
 
-                               elsif ($line =~ /\s+R (.*)/) {
+                               elsif ($line =~ /\s+R (.*)/ ||
+                                      $line =~ /\s+D (.*)/) {
                                        my $file = $1;
                                        $file =~ s#^/$tree_dir/##o;
                                        if ($entry->{REMOVED}) {
@@ -160,10 +159,14 @@ sub svn_parse($$$$)
 
 ######################################
 # 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);
 }