/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/per_workingtree/test_locking.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 16:40:42 UTC
  • mfrom: (6653.6.7 rename-controldir)
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170610164042-zrxqgy2htyduvke2
MergeĀ rename-controldirĀ branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
        # first check that it was not written yet.
155
155
        # TODO: This requires taking a read lock while we are holding the above
156
156
        #       write lock, which shouldn't actually be possible
157
 
        reference_tree = tree.bzrdir.open_workingtree()
 
157
        reference_tree = tree.controldir.open_workingtree()
158
158
        self.assertEqual(old_root, reference_tree.get_root_id())
159
159
        # now unlock the second held lock, which should do nothing.
160
160
        tree.unlock()
161
 
        reference_tree = tree.bzrdir.open_workingtree()
 
161
        reference_tree = tree.controldir.open_workingtree()
162
162
        self.assertEqual(old_root, reference_tree.get_root_id())
163
163
        # unlocking the first lock we took will now flush.
164
164
        tree.unlock()
165
165
        # and check it was written using another reference tree
166
 
        reference_tree = tree.bzrdir.open_workingtree()
 
166
        reference_tree = tree.controldir.open_workingtree()
167
167
        self.assertEqual('new-root', reference_tree.get_root_id())
168
168
 
169
169
    def test_unlock_from_tree_write_lock_flushes(self):