~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/memory.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-11 00:23:23 UTC
  • mfrom: (2070 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20061011002323-82ba88c293d7caff
[merge] bzr.dev 2070

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        if _abspath != '/' and _abspath not in self._dirs:
154
154
            raise NoSuchFile(relpath)
155
155
        result = []
156
 
 
157
 
        if not _abspath.endswith('/'):
158
 
            _abspath += '/'
159
 
 
160
 
        for path_group in self._files, self._dirs:
161
 
            for path in path_group:
162
 
                if path.startswith(_abspath):
163
 
                    trailing = path[len(_abspath):]
164
 
                    if trailing and '/' not in trailing:
165
 
                        result.append(trailing)
 
156
        for path in self._files:
 
157
            if (path.startswith(_abspath) and 
 
158
                path[len(_abspath) + 1:].find('/') == -1 and
 
159
                len(path) > len(_abspath)):
 
160
                result.append(path[len(_abspath) + 1:])
 
161
        for path in self._dirs:
 
162
            if (path.startswith(_abspath) and 
 
163
                path[len(_abspath) + 1:].find('/') == -1 and
 
164
                len(path) > len(_abspath) and
 
165
                path[len(_abspath)] == '/'):
 
166
                result.append(path[len(_abspath) + 1:])
166
167
        return map(urlutils.escape, result)
167
168
 
168
169
    def rename(self, rel_from, rel_to):