~gz/bzr/2.6b1-1

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_get_revision_id_to_revno_map.py

(jelmer) Remove Branch.revision_history() and Branch.set_revision_history().
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        finally:
82
82
            branch.unlock()
83
83
 
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()
87
 
        branch.lock_write()
88
 
        try:
89
 
            self.assertEqual({'rev-1':(1,), 'rev-2':(2,), 'rev-3':(3,),
90
 
                              'rev-1.1.1':(1,1,1)
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)
99
 
        finally:
100
 
            branch.unlock()
101
 
 
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()