~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

(vila) Add {basename} as a section local configuration option. (Vincent
 Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
        if abspath is None:
147
147
            abspath = u'.'
148
148
 
149
 
        return urlutils.file_relpath(self.base, abspath)
 
149
        return urlutils.file_relpath(
 
150
            urlutils.strip_trailing_slash(self.base),
 
151
            urlutils.strip_trailing_slash(abspath))
150
152
 
151
153
    def has(self, relpath):
152
154
        return os.access(self._abspath(relpath), os.F_OK)
538
540
            """See Transport.symlink."""
539
541
            abs_link_dirpath = urlutils.dirname(self.abspath(link_name))
540
542
            source_rel = urlutils.file_relpath(
541
 
                abs_link_dirpath, self.abspath(source))
 
543
                urlutils.strip_trailing_slash(abs_link_dirpath),
 
544
                urlutils.strip_trailing_slash(self.abspath(source))
 
545
            )
542
546
 
543
547
            try:
544
548
                os.symlink(source_rel, self._abspath(link_name))