Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 440:de5bf4191f11
Enabled transaction support in the bsddb backend.
It uses the anydbm code where possible, only replacing methods where
the db is opened (it uses the btree opener specifically.)
Also cleaned up some change note generation.
Made the backends package work with pydoc too.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 10 Dec 2001 22:20:01 +0000 |
| parents | 6e27cb83aacb |
| children | 52b5f53d12f3 |
comparison
equal
deleted
inserted
replaced
| 439:6e27cb83aacb | 440:de5bf4191f11 |
|---|---|
| 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: roundupdb.py,v 1.27 2001-12-10 21:02:53 richard Exp $ | 18 # $Id: roundupdb.py,v 1.28 2001-12-10 22:20:01 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Extending hyperdb with types specific to issue-tracking. | 21 Extending hyperdb with types specific to issue-tracking. |
| 22 """ | 22 """ |
| 23 | 23 |
| 437 changed[key] = new_value | 437 changed[key] = new_value |
| 438 except: | 438 except: |
| 439 changed[key] = new_value | 439 changed[key] = new_value |
| 440 | 440 |
| 441 # list the changes | 441 # list the changes |
| 442 m = [] | |
| 442 for propname, value in changed.items(): | 443 for propname, value in changed.items(): |
| 443 prop = cl.properties[propname] | 444 prop = cl.properties[propname] |
| 444 oldvalue = cl.get(nodeid, propname, None) | 445 oldvalue = cl.get(nodeid, propname, None) |
| 445 change = '%s -> %s'%(oldvalue, value) | 446 change = '%s -> %s'%(oldvalue, value) |
| 446 if isinstance(prop, hyperdb.Link): | 447 if isinstance(prop, hyperdb.Link): |
| 488 m.insert(0, '----------') | 489 m.insert(0, '----------') |
| 489 return '\n'.join(m) | 490 return '\n'.join(m) |
| 490 | 491 |
| 491 # | 492 # |
| 492 # $Log: not supported by cvs2svn $ | 493 # $Log: not supported by cvs2svn $ |
| 494 # Revision 1.27 2001/12/10 21:02:53 richard | |
| 495 # only insert the -------- change note marker if there is a change note | |
| 496 # | |
| 493 # Revision 1.26 2001/12/05 14:26:44 rochecompaan | 497 # Revision 1.26 2001/12/05 14:26:44 rochecompaan |
| 494 # Removed generation of change note from "sendmessage" in roundupdb.py. | 498 # Removed generation of change note from "sendmessage" in roundupdb.py. |
| 495 # The change note is now generated when the message is created. | 499 # The change note is now generated when the message is created. |
| 496 # | 500 # |
| 497 # Revision 1.25 2001/11/30 20:28:10 rochecompaan | 501 # Revision 1.25 2001/11/30 20:28:10 rochecompaan |
