Mercurial > p > roundup > code
comparison roundup/templates/classic/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 | a5cd27d33516 dce4c75bef5a |
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.12 2001-12-02 05:06:16 richard Exp $ | 18 # $Id: dbinit.py,v 1.13 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 issue = IssueClass(db, "issue", | 84 issue = IssueClass(db, "issue", |
| 125 address=instance_config.ADMIN_EMAIL) | 126 address=instance_config.ADMIN_EMAIL) |
| 126 db.commit() | 127 db.commit() |
| 127 | 128 |
| 128 # | 129 # |
| 129 # $Log: not supported by cvs2svn $ | 130 # $Log: not supported by cvs2svn $ |
| 131 # Revision 1.12 2001/12/02 05:06:16 richard | |
| 132 # . We now use weakrefs in the Classes to keep the database reference, so | |
| 133 # the close() method on the database is no longer needed. | |
| 134 # I bumped the minimum python requirement up to 2.1 accordingly. | |
| 135 # . #487480 ] roundup-server | |
| 136 # . #487476 ] INSTALL.txt | |
| 137 # | |
| 138 # I also cleaned up the change message / post-edit stuff in the cgi client. | |
| 139 # There's now a clearly marked "TODO: append the change note" where I believe | |
| 140 # the change note should be added there. The "changes" list will obviously | |
| 141 # have to be modified to be a dict of the changes, or somesuch. | |
| 142 # | |
| 143 # More testing needed. | |
| 144 # | |
| 130 # Revision 1.11 2001/12/01 07:17:50 richard | 145 # Revision 1.11 2001/12/01 07:17:50 richard |
| 131 # . We now have basic transaction support! Information is only written to | 146 # . We now have basic transaction support! Information is only written to |
| 132 # the database when the commit() method is called. Only the anydbm | 147 # the database when the commit() method is called. Only the anydbm |
| 133 # backend is modified in this way - neither of the bsddb backends have been. | 148 # backend is modified in this way - neither of the bsddb backends have been. |
| 134 # The mail, admin and cgi interfaces all use commit (except the admin tool | 149 # The mail, admin and cgi interfaces all use commit (except the admin tool |
