~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

(mbp, #303856) Don't set a pack write cache from RepoFetcher

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    """
78
78
 
79
79
    def __init__(self, to_repository, from_repository, last_revision=None, pb=None,
80
 
        find_ghosts=True, _write_group_acquired_callable=None):
 
80
        find_ghosts=True):
81
81
        """Create a repo fetcher.
82
82
 
83
83
        :param find_ghosts: If True search the entire history for ghosts.
98
98
        # must not mutate self._last_revision as its potentially a shared instance
99
99
        self._last_revision = last_revision
100
100
        self.find_ghosts = find_ghosts
101
 
        self._write_group_acquired_callable = _write_group_acquired_callable
102
101
        if pb is None:
103
102
            self.pb = bzrlib.ui.ui_factory.nested_progress_bar()
104
103
            self.nested_pb = self.pb
111
110
            try:
112
111
                self.to_repository.start_write_group()
113
112
                try:
114
 
                    if self._write_group_acquired_callable is not None:
115
 
                        # Used by InterPackRepo.fetch to set_write_cache_size
116
 
                        # on the new pack.
117
 
                        self._write_group_acquired_callable()
118
113
                    self.__fetch()
119
114
                except:
120
115
                    self.to_repository.abort_write_group(suppress_errors=True)