~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-06 12:11:25 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060306121125-4f05992d44e3bda8
Convert Knit repositories to use knits.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        eq(w1.get_lines('v2'), ['hello\n', 'world\n'])
149
149
        eq(w1.get_parents('v2'), ['v1', 'x1'])
150
150
 
 
151
    def test_join_with_ignore_missing_versions(self):
 
152
        # test that ignore_missing=True makes a listed but absent version id
 
153
        # be ignored, and that unlisted version_ids are not integrated.
 
154
        w1 = self.build_weave1()
 
155
        wb = self.get_target()
 
156
        wb.add_lines('x1', [], ['line from x1\n'])
 
157
        wb.add_lines('v1', [], ['hello\n'])
 
158
        wb.add_lines('v2', ['v1', 'x1'], ['hello\n', 'world\n'])
 
159
        w1.join(wb, version_ids=['x1', 'z1'], ignore_missing=True)
 
160
        eq = self.assertEquals
 
161
        eq(sorted(w1.versions()), ['v1', 'v2', 'v3', 'x1'])
 
162
        eq(w1.get_text('x1'), 'line from x1\n')
 
163
        eq(w1.get_lines('v2'), ['hello\n', 'world\n'])
 
164
        eq(w1.get_parents('v2'), ['v1'])
 
165
    
151
166
    def build_source_weave(self, name, *pattern):
152
167
        w = self.get_source(name)
153
168
        for version, parents in pattern: