diff -r f99d64e8a4e4 -r f0b6fbea00cf mercurial/subrepoutil.py --- a/mercurial/subrepoutil.py Thu Mar 22 21:19:31 2018 +0900 +++ b/mercurial/subrepoutil.py Thu Mar 22 21:56:20 2018 +0900 @@ -21,6 +21,9 @@ phases, util, ) +from .utils import ( + stringutil, +) nullstate = ('', '', 'empty') @@ -74,7 +77,7 @@ for pattern, repl in p.items('subpaths'): # Turn r'C:\foo\bar' into r'C:\\foo\\bar' since re.sub # does a string decode. - repl = util.escapestr(repl) + repl = stringutil.escapestr(repl) # However, we still want to allow back references to go # through unharmed, so we turn r'\\1' into r'\1'. Again, # extra escapes are needed because re.sub string decodes.