/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/repofmt/weaverepo.py

  • Committer: Martin
  • Date: 2011-01-26 20:02:52 UTC
  • mfrom: (5633 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5634.
  • Revision ID: gzlist@googlemail.com-20110126200252-s4yy1eywfgomxup7
Merge bzr.dev to add release notes for 2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    lockable_files,
41
41
    lockdir,
42
42
    osutils,
 
43
    symbol_versioning,
43
44
    trace,
44
45
    tuned_gzip,
45
46
    urlutils,
488
489
    _versionedfile_class = weave.WeaveFile
489
490
    supports_ghosts = False
490
491
    supports_chks = False
 
492
    supports_funky_characters = False
491
493
 
492
494
    _fetch_order = 'topological'
493
495
    _fetch_reconcile = True
806
808
            self.target.fetch(self.source, revision_id=revision_id)
807
809
 
808
810
    @needs_read_lock
809
 
    def search_missing_revision_ids(self, revision_id=None, find_ghosts=True):
810
 
        """See InterRepository.missing_revision_ids()."""
 
811
    def search_missing_revision_ids(self,
 
812
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
 
813
            find_ghosts=True, revision_ids=None, if_present_ids=None):
 
814
        """See InterRepository.search_missing_revision_ids()."""
811
815
        # we want all revisions to satisfy revision_id in source.
812
816
        # but we don't want to stat every file here and there.
813
817
        # we want then, all revisions other needs to satisfy revision_id
819
823
        # disk format scales terribly for push anyway due to rewriting
820
824
        # inventory.weave, this is considered acceptable.
821
825
        # - RBC 20060209
822
 
        if revision_id is not None:
823
 
            source_ids = self.source.get_ancestry(revision_id)
824
 
            if source_ids[0] is not None:
825
 
                raise AssertionError()
826
 
            source_ids.pop(0)
827
 
        else:
828
 
            source_ids = self.source._all_possible_ids()
829
 
        source_ids_set = set(source_ids)
 
826
        if symbol_versioning.deprecated_passed(revision_id):
 
827
            symbol_versioning.warn(
 
828
                'search_missing_revision_ids(revision_id=...) was '
 
829
                'deprecated in 2.3.  Use revision_ids=[...] instead.',
 
830
                DeprecationWarning, stacklevel=2)
 
831
            if revision_ids is not None:
 
832
                raise AssertionError(
 
833
                    'revision_ids is mutually exclusive with revision_id')
 
834
            if revision_id is not None:
 
835
                revision_ids = [revision_id]
 
836
        del revision_id
 
837
        source_ids_set = self._present_source_revisions_for(
 
838
            revision_ids, if_present_ids)
830
839
        # source_ids is the worst possible case we may need to pull.
831
840
        # now we want to filter source_ids against what we actually
832
841
        # have in target, but don't try to check for existence where we know
836
845
        actually_present_revisions = set(
837
846
            self.target._eliminate_revisions_not_present(possibly_present_revisions))
838
847
        required_revisions = source_ids_set.difference(actually_present_revisions)
839
 
        if revision_id is not None:
 
848
        if revision_ids is not None:
840
849
            # we used get_ancestry to determine source_ids then we are assured all
841
850
            # revisions referenced are present as they are installed in topological order.
842
851
            # and the tip revision was validated by get_ancestry.