Author: bdonlan
Date: 2004-06-27 15:30:34 -0400 (Sun, 27 Jun 2004)
New Revision: 259

Modified:
   trunk/dev-tools/haver-push/push.pl
   trunk/dev-tools/haver-push/receive.pl
Log:
* dev-tools/haver-push/push.pl, dev-tools/haver-push/receive.pl:
  
  Suppress svnadmin status messages when $debug is on
* dev-tools/haver-push/receive.pl:

  Don't suppress GPG errors when $debug is off
  Fix some more messages which were still being printed with $debug off


Modified: trunk/dev-tools/haver-push/push.pl
===================================================================
--- trunk/dev-tools/haver-push/push.pl  2004-06-27 18:54:15 UTC (rev 258)
+++ trunk/dev-tools/haver-push/push.pl  2004-06-27 19:30:34 UTC (rev 259)
@@ -75,11 +75,11 @@
 
 for my $rev ($lastrev..$youngest) {
        my $data;
-       my $err;
        my $prevrev = $rev - 1;
        $debug and print STDERR "start dump $rev\n";
        run3([
-                       "/usr/bin/svnadmin", "dump", "-r",
+                       "/usr/bin/svnadmin", "dump",
+                       ($debug ? () : ('-q')), '-r',
                        "$rev", '--incremental', $repopath
                ], \undef, \$data, undef);
 #      run(

Modified: trunk/dev-tools/haver-push/receive.pl
===================================================================
--- trunk/dev-tools/haver-push/receive.pl       2004-06-27 18:54:15 UTC (rev 
258)
+++ trunk/dev-tools/haver-push/receive.pl       2004-06-27 19:30:34 UTC (rev 
259)
@@ -60,17 +60,17 @@
 my $result = $mg->verify(entity => $entity);
 
 if (!$result->get_is_signed()) {
-       $debug print STDERR "Message is not signed.\n";
+       print STDERR "Message is not signed.\n";
        exit 1;
 }
 
 if (!$result->get_sign_ok()) {
-       $debug print STDERR "Signature verification failed.\n";
+       print STDERR "Signature verification failed.\n";
        exit 1;
 }
 
 if (lc($result->get_sign_key_id()) ne lc($gpgkey)) {
-       $debug print STDERR "Wrong key.\n";
+       print STDERR "Wrong key.\n";
        return;
 }
 
@@ -79,7 +79,7 @@
        next unless $part->effective_type() eq 'application/x-gzip';
        
        my $head = $part->head;
-       $head->print(\*STDERR);
+       $head->print(\*STDERR) if $debug;
        my $file_name = $head->recommended_filename;
        
        next unless defined $file_name and $file_name =~ /^r(\d+)\.gz$/;
@@ -104,14 +104,14 @@
 
 my $youngest = `svnlook youngest $repopath`; # XXX: better quoting etc
 my $cur_rev = $youngest + 1;
-print "youngest = $youngest, cur_rev = $cur_rev\n";
+print STDERR "youngest = $youngest, cur_rev = $cur_rev\n" if $debug;
 while (-r "$storedir/r$cur_rev") {
-       $debug print STDERR "Applying r$cur_rev\n";
+       $debug && print STDERR "Applying r$cur_rev\n";
        my $fh = new IO::File "$storedir/r$cur_rev", "r";
        local $/;
        my $buf = <$fh>;
        run3(
-               ["svnadmin", "load", $repopath],
+               ["svnadmin", "load", ($debug ? () : ("-q")), $repopath],
                \$buf, undef, undef
        );
        exit $? if $?;


Reply via email to