changeset 31503:670166e0fcaa

util: use bytes re on bytes input in fspath Fixes `hg add` on Python 3.
author Augie Fackler <augie@google.com>
date Sun, 19 Mar 2017 00:16:39 -0400
parents d1937bdcee8c
children a369482e9649
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: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):