[MERGE] Support FTP servers with non-atomic rename (bug #89436)

Alexander Belchenko bialix at ukr.net
Tue Apr 17 08:17:02 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley пишет:
> John Arbash Meinel wrote:
> 
>> FTPTransport.rename() should not be using 'fancy_rename'.
>> FTPTransport.move() should.
> 
> Here's an update that separates FtpTransport.rename from FtpTransport.move.
> 
> I have removed the fancy_rename changes because they're no longer
> necessary to fix the bug, but I still think they're a net improvement.
> Don't want to block unnecessarily.

Aaron, with your patch merged I have much more failing FTP tests on win32 than before.
Now I have 33 failed tests (60 total count).

Probably it's something related to testing FTP-server, I don't know.
But error all the time the same:

    Generic path error: '/a': : unable to rename to u'/tmp.a.1176788963.921000000.2928.8x8n8qgn91':
550 RNTO failed: [Error 2] )

Here's traceback:

Traceback (most recent call last):
  File "C:\Temp\selftest.win32\bzrlib\tests\test_transport_implementations.py", line 579, in test_append
    t.put_bytes('a', 'diff\ncontents for\na\n')
  File "C:\Temp\selftest.win32\bzrlib\transport\__init__.py", line 624, in put_bytes
    return self.put_file(relpath, StringIO(bytes), mode=mode)
  File "C:\Temp\selftest.win32\bzrlib\transport\ftp.py", line 321, in put_file
    self._rename_and_overwrite(tmp_abspath, abspath, f)
  File "C:\Temp\selftest.win32\bzrlib\transport\ftp.py", line 474, in _rename_and_overwrite
    unlink_func=lambda p: self._delete(p, f))
  File "C:\Temp\selftest.win32\bzrlib\osutils.py", line 200, in fancy_rename
    rename_func(new, tmp_name)
  File "C:\Temp\selftest.win32\bzrlib\transport\ftp.py", line 473, in <lambda>
    rename_func=lambda p1, p2: self._rename(p1, p2, f),
  File "C:\Temp\selftest.win32\bzrlib\transport\ftp.py", line 452, in _rename
    ': unable to rename to %r' % (abs_to))
  File "C:\Temp\selftest.win32\bzrlib\transport\ftp.py", line 179, in _translate_perm_error
    raise unknown_exc(path, extra=extra)
FtpPathError: Generic path error: '/a': : unable to rename to
u'/tmp.a.1176790929.500000000.1216.2ztpmbiyyl': 550 RNTO failed: [Error 2] )


I don't know is your patch is really fix the bug 89436 on win32,
but it provide a lot selftest errors on win32. It's bite me.

Can you fix this, please?

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJHRuzYr338mxwCURAt/3AJ9Q3L8tsxcfwhLtyT+lLuYYCoKrsgCbBVtE
kJv+m8CEJpuLnkdCAwhJXEc=
=0pwM
-----END PGP SIGNATURE-----



More information about the bazaar mailing list