|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -#$Id: back_anydbm.py,v 1.27 2002-01-22 07:21:13 richard Exp $ |
| 18 | +#$Id: back_anydbm.py,v 1.28 2002-02-16 09:14:17 richard Exp $ |
19 | 19 | ''' |
20 | 20 | This module defines a backend that saves the hyperdatabase in a database |
21 | 21 | chosen by anydbm. It is guaranteed to always be available in python |
@@ -313,9 +313,9 @@ def getjournal(self, classname, nodeid): |
313 | 313 | journal = marshal.loads(db[nodeid]) |
314 | 314 | res = [] |
315 | 315 | for entry in journal: |
316 | | - (nodeid, date_stamp, self.journaltag, action, params) = entry |
| 316 | + (nodeid, date_stamp, user, action, params) = entry |
317 | 317 | date_obj = date.Date(date_stamp) |
318 | | - res.append((nodeid, date_obj, self.journaltag, action, params)) |
| 318 | + res.append((nodeid, date_obj, user, action, params)) |
319 | 319 | return res |
320 | 320 |
|
321 | 321 | def pack(self, pack_before): |
@@ -411,10 +411,10 @@ def _doSaveNode(self, classname, nodeid, node): |
411 | 411 | db[nodeid] = marshal.dumps(node) |
412 | 412 |
|
413 | 413 | def _doSaveJournal(self, classname, nodeid, action, params): |
414 | | - if hyperdb.DEBUG: |
415 | | - print '_doSaveJournal', (self, classname, nodeid, action, params) |
416 | 414 | entry = (nodeid, date.Date().get_tuple(), self.journaltag, action, |
417 | 415 | params) |
| 416 | + if hyperdb.DEBUG: |
| 417 | + print '_doSaveJournal', entry |
418 | 418 |
|
419 | 419 | # get the database handle |
420 | 420 | db_name = 'journals.%s'%classname |
@@ -453,6 +453,14 @@ def rollback(self): |
453 | 453 |
|
454 | 454 | # |
455 | 455 | #$Log: not supported by cvs2svn $ |
| 456 | +#Revision 1.27 2002/01/22 07:21:13 richard |
| 457 | +#. fixed back_bsddb so it passed the journal tests |
| 458 | +# |
| 459 | +#... it didn't seem happy using the back_anydbm _open method, which is odd. |
| 460 | +#Yet another occurrance of whichdb not being able to recognise older bsddb |
| 461 | +#databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the |
| 462 | +#process. |
| 463 | +# |
456 | 464 | #Revision 1.26 2002/01/22 05:18:38 rochecompaan |
457 | 465 | #last_set_entry was referenced before assignment |
458 | 466 | # |
|
0 commit comments