db-refactoring: merged changes from log:trunk@...:2491
Taken care of manually merging r2426 and r2454, since the trac/db.py is no more.
This should be ready to go in the source:sandbox
Authored by: cboos 2005-11-05
Parent: [r2491]
Child: [r2493]