Rev 3609: Merge Christophe Troestler's fix for SFTP IO Error translation. in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/push-sftp

John Arbash Meinel john at arbash-meinel.com
Wed Aug 6 21:34:44 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/push-sftp

------------------------------------------------------------
revno: 3609
revision-id: john at arbash-meinel.com-20080806203424-6b9o4ijtzupf0bjd
parent: pqm at pqm.ubuntu.com-20080806085554-9e0l5crd6yv0kxy8
parent: christophe.troestler at umh.ac.be-20080718201920-lvt8l822l4v4qs4z
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: push-sftp
timestamp: Wed 2008-08-06 15:34:24 -0500
message:
  Merge Christophe Troestler's fix for SFTP IO Error translation.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 3565.4.2
    revision-id: christophe.troestler at umh.ac.be-20080718201920-lvt8l822l4v4qs4z
    parent: christophe.troestler at umh.ac.be-20080718195108-0kgfigpaqipeq71e
    committer: Christophe Troestler <Christophe.Troestler at umh.ac.be>
    branch nick: push-sftp
    timestamp: Fri 2008-07-18 22:19:20 +0200
    message:
      [Bug #123475] Added news entry.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3565.4.1
    revision-id: christophe.troestler at umh.ac.be-20080718195108-0kgfigpaqipeq71e
    parent: pqm at pqm.ubuntu.com-20080718100017-segv2csk7ux2xs9p
    committer: Christophe Troestler <Christophe.Troestler at umh.ac.be>
    branch nick: push-sftp
    timestamp: Fri 2008-07-18 21:51:08 +0200
    message:
      [Bug #123475] SFTPTransport._translate_io_exception: better detection
      of the `FileExists' case.
    modified:
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-08-06 08:23:43 +0000
+++ b/NEWS	2008-08-06 20:34:24 +0000
@@ -13,6 +13,9 @@
 
   BUG FIXES:
 
+    * sftp transport: added missing ``FileExists`` case to
+      ``_translate_io_exception`` (Christophe Troestler, #123475)
+
   API CHANGES:
 
   INTERNALS:

=== modified file 'bzrlib/transport/sftp.py'
--- a/bzrlib/transport/sftp.py	2008-07-09 09:36:41 +0000
+++ b/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',)):



More information about the bazaar-commits mailing list