changeset 31502:d1937bdcee8c

util: use pycompat.bytestr in checkwinfilename Fixes `hg add` on python3.
author Augie Fackler <augie@google.com>
date Sun, 19 Mar 2017 00:16:08 -0400
parents faf75a701aca
children 670166e0fcaa
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Sun Mar 19 00:22:04 2017 -0400
+++ b/mercurial/util.py	Sun Mar 19 00:16:08 2017 -0400
@@ -1177,7 +1177,7 @@
     for n in path.replace('\\', '/').split('/'):
         if not n:
             continue
-        for c in n:
+        for c in pycompat.bytestr(n):
             if c in _winreservedchars:
                 return _("filename contains '%s', which is reserved "
                          "on Windows") % c