~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

Tune working inventory generation more: walk the blocks, skipping deleted rows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
        subtree.add(['file-a'], ['id-a'])
307
307
        rev1 = subtree.commit('commit in subdir')
308
308
        rev1_tree = subtree.basis_tree()
 
309
        rev1_tree.lock_read()
 
310
        self.addCleanup(rev1_tree.unlock)
309
311
 
310
312
        subtree2 = subtree.bzrdir.sprout('subdir2').open_workingtree()
311
313
        self.build_tree(['subdir2/file-b'])
312
314
        subtree2.add(['file-b'], ['id-b'])
313
315
        rev2 = subtree2.commit('commit in subdir2')
314
316
        rev2_tree = subtree2.basis_tree()
 
317
        rev2_tree.lock_read()
 
318
        self.addCleanup(rev2_tree.unlock)
315
319
 
316
320
        subtree.merge_from_branch(subtree2.branch)
317
321
        rev3 = subtree.commit('merge from subdir2')
318
322
        rev3_tree = subtree.basis_tree()
 
323
        rev3_tree.lock_read()
 
324
        self.addCleanup(rev3_tree.unlock)
319
325
 
320
326
        repo = tree.branch.repository
321
327
        repo.fetch(subtree.branch.repository, rev3)
345
351
        subtree = self.make_branch_and_tree('subdir')
346
352
        rev1 = subtree.commit('commit in subdir')
347
353
        rev1_tree = subtree.basis_tree()
 
354
        rev1_tree.lock_read()
 
355
        self.addCleanup(rev1_tree.unlock)
348
356
 
349
357
        tree.branch.pull(subtree.branch)
350
358
 
368
376
        subtree = self.make_branch_and_tree('subdir')
369
377
        rev1 = subtree.commit('commit in subdir')
370
378
        rev1_tree = subtree.basis_tree()
 
379
        rev1_tree.lock_read()
 
380
        self.addCleanup(rev1_tree.unlock)
371
381
        rev2 = subtree.commit('second commit in subdir', allow_pointless=True)
372
382
        rev2_tree = subtree.basis_tree()
 
383
        rev2_tree.lock_read()
 
384
        self.addCleanup(rev2_tree.unlock)
373
385
 
374
386
        tree.branch.pull(subtree.branch)
375
387