~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/intertree_implementations/test_compare.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-05 05:11:39 UTC
  • mfrom: (2796.1.4 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070905051139-bogf0ne9pzsbsrs3
Use None to indicate 'no specific files' in revert, iter_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
            self.deleted(tree1, 'empty-root-id')])
514
514
        self.assertEqual(expected_results, self.do_iter_changes(tree1, tree2))
515
515
 
 
516
    def test_empty_specific_files(self):
 
517
        tree1 = self.make_branch_and_tree('1')
 
518
        tree2 = self.make_to_branch_and_tree('2')
 
519
        tree1 = self.get_tree_no_parents_no_content(tree1)
 
520
        tree2 = self.get_tree_no_parents_abc_content(tree2)
 
521
        tree1, tree2 = self.mutable_trees_to_locked_test_trees(tree1, tree2)
 
522
        self.assertEqual([],
 
523
            self.do_iter_changes(tree1, tree2, specific_files=[]))
 
524
 
 
525
    def test_no_specific_files(self):
 
526
        tree1 = self.make_branch_and_tree('1')
 
527
        tree2 = self.make_to_branch_and_tree('2')
 
528
        tree1 = self.get_tree_no_parents_no_content(tree1)
 
529
        tree2 = self.get_tree_no_parents_abc_content(tree2)
 
530
        tree1, tree2 = self.mutable_trees_to_locked_test_trees(tree1, tree2)
 
531
        expected_results = sorted([
 
532
            self.added(tree2, 'root-id'),
 
533
            self.added(tree2, 'a-id'),
 
534
            self.added(tree2, 'b-id'),
 
535
            self.added(tree2, 'c-id'),
 
536
            self.deleted(tree1, 'empty-root-id')])
 
537
        self.assertEqual(expected_results, self.do_iter_changes(tree1, tree2))
 
538
 
516
539
    def test_empty_to_abc_content_a_only(self):
517
540
        tree1 = self.make_branch_and_tree('1')
518
541
        tree2 = self.make_to_branch_and_tree('2')