Bugzilla – Attachment 102677 Details for
Bug 25104
Small adjustments in NewVersion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25104: Small adjustments to NewVersion
Bug-25104-Small-adjustments-to-NewVersion.patch (text/plain), 3.44 KB, created by
Marcel de Rooy
on 2020-04-10 07:59:45 UTC
(
hide
)
Description:
Bug 25104: Small adjustments to NewVersion
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-04-10 07:59:45 UTC
Size:
3.44 KB
patch
obsolete
>From 9236c836c5e0787c28e657ae8f37de573e8c3c34 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 10 Apr 2020 07:53:30 +0000 >Subject: [PATCH] Bug 25104: Small adjustments to NewVersion >Content-Type: text/plain; charset=utf-8 > >Main point: all descriptions go under the line with version/bugno. >Simplify the code in NewVersion. > >Test plan: >Run updatedatabase on command line as well as interface. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug25104.perl | 7 +++++++ > installer/data/mysql/atomicupdate/skeleton.perl | 4 ++-- > installer/data/mysql/updatedatabase.pl | 24 ++++-------------------- > 3 files changed, 13 insertions(+), 22 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug25104.perl > >diff --git a/installer/data/mysql/atomicupdate/bug25104.perl b/installer/data/mysql/atomicupdate/bug25104.perl >new file mode 100644 >index 0000000000..6f3213b245 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug25104.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ NewVersion( $DBversion, 25104, [ >+ "Time in front, bug number on first line, first message on second line", >+ "Only one tab on all message lines" >+ ] ); >+} >diff --git a/installer/data/mysql/atomicupdate/skeleton.perl b/installer/data/mysql/atomicupdate/skeleton.perl >index 813d7cbc5a..f97181142d 100644 >--- a/installer/data/mysql/atomicupdate/skeleton.perl >+++ b/installer/data/mysql/atomicupdate/skeleton.perl >@@ -8,6 +8,6 @@ if( CheckVersion( $DBversion ) ) { > # warn "There is something wrong"; > # } > >- # Always end with this (adjust the bug info) >- NewVersion( $DBversion, XXXXX, "Description"); >+ # Always end with this (adjust bug number, add description[s]) >+ NewVersion( $DBversion, 99999, [ "One or more descriptions here" ]); > } >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index b502a4a3f5..79c67ec1f9 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -21620,30 +21620,14 @@ sub NewVersion { > my ( $DBversion, $bug_number, $descriptions ) = @_; > > SetVersion($DBversion); >- > unless ( ref($descriptions) ) { > $descriptions = [ $descriptions ]; > } >- my $first = 1; > my $time = POSIX::strftime("%H:%M:%S",localtime); >- for my $description ( @$descriptions ) { >- if ( @$descriptions > 1 ) { >- if ( $first ) { >- unless ( $bug_number ) { >- say sprintf "Upgrade to %s done [%s]: %s", $DBversion, $time, $description; >- } else { >- say sprintf "Upgrade to %s done [%s]: Bug %5s - %s", $DBversion, $time, $bug_number, $description; >- } >- } >- say sprintf "\t\t\t\t\t\t - %s", $description; >- } else { >- unless ( $bug_number ) { >- say sprintf "Upgrade to %s done [%s]: %s", $DBversion, $time, $description; >- } else { >- say sprintf "Upgrade to %s done [%s]: Bug %5s - %s", $DBversion, $time, $bug_number, $description; >- } >- } >- $first = 0; >+ my $bug = $bug_number ? sprintf("%5s", $bug_number) : "XXX"; >+ say sprintf "%s Upgrade to %s done (Bug %s)", $time, $DBversion, $bug; >+ foreach my $description ( @$descriptions ) { >+ say sprintf "\t- %s", $description; > } > } > >-- >2.11.0
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 25104
: 102677