~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2006-10-13 05:29:02 UTC
  • mto: (2070.5.2 chroot decorator)
  • mto: This revision was merged to the branch mainline in revision 2083.
  • Revision ID: andrew.bennetts@canonical.com-20061013052902-60a2d663ee8d494b
Fix memory_transport.abspath('/foo')

Show diffs side-by-side

added added

removed removed

Lines of Context:
328
328
            '/home/sarah/project/foo'
329
329
            >>> t._combine_paths('/home/sarah', '../../etc')
330
330
            '/etc'
 
331
            >>> t._combine_paths('/home/sarah', '/etc')
 
332
            '/etc'
 
333
            >>> t._combine_paths('/home/sarah', '../../../etc')
 
334
            '/etc'
331
335
 
332
336
        :param base_path: urlencoded path for the transport root; typically a 
333
337
             URL but need not contain scheme/host/etc.
359
363
            elif p != '':
360
364
                base_parts.append(p)
361
365
        path = '/'.join(base_parts)
 
366
        if not path.startswith('/'):
 
367
            path = '/' + path
362
368
        return path
363
369
 
364
370
    def relpath(self, abspath):