~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2005-08-10 16:02:38 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: abentley@panoramicfeedback.com-20050810160238-de95cd021dae7a02
Stopped using SourceFile in inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tree classes, representing directory at point in time.
18
18
"""
19
19
 
 
20
from osutils import pumpfile, appendpath, fingerprint_file
20
21
import os
21
22
 
22
 
import bzrlib
23
23
from bzrlib.trace import mutter, note
24
24
from bzrlib.errors import BzrError
25
 
from bzrlib.inventory import Inventory
26
 
from bzrlib.osutils import pumpfile, appendpath, fingerprint_file
27
25
 
 
26
import bzrlib
28
27
 
29
28
exporters = {}
30
29
 
67
66
 
68
67
    def _get_inventory(self):
69
68
        return self._inventory
70
 
    
71
 
    def get_file_by_path(self, path):
72
 
        return self.get_file(self._inventory.path2id(path))
73
69
 
74
70
    inventory = property(_get_inventory,
75
71
                         doc="Inventory of this Tree")
148
144
 
149
145
 
150
146
class EmptyTree(Tree):
151
 
    def __init__(self):
152
 
        self._inventory = Inventory()
 
147
    def __init__(self, root_id):
 
148
        from bzrlib.inventory import Inventory
 
149
        self._inventory = Inventory(root_id)
153
150
 
154
151
    def has_filename(self, filename):
155
152
        return False