~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/groupcompress_repo.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-23 20:04:42 UTC
  • mto: (3735.2.161 brisbane-core)
  • mto: This revision was merged to the branch mainline in revision 4280.
  • Revision ID: john@arbash-meinel.com-20090323200442-10qwt4ws636wwjwl
Cleanup, in preparation for merging to brisbane-core.

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
                if pb is not None:
191
191
                    pb.update(message, idx + 1, len(keys))
192
192
                yield record
193
 
                record._manager = None
194
 
                record._bytes = None
195
193
        return pb_stream()
196
194
 
197
195
    def _get_filtered_inv_stream(self, source_vf, keys, message, pb=None):
218
216
                    p_id_roots_set.add(key)
219
217
                    self._chk_p_id_roots.append(key)
220
218
                yield record
221
 
                record._manager = None
222
 
                record._bytes = None
223
219
            # We have finished processing all of the inventory records, we
224
220
            # don't need these sets anymore
225
221
            id_roots_set.clear()
295
291
                        if pb is not None:
296
292
                            pb.update('chk node', counter[0], total_keys)
297
293
                        yield record
298
 
                        record._manager = None
299
 
                        record._bytes = None
300
294
                yield next_stream()
301
295
                # Double check that we won't be emitting any keys twice
302
296
                # If we get rid of the pre-calculation of all keys, we could
391
385
            self.revision_keys = source_vf.keys()
392
386
        self._copy_stream(source_vf, target_vf, self.revision_keys,
393
387
                          'revisions', self._get_progress_stream, 1)
394
 
        for index in source_vf._index._graph_index._indices:
395
 
            index._leaf_node_cache.clear()
396
 
        # target_vf._index._graph_index._spill_mem_keys_to_disk()
397
388
 
398
389
    def _copy_inventory_texts(self):
399
390
        source_vf, target_vf = self._build_vfs('inventory', True, True)
400
391
        self._copy_stream(source_vf, target_vf, self.revision_keys,
401
392
                          'inventories', self._get_filtered_inv_stream, 2)
402
 
        for index in source_vf._index._graph_index._indices:
403
 
            index._leaf_node_cache.clear()
404
 
        # target_vf._index._graph_index._spill_mem_keys_to_disk()
405
393
 
406
394
    def _copy_chk_texts(self):
407
395
        source_vf, target_vf = self._build_vfs('chk', False, False)
423
411
                    pass
424
412
        finally:
425
413
            child_pb.finished()
426
 
        for index in source_vf._index._graph_index._indices:
427
 
            index._leaf_node_cache.clear()
428
 
        # target_vf._index._graph_index._spill_mem_keys_to_disk()
429
414
 
430
415
    def _copy_text_texts(self):
431
416
        source_vf, target_vf = self._build_vfs('text', True, True)
437
422
        text_keys = source_vf.keys()
438
423
        self._copy_stream(source_vf, target_vf, text_keys,
439
424
                          'text', self._get_progress_stream, 4)
440
 
        for index in source_vf._index._graph_index._indices:
441
 
            index._leaf_node_cache.clear()
442
 
        # target_vf._index._graph_index._spill_mem_keys_to_disk()
443
425
 
444
426
    def _copy_signature_texts(self):
445
427
        source_vf, target_vf = self._build_vfs('signature', False, False)
447
429
        signature_keys.intersection(self.revision_keys)
448
430
        self._copy_stream(source_vf, target_vf, signature_keys,
449
431
                          'signatures', self._get_progress_stream, 5)
450
 
        for index in source_vf._index._graph_index._indices:
451
 
            index._leaf_node_cache.clear()
452
 
        # target_vf._index._graph_index._spill_mem_keys_to_disk()
453
432
 
454
433
    def _create_pack_from_packs(self):
455
434
        self.pb.update('repacking', 0, 7)
462
441
        self._copy_text_texts()
463
442
        self._copy_signature_texts()
464
443
        self.new_pack._check_references()
465
 
        trace.debug_memory('after fetch')
466
444
        if not self._use_pack(self.new_pack):
467
445
            self.new_pack.abort()
468
446
            return None