# HG changeset patch # User Yuya Nishihara # Date 1506507223 -32400 # Node ID 7508a7dc95c1a22a882f6cd05083ca469991edc8 # Parent f435097d13c9a5f34722ba7b4ceefa511c57cb96 py3: replace bytes[n] with slicing in checkwinfilename() diff -r f435097d13c9 -r 7508a7dc95c1 mercurial/util.py --- a/mercurial/util.py Wed Sep 27 19:11:28 2017 +0900 +++ b/mercurial/util.py Wed Sep 27 19:13:43 2017 +0900 @@ -1340,7 +1340,7 @@ if base and base.lower() in _winreservednames: return _("filename contains '%s', which is reserved " "on Windows") % base - t = n[-1] + t = n[-1:] if t in '. ' and n not in '..': return _("filename ends with '%s', which is not allowed " "on Windows") % t