~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: 2006-09-27 20:27:46 UTC
  • mfrom: (1910.2.66 format-bumps)
  • Revision ID: pqm@pqm.ubuntu.com-20060927202746-942eb21d12b7edc7
Add support for bundles and testaments with roots

Show diffs side-by-side

added added

removed removed

Lines of Context:
714
714
        warning("Format %s for %s is deprecated - please use 'bzr upgrade' to get better performance"
715
715
                % (self._format, self.bzrdir.transport.base))
716
716
 
 
717
    def supports_rich_root(self):
 
718
        return self._format.rich_root_data
 
719
 
717
720
 
718
721
class AllInOneRepository(Repository):
719
722
    """Legacy support - the repository behaviour for all-in-one branches."""
782
785
            parent_trees[p_id] = repository.revision_tree(None)
783
786
 
784
787
    inv = revision_tree.inventory
785
 
    
 
788
    entries = inv.iter_entries()
786
789
    # backwards compatability hack: skip the root id.
787
 
    entries = inv.iter_entries()
788
 
    entries.next()
 
790
    if not repository.supports_rich_root():
 
791
        path, root = entries.next()
 
792
        if root.revision != rev.revision_id:
 
793
            raise errors.IncompatibleRevision(repr(repository))
789
794
    # Add the texts that are not already present
790
795
    for path, ie in entries:
791
796
        w = repository.weave_store.get_weave_or_empty(ie.file_id,