[Formed-commits] r308 - in trunk: . formed/formed/plugins/export
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Feb 6 18:41:30 CET 2009
Author: teichmann
Date: 2009-02-06 18:41:29 +0100 (Fri, 06 Feb 2009)
New Revision: 308
Modified:
trunk/ChangeLog
trunk/formed/formed/plugins/export/sql.py
Log:
Make table comparision invariant of insert statements and case.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-02-06 17:24:27 UTC (rev 307)
+++ trunk/ChangeLog 2009-02-06 17:41:29 UTC (rev 308)
@@ -1,5 +1,12 @@
2009-02-09 Sascha L. Teichmanne <teichmann at intevation.de>
+ * formed/formed/plugins/export/sql.py: to figure ou which
+ tables are equal the insert statememnts are lower cased
+ and sorted before they are compared. This reduces the number
+ of generated referfence tables.
+
+2009-02-09 Sascha L. Teichmanne <teichmann at intevation.de>
+
Repair SQL schema creation for radio groups.
* formed/formed/plugins/export/sql.py: radio groups are handled
Modified: trunk/formed/formed/plugins/export/sql.py
===================================================================
--- trunk/formed/formed/plugins/export/sql.py 2009-02-06 17:24:27 UTC (rev 307)
+++ trunk/formed/formed/plugins/export/sql.py 2009-02-06 17:41:29 UTC (rev 308)
@@ -220,7 +220,13 @@
def equalContent(self, other):
# XXX: This is a bit to simple for general case
- return self.inserts == other.inserts
+ if len(self.inserts) != len(other.inserts):
+ return False
+ ains = [a.lower() for a in self.inserts]
+ bins = [b.lower() for b in other.inserts]
+ ains.sort()
+ bins.sort()
+ return cmp(ains, bins)
class SchemaCreator:
More information about the Formed-commits
mailing list