SFTP tests fail on Windows

John Arbash Meinel john at arbash-meinel.com
Mon May 1 23:21:33 BST 2006


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
C:\autoexec.bat
and
D:\myfile.txt

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)

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060501/2423facd/attachment.pgp 


More information about the bazaar mailing list