~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

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
 
84
102
    def test_set_last_revision_info_when_locked(self):
85
103
        """Calling set_last_revision_info should reset the cache."""
86
104
        branch, calls = self.get_instrumented_branch()