/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: Parth Malwankar
  • Date: 2010-05-12 12:08:44 UTC
  • mto: This revision was merged to the branch mainline in revision 5241.
  • Revision ID: parth.malwankar@gmail.com-20100512120844-d60qr48yp275okze
optimized to use "revisions" insert_record_stream for counting #records
rather than getting them eargerly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
                self.from_repository, self.to_repository,
117
117
                "different rich-root support")
118
118
        pb = ui.ui_factory.nested_progress_bar()
119
 
        key_count = len(search.get_keys())
 
119
        #key_count = len(search.get_keys())
 
120
        #print "key_count:", key_count, "##########"
120
121
        try:
121
122
            pb.update("Get stream source")
122
123
            source = self.from_repository._get_source(
126
127
            # TODO: slow
127
128
            pb.update("Inserting stream")
128
129
            resume_tokens, missing_keys = self.sink.insert_stream(
129
 
                stream, from_format, [], key_count)
 
130
                stream, from_format, [])
130
131
            if self.to_repository._fallback_repositories:
131
132
                missing_keys.update(
132
133
                    self._parent_inventories(search.get_keys()))
136
137
                stream = source.get_stream_for_missing_keys(missing_keys)
137
138
                pb.update("Inserting missing keys")
138
139
                resume_tokens, missing_keys = self.sink.insert_stream(
139
 
                    stream, from_format, resume_tokens, len(missing_keys))
 
140
                    stream, from_format, resume_tokens)
140
141
            if missing_keys:
141
142
                raise AssertionError(
142
143
                    "second push failed to complete a fetch %r." % (