~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-24 01:01:04 UTC
  • mto: This revision was merged to the branch mainline in revision 6464.
  • Revision ID: jelmer@samba.org-20120124010104-43ugdvy70ucp34ln
Lots of test fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
775
775
    inventory = property(_get_inventory,
776
776
                         doc="Inventory of this Tree")
777
777
 
778
 
    def _unpack_file_id(self, file_id):
779
 
        if isinstance(file_id, tuple):
780
 
            if len(file_id) != 0:
781
 
                raise ValueError("nested trees not yet supported: %r" % file_id)
782
 
            file_id = file_id[0]
783
 
        return self.inventory, file_id
784
 
 
785
778
    def _get_root_inventory(self):
 
779
        assert self._inventory is not None, "INV MISSING %r" % self
786
780
        return self._inventory
787
781
 
788
782
    root_inventory = property(_get_root_inventory,
798
792
            if len(file_id) != 0:
799
793
                raise ValueError("nested trees not yet supported: %r" % file_id)
800
794
            file_id = file_id[0]
 
795
        assert self.root_inventory is not None, "foo %r" % self.root_inventory
801
796
        return self.root_inventory, file_id
802
797
 
803
798
    @needs_read_lock
1265
1260
        :param file_id: The file_id to lookup.
1266
1261
        """
1267
1262
        try:
1268
 
            inventory = tree.inventory
 
1263
            inventory = tree.root_inventory
1269
1264
        except NotImplementedError:
1270
1265
            # No inventory available.
1271
1266
            try: