# HG changeset patch # User Augie Fackler # Date 2017-03-19 04:16:08 # Node ID d1937bdcee8ca3745bedc8f24c578e5590e4718a # Parent faf75a701aca3c3456b4415dfe2e72f8d69b36ee util: use pycompat.bytestr in checkwinfilename Fixes `hg add` on python3. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1177,7 +1177,7 @@ def checkwinfilename(path): 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