Activity log for bug #608096

Date Who What changed Old value New value Message
2010-07-21 08:34:43 Martin Packman bug added bug
2010-07-21 08:35:28 Martin Packman bzr: importance Undecided High
2010-07-21 08:35:28 Martin Packman bzr: status New Confirmed
2010-07-21 08:37:23 Martin Packman description In r5192 the transform code was changed from using os.rename to osutils.rename which boils down to no change on nix, but to _win32_rename to fancy_rename on windows. This made the following tests no longer pass on windows: bt.test_transform.TestFileMover.test_file_mover_rollback bt.test_transform.TestTreeTransform.test_rollback_on_directory_clash bt.test_transform.TestTreeTransform.test_two_directories_clash bt.test_transform.TestTreeTransform.test_two_directories_clash_finalize The new test added in r5228 also fails: bt.test_transform.TestTreeTransform.test_rename_fails The particular issue seems to be a difference in directory renaming. Given two directories, d1 and d2, rename(d1, d2) behaviour is as follows: On nix with os.rename: d1 replaces d2, unless d2 has contents, in which case ENOTEMPTY is raised On windows with os.rename EEXIST is raised On windows with osutils._win32_rename: d1 is renamed to a temp name, d1 is renamed d2, and os.unlink throws EACCES Need to never be using _win32_rename with directories, or teach it how to handle them. In r5192 the transform code was changed from using os.rename to osutils.rename which boils down to no change on nix, but to _win32_rename to fancy_rename on windows. This made the following tests no longer pass on windows: bt.test_transform.TestFileMover.test_file_mover_rollback bt.test_transform.TestTreeTransform.test_rollback_on_directory_clash bt.test_transform.TestTreeTransform.test_two_directories_clash bt.test_transform.TestTreeTransform.test_two_directories_clash_finalize The new test added in r5228 also fails: bt.test_transform.TestTreeTransform.test_rename_fails The particular issue seems to be a difference in directory renaming. Given two directories, d1 and d2, rename(d1, d2) behaviour is as follows: On nix with os.rename: d1 replaces d2, unless d2 has contents, in which case ENOTEMPTY is raised On windows with os.rename EEXIST is raised On windows with osutils._win32_rename: d2 is renamed to a temp name, d1 is renamed d2, and os.unlink throws EACCES Need to never be using _win32_rename with directories, or teach it how to handle them.
2010-07-21 10:23:23 Launchpad Janitor branch linked lp:~gz/bzr/2.2_transform_not_too_fancy_608096
2010-08-06 19:10:14 Martin Packman bzr: status Confirmed Fix Released
2010-08-06 19:10:14 Martin Packman bzr: milestone 2.2.0
2010-08-06 19:10:14 Martin Packman bzr: assignee Martin [gz] (gz)