sftp bugs
James Henstridge
james at jamesh.id.au
Wed Nov 30 01:33:36 GMT 2005
Matthieu Moy wrote:
>Hi,
>
>There are a couple of bugs in the upstream sftp implementation. Most
>are fixed in John's sftp-fix branch, but I still have a problem with
>it:
>
>$ bzr push sftp://moy@localhost/tmp/branch
>SSH id_rsa password:
>SSH moy at localhost password:
>bzr: ERROR: bzrlib.errors.NonRelativePath: path
>u'sftp://moy@localhost/tmp/branch' is not under base URL
>u'sftp://moy@localhost/tmp'
> at /home/moy/dev/sftp-fix/bzrlib/transport/sftp.py line 208
> in relpath
>bzr: ERROR: Channel request for unknown channel 1
>
>
>This is because _parse_url does a
>
> # remove leading '/'
> self._path = urllib.unquote(self._path[1:])
>
>(shouldn't this be a urllib.unquote(self._path.lstrip('/')) to remove
>multiple slashes?)
>
>
I think the URL handling fixes in the patch I posted yesterday should
fix this problem.
Removing multiple slashes is not necessarily correct though, since the
SFTP URI spec is a bit weird: "sftp://localhost/tmp" refers to "~/tmp",
while "sftp://localhost/%2Ftmp" refers to "/tmp".
It doesn't say how "sftp://localhost//tmp" should be interpreted
though. Stripping one slash will give you "/tmp", while stripping all
slashes gives you "~/tmp".
Could you check whether things work better with my branch?
James.
More information about the bazaar
mailing list