Mercurial > hg > mercurial-crew
diff mercurial/util.py @ 14264:23cd7eeff678
util: rename _windows_reserved_filenames and _windows_reserved_chars
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sat, 07 May 2011 22:25:20 +0200 (2011-05-07) |
parents | 34ec9b313638 |
children | 4030630fb59c |
line wrap: on
line diff
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -445,10 +445,10 @@ return hardlink, num -_windows_reserved_filenames = '''con prn aux nul +_winreservednames = '''con prn aux nul com1 com2 com3 com4 com5 com6 com7 com8 com9 lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9'''.split() -_windows_reserved_chars = ':*?"<>|' +_winreservedchars = ':*?"<>|' def checkwinfilename(path): '''Check that the base-relative path is a valid filename on Windows. Returns None if the path is ok, or a UI string describing the problem. @@ -472,14 +472,14 @@ if not n: continue for c in n: - if c in _windows_reserved_chars: + if c in _winreservedchars: return _("filename contains '%s', which is reserved " "on Windows") % c if ord(c) <= 31: return _("filename contains %r, which is invalid " "on Windows") % c base = n.split('.')[0] - if base and base.lower() in _windows_reserved_filenames: + if base and base.lower() in _winreservednames: return _("filename contains '%s', which is reserved " "on Windows") % base t = n[-1]