36
36
from bzrlib.inventory import InventoryFile
37
37
from bzrlib.inter import InterObject
38
38
from bzrlib.osutils import fingerprint_file
39
import bzrlib.revision
39
40
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
40
41
from bzrlib.trace import note
404
405
bit_iter = iter(path.split("/"))
405
406
for elt in bit_iter:
406
407
lelt = elt.lower()
408
408
for child in self.iter_children(cur_id):
410
# XXX: it seem like if the child is known to be in the
411
# tree, we shouldn't need to go from its id back to
412
# its path -- mbp 2010-02-11
414
# XXX: it seems like we could be more efficient
415
# by just directly looking up the original name and
416
# only then searching all children; also by not
417
# chopping paths so much. -- mbp 2010-02-11
418
410
child_base = os.path.basename(self.id2path(child))
419
if (child_base == elt):
420
# if we found an exact match, we can stop now; if
421
# we found an approximate match we need to keep
422
# searching because there might be an exact match
411
if child_base.lower() == lelt:
425
new_path = osutils.pathjoin(cur_path, child_base)
413
cur_path = osutils.pathjoin(cur_path, child_base)
427
elif child_base.lower() == lelt:
429
new_path = osutils.pathjoin(cur_path, child_base)
431
416
# before a change is committed we can see this error...
436
419
# got to the end of this directory and no entries matched.
437
420
# Return what matched so far, plus the rest as specified.