[MERGE] Fix case-sensitivity detection

John Arbash Meinel john at arbash-meinel.com
Wed Nov 28 14:42:27 GMT 2007


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

Aaron Bentley wrote:

...

> Here's an updated patch.
> 
> I've removed the incorrect comments for test_apply_case_conflicts, and
> also added an additional pair of files ('dir/dirfile' and
> 'dir/dirFiLe'), to ensure that when files are created inside their
> containing directory, creating files with duplicate names doesn't cause
> conflicts.
> 
>> Also when you're comment on my previous attempt to introduce case
>> sensitiveness detection you said test for _detect_case_handling()
>> should be in workingtree_implementation group. But you're not
>> provide any test for it. Is it intended or you just forget about it?
> 
> I've now provided tests for WorkingTree.case_sensitive, which is the
> public API.  (presumably a tree could use some mechanism other than
> _detect_case_handling() to set it.)
> 
> I'm pretty confident these updated tests will pass on win32, but I don't
> have a machine handy to test with.  Could you please run them, Alexander?
> 
> Aaron

You seem to be testing that if TT sees 2 forms of a file then it will notice
that they have a case conflict (which is very good). But what about if the
filesystem already has one form, and TT is seeing another. Such as something like:

touch foo
bzr add foo
bzr commit -m 'foo'
bzr push /to/vfat/fs
touch Foo
bzr add Foo
bzr commit -m "Foo"
cd /to/vfat/fs
bzr pull $SOURCE

Is that already handled in TT because it is stat'ing the target and will see
that it already exists? I'm guessing there isn't any way to test this on
case-sensitive platforms.

Maybe if we monkey patch os.stat?

Otherwise I'm very happy to see this be merged.

BB:comment

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

iD8DBQFHTX5SJdeBCYSNAAMRAhACAJ4mthCxfLB56avT6Nc4u9u1Dfgs9QCfb1lr
ePKAXAXCT2dctg3pxDutuG0=
=heiY
-----END PGP SIGNATURE-----



More information about the bazaar mailing list