[MERGE/RFC] case sensitivity on Windows
Ian Clatworthy
ian.clatworthy at internode.on.net
Tue Dec 30 05:18:48 GMT 2008
Mark Hammond wrote:
> I believe I've addressed every other comment in the attached patch.
Thanks for the improved implementation inside builtins.py. With changes
like this, I'm never quite sure we've got every spot necessary but it
certainly now feels (to me) like a safe step forward.
bb:tweak
> + * When working on a case-insensitive case-preserving file-systems, as
s/file-systems/file-system/
> -def internal_tree_files(file_list, default_branch=u'.'):
> +def internal_tree_files(file_list, default_branch=u'.', canonicalize=True):
> """Convert command-line paths to a WorkingTree and relative paths.
The new parameter needs to be mentioned in the docstring.
> +def safe_relpath_files(tree, file_list, canonicalize=True):
Ditto.
> + def _probe(self):
> + fileno, name = tempfile.mkstemp(prefix='MixedCase')
> + try:
> + # first check truly case-preserving for created files, then check
> + # case insensitive when opening existing files.
> + name = osutils.normpath(name)
> + base, rel = osutils.split(name)
> + found_rel = osutils.canonical_relpath(base, name)
> + return (found_rel==rel
s/==/ == / (PEP-8)
> + def test_canonical_path(self):
> + work_tree = self._make_canonical_test_tree()
> + self.assertEqual(work_tree.get_canonical_inventory_path('Dir/File'), 'dir/file')
> +
> + def test_canonical_path_before_commit(self):
> + work_tree = self._make_canonical_test_tree(False)
> + # note: not committed.
> + self.assertEqual(work_tree.get_canonical_inventory_path('Dir/File'), 'dir/file')
> +
4 of the tests you've added in this section, including the above 2,
have lines > 80 chars.
> +* `Bazaar and case-insensitive file systems <case-insensitive-file-systems.html>`_
> +|--| How Bazaar operates on case-insensitive file systems such as commonly
> +found on Windows, USB sticks, etc.
> +
Not quite - you need to indent lines 2 and 3 here by 2 spaces.
Currently, 'make docs' fails with a ReST error (which means PQM
won't merge this patch).
Ian C.
More information about the bazaar
mailing list