view tests/test-lrucachedict.py.out @ 27698:dad6404ccddb

bmstore: add handling of the active bookmark This further centralizes the handling of bookmark storage, and will help get some lingering bookmarks business out of localrepo. Right now, this change implies reading of the active bookmark to also imply reading all bookmarks from disk - for users with many many bookmarks this may be a measurable performance hit. In that case, we should migrate bmstore to be able to lazy-read its properties from disk rather than having to eagerly read them, but I decided to avoid doing that to try and avoid some potentially complicated filecache decorator issues. This doesn't move the logic for writing the active bookmark into a transaction, though that is probably the correct next step. Since the API probably needs to morph a little more, I didn't bother marking bookmarks.{activate,deactivate} as deprecated yet.
author Augie Fackler <augie@google.com>
date Wed, 11 Nov 2015 21:18:02 -0500
parents 6cd3044985c2
children
line wrap: on
line source

'a' in d: True
d['a']: va
'b' in d: True
d['b']: vb
'c' in d: True
d['c']: vc
'd' in d: True
d['d']: vd
'a' in d: False
'b' in d: True
d['b']: vb
'c' in d: True
d['c']: vc
'd' in d: True
d['d']: vd
'e' in d: True
d['e']: ve
'b' in d: True
d['b']: vb2
'c' in d: True
d['c']: vc2
'd' in d: True
d['d']: vd
'e' in d: False
'f' in d: True
d['f']: vf
'b' in d: False
'c' in d: False
'd' in d: False
'e' in d: False
'f' in d: False
'a' in d: True
d['a']: 1
'b' in d: True
d['b']: 2

All of these should be present:
'a' in dc: True
dc['a']: va3
'b' in dc: True
dc['b']: vb3
'c' in dc: True
dc['c']: vc3
'd' in dc: True
dc['d']: vd3

All of these except 'a' should be present:
'a' in dc: False
'b' in dc: True
dc['b']: vb3
'c' in dc: True
dc['c']: vc3
'd' in dc: True
dc['d']: vd3
'e' in dc: True
dc['e']: ve3

These should be in reverse alphabetical order and read 'v?3':
d['d']: vd3
d['c']: vc3
d['b']: vb3
d['a']: va3