def normalize_name(name):
    """Some VCS print directory names with trailing slashes.  Strip them.

    Easiest is to normalize the path.

    And encodings may trip us up too, especially when comparing lists
    of files.  Plus maybe lowercase versus uppercase.
    """
    name = os.path.normpath(name)
    name = unicodify(name)
    if sys.platform == 'darwin':
        # Mac OSX may have problems comparing non-ascii filenames, so
        # we convert them.
        name = unicodedata.normalize('NFC', name)
    return name
def normalize_name ( name ) : name = os . path . normpath ( name ) name = unicodify ( name ) if sys . platform == 'darwin' : name = unicodedata . normalize ( 'NFC' , name ) return name
Some VCS print directory names with trailing slashes.  Strip them.

    Easiest is to normalize the path.

    And encodings may trip us up too, especially when comparing lists
    of files.  Plus maybe lowercase versus uppercase.