--- a/mercurial/posix.py Fri Sep 15 19:43:32 2017 -0400
+++ b/mercurial/posix.py Fri Sep 15 19:44:05 2017 -0400
@@ -372,7 +372,7 @@
c = encoding.getutf8char(path, pos)
pos += len(c)
except ValueError:
- c = '%%%02X' % ord(path[pos])
+ c = '%%%02X' % ord(path[pos:pos + 1])
pos += 1
s += c