/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Parth Malwankar
  • Date: 2010-04-19 13:04:30 UTC
  • mfrom: (5165 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5166.
  • Revision ID: parth.malwankar@gmail.com-20100419130430-njvxdaka6xbqwvjw
merged in trunk and moved NEWS entry to right location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    lru_cache,
41
41
    osutils,
42
42
    revision as _mod_revision,
 
43
    static_tuple,
43
44
    symbol_versioning,
44
45
    trace,
45
46
    tsort,
2629
2630
    def _make_parents_provider(self):
2630
2631
        return self
2631
2632
 
 
2633
    @needs_read_lock
 
2634
    def get_known_graph_ancestry(self, revision_ids):
 
2635
        """Return the known graph for a set of revision ids and their ancestors.
 
2636
        """
 
2637
        st = static_tuple.StaticTuple
 
2638
        revision_keys = [st(r_id).intern() for r_id in revision_ids]
 
2639
        known_graph = self.revisions.get_known_graph_ancestry(revision_keys)
 
2640
        return graph.GraphThunkIdsToKeys(known_graph)
 
2641
 
2632
2642
    def get_graph(self, other_repository=None):
2633
2643
        """Return the graph walker for this repository format"""
2634
2644
        parents_provider = self._make_parents_provider()
3036
3046
    # Is the format experimental ?
3037
3047
    experimental = False
3038
3048
 
3039
 
    def __str__(self):
3040
 
        return "<%s>" % self.__class__.__name__
 
3049
    def __repr__(self):
 
3050
        return "%s()" % self.__class__.__name__
3041
3051
 
3042
3052
    def __eq__(self, other):
3043
3053
        # format objects are generally stateless
3375
3385
        :return: None.
3376
3386
        """
3377
3387
        ui.ui_factory.warn_experimental_format_fetch(self)
3378
 
        f = _mod_fetch.RepoFetcher(to_repository=self.target,
 
3388
        from bzrlib.fetch import RepoFetcher
 
3389
        # See <https://launchpad.net/bugs/456077> asking for a warning here
 
3390
        if self.source._format.network_name() != self.target._format.network_name():
 
3391
            ui.ui_factory.show_user_warning('cross_format_fetch',
 
3392
                from_format=self.source._format,
 
3393
                to_format=self.target._format)
 
3394
        f = RepoFetcher(to_repository=self.target,
3379
3395
                               from_repository=self.source,
3380
3396
                               last_revision=revision_id,
3381
3397
                               fetch_spec=fetch_spec,
3959
3975
        """See InterRepository.fetch()."""
3960
3976
        if fetch_spec is not None:
3961
3977
            raise AssertionError("Not implemented yet...")
3962
 
        # See <https://launchpad.net/bugs/456077> asking for a warning here
3963
 
        #
3964
 
        # nb this is only active for local-local fetches; other things using
3965
 
        # streaming.
3966
 
        ui.ui_factory.warn_cross_format_fetch(self.source._format,
3967
 
            self.target._format)
3968
3978
        ui.ui_factory.warn_experimental_format_fetch(self)
3969
3979
        if (not self.source.supports_rich_root()
3970
3980
            and self.target.supports_rich_root()):
3972
3982
            self._revision_id_to_root_id = {}
3973
3983
        else:
3974
3984
            self._converting_to_rich_root = False
 
3985
        # See <https://launchpad.net/bugs/456077> asking for a warning here
 
3986
        if self.source._format.network_name() != self.target._format.network_name():
 
3987
            ui.ui_factory.show_user_warning('cross_format_fetch',
 
3988
                from_format=self.source._format,
 
3989
                to_format=self.target._format)
3975
3990
        revision_ids = self.target.search_missing_revision_ids(self.source,
3976
3991
            revision_id, find_ghosts=find_ghosts).get_keys()
3977
3992
        if not revision_ids:
4260
4275
                    self._extract_and_insert_inventories(
4261
4276
                        substream, src_serializer)
4262
4277
            elif substream_type == 'inventory-deltas':
4263
 
                ui.ui_factory.warn_cross_format_fetch(src_format,
4264
 
                    self.target_repo._format)
4265
4278
                self._extract_and_insert_inventory_deltas(
4266
4279
                    substream, src_serializer)
4267
4280
            elif substream_type == 'chk_bytes':