[open-ils-commits] [GIT] Evergreen ILS branch master updated. 41510e82a8946a13965c7db5ed10b0491d88f603
Evergreen Git
git at git.evergreen-ils.org
Tue May 17 14:24:17 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 41510e82a8946a13965c7db5ed10b0491d88f603 (commit)
via 015a697755ee7159c210b123e2060cef9d0b3fbc (commit)
from 007195f83beb33519d90133818a7d114ae82428b (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 41510e82a8946a13965c7db5ed10b0491d88f603
Author: Galen Charlton <gmc at esilibrary.com>
Date: Tue May 17 15:09:51 2011 -0400
add a bit of context to upgrade SQL hints
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 30993b8..663b901 100755
--- a/Open-ILS/src/sql/Pg/make-db-patch.pl
+++ b/Open-ILS/src/sql/Pg/make-db-patch.pl
@@ -97,7 +97,7 @@ 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 '');
print OUT <<_FOOTER_;
commit 015a697755ee7159c210b123e2060cef9d0b3fbc
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Tue May 17 13:50:44 2011 -0400
Improvements to make-db-patch.pl
Grab all changes to base sql files into the upgrade script
Based on HEAD (uncommitted changes) or --from=refspec
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 ffb1b01..30993b8 100755
--- a/Open-ILS/src/sql/Pg/make-db-patch.pl
+++ b/Open-ILS/src/sql/Pg/make-db-patch.pl
@@ -22,6 +22,7 @@ use Getopt::Long;
my $db_patch_num;
my $patch_name;
+my $patch_from;
my @deprecates;
my @supersedes;
@@ -29,6 +30,7 @@ exit_usage() if $#ARGV == -1;
GetOptions(
'num=i' => \$db_patch_num,
'name=s' => \$patch_name,
+ 'from=s' => \$patch_from,
'deprecates=i' => \@deprecates,
'supersedes=i' => \@supersedes,
) or exit_usage();
@@ -36,6 +38,8 @@ GetOptions(
exit_usage('--num required') unless defined $db_patch_num;
exit_usage('--name required') unless defined $patch_name;
+$patch_from = 'HEAD' unless defined $patch_from;
+
# pad to four digits
$db_patch_num = sprintf('%-04.4d', $db_patch_num);
$_ = sprintf('%-04.4d', $_) foreach @deprecates;
@@ -92,12 +96,16 @@ if (@deprecates or @supersedes) {
");\n";
}
+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 '');
+
print OUT <<_FOOTER_;
-- check whether patch can be applied
SELECT evergreen.update_deps_block_check('$db_patch_num', :eg_version);
--- FIXME: add SQL statements to perform the upgrade
+-- FIXME: add/check SQL statements to perform the upgrade
+$patch_init_contents
COMMIT;
_FOOTER_
@@ -117,6 +125,7 @@ Make template for a DB patch SQL file.
--name descriptive part of patch filename
--deprecates patch(es) deprecated by this update
--supersedes patch(es) superseded by this update
+ --from git refspec to compare against
_HELP_
exit 0;
}
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/make-db-patch.pl | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list