/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/test_transform.py

  • Committer: Aaron Bentley
  • Date: 2008-08-01 04:29:45 UTC
  • mto: (3363.19.2 fix-iter-changes)
  • mto: This revision was merged to the branch mainline in revision 3752.
  • Revision ID: aaron@aaronbentley.com-20080801042945-13iii343abtkpyxt
Add text checking

Show diffs side-by-side

added added

removed removed

Lines of Context:
2392
2392
        self.assertEqual(set(['new-file', 'removed-file', 'existing-file']),
2393
2393
                         set(tree.extras()))
2394
2394
 
2395
 
    def test_merge_from(self):
 
2395
    def test_merge_into_preview(self):
2396
2396
        work_tree = self.make_branch_and_tree('tree')
 
2397
        self.build_tree_contents([('tree/file','b\n')])
 
2398
        work_tree.add('file', 'file-id')
2397
2399
        work_tree.commit('first commit')
2398
2400
        child_tree = work_tree.bzrdir.sprout('child').open_workingtree()
 
2401
        self.build_tree_contents([('child/file','b\nc\n')])
2399
2402
        child_tree.commit('child commit')
2400
2403
        child_tree.lock_write()
2401
2404
        self.addCleanup(child_tree.unlock)
2411
2414
                                          tree_branch=work_tree.branch)
2412
2415
        merger.merge_type = Merge3Merger
2413
2416
        tt = merger.make_merger().make_preview_transform()
 
2417
        self.addCleanup(tt.finalize)
 
2418
        final_tree = tt.get_preview_tree()
 
2419
        self.assertEqual('a\nb\nc\n', final_tree.get_file_text('file-id'))