~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-30 06:54:40 UTC
  • mfrom: (3380.1.16 make-it-right)
  • Revision ID: pqm@pqm.ubuntu.com-20080430065440-1l8693padc4f7uho
(abentley) Fix fetch from non-rich-root to rich-root

Show diffs side-by-side

added added

removed removed

Lines of Context:
542
542
            plaintext = Testament(rev, inv).as_short_text()
543
543
            self.store_revision_signature(
544
544
                gpg.GPGStrategy(config), plaintext, revision_id)
545
 
        if not revision_id in self.get_inventory_weave():
 
545
        inventory_vf = self.get_inventory_weave()
 
546
        if not revision_id in inventory_vf:
546
547
            if inv is None:
547
548
                raise errors.WeaveRevisionNotPresent(revision_id,
548
 
                                                     self.get_inventory_weave())
 
549
                                                     inventory_vf)
549
550
            else:
550
551
                # yes, this is not suitable for adding with ghosts.
551
 
                rev.inventory_sha1 = self.add_inventory(revision_id, inv, 
 
552
                rev.inventory_sha1 = self.add_inventory(revision_id, inv,
552
553
                                                        rev.parent_ids)
 
554
        else:
 
555
            rev.inventory_sha1 = inventory_vf.get_sha1s([revision_id])[0]
553
556
        self._revision_store.add_revision(rev, self.get_transaction())
554
557
 
555
558
    def _add_revision_text(self, revision_id, text):