~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Aaron Bentley
  • Date: 2008-10-10 11:55:03 UTC
  • mto: (3363.19.2 fix-iter-changes)
  • mto: This revision was merged to the branch mainline in revision 3777.
  • Revision ID: aaron@aaronbentley.com-20081010115503-6aolshz5fz0s2ai4
remove get_inventory_entry, replace with create_from_tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1327
1327
        self.assertEqual('directory', osutils.file_kind('tree2/foo'))
1328
1328
        self.assertFileEqual('baz', 'tree2/bar')
1329
1329
 
1330
 
    def test_create_symlink_from_tree(self):
 
1330
    def test_create_from_tree_bytes(self):
 
1331
        """Provided lines are used instead of tree content."""
 
1332
        tree1 = self.make_branch_and_tree('tree1')
 
1333
        self.build_tree_contents([('tree1/foo', 'bar'),])
 
1334
        tree1.add('foo', 'foo-id')
 
1335
        tree2 = self.make_branch_and_tree('tree2')
 
1336
        tt = TreeTransform(tree2)
 
1337
        foo_trans_id = tt.create_path('foo', tt.root)
 
1338
        create_from_tree(tt, foo_trans_id, tree1, 'foo-id', bytes='qux')
 
1339
        tt.apply()
 
1340
        self.assertFileEqual('qux', 'tree2/foo')
 
1341
 
 
1342
    def test_create_from_tree_symlink(self):
1331
1343
        self.requireFeature(SymlinkFeature)
1332
1344
        tree1 = self.make_branch_and_tree('tree1')
1333
1345
        os.symlink('bar', 'tree1/foo')