Mercurial > p > roundup > code
annotate roundup/backends/back_bsddb3.py @ 275:1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
...get, set and create methods. This means that the data is also
stringified for the journal call, and removes duplication of code from
the backends. The backend code now only sees strings.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 09 Oct 2001 23:58:10 +0000 |
| parents | a4241ddd22d7 |
| children | f43af1e97fdd |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
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:
196
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:
196
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:
196
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:
196
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:
196
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:
196
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:
196
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
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:
196
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:
196
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:
196
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:
196
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:
196
diff
changeset
|
17 # |
|
275
1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents:
270
diff
changeset
|
18 #$Id: back_bsddb3.py,v 1.9 2001-10-09 23:58:10 richard Exp $ |
|
64
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
20 import bsddb3, os, marshal |
|
270
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
21 from roundup import hyperdb, date, password |
|
64
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
22 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
23 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
24 # Now the database |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
25 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
26 class Database(hyperdb.Database): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
27 """A database for storing records containing flexible data types.""" |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
28 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
29 def __init__(self, storagelocator, journaltag=None): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
30 """Open a hyperdatabase given a specifier to some storage. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
31 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
32 The meaning of 'storagelocator' depends on the particular |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
33 implementation of the hyperdatabase. It could be a file name, |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
34 a directory path, a socket descriptor for a connection to a |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
35 database over the network, etc. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
36 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
37 The 'journaltag' is a token that will be attached to the journal |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
38 entries for any edits done on the database. If 'journaltag' is |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
39 None, the database is opened in read-only mode: the Class.create(), |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
40 Class.set(), and Class.retire() methods are disabled. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
41 """ |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
42 self.dir, self.journaltag = storagelocator, journaltag |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
43 self.classes = {} |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
44 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
45 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
46 # Classes |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
47 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
48 def __getattr__(self, classname): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
49 """A convenient way of calling self.getclass(classname).""" |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
50 return self.classes[classname] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
51 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
52 def addclass(self, cl): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
53 cn = cl.classname |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
54 if self.classes.has_key(cn): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
55 raise ValueError, cn |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
56 self.classes[cn] = cl |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
57 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
58 def getclasses(self): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
59 """Return a list of the names of all existing classes.""" |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
60 l = self.classes.keys() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
61 l.sort() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
62 return l |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
63 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
64 def getclass(self, classname): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
65 """Get the Class object representing a particular class. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
66 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
67 If 'classname' is not a valid class name, a KeyError is raised. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
68 """ |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
69 return self.classes[classname] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
70 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
71 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
72 # Class DBs |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
73 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
74 def clear(self): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
75 for cn in self.classes.keys(): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
76 db = os.path.join(self.dir, 'nodes.%s'%cn) |
|
196
6dfbc1aa0b1f
'n' -> 'c' for create.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
152
diff
changeset
|
77 bsddb3.btopen(db, 'c') |
|
64
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
78 db = os.path.join(self.dir, 'journals.%s'%cn) |
|
196
6dfbc1aa0b1f
'n' -> 'c' for create.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
152
diff
changeset
|
79 bsddb3.btopen(db, 'c') |
|
64
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
80 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
81 def getclassdb(self, classname, mode='r'): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
82 ''' grab a connection to the class db that will be used for |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
83 multiple actions |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
84 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
85 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
|
86 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
|
87 return bsddb3.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
|
88 else: |
|
196
6dfbc1aa0b1f
'n' -> 'c' for create.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
152
diff
changeset
|
89 return bsddb3.btopen(path, 'c') |
|
64
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
90 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
91 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
92 # Nodes |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
93 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
94 def addnode(self, classname, nodeid, node): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
95 ''' add the specified node to its class's db |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
96 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
97 db = self.getclassdb(classname, 'c') |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
98 # now save the marshalled data |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
99 db[nodeid] = marshal.dumps(node) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
100 db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
101 setnode = addnode |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
102 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
103 def getnode(self, classname, nodeid, cldb=None): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
104 ''' add the specified node to its class's db |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
105 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
106 db = cldb or self.getclassdb(classname) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
107 if not db.has_key(nodeid): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
108 raise IndexError, nodeid |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
109 res = marshal.loads(db[nodeid]) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
110 if not cldb: db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
111 return res |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
112 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
113 def hasnode(self, classname, nodeid, cldb=None): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
114 ''' add the specified node to its class's db |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
115 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
116 db = cldb or self.getclassdb(classname) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
117 res = db.has_key(nodeid) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
118 if not cldb: db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
119 return res |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
120 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
121 def countnodes(self, classname, cldb=None): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
122 db = cldb or self.getclassdb(classname) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
123 return len(db.keys()) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
124 if not cldb: db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
125 return res |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
126 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
127 def getnodeids(self, classname, cldb=None): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
128 db = cldb or self.getclassdb(classname) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
129 res = db.keys() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
130 if not cldb: db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
131 return res |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
132 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
133 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
134 # Journal |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
135 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
136 def addjournal(self, classname, nodeid, action, params): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
137 ''' Journal the Action |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
138 'action' may be: |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
139 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
140 'create' or 'set' -- 'params' is a dictionary of property values |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
141 'link' or 'unlink' -- 'params' is (classname, nodeid, propname) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
142 'retire' -- 'params' is None |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
143 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
144 entry = (nodeid, date.Date().get_tuple(), self.journaltag, action, |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
145 params) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
146 db = bsddb3.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c') |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
147 if db.has_key(nodeid): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
148 s = db[nodeid] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
149 l = marshal.loads(db[nodeid]) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
150 l.append(entry) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
151 else: |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
152 l = [entry] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
153 db[nodeid] = marshal.dumps(l) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
154 db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
155 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
156 def getjournal(self, classname, nodeid): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
157 ''' get the journal for id |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
158 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
159 # attempt to open the journal - in some rare cases, the journal may |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
160 # not exist |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
161 try: |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
162 db = bsddb3.btopen(os.path.join(self.dir, 'journals.%s'%classname), |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
163 'r') |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
164 except bsddb3.error, error: |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
165 if error.args[0] != 2: raise |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
166 return [] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
167 # mor handling of bad journals |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
168 if not db.has_key(nodeid): return [] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
169 journal = marshal.loads(db[nodeid]) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
170 res = [] |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
171 for entry in journal: |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
172 (nodeid, date_stamp, self.journaltag, action, params) = entry |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
173 date_obj = date.Date(date_stamp) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
174 res.append((nodeid, date_obj, self.journaltag, action, params)) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
175 db.close() |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
176 return res |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
177 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
178 def close(self): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
179 ''' Close the Database - we must release the circular refs so that |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
180 we can be del'ed and the underlying bsddb connections closed |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
181 cleanly. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
182 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
183 self.classes = None |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
184 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
185 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
186 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
187 # Basic transaction support |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
188 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
189 # TODO: well, write these methods (and then use them in other code) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
190 def register_action(self): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
191 ''' Register an action to the transaction undo log |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
192 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
193 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
194 def commit(self): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
195 ''' Commit the current transaction, start a new one |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
196 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
197 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
198 def rollback(self): |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
199 ''' Reverse all actions from the current transaction |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
200 ''' |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
201 |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
202 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
203 #$Log: not supported by cvs2svn $ |
|
275
1cc866cec608
Moved the data stringification up into the hyperdb.Class class's...
Richard Jones <richard@users.sourceforge.net>
parents:
270
diff
changeset
|
204 #Revision 1.8 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
|
205 #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
|
206 #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
|
207 # |
|
270
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
208 #Revision 1.7 2001/08/12 06:32:36 richard |
|
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
209 #using isinstance(blah, Foo) now instead of isFooType |
|
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
224
diff
changeset
|
210 # |
|
224
ad2c98faec97
using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
211 #Revision 1.6 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
|
212 #stupid typo |
|
ad2c98faec97
using isinstance(blah, Foo) now instead of isFooType
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
213 # |
| 214 | 214 #Revision 1.5 2001/08/07 00:15:51 richard |
| 215 #Added the copyright/license notice to (nearly) all files at request of | |
| 216 #Bizar Software. | |
| 217 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
diff
changeset
|
218 #Revision 1.4 2001/08/03 02:45:47 anthonybaxter |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
diff
changeset
|
219 #'n' -> 'c' for create. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
196
diff
changeset
|
220 # |
|
196
6dfbc1aa0b1f
'n' -> 'c' for create.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
152
diff
changeset
|
221 #Revision 1.3 2001/07/30 02:36:23 richard |
|
6dfbc1aa0b1f
'n' -> 'c' for create.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
152
diff
changeset
|
222 #Handle non-existence of db files in the other backends (code from anydbm). |
|
6dfbc1aa0b1f
'n' -> 'c' for create.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
152
diff
changeset
|
223 # |
|
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
|
224 #Revision 1.2 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
|
225 #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
|
226 # |
|
149
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
64
diff
changeset
|
227 #Revision 1.1 2001/07/24 04:26:03 anthonybaxter |
|
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
64
diff
changeset
|
228 #bsddb3 implementation. For now, it's the bsddb implementation with a "3" |
|
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
64
diff
changeset
|
229 #added in crayon. |
|
fbc77ecf133b
Makes schema changes mucho easier.
Richard Jones <richard@users.sourceforge.net>
parents:
64
diff
changeset
|
230 # |
|
64
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
231 #Revision 1.4 2001/07/23 08:25:33 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
232 #more handling of bad journals |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
233 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
234 #Revision 1.3 2001/07/23 08:20:44 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
235 #Moved over to using marshal in the bsddb and anydbm backends. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
236 #roundup-admin now has a "freshen" command that'll load/save all nodes (not |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
237 # retired - mod hyperdb.Class.list() so it lists retired nodes) |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
238 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
239 #Revision 1.2 2001/07/23 07:56:05 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
240 #Storing only marshallable data in the db - no nasty pickled class references. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
241 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
242 #Revision 1.1 2001/07/23 07:22:13 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
243 #*sigh* some databases have _foo.so as their underlying implementation. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
244 #This time for sure, Rocky. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
245 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
246 #Revision 1.1 2001/07/23 07:15:57 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
247 #Moved the backends into the backends package. Anydbm hasn't been tested at all. |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
248 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
249 #Revision 1.1 2001/07/23 06:23:41 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
250 #moved hyper_bsddb.py to the new backends package as bsddb.py |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
251 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
252 #Revision 1.2 2001/07/22 12:09:32 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
253 #Final commit of Grande Splite |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
254 # |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
255 #Revision 1.1 2001/07/22 11:58:35 richard |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
256 #More Grande Splite |
|
8bce2210ef81
bsddb3 implementation.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
257 # |
