Comment 2 for bug 172383

Revision history for this message
John A Meinel (jameinel) wrote : Re: Cannot add NFD normalized Unicode file to repo

This removes the last of the internal normalization checks. We need to update the test suite to match.
But this will leave the filenames alone. Which means we will track them in whatever form they are on disk.
=== modified file 'bzrlib/dirstate.py'
--- bzrlib/dirstate.py 2007-11-15 01:07:51 +0000
+++ bzrlib/dirstate.py 2007-11-27 18:54:08 +0000
@@ -373,14 +373,6 @@
         #------- copied from inventory.ensure_normalized_name - keep synced.
         # --- normalized_filename wants a unicode basename only, so get one.
         dirname, basename = osutils.split(path)
- # we dont import normalized_filename directly because we want to be
- # able to change the implementation at runtime for tests.
- norm_name, can_access = osutils.normalized_filename(basename)
- if norm_name != basename:
- if can_access:
- basename = norm_name
- else:
- raise errors.InvalidNormalization(path)
         # you should never have files called . or ..; just add the directory
         # in the parent, or according to the special treatment for the root
         if basename == '.' or basename == '..':

=== modified file 'bzrlib/inventory.py'
--- bzrlib/inventory.py 2007-10-24 20:38:50 +0000
+++ bzrlib/inventory.py 2007-11-27 18:55:28 +0000
@@ -1367,7 +1367,6 @@

         This does not move the working file.
         """
- new_name = ensure_normalized_name(new_name)
         if not is_valid_name(new_name):
             raise BzrError("not an acceptable filename: %r" % new_name)

@@ -1412,7 +1411,6 @@
     """
     if file_id is None:
         file_id = generate_ids.gen_file_id(name)
- name = ensure_normalized_name(name)
     try:
         factory = entry_factory[kind]
     except KeyError:

This finishes up bug 165071 (making it official, rather than in the current semi-broken state.)