~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-21 14:53:25 UTC
  • mfrom: (3137.1.1 hardlinks3)
  • Revision ID: pqm@pqm.ubuntu.com-20071221145325-erktp9le86ik56j1
Fix build_tree acceleration when file is moved in accelerator_tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1569
1569
        self.addCleanup(target.unlock)
1570
1570
        self.assertEqual([], list(target._iter_changes(revision_tree)))
1571
1571
 
 
1572
    def test_build_tree_accelerator_tree_moved(self):
 
1573
        source = self.make_branch_and_tree('source')
 
1574
        self.build_tree_contents([('source/file1', 'A')])
 
1575
        source.add(['file1'], ['file1-id'])
 
1576
        source.commit('commit files')
 
1577
        source.rename_one('file1', 'file2')
 
1578
        source.lock_read()
 
1579
        self.addCleanup(source.unlock)
 
1580
        target = self.make_branch_and_tree('target')
 
1581
        revision_tree = source.basis_tree()
 
1582
        revision_tree.lock_read()
 
1583
        self.addCleanup(revision_tree.unlock)
 
1584
        build_tree(revision_tree, target, source)
 
1585
        target.lock_read()
 
1586
        self.addCleanup(target.unlock)
 
1587
        self.assertEqual([], list(target._iter_changes(revision_tree)))
 
1588
 
1572
1589
 
1573
1590
class MockTransform(object):
1574
1591