changeset 40955:e48fdeb08c77

py3: fix bad escapes of sub() replacement pattern in test-template-basic.t Python 3.7 starts complaining about it. We have to double the backslash or '\x5c' to get around.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 14 Dec 2018 21:19:19 +0900
parents db6cace18765
children 205c639ce27d
files tests/test-template-basic.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-template-basic.t	Thu Dec 13 17:10:03 2018 +0100
+++ b/tests/test-template-basic.t	Fri Dec 14 21:19:19 2018 +0900
@@ -860,7 +860,7 @@
   $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
   fourth\x5c\x786esecond\x5c\x786ethird
 
-  $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
+  $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\\x5c\\x786e", "\x5c\x5c\x786e"), desc)}\n'
   3:\x6eo user, \x6eo domai\x6e
   4:\x5c\x786eew bra\x5c\x786ech