~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Jelmer Vernooij
  • Date: 2005-10-19 09:34:39 UTC
  • mfrom: (1185.16.78)
  • mto: (1185.16.102)
  • mto: This revision was merged to the branch mainline in revision 1488.
  • Revision ID: jelmer@samba.org-20051019093439-e1d8e3508d1ba46b
MergeĀ fromĀ Martin

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
        self.pb.update('loading revision',
264
264
                       len(self.revisions),
265
265
                       len(self.known_revisions))
266
 
        if rev_id not in self.branch.revision_store:
 
266
        if not self.branch.revision_store.has_id(rev_id):
267
267
            self.pb.clear()
268
268
            note('revision {%s} not present in branch; '
269
269
                 'will be converted as a ghost',
270
270
                 rev_id)
271
271
            self.absent_revisions.add(rev_id)
272
272
        else:
273
 
            rev_xml = self.branch.revision_store[rev_id].read()
 
273
            rev_xml = self.branch.revision_store.get(rev_id).read()
274
274
            rev = serializer_v4.read_revision_from_string(rev_xml)
275
275
            for parent_id in rev.parent_ids:
276
276
                self.known_revisions.add(parent_id)
280
280
 
281
281
    def _load_old_inventory(self, rev_id):
282
282
        assert rev_id not in self.converted_revs
283
 
        old_inv_xml = self.branch.inventory_store[rev_id].read()
 
283
        old_inv_xml = self.branch.inventory_store.get(rev_id).read()
284
284
        inv = serializer_v4.read_inventory_from_string(old_inv_xml)
285
285
        rev = self.revisions[rev_id]
286
286
        if rev.inventory_sha1:
375
375
                return
376
376
        parent_indexes = map(w.lookup, previous_revisions)
377
377
        if ie.has_text():
378
 
            file_lines = self.branch.text_store[ie.text_id].readlines()
 
378
            file_lines = self.branch.text_store.get(ie.text_id).readlines()
379
379
            assert sha_strings(file_lines) == ie.text_sha1
380
380
            assert sum(map(len, file_lines)) == ie.text_size
381
381
            w.add(rev_id, parent_indexes, file_lines, ie.text_sha1)