~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/changecache.py

[rs=mwhudson][release-critical=Rinchen] update to loggerhead trunk,
        mainly to get the code to not hold branches open the whole time but
        also getting some other improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from loggerhead import util
32
32
from loggerhead.lockfile import LockFile
33
33
 
34
 
 
35
34
with_lock = util.with_lock('_lock', 'ChangeCache')
36
35
 
37
36
SQLITE_INTERFACE = os.environ.get('SQLITE_INTERFACE', 'sqlite')
42
41
elif SQLITE_INTERFACE == 'sqlite':
43
42
    import sqlite as dbapi2
44
43
    _param_marker = '%s'
45
 
else:
46
 
    raise AssertionError("bad sqlite interface %r!?"%SQLITE_INTERFACE)
 
44
 
47
45
 
48
46
_select_stmt = ("select data from revisiondata where revid = ?"
49
47
                ).replace('?', _param_marker)