[MERGE] OSX test suite passing (well as of 2008/09/08 :)
Aaron Bentley
aaron at aaronbentley.com
Mon Sep 8 18:25:21 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> @aaron: If you can at least review test_case_insensitive_clash
> changed into test_rollback_on_directory_clash, that will be
> great.
Okay, I rate it a tweak.
> aaron> Vincent Ladeuil wrote:
> >>>>>>> "aaron" == Aaron Bentley <aaron at aaronbentley.com> writes:
>
> >> Roughly speaking, in that test, we rely on _FileMover via
> >> TreeTransform to detect a name clash when the file system is case
> >> insensitive.
>
> aaron> Actually, that test is about making sure that if
> aaron> renaming a file fails during a TreeTransform, we roll
> aaron> back properly. It doesn't really have anything to do
> aaron> with case sensitivity. I should not have used
> aaron> CaseInsensitiveFilesystemFeature for this.
>
> <snip/>
>
> aaron> Well, what I really mean is changing the test so that
> aaron> it tries to rename a directory on top of another
> aaron> directory. I believe this causes failures on every
> aaron> platform.
>
> So I changed test_case_insensitive_clash into
> test_rollback_on_directory_clash.
>
> Does that fit ?
Yes, I think it's better to have a test that works everywhere.
> + def test_rollback_on_directory_clash(self):
> + wt = self.make_branch_and_tree('.')
> + wt.add
^^^ I think this is a no-op.
> def tt_helper():
> - wt = self.make_branch_and_tree('.')
> tt = TreeTransform(wt) # TreeTransform obtains write lock
> try:
> - tt.new_file('foo', tt.root, 'bar')
> - tt.new_file('Foo', tt.root, 'spam')
> + foo = tt.new_directory('foo', tt.root)
> + tt.new_file('bar', foo, 'foobar')
> + baz = tt.new_directory('baz', tt.root)
> + tt.new_file('qux', baz, 'quux')
> + # Ask for a rename 'foo' -> 'baz'
> + tt.adjust_path('baz', tt.root, foo)
> # Lie to tt that we've already resolved all conflicts.
> tt.apply(no_conflicts=True)
> except:
> wt.unlock()
> raise
> + # It will fail the renaming because the target directory is not empty
^^^ "The rename will fail..."
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIxWAB0F+nu1YWqI0RAnIUAJ9fBeXX9FQpO5RbpSecmOeO+3W0YQCfUnOX
hGosSu5dffngf0VwEtxtlws=
=1G2Y
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list