~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/memory.py

More tests for abspath and clone behaviour

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
so this is primarily useful for testing.
21
21
"""
22
22
 
 
23
from copy import copy
23
24
import os
24
25
import errno
25
26
import re
235
236
        relpath = urlutils.unescape(relpath)
236
237
        if relpath.find('..') != -1:
237
238
            raise AssertionError('relpath contains ..')
 
239
        if relpath[0] == '/':
 
240
            return relpath
238
241
        if relpath == '.':
239
242
            if (self._cwd == '/'):
240
243
                return self._cwd