~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-27 01:14:33 UTC
  • mfrom: (1686.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060427011433-95634ee1da8a2049
Merge in faster joins from weave to knit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
            # switch source and target so source is ghostless
268
268
            t = source
269
269
            source = target
270
 
            target = source
 
270
            target = t
271
271
            source_ghosts = False
272
272
            target_ghosts = True
273
273
        # now target always supports ghosts.
306
306
                          },
307
307
                         target.get_graph_with_ghosts())
308
308
        self.assertFalse(target.has_ghost('base'))
 
309
 
 
310
    def test_restricted_join_into_empty(self):
 
311
        # joining into an empty versioned file with a version_ids list
 
312
        # should only grab the selected versions.
 
313
        source = self.get_source()
 
314
        source.add_lines('skip_me', [], ['a\n'])
 
315
        source.add_lines('inherit_me', [], ['b\n'])
 
316
        source.add_lines('select_me', ['inherit_me'], ['b\n'])
 
317
        target = self.get_target()
 
318
        target.join(source, version_ids=['select_me'])
 
319
        self.assertEqual(['inherit_me', 'select_me'], target.versions())