~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-18 02:24:28 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: aaron.bentley@utoronto.ca-20050818022428-4c0bf84005f4dba8
mergedĀ mbp@sourcefrog.net-20050817233101-0939da1cf91f2472

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
21
20
import os
22
21
 
 
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
25
27
 
26
 
import bzrlib
27
28
 
28
29
exporters = {}
29
30
 
66
67
 
67
68
    def _get_inventory(self):
68
69
        return self._inventory
 
70
    
 
71
    def get_file_by_path(self, path):
 
72
        return self.get_file(self._inventory.path2id(path))
69
73
 
70
74
    inventory = property(_get_inventory,
71
75
                         doc="Inventory of this Tree")
144
148
 
145
149
 
146
150
class EmptyTree(Tree):
147
 
    def __init__(self, root_id):
148
 
        from bzrlib.inventory import Inventory
149
 
        self._inventory = Inventory(root_id)
 
151
    def __init__(self):
 
152
        self._inventory = Inventory()
150
153
 
151
154
    def has_filename(self, filename):
152
155
        return False