84
def test_set_revision_history_when_locked(self):
85
"""Calling set_revision_history should reset the cache."""
86
branch, calls = self.get_instrumented_branch()
89
self.assertEqual({'rev-1':(1,), 'rev-2':(2,), 'rev-3':(3,),
91
}, branch.get_revision_id_to_revno_map())
92
self.applyDeprecated(deprecated_in((2, 4, 0)),
93
branch.set_revision_history, ['rev-1', 'rev-2'])
94
self.assertEqual({'rev-1':(1,), 'rev-2':(2,)},
95
branch.get_revision_id_to_revno_map())
96
self.assertEqual({'rev-1':(1,), 'rev-2':(2,)},
97
branch.get_revision_id_to_revno_map())
98
self.assertEqual(['_gen_revno_map']*2, calls)
102
84
def test_set_last_revision_info_when_locked(self):
103
85
"""Calling set_last_revision_info should reset the cache."""
104
86
branch, calls = self.get_instrumented_branch()