~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Parth Malwankar
  • Date: 2010-05-13 09:54:03 UTC
  • mto: This revision was merged to the branch mainline in revision 5241.
  • Revision ID: parth.malwankar@gmail.com-20100513095403-0zr0oz16ievu9an2
code cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4317
4317
        current_count = 0
4318
4318
        rc = RecordCounter()
4319
4319
        pb = ui.ui_factory.nested_progress_bar()
 
4320
        pb.update('Estimate')
4320
4321
 
4321
4322
        for substream_type, substream in stream:
4322
4323
            if 'stream' in debug.debug_flags:
4323
4324
                mutter('inserting substream: %s', substream_type)
4324
4325
            if substream_type == 'texts':
4325
 
                #print "A"
4326
4326
                rc.stream_type = substream_type
4327
4327
                self.target_repo.texts.insert_record_stream(substream,
4328
 
                    rc)
 
4328
                    substream_type, rc)
4329
4329
            elif substream_type == 'inventories':
4330
 
                #print "B"
4331
4330
                if src_serializer == to_serializer:
4332
4331
                    rc.stream_type = substream_type
4333
4332
                    self.target_repo.inventories.insert_record_stream(
4336
4335
                    self._extract_and_insert_inventories(
4337
4336
                        substream, src_serializer)
4338
4337
            elif substream_type == 'inventory-deltas':
4339
 
                #print "C"
4340
4338
                self._extract_and_insert_inventory_deltas(
4341
4339
                    substream, src_serializer)
4342
4340
            elif substream_type == 'chk_bytes':
4343
4341
                # XXX: This doesn't support conversions, as it assumes the
4344
4342
                #      conversion was done in the fetch code.
4345
 
                #print "D"
4346
4343
                rc.stream_type = substream_type
4347
4344
                self.target_repo.chk_bytes.insert_record_stream(substream,
4348
4345
                    substream_type, rc)
4356
4353
                    # which initialzed RecordCounter to be used with the other
4357
4354
                    # insert_record_stream operation to provide better estimate
4358
4355
                    # of workload.
4359
 
                    #print "E"
4360
4356
                    rc.stream_type = substream_type
4361
4357
                    self.target_repo.revisions.insert_record_stream(
4362
4358
                        substream, substream_type, rc)
4364
4360
                    self._extract_and_insert_revisions(substream,
4365
4361
                        src_serializer)
4366
4362
            elif substream_type == 'signatures':
4367
 
                #print "F"
4368
4363
                rc.stream_type = substream_type
4369
4364
                current_count = self.target_repo.signatures.insert_record_stream(substream,
4370
4365
                    substream_type, rc)
4373
4368
 
4374
4369
        # Indicate the record copy is complete.
4375
4370
        # We do this as max is only an estimate
4376
 
        pb.update('', rc.max, rc.max)
 
4371
        pb.update('Estimate', rc.max, rc.max)
4377
4372
        pb.finished()
4378
4373
 
4379
4374
        # Done inserting data, and the missing_keys calculations will try to