~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
735
735
                                         ' versioned, but has versioned'
736
736
                                         ' children.  Versioned directory.')
737
737
        self.assertEqual(conflicts_s[6], 'Conflict moving oz/emeraldcity into'
738
 
                                         ' oz/emeraldcity.  Cancelled move.')
 
738
                                         ' oz/emeraldcity. Cancelled move.')
739
739
 
740
740
    def prepare_wrong_parent_kind(self):
741
741
        tt, root = self.get_transform()
1923
1923
        self.assertTrue(source.is_executable('file1-id'))
1924
1924
 
1925
1925
    def install_rot13_content_filter(self, pattern):
 
1926
        # We could use
 
1927
        # self.addCleanup(filters._reset_registry, filters._reset_registry())
 
1928
        # below, but that looks a bit... hard to read even if it's exactly
 
1929
        # the same thing.
1926
1930
        original_registry = filters._reset_registry()
1927
1931
        def restore_registry():
1928
1932
            filters._reset_registry(original_registry)
2367
2371
    def test_ignore_pb(self):
2368
2372
        # pb could be supported, but TT.iter_changes doesn't support it.
2369
2373
        revision_tree, preview_tree = self.get_tree_and_preview_tree()
2370
 
        preview_tree.iter_changes(revision_tree, pb=progress.DummyProgress())
 
2374
        preview_tree.iter_changes(revision_tree)
2371
2375
 
2372
2376
    def test_kind(self):
2373
2377
        revision_tree = self.create_tree()
2775
2779
        file_trans_id = preview.trans_id_file_id('file-id')
2776
2780
        preview.delete_contents(file_trans_id)
2777
2781
        preview.create_file('a\nb\n', file_trans_id)
2778
 
        pb = progress.DummyProgress()
2779
2782
        preview_tree = preview.get_preview_tree()
2780
 
        merger = Merger.from_revision_ids(pb, preview_tree,
 
2783
        merger = Merger.from_revision_ids(None, preview_tree,
2781
2784
                                          child_tree.branch.last_revision(),
2782
2785
                                          other_branch=child_tree.branch,
2783
2786
                                          tree_branch=work_tree.branch)
2795
2798
        tt.new_file('name', tt.root, 'content', 'file-id')
2796
2799
        tree2 = self.make_branch_and_tree('tree2')
2797
2800
        tree2.set_root_id('TREE_ROOT')
2798
 
        pb = progress.DummyProgress()
2799
2801
        merger = Merger.from_uncommitted(tree2, tt.get_preview_tree(),
2800
 
                                         pb, tree.basis_tree())
 
2802
                                         None, tree.basis_tree())
2801
2803
        merger.merge_type = Merge3Merger
2802
2804
        merger.do_merge()
2803
2805
 
2813
2815
        tt.create_file('baz', trans_id)
2814
2816
        tree2 = tree.bzrdir.sprout('tree2').open_workingtree()
2815
2817
        self.build_tree_contents([('tree2/foo', 'qux')])
2816
 
        pb = progress.DummyProgress()
 
2818
        pb = None
2817
2819
        merger = Merger.from_uncommitted(tree2, tt.get_preview_tree(),
2818
2820
                                         pb, tree.basis_tree())
2819
2821
        merger.merge_type = Merge3Merger