changeset 36548:086fc71fbb09

py3: mark all string literals in test-command-template.t as bytes # skip-blame because just b'' prefixes
author Yuya Nishihara <yuya@tcha.org>
date Thu, 01 Mar 2018 17:43:25 -0500
parents 7840d8bd0558
children 3696efeab66f
files tests/revnamesext.py tests/test-command-template.t
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tests/revnamesext.py	Thu Mar 01 17:03:40 2018 -0500
+++ b/tests/revnamesext.py	Thu Mar 01 17:43:25 2018 -0500
@@ -7,12 +7,12 @@
 )
 
 def reposetup(ui, repo):
-    names = {'r%d' % rev: repo[rev].node() for rev in repo}
+    names = {b'r%d' % rev: repo[rev].node() for rev in repo}
     namemap = lambda r, name: names.get(name)
-    nodemap = lambda r, node: ['r%d' % repo[node].rev()]
+    nodemap = lambda r, node: [b'r%d' % repo[node].rev()]
 
-    ns = namespaces.namespace('revnames', templatename='revname',
-                              logname='revname',
+    ns = namespaces.namespace(b'revnames', templatename=b'revname',
+                              logname=b'revname',
                               listnames=lambda r: names.keys(),
                               namemap=namemap, nodemap=nodemap)
     repo.names.addnamespace(ns)
--- a/tests/test-command-template.t	Thu Mar 01 17:03:40 2018 -0500
+++ b/tests/test-command-template.t	Thu Mar 01 17:43:25 2018 -0500
@@ -4622,9 +4622,9 @@
   > 
   > templatefunc = registrar.templatefunc()
   > 
-  > @templatefunc('custom()')
+  > @templatefunc(b'custom()')
   > def custom(context, mapping, args):
-  >     return 'custom'
+  >     return b'custom'
   > EOF
   $ cat <<EOF > .hg/hgrc
   > [extensions]