/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/fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2010-03-21 21:39:33 UTC
  • mfrom: (5102 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5143.
  • Revision ID: jelmer@samba.org-20100321213933-fexeh9zcoz8oaju2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
50
50
    """
51
51
 
52
52
    def __init__(self, to_repository, from_repository, last_revision=None,
53
 
        pb=None, find_ghosts=True, fetch_spec=None):
 
53
        find_ghosts=True, fetch_spec=None):
54
54
        """Create a repo fetcher.
55
55
 
56
56
        :param last_revision: If set, try to limit to the data this revision
57
57
            references.
58
58
        :param find_ghosts: If True search the entire history for ghosts.
59
 
        :param pb: ProgressBar object to use; deprecated and ignored.
60
 
            This method will just create one on top of the stack.
61
59
        """
62
 
        if pb is not None:
63
 
            symbol_versioning.warn(
64
 
                symbol_versioning.deprecated_in((1, 14, 0))
65
 
                % "pb parameter to RepoFetcher.__init__")
66
 
            # and for simplicity it is in fact ignored
67
60
        # repository.fetch has the responsibility for short-circuiting
68
61
        # attempts to copy between a repository and itself.
69
62
        self.to_repository = to_repository
252
245
        root_id_order.sort(key=operator.itemgetter(0))
253
246
        # Create a record stream containing the roots to create.
254
247
        if len(revs) > 100:
 
248
            # XXX: not covered by tests, should have a flag to always run
 
249
            # this. -- mbp 20100129
255
250
            graph = self.source_repo.get_known_graph_ancestry(revs)
256
251
        new_roots_stream = _new_root_data_stream(
257
252
            root_id_order, rev_id_to_root_id, parent_map, self.source, graph)