SFTP tests fail on Windows
robertc at robertcollins.net
Mon May 1 23:41:48 BST 2006
On Mon, 2006-05-01 at 17:21 -0500, John Arbash Meinel wrote:
> Robert Collins wrote:
> > On Mon, 2006-05-01 at 17:05 -0500, John Arbash Meinel wrote:
> >> Alexander Belchenko wrote:
> >> I don't know what sftp servers exist for windows, so I don't know what
> >> the "official" paths look like, but I think the above path will at least
> >> get us 90% of the way.
> >> (The biggest trick is that right now the code just does:
> >> sftp_url = "sftp://localhost" + abspath(path)
> >> But for win32 it needs to do:
> >> sftp_url = "sftp://localhost/" + munge(abspath(path))
> >> ^--very important
> > I think that a better approach is to implement the previously discussed
> > transport backing server for the sftp stub server.
> > Then the transport server sftp://localhost/ can be backed by
> > LocalTransport(file:///C|/), so a request for
> > sftp://localhosthost/autoexec.bat returns C:\autoexec.bat.
> > This means no platform specific code path is needed, and also allows us
> > to start testing the sftp permissions code paths on windows, by backing
> > the sftp server with a MemoryTransport.
> > Rob
> > Cheers,
> > Rob
> Except it seems to me that sftp://localhost/autoexec.bat is not an
> absolute path, since there is no way under that scheme to request both
> I would actually like to know that if I setup an SFTP server on windows,
> I would actually be able to get access to windows files. (Though this
> requires knowing what kind of path requests bzr needs to make for a
> Windows SFTP server).
> But I can see your point that there are different benefits to using a
> Transport underneath the StubSFTPServer. (Especially testing the
> permissions stuff)
All the SFTP servers I've seen on windows have had an artificial root,
and did not allow access to drive letters. the cygwin one naturally uses
the cygwin / as its root. The commercial ones had you select a path to
And for our tests, I dont see that allowing access to both C: and D: is
valid or useful: SFTP is an abstraction layer, and its correspondence to
file:// or http:// schemes will always be through some form of mapping.
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060502/ac7fe84f/attachment.pgp
More information about the bazaar