/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Aaron Bentley
  • Date: 2008-02-24 16:42:13 UTC
  • mfrom: (3234 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: aaron@aaronbentley.com-20080224164213-eza1lzru5bwuwmmj
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
 
361
361
 
362
362
def _mac_getcwd():
363
 
    return unicodedata.normalize('NFKC', os.getcwdu())
 
363
    return unicodedata.normalize('NFC', os.getcwdu())
364
364
 
365
365
 
366
366
# Default is to just use the python builtins, but these can be rebound on
670
670
        tt = time.localtime(t)
671
671
        offset = local_time_offset(t)
672
672
    else:
673
 
        raise errors.BzrError("unsupported timezone format %r" % timezone,
674
 
                              ['options are "utc", "original", "local"'])
 
673
        raise errors.UnsupportedTimezoneFormat(timezone)
675
674
    if date_fmt is None:
676
675
        date_fmt = "%a %Y-%m-%d %H:%M:%S"
677
676
    if show_offset:
1022
1021
    On platforms where the system does not normalize filenames 
1023
1022
    (Windows, Linux), you have to access a file by its exact path.
1024
1023
 
1025
 
    Internally, bzr only supports NFC/NFKC normalization, since that is 
 
1024
    Internally, bzr only supports NFC normalization, since that is 
1026
1025
    the standard for XML documents.
1027
1026
 
1028
1027
    So return the normalized path, and a flag indicating if the file
1029
1028
    can be accessed by that path.
1030
1029
    """
1031
1030
 
1032
 
    return unicodedata.normalize('NFKC', unicode(path)), True
 
1031
    return unicodedata.normalize('NFC', unicode(path)), True
1033
1032
 
1034
1033
 
1035
1034
def _inaccessible_normalized_filename(path):
1036
1035
    __doc__ = _accessible_normalized_filename.__doc__
1037
1036
 
1038
 
    normalized = unicodedata.normalize('NFKC', unicode(path))
 
1037
    normalized = unicodedata.normalize('NFC', unicode(path))
1039
1038
    return normalized, normalized == path
1040
1039
 
1041
1040