util: use bytes re on bytes input in fspath
Fixes `hg add` on Python 3.
--- a/mercurial/util.py Sun Mar 19 00:16:08 2017 -0400
+++ b/mercurial/util.py Sun Mar 19 00:16:39 2017 -0400
@@ -1331,7 +1331,7 @@
seps = seps + pycompat.osaltsep
# Protect backslashes. This gets silly very quickly.
seps.replace('\\','\\\\')
- pattern = remod.compile(r'([^%s]+)|([%s]+)' % (seps, seps))
+ pattern = remod.compile(br'([^%s]+)|([%s]+)' % (seps, seps))
dir = os.path.normpath(root)
result = []
for part, sep in pattern.findall(name):