mercurial/util.py
changeset 31495 d1937bdcee8c
parent 31485 cad95575dc46
child 31496 670166e0fcaa
equal deleted inserted replaced
31494:faf75a701aca 31495:d1937bdcee8c
  1175     if '\\/' in path:
  1175     if '\\/' in path:
  1176         return _("directory name ends with '\\', which is invalid on Windows")
  1176         return _("directory name ends with '\\', which is invalid on Windows")
  1177     for n in path.replace('\\', '/').split('/'):
  1177     for n in path.replace('\\', '/').split('/'):
  1178         if not n:
  1178         if not n:
  1179             continue
  1179             continue
  1180         for c in n:
  1180         for c in pycompat.bytestr(n):
  1181             if c in _winreservedchars:
  1181             if c in _winreservedchars:
  1182                 return _("filename contains '%s', which is reserved "
  1182                 return _("filename contains '%s', which is reserved "
  1183                          "on Windows") % c
  1183                          "on Windows") % c
  1184             if ord(c) <= 31:
  1184             if ord(c) <= 31:
  1185                 return _("filename contains %r, which is invalid "
  1185                 return _("filename contains %r, which is invalid "