~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

Really finish the prior commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
        # work that merge would do.
303
303
 
304
304
        subtree = self.make_branch_and_tree('subdir')
 
305
        # writelock the tree so its repository doesn't get readlocked by
 
306
        # the revision tree locks. This works around the bug where we dont
 
307
        # permit lock upgrading.
 
308
        subtree.lock_write()
 
309
        self.addCleanup(subtree.unlock)
305
310
        self.build_tree(['subdir/file-a',])
306
311
        subtree.add(['file-a'], ['id-a'])
307
312
        rev1 = subtree.commit('commit in subdir')
374
379
        tree = self.make_workingtree()
375
380
 
376
381
        subtree = self.make_branch_and_tree('subdir')
 
382
        # writelock the tree so its repository doesn't get readlocked by
 
383
        # the revision tree locks. This works around the bug where we dont
 
384
        # permit lock upgrading.
 
385
        subtree.lock_write()
 
386
        self.addCleanup(subtree.unlock)
377
387
        rev1 = subtree.commit('commit in subdir')
378
388
        rev1_tree = subtree.basis_tree()
379
389
        rev1_tree.lock_read()