[RFC] bug #111758: Bazaar does not indicate which file already exists with Error 17

John Arbash Meinel john at arbash-meinel.com
Mon Nov 26 18:49:18 GMT 2007


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

Aaron Bentley wrote:
> Alexander Belchenko wrote:
>> Probably you can help me with my question re bug #111758.
> 
>> I'm starting to write the test for this bug and eventually stumble
>> with my question.
> 
>> === modified file 'bzrlib/tests/test_transform.py'
>> --- bzrlib/tests/test_transform.py 23.11.2007 10:31:24
>> +++ bzrlib/tests/test_transform.py 26.11.2007 16:49:07
>> @@ -983,8 +983,21 @@
>>          self.callDeprecated([txt], change_entry, None, None, None,
>> None, None,
>>              None, None, None)
> 
>> +    def test_case_insensitive_clash(self):
>> +        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')
>> +                tt.apply()
> 
> This is a test for what happens when TT tries to create two files that
> are case-insensitively the same.  As I read it, bug 111758 is about
> errno 17, not case-insensitivity.  There are more ways to get error 17
> than just case-insensitivity.  Unicode normalization, for example.
> 
> If you're checking what happens when TT causes error 17, you should
> create two directories with the same name, and then run
> tt.apply(no_conflicts=True).  This will cause errno 17 on Linux, and
> presumably also on Windows & Mac.

I think you need to create a directory with something in it for it to fail on
all platforms.

I just tested on Linux:
python
>>> import os
>>> os.mkdir('a')
>>> os.mkdir('b')
>>> os.rename('a', 'b')

And it gave 0 errors, and there was only a 'b/' directory when it was done.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHSxUuJdeBCYSNAAMRAjQvAKCumjNl8SMK0iiAVbggIOYF3mCwXgCeKgjw
1sDrVUdj4eszYC1qjXylctQ=
=4YHX
-----END PGP SIGNATURE-----



More information about the bazaar mailing list