~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
719
719
        subtree2 = self.make_to_branch_and_tree('2/sub')
720
720
        subtree2.set_root_id('subtree-id')
721
721
        tree2.add_reference(subtree2)
722
 
 
723
722
        tree1, tree2 = self.mutable_trees_to_test_trees(tree1, tree2)
724
 
 
725
723
        tree1.lock_read()
 
724
        self.addCleanup(tree1.unlock)
726
725
        tree2.lock_read()
727
 
        try:
728
 
            self.assertEqual([], list(tree2._iter_changes(tree1)))
729
 
            subtree1.commit('commit', rev_id='commit-a')
730
 
            self.assertEqual([
731
 
                ('root-id',
732
 
                 (u'', u''),
733
 
                 False,
734
 
                 (True, True),
735
 
                 (None, None),
736
 
                 (u'', u''),
737
 
                 ('directory', 'directory'),
738
 
                 (False, False)),
739
 
                ('subtree-id',
740
 
                 ('sub', 'sub',),
741
 
                 False,
742
 
                 (True, True),
743
 
                 ('root-id', 'root-id'),
744
 
                 ('sub', 'sub'),
745
 
                 ('tree-reference', 'tree-reference'),
746
 
                 (False, False))],
747
 
                             list(tree2._iter_changes(tree1,
748
 
                                 include_unchanged=True)))
749
 
        finally:
750
 
            tree1.unlock()
751
 
            tree2.unlock()
 
726
        self.addCleanup(tree2.unlock)
 
727
        self.assertEqual([], list(tree2._iter_changes(tree1)))
 
728
        subtree1.commit('commit', rev_id='commit-a')
 
729
        self.assertEqual([
 
730
            ('root-id',
 
731
             (u'', u''),
 
732
             False,
 
733
             (True, True),
 
734
             (None, None),
 
735
             (u'', u''),
 
736
             ('directory', 'directory'),
 
737
             (False, False)),
 
738
            ('subtree-id',
 
739
             ('sub', 'sub',),
 
740
             False,
 
741
             (True, True),
 
742
             ('root-id', 'root-id'),
 
743
             ('sub', 'sub'),
 
744
             ('tree-reference', 'tree-reference'),
 
745
             (False, False))],
 
746
                         list(tree2._iter_changes(tree1,
 
747
                             include_unchanged=True)))
752
748
 
753
749
    def test_default_ignores_unversioned_files(self):
754
750
        tree1 = self.make_branch_and_tree('tree1')