[MERGE] Fix case-sensitivity detection
Alexander Belchenko
bialix at ukr.net
Wed Nov 28 12:04:49 GMT 2007
Aaron Bentley пишет:
> Hi all,
>
> This patch enables TreeTransform to handle case-insensitive filesystems
> better. On those systems, it will treat names that only differ in case
> as duplicates. Therefore, it will subject them to the same conflict
> resolution as true duplicates get: renaming one of them to have a .moved
> extension. This applies to most (all?) bulk tree operations:
> build_tree, revert and merge.
>
> Case-sensitivity is determined by looking for a file named
> .bzr/checkout/FoRMaT. If it exists, the filesystem is presumed to be
> case-insensitive.
Thank you for carrying it on.
bb:tweak
+ def test_apply_case_conflict(self):
+ tree = self.make_branch_and_tree('tree')
+ # Don't try this at home, kids!
+ # Force the tree to report that it is case insensitive, for
conflict
+ # resolution tests
<-- it seems you forget to force insensitiveness here, as comment claims
I.e. the line is missed:
+ tree.case_sensitive = False
+ transform = TreeTransform(tree)
+ self.addCleanup(transform.finalize)
+ transform.new_file('file', transform.root, 'content')
+ transform.new_file('FiLe', transform.root, 'content')
+ resolve_conflicts(transform,
+ pass_func=lambda t, c: resolve_checkout(t, c,
[]))
+ transform.apply()
+ self.failUnlessExists('tree/file')
+ if not os.path.exists('tree/FiLe.moved'):
+ self.failUnlessExists('tree/FiLe')
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?
More information about the bazaar
mailing list