/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-15 19:47:18 UTC
  • mfrom: (4634.77.2 2.0)
  • mto: (4634.77.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4750.
  • Revision ID: john@arbash-meinel.com-20091015194718-03501qjvwifiy3c5
Merge the bzr 2.0 stable branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1083
1083
    bit_iter = iter(rel.split('/'))
1084
1084
    for bit in bit_iter:
1085
1085
        lbit = bit.lower()
1086
 
        for look in _listdir(current):
 
1086
        try:
 
1087
            next_entries = _listdir(current)
 
1088
        except OSError: # enoent, eperm, etc
 
1089
            # We can't find this in the filesystem, so just append the
 
1090
            # remaining bits.
 
1091
            current = pathjoin(current, bit, *list(bit_iter))
 
1092
            break
 
1093
        for look in next_entries:
1087
1094
            if lbit == look.lower():
1088
1095
                current = pathjoin(current, look)
1089
1096
                break
1093
1100
            # the target of a move, for example).
1094
1101
            current = pathjoin(current, bit, *list(bit_iter))
1095
1102
            break
1096
 
    return current[len(abs_base)+1:]
 
1103
    return current[len(abs_base):].lstrip('/')
1097
1104
 
1098
1105
# XXX - TODO - we need better detection/integration of case-insensitive
1099
1106
# file-systems; Linux often sees FAT32 devices (or NFS-mounted OSX