~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-04 19:06:44 UTC
  • mfrom: (5816.4.2 move-more-repo-vf-tests)
  • Revision ID: pqm@pqm.ubuntu.com-20110504190644-xt0ebtkasp1rnfkc
(jelmer) Move more tests that require the full versioned files API to
 bzrlib.tests.per_repository_vf. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    bzrdir,
21
21
    errors,
22
22
    gpg,
23
 
    graph,
24
23
    remote,
25
24
    repository,
26
25
    tests,
356
355
        self.addCleanup(source.unlock)
357
356
        target.fetch(source, revision_id='B-id')
358
357
 
359
 
 
360
 
class TestSource(TestCaseWithRepository):
361
 
    """Tests for/about the results of Repository._get_source."""
362
 
 
363
 
    def test_no_absent_records_in_stream_with_ghosts(self):
364
 
        # XXX: Arguably should be in per_interrepository but
365
 
        # doesn't actually gain coverage there; need a specific set of
366
 
        # permutations to cover it.
367
 
        # bug lp:376255 was reported about this.
368
 
        builder = self.make_branch_builder('repo')
369
 
        builder.start_series()
370
 
        builder.build_snapshot('tip', ['ghost'],
371
 
            [('add', ('', 'ROOT_ID', 'directory', ''))],
372
 
            allow_leftmost_as_ghost=True)
373
 
        builder.finish_series()
374
 
        b = builder.get_branch()
375
 
        b.lock_read()
376
 
        self.addCleanup(b.unlock)
377
 
        repo = b.repository
378
 
        source = repo._get_source(repo._format)
379
 
        search = graph.PendingAncestryResult(['tip'], repo)
380
 
        stream = source.get_stream(search)
381
 
        for substream_type, substream in stream:
382
 
            for record in substream:
383
 
                self.assertNotEqual('absent', record.storage_kind,
384
 
                    "Absent record for %s" % (((substream_type,) + record.key),))