[open-ils-commits] [GIT] Evergreen ILS branch master updated. fe68fed77dfeef5014c3c9445b109020d4c39f13

Evergreen Git git at git.evergreen-ils.org
Wed May 18 09:33:49 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  fe68fed77dfeef5014c3c9445b109020d4c39f13 (commit)
      from  bf83c01e4f232e050ec320969b9bb6c6a8c1eeb1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fe68fed77dfeef5014c3c9445b109020d4c39f13
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed May 18 08:21:53 2011 -0400

    More make-db-patch goodness: wrap existing
    
    --wrap option will take an existing file and wrap it properly.
    When --wrap is specified --from is ignored.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/make-db-patch.pl b/Open-ILS/src/sql/Pg/make-db-patch.pl
index 663b901..505dd4a 100755
--- a/Open-ILS/src/sql/Pg/make-db-patch.pl
+++ b/Open-ILS/src/sql/Pg/make-db-patch.pl
@@ -23,6 +23,7 @@ use Getopt::Long;
 my $db_patch_num;
 my $patch_name;
 my $patch_from;
+my $patch_wrap;
 my @deprecates;
 my @supersedes;
 
@@ -31,6 +32,7 @@ GetOptions(
     'num=i' => \$db_patch_num,
     'name=s' => \$patch_name,
     'from=s' => \$patch_from,
+    'wrap=s' => \$patch_wrap,
     'deprecates=i' => \@deprecates,
     'supersedes=i' => \@supersedes,
 ) or exit_usage();
@@ -97,7 +99,8 @@ if (@deprecates or @supersedes) {
 }
 
 my $patch_init_contents;
-$patch_init_contents = `git diff $patch_from -- ./[0-9][0-9][0-9].*.sql | sed -e '/^[^+\@-]/d' -e '/^\\(--- a\\|+++ b\\)/d' -e 's/^+//'` if ($patch_from ne '');
+$patch_init_contents = `git diff $patch_from -- ./[0-9][0-9][0-9].*.sql | sed -e '/^[^+\@-]/d' -e '/^\\(--- a\\|+++ b\\)/d' -e 's/^+//'` if ($patch_from ne '' && ! defined $patch_wrap);
+$patch_init_contents = `cat $patch_wrap` if (defined $patch_wrap && $patch_wrap ne '');
 
 print OUT <<_FOOTER_;
 
@@ -126,6 +129,7 @@ Make template for a DB patch SQL file.
     --deprecates   patch(es) deprecated by this update
     --supersedes   patch(es) superseded by this update
     --from         git refspec to compare against
+    --wrap         existing file to wrap (overrides --from)
 _HELP_
     exit 0;
 }

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

Summary of changes:
 Open-ILS/src/sql/Pg/make-db-patch.pl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list