summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a1ad36d)
raw | patch | inline | side by side (parent: a1ad36d)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 26 Mar 2004 05:16:03 +0000 (05:16 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 26 Mar 2004 05:16:03 +0000 (05:16 +0000) |
Change Cookie -> SimpleCookie
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2205 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2205 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
TODO.txt | patch | blob | history | |
roundup/backends/back_sqlite.py | patch | blob | history | |
roundup/cgi/client.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 952d337e62e659167e1fd89131ed8f1303c613c2..d7b3d19e6ae2eaa924fe3e13020791dc8a51e465 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
2004-??-?? 0.7.0b2
Feature:
- added CSV export to index pages
-- added new auditor, emailauditor.py, that works around a bug in IE. See
- emailauditor.py for more info.
+- added emailauditor.py which works around a bug in IE. See
+ "detectors/emailauditor.py" for more info.
- added dispatcher functionality - see upgrading.txt for more info
- added Reject exception which may be raised by auditors. This is trapped
by mailgw and may be used to veto creation of file attachments or
Fixed:
- Boolean HTML templating was broken
- Link HTML templating field() was broken
-- Fix reporting of test inclusion in postgresql test
+- fix reporting of test inclusion in postgresql test
- EditAction was confused about who "self" was
-- Edit collision detection was broken for index-page edits
+- edit collision detection was broken for index-page edits
+- sqlite backend wasn't migrating multilink tables correctly
+- use SimpleCookie instead of Cookie (is an alias for the evil SmartCookie)
2004-03-24 0.7.0b1
diff --git a/TODO.txt b/TODO.txt
index 3d6ae74faf47da7439afbf1f69d6c7c92de8d4b2..b2f8f02ffd29efa0a4837f97c91a039edf0ad5fa 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
This file contains items that need doing before the next release:
-- ensure index creation is triggered by the version 1->2 update
- (and other upgrade tests)
-
Optionally:
- have rdbms backends look up the journal for actor if it's not set
- migrate to numeric ID values (fixes bug 817217)
index 32f3d7c3bccfeedfe6c887bfc45a56394770fd48..de200228c274a63dec58e20797b9f1806dbfc3a3 100644 (file)
-# $Id: back_sqlite.py,v 1.20 2004-03-22 07:45:39 richard Exp $
+# $Id: back_sqlite.py,v 1.21 2004-03-26 05:16:03 richard Exp $
'''Implements a backend for SQLite.
See https://pysqlite.sourceforge.net/ for pysqlite info
if tables.has_key(classname):
dbspec = tables[classname]
self.update_class(spec, dbspec, force=1, adding_actor=1)
+ # we've updated - don't try again
+ tables[classname] = spec.schema()
def update_class(self, spec, old_spec, force=0, adding_actor=0):
''' Determine the differences between the current spec and the
return 0
if __debug__:
- print >>hyperdb.DEBUG, 'update_class FIRING'
+ print >>hyperdb.DEBUG, 'update_class FIRING for', spec.classname
# detect multilinks that have been removed, and drop their table
old_has = {}
- for name,prop in old_spec[1]:
+ for name, prop in old_spec[1]:
+ print (name, prop)
old_has[name] = 1
if new_has(name) or not isinstance(prop, hyperdb.Multilink):
continue
for propname,x in new_spec[1]:
prop = properties[propname]
if isinstance(prop, hyperdb.Multilink):
- if force or not old_has(propname):
+ if not old_has(propname):
# we need to create the new table
self.create_multilink_table(spec, propname)
+ elif force:
+ tn = '%s_%s'%(spec.classname, propname)
+ # grabe the current values
+ sql = 'select linkid, nodeid from %s'%tn
+ if __debug__:
+ print >>hyperdb.DEBUG, 'update_class', (self, sql)
+ self.cursor.execute(sql)
+ rows = self.cursor.fetchall()
+
+ # drop the old table
+ self.drop_multilink_table_indexes(spec.classname, propname)
+ sql = 'drop table %s'%tn
+ if __debug__:
+ print >>hyperdb.DEBUG, 'migration', (self, sql)
+ self.cursor.execute(sql)
+
+ # re-create and populate the new table
+ self.create_multilink_table(spec, propname)
+ sql = '''insert into %s (linkid, nodeid) values
+ (%s, %s)'''%(tn, self.arg, self.arg)
+ for linkid, nodeid in rows:
+ self.cursor.execute(sql, (int(linkid), int(nodeid)))
elif old_has(propname):
# we copy this col over from the old table
fetch.append('_'+propname)
self.drop_class_table_indexes(cn, old_spec[0])
# drop the old table
+ if __debug__:
+ print >>hyperdb.DEBUG, 'update_class "drop table _%s"'%cn
self.cursor.execute('drop table _%s'%cn)
# create the new table
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index a07e72160d0759b0deced98495bf3a17dbe1e6ce..c34d4266208fa8c2dd2b5a7aad92ed1ba6f23788 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.168 2004-03-25 00:44:28 richard Exp $
+# $Id: client.py,v 1.169 2004-03-26 05:16:03 richard Exp $
"""WWW request handler (also used in the stand-alone server).
"""
pass
# look up the user session cookie (may override the REMOTE_USER)
- cookie = Cookie.Cookie(self.env.get('HTTP_COOKIE', ''))
+ cookie = Cookie.SimpleCookie(self.env.get('HTTP_COOKIE', ''))
user = 'anonymous'
if (cookie.has_key(self.cookie_name) and
cookie[self.cookie_name].value != 'deleted'):