~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

Merge 2.1.1, especially the fetch format warning, back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
3033
3033
    # Is the format experimental ?
3034
3034
    experimental = False
3035
3035
 
3036
 
    def __str__(self):
3037
 
        return "<%s>" % self.__class__.__name__
 
3036
    def __repr__(self):
 
3037
        return "%s()" % self.__class__.__name__
3038
3038
 
3039
3039
    def __eq__(self, other):
3040
3040
        # format objects are generally stateless
3372
3372
        :return: None.
3373
3373
        """
3374
3374
        ui.ui_factory.warn_experimental_format_fetch(self)
3375
 
        f = _mod_fetch.RepoFetcher(to_repository=self.target,
 
3375
        from bzrlib.fetch import RepoFetcher
 
3376
        # See <https://launchpad.net/bugs/456077> asking for a warning here
 
3377
        if self.source._format.network_name() != self.target._format.network_name():
 
3378
            ui.ui_factory.show_user_warning('cross_format_fetch',
 
3379
                from_format=self.source._format,
 
3380
                to_format=self.target._format)
 
3381
        f = RepoFetcher(to_repository=self.target,
3376
3382
                               from_repository=self.source,
3377
3383
                               last_revision=revision_id,
3378
3384
                               fetch_spec=fetch_spec,
3956
3962
        """See InterRepository.fetch()."""
3957
3963
        if fetch_spec is not None:
3958
3964
            raise AssertionError("Not implemented yet...")
3959
 
        # See <https://launchpad.net/bugs/456077> asking for a warning here
3960
 
        #
3961
 
        # nb this is only active for local-local fetches; other things using
3962
 
        # streaming.
3963
 
        ui.ui_factory.warn_cross_format_fetch(self.source._format,
3964
 
            self.target._format)
3965
 
        ui.ui_factory.warn_experimental_format_fetch(self)
3966
3965
        if (not self.source.supports_rich_root()
3967
3966
            and self.target.supports_rich_root()):
3968
3967
            self._converting_to_rich_root = True
3969
3968
            self._revision_id_to_root_id = {}
3970
3969
        else:
3971
3970
            self._converting_to_rich_root = False
 
3971
        # See <https://launchpad.net/bugs/456077> asking for a warning here
 
3972
        if self.source._format.network_name() != self.target._format.network_name():
 
3973
            ui.ui_factory.show_user_warning('cross_format_fetch',
 
3974
                from_format=self.source._format,
 
3975
                to_format=self.target._format)
3972
3976
        revision_ids = self.target.search_missing_revision_ids(self.source,
3973
3977
            revision_id, find_ghosts=find_ghosts).get_keys()
3974
3978
        if not revision_ids:
4257
4261
                    self._extract_and_insert_inventories(
4258
4262
                        substream, src_serializer)
4259
4263
            elif substream_type == 'inventory-deltas':
4260
 
                ui.ui_factory.warn_cross_format_fetch(src_format,
4261
 
                    self.target_repo._format)
4262
4264
                self._extract_and_insert_inventory_deltas(
4263
4265
                    substream, src_serializer)
4264
4266
            elif substream_type == 'chk_bytes':