~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2009-06-01 18:13:46 UTC
  • mto: (4360.4.11 1.15-pack-source)
  • mto: This revision was merged to the branch mainline in revision 4396.
  • Revision ID: john@arbash-meinel.com-20090601181346-2fxsd3o977j5bj5b
Add tests that ensure we can fetch branches with ghosts in their ancestry.

Also added similar tests when stacking is involved.
Then fixed both the StreamSource and GroupCHKStreamSource to handle these cases.
Andrew's fix didn't work in the case of Stacked, as it only worked if the
initial fetch created a fully complete target. Not if there was a ghost
involved with the transmitted revisions, and stacking was also involved.

Basic fix is just to allow absent records during 'get_stream_for_missing_keys',
the StreamSink is then responsible for ensuring no content is actually missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4265
4265
                continue
4266
4266
            # Ask for full texts always so that we don't need more round trips
4267
4267
            # after this stream.
 
4268
            # Some of the missing keys are genuinely ghosts, so filter absent
 
4269
            # records. The Sink is responsible for doing another check to
 
4270
            # ensure that ghosts don't introduce missing data for future
 
4271
            # fetches.
4268
4272
            stream = versionedfile.filter_absent(vf.get_record_stream(keys,
4269
4273
                self.to_format._fetch_order, True))
4270
4274
            yield substream_kind, stream