/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: Robert Collins
  • Date: 2006-04-20 01:27:45 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: robertc@robertcollins.net-20060420012745-5c1d423d144b7d08
Remove unneeded optimisation in fetch_texts - the interversioned file optimisers now do this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
            for file_id in file_ids:
164
164
                texts_pb.update("fetch texts", count, num_file_ids)
165
165
                count +=1
166
 
                try:
167
 
                    to_weave = self.to_weaves.get_weave(file_id,
168
 
                        self.to_repository.get_transaction())
169
 
                except errors.NoSuchFile:
170
 
                    # destination is empty, just copy it.
171
 
                    # this copies all the texts, which is useful and 
172
 
                    # on per-file basis quite cheap.
173
 
                    self.to_weaves.copy_multi(
174
 
                        self.from_weaves,
175
 
                        [file_id],
176
 
                        None,
177
 
                        self.from_repository.get_transaction(),
178
 
                        self.to_repository.get_transaction())
179
 
                else:
180
 
                    # destination has contents, must merge
181
 
                    from_weave = self.from_weaves.get_weave(file_id,
182
 
                        self.from_repository.get_transaction())
183
 
                    # we fetch all the texts, because texts do
184
 
                    # not reference anything, and its cheap enough
185
 
                    to_weave.join(from_weave)
 
166
                to_weave = self.to_weaves.get_weave_or_empty(file_id,
 
167
                    self.to_repository.get_transaction())
 
168
                from_weave = self.from_weaves.get_weave(file_id,
 
169
                    self.from_repository.get_transaction())
 
170
                # we fetch all the texts, because texts do
 
171
                # not reference anything, and its cheap enough
 
172
                to_weave.join(from_weave)
186
173
        finally:
187
174
            texts_pb.finished()
188
175