~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/interversionedfile_implementations/test_join.py

  • Committer: Robert Collins
  • Date: 2006-03-07 23:38:58 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060307233858-ee407c954a9c9c53
Extra test for joining of version-limited sets.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        target = self.get_target()
68
68
        inter = versionedfile.InterVersionedFile.get(source, target)
69
69
        self.assertTrue(isinstance(inter, self.interversionedfile_class))
70
 
        
 
70
 
 
71
    def test_join_versions_joins_ancestors_not_siblings(self):
 
72
        # joining with a version list should bring in ancestors of the
 
73
        # named versions but not siblings thereof.
 
74
        target = self.get_target()
 
75
        target.add_lines('base', [], [])
 
76
        source = self.get_source()
 
77
        source.add_lines('base', [], [])
 
78
        source.add_lines('sibling', ['base'], [])
 
79
        source.add_lines('ancestorleft', ['base'], [])
 
80
        source.add_lines('ancestorright', ['base'], [])
 
81
        source.add_lines('namedleft', ['ancestorleft'], [])
 
82
        source.add_lines('namedright', ['ancestorright'], [])
 
83
        target.join(source, version_ids=['namedleft', 'namedright'])
 
84
        self.assertFalse(target.has_version('sibling'))
 
85
        self.assertTrue(target.has_version('ancestorleft'))
 
86
        self.assertTrue(target.has_version('ancestorright'))
 
87
        self.assertTrue(target.has_version('namedleft'))
 
88
        self.assertTrue(target.has_version('namedright'))
 
89
 
71
90
    def test_join_add_parents(self):
72
91
        """Join inserting new parents into existing versions
73
92