push over sftp
Robey Pointer
robey at lag.net
Wed Nov 2 22:24:06 GMT 2005
On 2 Nov 2005, at 12:11, John Arbash Meinel wrote:
> Robey Pointer wrote:
>>
>> SFTP urls are always absolute and formatted like HTTP urls, so I
>> think
>> the right one would be:
>>
>> sftp://crash@vmlinux.org/home/crash/public_html/bzr/gul
>>
>> I was just able to push one of my archives to a new place using
>> "push"
>> over sftp, so it does seem to work (but be sure the destination
>> folder
>> doesn't exist yet, bzr wants to be able to mkdir it).
>
> Actually, it does:
> try:
> transport.mkdir(path)
> except NoSuchFile:
> pass
Yeah, that's the problem though -- it's not catching FileExists (line
442 of builtins.py).
> The only problem I know of is if the directory already exists, and
> SftpTransport is raising the wrong exception.
>
> I think that was fixed in Robert's integration branch. Though I
> know he
> (and I believe you) had problems because paramiko doesn't through
> informative exceptions.
Robert fixed the exception impedance (as well as can probably be
done). Thanks Robert. :) I added your clever idea to paramiko
1.5.1, John, of adding a fake "errno" field to the IOError object, so
at least ENOENT and EACCES can be detected. SFTP has no equivalent
to EEXIST, sadly.
robey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051102/272a7ff9/attachment.pgp
More information about the bazaar
mailing list