~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-02-03 02:22:57 UTC
  • mfrom: (5639.1.2 doc-lint-2.4)
  • Revision ID: pqm@pqm.ubuntu.com-20110203022257-caoghu6higq98tak
(spiv) Link to What's New in 2.4 (rather than 2.3) in doc index,
 and add missing comma in doc. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1608
1608
        if symbol_versioning.deprecated_passed(revision_id):
1609
1609
            symbol_versioning.warn(
1610
1610
                'search_missing_revision_ids(revision_id=...) was '
1611
 
                'deprecated in 2.4.  Use revision_ids=[...] instead.',
 
1611
                'deprecated in 2.3.  Use revision_ids=[...] instead.',
1612
1612
                DeprecationWarning, stacklevel=3)
1613
1613
            if revision_ids is not None:
1614
1614
                raise AssertionError(
1785
1785
                not _mod_revision.is_null(revision_id)):
1786
1786
                self.get_revision(revision_id)
1787
1787
            return 0, []
 
1788
        # if there is no specific appropriate InterRepository, this will get
 
1789
        # the InterRepository base class, which raises an
 
1790
        # IncompatibleRepositories when asked to fetch.
1788
1791
        inter = InterRepository.get(source, self)
1789
1792
        return inter.fetch(revision_id=revision_id, pb=pb,
1790
1793
            find_ghosts=find_ghosts, fetch_spec=fetch_spec)
3523
3526
        if symbol_versioning.deprecated_passed(revision_id):
3524
3527
            symbol_versioning.warn(
3525
3528
                'search_missing_revision_ids(revision_id=...) was '
3526
 
                'deprecated in 2.4.  Use revision_ids=[...] instead.',
 
3529
                'deprecated in 2.3.  Use revision_ids=[...] instead.',
3527
3530
                DeprecationWarning, stacklevel=2)
3528
3531
            if revision_ids is not None:
3529
3532
                raise AssertionError(
3898
3901
            fetch_spec=None):
3899
3902
        """See InterRepository.fetch()."""
3900
3903
        if fetch_spec is not None:
3901
 
            revision_ids = fetch_spec.get_keys()
3902
 
        else:
3903
 
            revision_ids = None
 
3904
            if (isinstance(fetch_spec, graph.NotInOtherForRevs) and
 
3905
                    len(fetch_spec.required_ids) == 1 and not
 
3906
                    fetch_spec.if_present_ids):
 
3907
                revision_id = list(fetch_spec.required_ids)[0]
 
3908
                del fetch_spec
 
3909
            else:
 
3910
                raise AssertionError("Not implemented yet...")
3904
3911
        ui.ui_factory.warn_experimental_format_fetch(self)
3905
3912
        if (not self.source.supports_rich_root()
3906
3913
            and self.target.supports_rich_root()):
3913
3920
            ui.ui_factory.show_user_warning('cross_format_fetch',
3914
3921
                from_format=self.source._format,
3915
3922
                to_format=self.target._format)
3916
 
        if revision_ids is None:
3917
 
            if revision_id:
3918
 
                search_revision_ids = [revision_id]
3919
 
            else:
3920
 
                search_revision_ids = None
3921
 
            revision_ids = self.target.search_missing_revision_ids(self.source,
3922
 
                revision_ids=search_revision_ids,
3923
 
                find_ghosts=find_ghosts).get_keys()
 
3923
        if revision_id:
 
3924
            search_revision_ids = [revision_id]
 
3925
        else:
 
3926
            search_revision_ids = None
 
3927
        revision_ids = self.target.search_missing_revision_ids(self.source,
 
3928
            revision_ids=search_revision_ids, find_ghosts=find_ghosts).get_keys()
3924
3929
        if not revision_ids:
3925
3930
            return 0, 0
3926
3931
        revision_ids = tsort.topo_sort(