[Rt-commit] rt branch, 4.4/serialize-json-initialdata, updated. rt-4.4.1-431-gaacd6f0
Shawn Moore
shawn at bestpractical.com
Thu Mar 23 16:57:06 EDT 2017
The branch, 4.4/serialize-json-initialdata has been updated
via aacd6f0c8bbbe4165dea120982549db56b5e77e6 (commit)
from 436fd2211d13dcd8c4ca4e2fe846958fdfab51a5 (commit)
Summary of changes:
sbin/rt-serializer.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit aacd6f0c8bbbe4165dea120982549db56b5e77e6
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu Mar 23 20:54:49 2017 +0000
Use $OPT{quiet} instead of $ARGS{Verbose}
The -t STDOUT conditional explicitly sets $ARGS{Verbose} to 0
diff --git a/sbin/rt-serializer.in b/sbin/rt-serializer.in
index 2ff6cc4..ae3ab10 100644
--- a/sbin/rt-serializer.in
+++ b/sbin/rt-serializer.in
@@ -139,9 +139,8 @@ $args{Clone} = $OPT{clone} if $OPT{clone};
$args{Incremental} = $OPT{incremental} if $OPT{incremental};
$args{Sync} = $OPT{sync} if $OPT{sync};
-$args{GC} = defined $OPT{gc} ? $OPT{gc} : 5000;
-$args{Page} = defined $OPT{page} ? $OPT{page} : 100;
-$args{Verbose} = defined $OPT{quiet} ? !$OPT{quiet} : 1;
+$args{GC} = defined $OPT{gc} ? $OPT{gc} : 5000;
+$args{Page} = defined $OPT{page} ? $OPT{page} : 100;
if (($OPT{clone} or $OPT{incremental})
and grep { /^(users|groups|deleted|disabled|scrips|tickets|transactions|acls|assets)$/ } keys %OPT) {
@@ -164,6 +163,7 @@ if (-t STDOUT and not $OPT{verbose} and not $OPT{quiet}) {
};
$args{Verbose} = 0;
}
+$args{Verbose} = 0 if $OPT{quiet};
my $walker_class = "RT::Migrate::Serializer::" . ($OPT{format} || 'File');
@@ -173,12 +173,12 @@ $walker_class->require
$walker = $walker_class->new( %args );
my $log = RT::Migrate::setup_logging( $walker->{Directory} => 'serializer.log' );
-print "Logging warnings and errors to $log\n" if $log && $args{Verbose};
+print "Logging warnings and errors to $log\n" if $log && !$OPT{quiet};
-print "Beginning database serialization..." if $args{Verbose};
+print "Beginning database serialization..." if !$OPT{quiet};
my %counts = $walker->Export;
-if ($args{Verbose}) {
+if (!$OPT{quiet}) {
my @files = $walker->Files;
print "Wrote @{[scalar @files]} files:\n";
print " $_\n" for @files;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list