Mercurial > p > roundup > code
comparison roundup/templates/extended/dbinit.py @ 475:a1a44636bace
Fix breakage caused by transaction changes.
Sorry for the huge checkin message - I was only intending to implement
[SF#496356] but I found a number of places where things had been
broken by transactions:
. modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename
for _all_ roundup-generated smtp messages to be sent to.
. the transaction cache had broken the roundupdb.Class set() reactors
. newly-created author users in the mailgw weren't being committed to the db
Stuff that made it into CHANGES.txt (ie. the stuff I was actually working
on when I found that stuff :):
. [SF#496356] Use threading in messages
. detectors were being registered multiple times
. added tests for mailgw
. much better attaching of erroneous messages in the mail gateway
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 02 Jan 2002 02:31:38 +0000 |
| parents | a28a80b714f9 |
| children | dce4c75bef5a c242455d9b46 |
comparison
equal
deleted
inserted
replaced
| 474:ef06a66a0b72 | 475:a1a44636bace |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: dbinit.py,v 1.17 2001-12-02 05:06:16 richard Exp $ | 18 # $Id: dbinit.py,v 1.18 2002-01-02 02:31:38 richard Exp $ |
| 19 | 19 |
| 20 import os | 20 import os |
| 21 | 21 |
| 22 import instance_config | 22 import instance_config |
| 23 from roundup import roundupdb | 23 from roundup import roundupdb |
| 73 user.setkey("username") | 73 user.setkey("username") |
| 74 | 74 |
| 75 msg = FileClass(db, "msg", | 75 msg = FileClass(db, "msg", |
| 76 author=Link("user"), recipients=Multilink("user"), | 76 author=Link("user"), recipients=Multilink("user"), |
| 77 date=Date(), summary=String(), | 77 date=Date(), summary=String(), |
| 78 files=Multilink("file")) | 78 files=Multilink("file"), |
| 79 messageid=String(), inreplyto=String()) | |
| 79 | 80 |
| 80 file = FileClass(db, "file", | 81 file = FileClass(db, "file", |
| 81 name=String(), type=String()) | 82 name=String(), type=String()) |
| 82 | 83 |
| 83 # bugs and support calls etc | 84 # bugs and support calls etc |
| 176 | 177 |
| 177 db.commit() | 178 db.commit() |
| 178 | 179 |
| 179 # | 180 # |
| 180 # $Log: not supported by cvs2svn $ | 181 # $Log: not supported by cvs2svn $ |
| 182 # Revision 1.17 2001/12/02 05:06:16 richard | |
| 183 # . We now use weakrefs in the Classes to keep the database reference, so | |
| 184 # the close() method on the database is no longer needed. | |
| 185 # I bumped the minimum python requirement up to 2.1 accordingly. | |
| 186 # . #487480 ] roundup-server | |
| 187 # . #487476 ] INSTALL.txt | |
| 188 # | |
| 189 # I also cleaned up the change message / post-edit stuff in the cgi client. | |
| 190 # There's now a clearly marked "TODO: append the change note" where I believe | |
| 191 # the change note should be added there. The "changes" list will obviously | |
| 192 # have to be modified to be a dict of the changes, or somesuch. | |
| 193 # | |
| 194 # More testing needed. | |
| 195 # | |
| 181 # Revision 1.16 2001/12/01 07:17:50 richard | 196 # Revision 1.16 2001/12/01 07:17:50 richard |
| 182 # . We now have basic transaction support! Information is only written to | 197 # . We now have basic transaction support! Information is only written to |
| 183 # the database when the commit() method is called. Only the anydbm | 198 # the database when the commit() method is called. Only the anydbm |
| 184 # backend is modified in this way - neither of the bsddb backends have been. | 199 # backend is modified in this way - neither of the bsddb backends have been. |
| 185 # The mail, admin and cgi interfaces all use commit (except the admin tool | 200 # The mail, admin and cgi interfaces all use commit (except the admin tool |
