[Rt-commit] rt branch, upgrade-history, updated. rt-3.9.7-962-gbfa22ea

Shawn Moore sartak at bestpractical.com
Tue Dec 21 20:47:25 EST 2010


The branch, upgrade-history has been updated
       via  bfa22ea6581b0450a02cc0c28f62b933ed30fdc4 (commit)
      from  8ecb63f529172081883ad330a6e20f55c10cc53b (commit)

Summary of changes:
 sbin/rt-setup-database.in |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit bfa22ea6581b0450a02cc0c28f62b933ed30fdc4
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Dec 21 20:47:06 2010 -0500

    Include the content of the file we use for the insert action

diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 66af7dc..3754971 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -269,9 +269,17 @@ sub action_insert {
     ($status, $msg) = $RT::Handle->InsertData( $file, $root_password );
     return ($status, $msg) unless $status;
 
+    my $content;
+    open my $handle, '<', $file or warn "Unable to open $file: $!";
+    if ($handle) {
+        local $/; # slurp
+        $content = <$handle>;
+    }
+
     RT->System->AddUpgradeHistory(RT => {
         action   => 'insert',
         filename => $file,
+        content  => $content,
         stage    => 'after',
     });
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list