Bugzilla – Attachment 32646 Details for
Bug 13028
Remove uninitialized value warning and add partial flag to cmp_sysprefs script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13028: Followup adding a -partial flag for partial compares
PASSED-QA-Bug-13028-Followup-adding-a--partial-fla.patch (text/plain), 2.07 KB, created by
Katrin Fischer
on 2014-10-23 21:56:44 UTC
(
hide
)
Description:
[PASSED QA] Bug 13028: Followup adding a -partial flag for partial compares
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-10-23 21:56:44 UTC
Size:
2.07 KB
patch
obsolete
>From 8e759042a34e674950e829b2356581a7908cedfb Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 8 Oct 2014 14:27:40 +0200 >Subject: [PATCH] [PASSED QA] Bug 13028: Followup adding a -partial flag for > partial compares > >If you compare the database with a partial pref file, you may not be >interested in lots of lines saying that a pref is not in the file. You >were already aware of that ;) >If you add the -partial flag, these lines will be skipped. > >Test plan: >Do as described above. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Works as described, passes tests and QA script. >--- > misc/maintenance/cmp_sysprefs.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/misc/maintenance/cmp_sysprefs.pl b/misc/maintenance/cmp_sysprefs.pl >index bed32a2..57f2b42 100755 >--- a/misc/maintenance/cmp_sysprefs.pl >+++ b/misc/maintenance/cmp_sysprefs.pl >@@ -33,7 +33,7 @@ use Pod::Usage; > use C4::Context; > my $dbh = C4::Context->dbh; > >-my ( $help, $cmd, $filename, $override, $compare_add, $compare_del, $compare_upd, $ignore_opt ); >+my ( $help, $cmd, $filename, $override, $compare_add, $compare_del, $compare_upd, $ignore_opt, $partial ); > GetOptions( > 'help' => \$help, > 'cmd:s' => \$cmd, >@@ -42,6 +42,7 @@ GetOptions( > 'del' => \$compare_del, > 'upd' => \$compare_upd, > 'ign-opt' => \$ignore_opt, >+ 'partial' => \$partial, > ); > > if ( $filename && !-e $filename && $cmd !~ /^b/ ) { >@@ -98,6 +99,7 @@ sub PrintCompare { > my ( $ch, $s1, $s2 ) = @_; > foreach ( sort keys %$ch ) { > my $v = $ch->{$_}; >+ next if $v eq '1' && $partial; > print "$_: "; > if ( $v eq '1' ) { print "Not in $s2"; } > elsif ( $v eq '2' ) { print "Not in $s1"; } >@@ -308,6 +310,10 @@ Command: backup, compare, restore or test. > > Name of the file used in command. > >+=item B<-partial> >+ >+Only for partial compares: skip 'not present in file'-messages. >+ > =item B<-add> > > Only for compares: restore preferences not present in database. >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13028
:
32005
|
32062
|
32641
|
32643
|
32645
| 32646