[MERGE] [Bug #123475] SFTPTransport._translate_io_exception: better detection
Christophe TROESTLER
Christophe.Troestler+bzr at umh.ac.be
Fri Jul 18 21:01:00 BST 2008
On Fri, 18 Jul 2008 21:46:50 +0200 (CEST), Christophe TROESTLER wrote:
>
> In working on bug #123475, I was wondering why _show_push_branch (in
> push.py) did not report the message that the directory existed but did
> not have a .bzr/ subdir. It turns out that a case for raising
> `FileExists' in sftp.py (_translate_io_exception) has to be added.
Actually, much to my surprise, this simple fix actually closes the
bug! So I am resending it with the proper bug number in the subject
line. Sorry for the noise of the previous mail.
Regards,
C.
-------------- next part --------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: christophe.troestler at umh.ac.be-20080718195108-\
# 0kgfigpaqipeq71e
# target_branch: http://bazaar-vcs.org/bzr/bzr.dev/
# testament_sha1: 60243636283ebad0884365283d72cb0c60e4e36c
# timestamp: 2008-07-18 21:52:22 +0200
# base_revision_id: pqm at pqm.ubuntu.com-20080718100017-segv2csk7ux2xs9p
#
# Begin patch
=== modified file 'bzrlib/transport/sftp.py'
--- bzrlib/transport/sftp.py 2008-07-09 09:36:41 +0000
+++ bzrlib/transport/sftp.py 2008-07-18 19:51:08 +0000
@@ -584,7 +584,8 @@
if (e.args == ('No such file or directory',) or
e.args == ('No such file',)):
raise NoSuchFile(path, str(e) + more_info)
- if (e.args == ('mkdir failed',)):
+ if (e.args == ('mkdir failed',) or
+ e.args[0].startswith('syserr: File exists')):
raise FileExists(path, str(e) + more_info)
# strange but true, for the paramiko server.
if (e.args == ('Failure',)):
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWVbPJ74AAZDfgABUWef//1sA
TAr/7//wUAOteaOm7dtIOgSkTQBBlPJieiNJ6gYgZGR6mjTQMpTGoeFHoTIaAAAAAAASmkFR5TbU
anqaaNBoaaBoAMhpoBzTEwAJgAmAAEwABMEkgmgNJhNTEmZBGJppiDIDJo5TLZWrj5pQ7hO8jBS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