Mercurial > p > roundup > code
annotate roundup/backends/back_bsddb.py @ 651:6257d4e49d2a
Ran it through pychecker, made fixes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 27 Feb 2002 04:14:31 +0000 |
| parents | 9b2575610953 |
| children | bc46480e2a2b 54333751e98d |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
6 # |
| 214 | 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
17 # |
|
650
9b2575610953
Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents:
625
diff
changeset
|
18 #$Id: back_bsddb.py,v 1.16 2002-02-27 03:40:59 richard Exp $ |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
19 ''' |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
20 This module defines a backend that saves the hyperdatabase in BSDDB. |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
21 ''' |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
22 |
|
47
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
23 import bsddb, os, marshal |
|
650
9b2575610953
Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents:
625
diff
changeset
|
24 from roundup import hyperdb, date |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
25 |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
26 # these classes are so similar, we just use the anydbm methods |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
27 import back_anydbm |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
28 |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
29 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
30 # Now the database |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
31 # |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
32 class Database(back_anydbm.Database): |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
33 """A database for storing records containing flexible data types.""" |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
34 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
35 # Class DBs |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
36 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
37 def clear(self): |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
38 for cn in self.classes.keys(): |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
39 db = os.path.join(self.dir, 'nodes.%s'%cn) |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
40 bsddb.btopen(db, 'n') |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
41 db = os.path.join(self.dir, 'journals.%s'%cn) |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
42 bsddb.btopen(db, 'n') |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
43 |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
44 def getclassdb(self, classname, mode='r'): |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
45 ''' grab a connection to the class db that will be used for |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
46 multiple actions |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
47 ''' |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
48 path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname) |
|
152
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
49 if os.path.exists(path): |
|
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
50 return bsddb.btopen(path, mode) |
|
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
51 else: |
|
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
52 return bsddb.btopen(path, 'n') |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
53 |
|
570
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
54 def _opendb(self, name, mode): |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
55 '''Low-level database opener that gets around anydbm/dbm |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
56 eccentricities. |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
57 ''' |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
58 if hyperdb.DEBUG: |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
59 print self, '_opendb', (self, name, mode) |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
60 # determine which DB wrote the class file |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
61 path = os.path.join(os.getcwd(), self.dir, name) |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
62 if not os.path.exists(path): |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
63 if hyperdb.DEBUG: |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
64 print "_opendb bsddb.open(%r, 'n')"%path |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
65 return bsddb.btopen(path, 'n') |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
66 |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
67 # open the database with the correct module |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
68 if hyperdb.DEBUG: |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
69 print "_opendb bsddb.open(%r, %r)"%(path, mode) |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
70 return bsddb.btopen(path, mode) |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
71 |
|
47
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
72 # |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
73 # Journal |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
74 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
75 def getjournal(self, classname, nodeid): |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
76 ''' get the journal for id |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
77 ''' |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
78 # attempt to open the journal - in some rare cases, the journal may |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
79 # not exist |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
80 try: |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
81 db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
82 'r') |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
83 except bsddb.error, error: |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
84 if error.args[0] != 2: raise |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
85 return [] |
|
50
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
86 # mor handling of bad journals |
|
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
87 if not db.has_key(nodeid): return [] |
|
47
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
88 journal = marshal.loads(db[nodeid]) |
|
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
89 res = [] |
|
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
90 for entry in journal: |
|
625
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
91 (nodeid, date_stamp, user, action, params) = entry |
|
48
671203878652
Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents:
47
diff
changeset
|
92 date_obj = date.Date(date_stamp) |
|
625
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
93 res.append((nodeid, date_obj, user, action, params)) |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
94 db.close() |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
95 return res |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
96 |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
97 def _doSaveJournal(self, classname, nodeid, action, params): |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
98 entry = (nodeid, date.Date().get_tuple(), self.journaltag, action, |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
99 params) |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
100 db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c') |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
101 if db.has_key(nodeid): |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
102 s = db[nodeid] |
|
650
9b2575610953
Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents:
625
diff
changeset
|
103 l = marshal.loads(s) |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
104 l.append(entry) |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
105 else: |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
106 l = [entry] |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
107 db[nodeid] = marshal.dumps(l) |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
108 db.close() |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
109 |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
110 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
111 #$Log: not supported by cvs2svn $ |
|
650
9b2575610953
Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents:
625
diff
changeset
|
112 #Revision 1.15 2002/02/16 09:15:33 richard |
|
9b2575610953
Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents:
625
diff
changeset
|
113 #forgot to patch bsddb backend too |
|
9b2575610953
Ran it through pychecker, made fixes
Richard Jones <richard@users.sourceforge.net>
parents:
625
diff
changeset
|
114 # |
|
625
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
115 #Revision 1.14 2002/01/22 07:21:13 richard |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
116 #. fixed back_bsddb so it passed the journal tests |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
117 # |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
118 #... it didn't seem happy using the back_anydbm _open method, which is odd. |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
119 #Yet another occurrance of whichdb not being able to recognise older bsddb |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
120 #databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
121 #process. |
|
88acf6fe20a8
forgot to patch bsddb backend too
Richard Jones <richard@users.sourceforge.net>
parents:
570
diff
changeset
|
122 # |
|
570
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
123 #Revision 1.13 2001/12/10 22:20:01 richard |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
124 #Enabled transaction support in the bsddb backend. It uses the anydbm code |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
125 #where possible, only replacing methods where the db is opened (it uses the |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
126 #btree opener specifically.) |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
127 #Also cleaned up some change note generation. |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
128 #Made the backends package work with pydoc too. |
|
e346a9792335
fixed back_bsddb so it passed the journal tests
Richard Jones <richard@users.sourceforge.net>
parents:
440
diff
changeset
|
129 # |
|
440
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
130 #Revision 1.12 2001/11/21 02:34:18 richard |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
131 #Added a target version field to the extended issue schema |
|
de5bf4191f11
Enabled transaction support in the bsddb backend.
Richard Jones <richard@users.sourceforge.net>
parents:
394
diff
changeset
|
132 # |
|
394
f43af1e97fdd
Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents:
275
diff
changeset
|
133 #Revision 1.11 2001/10/09 23:58:10 richard |
|
f43af1e97fdd
Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents:
275
diff
changeset
|
134 #Moved the data stringification up into the hyperdb.Class class' get, set |
|
f43af1e97fdd
Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents:
275
diff
changeset
|
135 #and create methods. This means that the data is also stringified for the |
|
f43af1e97fdd
Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents:
275
diff
changeset
|
136 #journal call, and removes duplication of code from the backends. The |
|
f43af1e97fdd
Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents:
275
diff
changeset
|
137 #backend code now only sees strings. |
|
f43af1e97fdd
Added a target version field to the extended issue schema
Richard Jones <richard@users.sourceforge.net>
parents:
275
diff
changeset
|
138 # |
|
275
1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents:
270
diff
changeset
|
139 #Revision 1.10 2001/10/09 07:25:59 richard |
|
1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents:
270
diff
changeset
|
140 #Added the Password property type. See "pydoc roundup.password" for |
|
1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents:
270
diff
changeset
|
141 #implementation details. Have updated some of the documentation too. |
|
1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents:
270
diff
changeset
|
142 # |
|
270
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
143 #Revision 1.9 2001/08/12 06:32:36 richard |
|
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
144 #using isinstance(blah, Foo) now instead of isFooType |
|
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
145 # |
|
224
ad2c98faec97
using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
146 #Revision 1.8 2001/08/07 00:24:42 richard |
|
ad2c98faec97
using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
147 #stupid typo |
|
ad2c98faec97
using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
148 # |
| 214 | 149 #Revision 1.7 2001/08/07 00:15:51 richard |
| 150 #Added the copyright/license notice to (nearly) all files at request of | |
| 151 #Bizar Software. | |
| 152 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
153 #Revision 1.6 2001/07/30 02:36:23 richard |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
154 #Handle non-existence of db files in the other backends (code from anydbm). |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
152
diff
changeset
|
155 # |
|
152
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
156 #Revision 1.5 2001/07/30 01:41:36 richard |
|
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
157 #Makes schema changes mucho easier. |
|
80c062af1b7d
Handle non-existence of db files in the other backends (code from anydbm).
Richard Jones <richard@users.sourceforge.net>
parents:
149
diff
changeset
|
158 # |
|
149
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
50
diff
changeset
|
159 #Revision 1.4 2001/07/23 08:25:33 richard |
|
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
50
diff
changeset
|
160 #more handling of bad journals |
|
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
50
diff
changeset
|
161 # |
|
50
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
162 #Revision 1.3 2001/07/23 08:20:44 richard |
|
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
163 #Moved over to using marshal in the bsddb and anydbm backends. |
|
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
164 #roundup-admin now has a "freshen" command that'll load/save all nodes (not |
|
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
165 # retired - mod hyperdb.Class.list() so it lists retired nodes) |
|
674bd8e1b36e
more handling of bad journals
Richard Jones <richard@users.sourceforge.net>
parents:
48
diff
changeset
|
166 # |
|
48
671203878652
Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents:
47
diff
changeset
|
167 #Revision 1.2 2001/07/23 07:56:05 richard |
|
671203878652
Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents:
47
diff
changeset
|
168 #Storing only marshallable data in the db - no nasty pickled class references. |
|
671203878652
Moved over to using marshal in the bsddb and anydbm backends.
Richard Jones <richard@users.sourceforge.net>
parents:
47
diff
changeset
|
169 # |
|
47
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
170 #Revision 1.1 2001/07/23 07:22:13 richard |
|
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
171 #*sigh* some databases have _foo.so as their underlying implementation. |
|
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
172 #This time for sure, Rocky. |
|
34491d9b91a0
Storing only marshallable data in the db - no nasty pickled class references.
Richard Jones <richard@users.sourceforge.net>
parents:
46
diff
changeset
|
173 # |
|
46
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
174 #Revision 1.1 2001/07/23 07:15:57 richard |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
175 #Moved the backends into the backends package. Anydbm hasn't been tested at all. |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
176 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
177 #Revision 1.1 2001/07/23 06:23:41 richard |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
178 #moved hyper_bsddb.py to the new backends package as bsddb.py |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
179 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
180 #Revision 1.2 2001/07/22 12:09:32 richard |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
181 #Final commit of Grande Splite |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
182 # |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
183 #Revision 1.1 2001/07/22 11:58:35 richard |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
184 #More Grande Splite |
|
3c5920433866
*sigh* some databases have _foo.so as their underlying implementation.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
185 # |
