~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

(mbp) warning on cross-format stream transfers

Show diffs side-by-side

added added

removed removed

Lines of Context:
3984
3984
        #
3985
3985
        # nb this is only active for local-local fetches; other things using
3986
3986
        # streaming.
3987
 
        trace.warning("Fetching between repositories with different formats\n"
3988
 
            "from %s to %s.\n"
3989
 
            "This may take some time. Upgrade the branches to the same format \n"
3990
 
            "for better results.\n"
3991
 
            % (self.source._format, self.target._format))
 
3987
        ui.ui_factory.warn_cross_format_fetch(self.source._format,
 
3988
            self.target._format)
3992
3989
        if (not self.source.supports_rich_root()
3993
3990
            and self.target.supports_rich_root()):
3994
3991
            self._converting_to_rich_root = True
4287
4284
                    self._extract_and_insert_inventories(
4288
4285
                        substream, src_serializer)
4289
4286
            elif substream_type == 'inventory-deltas':
 
4287
                ui.ui_factory.warn_cross_format_fetch(src_format,
 
4288
                    self.target_repo._format)
4290
4289
                self._extract_and_insert_inventory_deltas(
4291
4290
                    substream, src_serializer)
4292
4291
            elif substream_type == 'chk_bytes':
4591
4590
 
4592
4591
    def _get_convertable_inventory_stream(self, revision_ids,
4593
4592
                                          delta_versus_null=False):
4594
 
        # The source is using CHKs, but the target either doesn't or it has a
4595
 
        # different serializer.  The StreamSink code expects to be able to
 
4593
        # The two formats are sufficiently different that there is no fast
 
4594
        # path, so we need to send just inventorydeltas, which any
 
4595
        # sufficiently modern client can insert into any repository.
 
4596
        # The StreamSink code expects to be able to
4596
4597
        # convert on the target, so we need to put bytes-on-the-wire that can
4597
4598
        # be converted.  That means inventory deltas (if the remote is <1.19,
4598
4599
        # RemoteStreamSink will fallback to VFS to insert the deltas).