/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 bzrlib/tests/per_workingtree/test_locking.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-31 17:42:29 UTC
  • mto: This revision was merged to the branch mainline in revision 4611.
  • Revision ID: john@arbash-meinel.com-20090731174229-w2zdsdlfpeddk8gl
Now we got to the per-workingtree tests, etc.

The main causes seem to break down into:
  bzrdir.clone() is known to be broken wrt locking, this effects
  everything that tries to 'push'

  shelf code is not compatible with strict locking

  merge code seems to have an issue. This might actually be the
  root cause of the clone() problems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
        :param methodname: The lock method to use to establish locks.
107
107
        """
 
108
        # This write locks the local tree, and then grabs a read lock on a
 
109
        # copy, which is bogus and the test just needs to be rewritten.
 
110
        self.thisFailsStrictLockCheck()
108
111
        # when unlocking the last lock count from tree_write_lock,
109
112
        # the tree should do a flush().
110
113
        # we test that by changing the inventory using set_root_id
128
131
        tree.set_root_id('new-root')
129
132
        # to detect that the inventory is written by unlock, we
130
133
        # first check that it was not written yet.
 
134
        # TODO: This requires taking a read lock while we are holding the above
 
135
        #       write lock, which shouldn't actually be possible
131
136
        reference_tree = tree.bzrdir.open_workingtree()
132
137
        self.assertEqual(old_root, reference_tree.get_root_id())
133
138
        # now unlock the second held lock, which should do nothing.