Part of bzrlib.tests.per_branch.test_get_revision_id_to_revno_map View In Hierarchy
When locked, branches should avoid regenerating revision_id=>dotted revno mapping.
When not locked, obviously the revision_id => dotted revno will need to be regenerated or reread each time.
We test if revision_history is using the cache by instrumenting the branch's _gen_revno_map method, which is called by get_revision_id_to_revno_map.
Method | get_instrumented_branch | Get a branch and monkey patch it to log calls to _gen_revno_map. |
Method | test_unlocked | Repeated calls will call _gen_revno_map each time. |
Method | test_locked | Repeated calls will only call _gen_revno_map once. |
Method | test_set_revision_history_when_locked | Calling set_revision_history should reset the cache. |
Method | test_set_last_revision_info_when_locked | Calling set_last_revision_info should reset the cache. |
Inherited from TestCaseWithBranch:
Method | setUp | Undocumented |
Method | get_branch | Undocumented |
Method | get_default_format | Undocumented |
Method | make_branch | Undocumented |
Method | create_tree_with_merge | Create a branch with a simple ancestry. |
Returns | a tuple of (the branch, list that calls will be logged to) |