[MERGE] Catch OSError 17 (file exists) in final phase of tree transform and show filename to user (#111758).

Aaron Bentley aaron.bentley at utoronto.ca
Sun Dec 2 03:09:50 GMT 2007


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

Alexander Belchenko wrote:
> Aaron Bentley пишет:
>> Aaron Bentley has voted abstain.
>> Status is now: Semi-approved
>> Comment:
>> See comments on list.
> 
> New version with 2 directories clash test. Aaron said this test needs polishing on Linux.

Here's a polished version that works on Linux as well.

Your original patch broke a test of FileMover, which I presume you
didn't notice because of all the other test failures on win32.  (But all
the tests in test_transform pass on win32.)

I don't think we really need test_case_insensitive_clash--
test_two_directories_clash does the same thing in a more general way.
But I don't object to keeping it.

No code that uses TreeTransform does wt.unlock() in a finally block.
Instead, they do tt.finalize in a finally block.  This is because
TreeTransform.apply will unlock if it succeeds, and
TreeTransform.finalize will not attempt to unlock a tree if it has
already been unlocked.

I have changed the finally to an except, because if I do
TreeTransform.finalize, we get an ImmortalLimbo exception.  I believe
there's a separate bug for that somewhere...

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHUiH+0F+nu1YWqI0RAu10AJ0d5m6BXGqN15pI0WEqoE7QpGQpvgCdHuw3
Y9X630c2JZlAYLfuynHuNDs=
=ILFX
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.111758-2.patch
Type: text/x-diff
Size: 9549 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071201/f8b067f2/attachment-0001.bin 


More information about the bazaar mailing list