~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-12-01 19:41:16 UTC
  • mfrom: (2158 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2159.
  • Revision ID: john@arbash-meinel.com-20061201194116-nvn5qhfxux5284jc
[merge] bzr.dev 2158

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
 
        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:])
 
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)
167
166
        return map(urlutils.escape, result)
168
167
 
169
168
    def rename(self, rel_from, rel_to):